diff --git a/.github/workflows/phpunit_on_pull_request.yml b/.github/workflows/phpunit_on_pull_request.yml
index fcca5610..e2670d3a 100644
--- a/.github/workflows/phpunit_on_pull_request.yml
+++ b/.github/workflows/phpunit_on_pull_request.yml
@@ -48,9 +48,13 @@ jobs:
if: steps.check_files.outputs.files_exists == 'true'
run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
+ - name: Update composer packages
+ if: steps.check_files.outputs.files_exists == 'true'
+ run: composer update
+
- name: Run PHPUnit
if: steps.check_files.outputs.files_exists == 'true'
- run: composer update && composer tests:unit
+ run: vendor/bin/phpunit tests/php/Unit/ --verbose
- name: Archive code coverage results
uses: actions/upload-artifact@v2
diff --git a/.gitignore b/.gitignore
index 19b7c6ec..0e617167 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,3 +2,6 @@
node_modules/
.DS_Store
.phpunit.result.cache
+
+# Configs
+/phpcs.xml
diff --git a/composer.json b/composer.json
index 720659d7..daa43523 100644
--- a/composer.json
+++ b/composer.json
@@ -1,67 +1,54 @@
{
- "name": "rtcamp/login-with-google",
- "description": "WordPress plugin to let users login with google.",
- "license": "GPL 2.0",
- "authors": [
- {
- "name": "rtCamp",
- "email": "contact@rtcamp.com",
- "homepage": "https://rtcamp.com/",
- "role": "Developer"
- },
- {
- "name": "Utkarsh Patel",
- "email": "itismeutkarsh@gmail.com"
- },
- {
- "name": "Paul Clark",
- "role": "Developer"
- },
- {
- "name": "Ankit Gade",
- "email": "ankit.gade@rtcamp.com",
- "homepage": "https://iamank.it/",
- "role": "Developer"
- }
- ],
- "minimum-stability": "dev",
- "prefer-stable": true,
- "require": {
- "php": ">=7.1",
- "pimple/pimple": "3.3.*"
- },
- "require-dev": {
- "squizlabs/php_codesniffer": "^3.7.1",
- "dealerdirect/phpcodesniffer-composer-installer": "^0.7.2",
- "wp-coding-standards/wpcs": "^2.3",
- "sirbrillig/phpcs-variable-analysis": "^v2.11.3",
- "automattic/vipwpcs": "^2.3.3",
- "phpcompatibility/phpcompatibility-wp": "^2.1.3",
- "phpunit/phpunit": "9.5",
- "10up/wp_mock": "0.4.2"
- },
- "config": {
- "allow-plugins": {
- "dealerdirect/phpcodesniffer-composer-installer": true
- }
- },
- "autoload": {
- "psr-4": {
- "RtCamp\\GoogleLogin\\": "src/"
- }
- },
- "autoload-dev": {
- "psr-4": {
- "RtCamp\\GoogleLogin\\Tests\\": "tests/php"
- }
- },
- "scripts": {
- "cs": "@php ./vendor/bin/phpcs",
- "cs:fix": "@php ./vendor/bin/phpcbf",
- "tests:unit": "@php ./vendor/bin/phpunit tests/php/Unit/",
- "qa": [
- "@cs",
- "@tests"
- ]
- }
+ "name": "rtcamp/login-with-google",
+ "description": "WordPress plugin to let users login with google.",
+ "license": "GPL-2.0-or-later",
+ "type": "wordpress-plugin",
+ "homepage": "https://github.com/rtCamp/login-with-google",
+ "require": {
+ "php": ">=7.1",
+ "pimple/pimple": "3.3.*"
+ },
+ "require-dev": {
+ "10up/wp_mock": "^0.4.2",
+ "automattic/vipwpcs": "^2.3",
+ "civicrm/composer-downloads-plugin": "^3.0",
+ "dealerdirect/phpcodesniffer-composer-installer": "^0.7.2",
+ "php-stubs/wordpress-stubs": "^6.0",
+ "phpcompatibility/phpcompatibility-wp": "^2.1",
+ "phpunit/phpunit": "^9.5",
+ "roave/security-advisories": "dev-latest",
+ "sirbrillig/phpcs-variable-analysis": "^2.11",
+ "wp-coding-standards/wpcs": "^2.3"
+ },
+ "minimum-stability": "dev",
+ "prefer-stable": true,
+ "autoload": {
+ "psr-4": {
+ "RtCamp\\GoogleLogin\\": "src/"
+ }
+ },
+ "autoload-dev": {
+ "psr-4": {
+ "RtCamp\\GoogleLogin\\Tests\\": "tests/php"
+ }
+ },
+ "config": {
+ "allow-plugins": {
+ "dealerdirect/phpcodesniffer-composer-installer": true,
+ "civicrm/composer-downloads-plugin": true
+ },
+ "sort-packages": true
+ },
+ "extra": {
+ "downloads": {
+ "phpstan": {
+ "path": "vendor/bin/phpstan",
+ "type": "phar",
+ "url": "https://github.com/phpstan/phpstan/releases/latest/download/phpstan.phar"
+ }
+ }
+ },
+ "scripts": {
+ "analyze": "if [ -z $TEST_SKIP_PHPSTAN ]; then phpstan --version; phpstan analyze --ansi --memory-limit=2G; fi"
+ }
}
diff --git a/composer.lock b/composer.lock
index 26277ea8..46d54de2 100644
--- a/composer.lock
+++ b/composer.lock
@@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
- "content-hash": "d2829135489b5b1e667b36f82f5acec2",
+ "content-hash": "c02cee376d9004646594ecd17e2bb462",
"packages": [
{
"name": "pimple/pimple",
@@ -54,6 +54,9 @@
"container",
"dependency injection"
],
+ "support": {
+ "source": "https://github.com/silexphp/Pimple/tree/v3.3.1"
+ },
"time": "2020-11-24T20:35:42+00:00"
},
{
@@ -98,6 +101,10 @@
"container-interop",
"psr"
],
+ "support": {
+ "issues": "https://github.com/php-fig/container/issues",
+ "source": "https://github.com/php-fig/container/tree/1.1.2"
+ },
"time": "2021-11-05T16:50:12+00:00"
}
],
@@ -141,6 +148,10 @@
"GPL-2.0-or-later"
],
"description": "A mocking library to take the pain out of unit testing for WordPress",
+ "support": {
+ "issues": "https://github.com/10up/wp_mock/issues",
+ "source": "https://github.com/10up/wp_mock/tree/master"
+ },
"time": "2019-03-16T03:44:39+00:00"
},
{
@@ -185,6 +196,10 @@
"runkit",
"testing"
],
+ "support": {
+ "issues": "https://github.com/antecedent/patchwork/issues",
+ "source": "https://github.com/antecedent/patchwork/tree/2.1.21"
+ },
"time": "2022-02-07T07:28:34+00:00"
},
{
@@ -232,8 +247,67 @@
"standards",
"wordpress"
],
+ "support": {
+ "issues": "https://github.com/Automattic/VIP-Coding-Standards/issues",
+ "source": "https://github.com/Automattic/VIP-Coding-Standards",
+ "wiki": "https://github.com/Automattic/VIP-Coding-Standards/wiki"
+ },
"time": "2021-09-29T16:20:23+00:00"
},
+ {
+ "name": "civicrm/composer-downloads-plugin",
+ "version": "v3.0.1",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/civicrm/composer-downloads-plugin.git",
+ "reference": "3aabb6d259a86158d01829fc2c62a2afb9618877"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/civicrm/composer-downloads-plugin/zipball/3aabb6d259a86158d01829fc2c62a2afb9618877",
+ "reference": "3aabb6d259a86158d01829fc2c62a2afb9618877",
+ "shasum": ""
+ },
+ "require": {
+ "composer-plugin-api": "^1.1 || ^2.0",
+ "php": ">=5.6",
+ "togos/gitignore": "~1.1.1"
+ },
+ "require-dev": {
+ "composer/composer": "~1.0 || ~2.0",
+ "friendsofphp/php-cs-fixer": "^2.3",
+ "phpunit/phpunit": "^5.7",
+ "totten/process-helper": "^1.0.1"
+ },
+ "type": "composer-plugin",
+ "extra": {
+ "class": "LastCall\\DownloadsPlugin\\Plugin"
+ },
+ "autoload": {
+ "psr-4": {
+ "LastCall\\DownloadsPlugin\\": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Rob Bayliss",
+ "email": "rob@lastcallmedia.com"
+ },
+ {
+ "name": "Tim Otten",
+ "email": "totten@civicrm.org"
+ }
+ ],
+ "description": "Composer plugin for downloading additional files within any composer package.",
+ "support": {
+ "source": "https://github.com/civicrm/composer-downloads-plugin/tree/v3.0.1"
+ },
+ "time": "2020-11-02T05:26:23+00:00"
+ },
{
"name": "dealerdirect/phpcodesniffer-composer-installer",
"version": "v0.7.2",
@@ -303,34 +377,38 @@
"stylecheck",
"tests"
],
+ "support": {
+ "issues": "https://github.com/dealerdirect/phpcodesniffer-composer-installer/issues",
+ "source": "https://github.com/dealerdirect/phpcodesniffer-composer-installer"
+ },
"time": "2022-02-04T12:51:07+00:00"
},
{
"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": {
@@ -355,6 +433,10 @@
"constructor",
"instantiate"
],
+ "support": {
+ "issues": "https://github.com/doctrine/instantiator/issues",
+ "source": "https://github.com/doctrine/instantiator/tree/1.5.0"
+ },
"funding": [
{
"url": "https://www.doctrine-project.org/sponsorship.html",
@@ -369,7 +451,7 @@
"type": "tidelift"
}
],
- "time": "2022-03-03T08:28:38+00:00"
+ "time": "2022-12-30T00:15:36+00:00"
},
{
"name": "hamcrest/hamcrest-php",
@@ -416,20 +498,24 @@
"keywords": [
"test"
],
+ "support": {
+ "issues": "https://github.com/hamcrest/hamcrest-php/issues",
+ "source": "https://github.com/hamcrest/hamcrest-php/tree/v2.0.1"
+ },
"time": "2020-07-09T08:09:16+00:00"
},
{
"name": "mockery/mockery",
- "version": "1.5.0",
+ "version": "1.5.1",
"source": {
"type": "git",
"url": "https://github.com/mockery/mockery.git",
- "reference": "c10a5f6e06fc2470ab1822fa13fa2a7380f8fbac"
+ "reference": "e92dcc83d5a51851baf5f5591d32cb2b16e3684e"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/mockery/mockery/zipball/c10a5f6e06fc2470ab1822fa13fa2a7380f8fbac",
- "reference": "c10a5f6e06fc2470ab1822fa13fa2a7380f8fbac",
+ "url": "https://api.github.com/repos/mockery/mockery/zipball/e92dcc83d5a51851baf5f5591d32cb2b16e3684e",
+ "reference": "e92dcc83d5a51851baf5f5591d32cb2b16e3684e",
"shasum": ""
},
"require": {
@@ -484,7 +570,11 @@
"test double",
"testing"
],
- "time": "2022-01-20T13:18:17+00:00"
+ "support": {
+ "issues": "https://github.com/mockery/mockery/issues",
+ "source": "https://github.com/mockery/mockery/tree/1.5.1"
+ },
+ "time": "2022-09-07T15:32:08+00:00"
},
{
"name": "myclabs/deep-copy",
@@ -533,6 +623,10 @@
"object",
"object graph"
],
+ "support": {
+ "issues": "https://github.com/myclabs/DeepCopy/issues",
+ "source": "https://github.com/myclabs/DeepCopy/tree/1.11.0"
+ },
"funding": [
{
"url": "https://tidelift.com/funding/github/packagist/myclabs/deep-copy",
@@ -543,16 +637,16 @@
},
{
"name": "nikic/php-parser",
- "version": "v4.14.0",
+ "version": "v4.15.3",
"source": {
"type": "git",
"url": "https://github.com/nikic/PHP-Parser.git",
- "reference": "34bea19b6e03d8153165d8f30bba4c3be86184c1"
+ "reference": "570e980a201d8ed0236b0a62ddf2c9cbb2034039"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/34bea19b6e03d8153165d8f30bba4c3be86184c1",
- "reference": "34bea19b6e03d8153165d8f30bba4c3be86184c1",
+ "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/570e980a201d8ed0236b0a62ddf2c9cbb2034039",
+ "reference": "570e980a201d8ed0236b0a62ddf2c9cbb2034039",
"shasum": ""
},
"require": {
@@ -591,7 +685,11 @@
"parser",
"php"
],
- "time": "2022-05-31T20:59:12+00:00"
+ "support": {
+ "issues": "https://github.com/nikic/PHP-Parser/issues",
+ "source": "https://github.com/nikic/PHP-Parser/tree/v4.15.3"
+ },
+ "time": "2023-01-16T22:05:37+00:00"
},
{
"name": "phar-io/manifest",
@@ -647,6 +745,10 @@
}
],
"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"
+ },
"time": "2021-07-20T11:28:43+00:00"
},
{
@@ -694,8 +796,56 @@
}
],
"description": "Library for handling version information and constraints",
+ "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"
},
+ {
+ "name": "php-stubs/wordpress-stubs",
+ "version": "v6.1.1",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/php-stubs/wordpress-stubs.git",
+ "reference": "601c429ba8d91ef50a2a1bec05a7cd38b88064ff"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/php-stubs/wordpress-stubs/zipball/601c429ba8d91ef50a2a1bec05a7cd38b88064ff",
+ "reference": "601c429ba8d91ef50a2a1bec05a7cd38b88064ff",
+ "shasum": ""
+ },
+ "require-dev": {
+ "nikic/php-parser": "< 4.12.0",
+ "php": "~7.3 || ~8.0",
+ "php-stubs/generator": "^0.8.3",
+ "phpdocumentor/reflection-docblock": "^5.3",
+ "phpstan/phpstan": "^1.2"
+ },
+ "suggest": {
+ "paragonie/sodium_compat": "Pure PHP implementation of libsodium",
+ "symfony/polyfill-php73": "Symfony polyfill backporting some PHP 7.3+ features to lower PHP versions",
+ "szepeviktor/phpstan-wordpress": "WordPress extensions for PHPStan"
+ },
+ "type": "library",
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "description": "WordPress function and class declaration stubs for static analysis.",
+ "homepage": "https://github.com/php-stubs/wordpress-stubs",
+ "keywords": [
+ "PHPStan",
+ "static analysis",
+ "wordpress"
+ ],
+ "support": {
+ "issues": "https://github.com/php-stubs/wordpress-stubs/issues",
+ "source": "https://github.com/php-stubs/wordpress-stubs/tree/v6.1.1"
+ },
+ "time": "2023-02-09T11:10:35+00:00"
+ },
{
"name": "phpcompatibility/php-compatibility",
"version": "9.3.5",
@@ -752,20 +902,24 @@
"phpcs",
"standards"
],
+ "support": {
+ "issues": "https://github.com/PHPCompatibility/PHPCompatibility/issues",
+ "source": "https://github.com/PHPCompatibility/PHPCompatibility"
+ },
"time": "2019-12-27T09:44:58+00:00"
},
{
"name": "phpcompatibility/phpcompatibility-paragonie",
- "version": "1.3.1",
+ "version": "1.3.2",
"source": {
"type": "git",
"url": "https://github.com/PHPCompatibility/PHPCompatibilityParagonie.git",
- "reference": "ddabec839cc003651f2ce695c938686d1086cf43"
+ "reference": "bba5a9dfec7fcfbd679cfaf611d86b4d3759da26"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/PHPCompatibility/PHPCompatibilityParagonie/zipball/ddabec839cc003651f2ce695c938686d1086cf43",
- "reference": "ddabec839cc003651f2ce695c938686d1086cf43",
+ "url": "https://api.github.com/repos/PHPCompatibility/PHPCompatibilityParagonie/zipball/bba5a9dfec7fcfbd679cfaf611d86b4d3759da26",
+ "reference": "bba5a9dfec7fcfbd679cfaf611d86b4d3759da26",
"shasum": ""
},
"require": {
@@ -802,22 +956,27 @@
"paragonie",
"phpcs",
"polyfill",
- "standards"
+ "standards",
+ "static analysis"
],
- "time": "2021-02-15T10:24:51+00:00"
+ "support": {
+ "issues": "https://github.com/PHPCompatibility/PHPCompatibilityParagonie/issues",
+ "source": "https://github.com/PHPCompatibility/PHPCompatibilityParagonie"
+ },
+ "time": "2022-10-25T01:46:02+00:00"
},
{
"name": "phpcompatibility/phpcompatibility-wp",
- "version": "2.1.3",
+ "version": "2.1.4",
"source": {
"type": "git",
"url": "https://github.com/PHPCompatibility/PHPCompatibilityWP.git",
- "reference": "d55de55f88697b9cdb94bccf04f14eb3b11cf308"
+ "reference": "b6c1e3ee1c35de6c41a511d5eb9bd03e447480a5"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/PHPCompatibility/PHPCompatibilityWP/zipball/d55de55f88697b9cdb94bccf04f14eb3b11cf308",
- "reference": "d55de55f88697b9cdb94bccf04f14eb3b11cf308",
+ "url": "https://api.github.com/repos/PHPCompatibility/PHPCompatibilityWP/zipball/b6c1e3ee1c35de6c41a511d5eb9bd03e447480a5",
+ "reference": "b6c1e3ee1c35de6c41a511d5eb9bd03e447480a5",
"shasum": ""
},
"require": {
@@ -852,240 +1011,34 @@
"compatibility",
"phpcs",
"standards",
+ "static analysis",
"wordpress"
],
- "time": "2021-12-30T16:37:40+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/"
- }
+ "support": {
+ "issues": "https://github.com/PHPCompatibility/PHPCompatibilityWP/issues",
+ "source": "https://github.com/PHPCompatibility/PHPCompatibilityWP"
},
- "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"
- ],
- "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.",
- "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",
- "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"
- ],
- "time": "2021-12-08T12:19:24+00:00"
+ "time": "2022-10-24T09:00:36+00:00"
},
{
"name": "phpunit/php-code-coverage",
- "version": "9.2.15",
+ "version": "9.2.24",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/php-code-coverage.git",
- "reference": "2e9da11878c4202f97915c1cb4bb1ca318a63f5f"
+ "reference": "2cf940ebc6355a9d430462811b5aaa308b174bed"
},
"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/2cf940ebc6355a9d430462811b5aaa308b174bed",
+ "reference": "2cf940ebc6355a9d430462811b5aaa308b174bed",
"shasum": ""
},
"require": {
"ext-dom": "*",
"ext-libxml": "*",
"ext-xmlwriter": "*",
- "nikic/php-parser": "^4.13.0",
+ "nikic/php-parser": "^4.14",
"php": ">=7.3",
"phpunit/php-file-iterator": "^3.0.3",
"phpunit/php-text-template": "^2.0.2",
@@ -1132,13 +1085,17 @@
"testing",
"xunit"
],
+ "support": {
+ "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues",
+ "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.24"
+ },
"funding": [
{
"url": "https://github.com/sebastianbergmann",
"type": "github"
}
],
- "time": "2022-03-07T09:28:20+00:00"
+ "time": "2023-01-26T08:26:55+00:00"
},
{
"name": "phpunit/php-file-iterator",
@@ -1188,6 +1145,10 @@
"filesystem",
"iterator"
],
+ "support": {
+ "issues": "https://github.com/sebastianbergmann/php-file-iterator/issues",
+ "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/3.0.6"
+ },
"funding": [
{
"url": "https://github.com/sebastianbergmann",
@@ -1247,6 +1208,10 @@
"keywords": [
"process"
],
+ "support": {
+ "issues": "https://github.com/sebastianbergmann/php-invoker/issues",
+ "source": "https://github.com/sebastianbergmann/php-invoker/tree/3.1.1"
+ },
"funding": [
{
"url": "https://github.com/sebastianbergmann",
@@ -1302,6 +1267,10 @@
"keywords": [
"template"
],
+ "support": {
+ "issues": "https://github.com/sebastianbergmann/php-text-template/issues",
+ "source": "https://github.com/sebastianbergmann/php-text-template/tree/2.0.4"
+ },
"funding": [
{
"url": "https://github.com/sebastianbergmann",
@@ -1357,6 +1326,10 @@
"keywords": [
"timer"
],
+ "support": {
+ "issues": "https://github.com/sebastianbergmann/php-timer/issues",
+ "source": "https://github.com/sebastianbergmann/php-timer/tree/5.0.3"
+ },
"funding": [
{
"url": "https://github.com/sebastianbergmann",
@@ -1367,20 +1340,20 @@
},
{
"name": "phpunit/phpunit",
- "version": "9.5.0",
+ "version": "9.6.3",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/phpunit.git",
- "reference": "8e16c225d57c3d6808014df6b1dd7598d0a5bbbe"
+ "reference": "e7b1615e3e887d6c719121c6d4a44b0ab9645555"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/8e16c225d57c3d6808014df6b1dd7598d0a5bbbe",
- "reference": "8e16c225d57c3d6808014df6b1dd7598d0a5bbbe",
+ "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/e7b1615e3e887d6c719121c6d4a44b0ab9645555",
+ "reference": "e7b1615e3e887d6c719121c6d4a44b0ab9645555",
"shasum": ""
},
"require": {
- "doctrine/instantiator": "^1.3.1",
+ "doctrine/instantiator": "^1.3.1 || ^2",
"ext-dom": "*",
"ext-json": "*",
"ext-libxml": "*",
@@ -1388,31 +1361,26 @@
"ext-xml": "*",
"ext-xmlwriter": "*",
"myclabs/deep-copy": "^1.10.1",
- "phar-io/manifest": "^2.0.1",
+ "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.3",
+ "phpunit/php-code-coverage": "^9.2.13",
"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": "^2.3",
+ "sebastian/type": "^3.2",
"sebastian/version": "^3.0.2"
},
- "require-dev": {
- "ext-pdo": "*",
- "phpspec/prophecy-phpunit": "^2.0.1"
- },
"suggest": {
"ext-soap": "*",
"ext-xdebug": "*"
@@ -1423,7 +1391,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "9.5-dev"
+ "dev-master": "9.6-dev"
}
},
"autoload": {
@@ -1452,17 +1420,602 @@
"testing",
"xunit"
],
+ "support": {
+ "issues": "https://github.com/sebastianbergmann/phpunit/issues",
+ "source": "https://github.com/sebastianbergmann/phpunit/tree/9.6.3"
+ },
"funding": [
{
- "url": "https://phpunit.de/donate.html",
+ "url": "https://phpunit.de/sponsors.html",
"type": "custom"
},
{
"url": "https://github.com/sebastianbergmann",
"type": "github"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/phpunit/phpunit",
+ "type": "tidelift"
+ }
+ ],
+ "time": "2023-02-04T13:37:15+00:00"
+ },
+ {
+ "name": "roave/security-advisories",
+ "version": "dev-latest",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/Roave/SecurityAdvisories.git",
+ "reference": "72ca3d8b529b6679ccbefcdc1433fa6aeb7564b8"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/Roave/SecurityAdvisories/zipball/72ca3d8b529b6679ccbefcdc1433fa6aeb7564b8",
+ "reference": "72ca3d8b529b6679ccbefcdc1433fa6aeb7564b8",
+ "shasum": ""
+ },
+ "conflict": {
+ "3f/pygmentize": "<1.2",
+ "admidio/admidio": "<4.1.9",
+ "adodb/adodb-php": "<=5.20.20|>=5.21,<=5.21.3",
+ "aheinze/cockpit": "<=2.2.1",
+ "akaunting/akaunting": "<2.1.13",
+ "akeneo/pim-community-dev": "<5.0.119|>=6,<6.0.53",
+ "alextselegidis/easyappointments": "<=1.4.3",
+ "alterphp/easyadmin-extension-bundle": ">=1.2,<1.2.11|>=1.3,<1.3.1",
+ "amazing/media2click": ">=1,<1.3.3",
+ "amphp/artax": "<1.0.6|>=2,<2.0.6",
+ "amphp/http": "<1.0.1",
+ "amphp/http-client": ">=4,<4.4",
+ "anchorcms/anchor-cms": "<=0.12.7",
+ "andreapollastri/cipi": "<=3.1.15",
+ "apereo/phpcas": "<1.6",
+ "api-platform/core": ">=2.2,<2.2.10|>=2.3,<2.3.6",
+ "appwrite/server-ce": "<0.11.1|>=0.12,<0.12.2",
+ "arc/web": "<3",
+ "area17/twill": "<1.2.5|>=2,<2.5.3",
+ "asymmetricrypt/asymmetricrypt": ">=0,<9.9.99",
+ "automad/automad": "<1.8",
+ "awesome-support/awesome-support": "<=6.0.7",
+ "aws/aws-sdk-php": ">=3,<3.2.1",
+ "backdrop/backdrop": "<=1.23",
+ "badaso/core": "<2.7",
+ "bagisto/bagisto": "<0.1.5",
+ "barrelstrength/sprout-base-email": "<1.2.7",
+ "barrelstrength/sprout-forms": "<3.9",
+ "barryvdh/laravel-translation-manager": "<0.6.2",
+ "barzahlen/barzahlen-php": "<2.0.1",
+ "baserproject/basercms": "<4.7.2",
+ "bassjobsen/bootstrap-3-typeahead": ">4.0.2",
+ "billz/raspap-webgui": "<=2.6.6",
+ "bk2k/bootstrap-package": ">=7.1,<7.1.2|>=8,<8.0.8|>=9,<9.0.4|>=9.1,<9.1.3|>=10,<10.0.10|>=11,<11.0.3",
+ "bmarshall511/wordpress_zero_spam": "<5.2.13",
+ "bolt/bolt": "<3.7.2",
+ "bolt/core": "<=4.2",
+ "bottelet/flarepoint": "<2.2.1",
+ "brightlocal/phpwhois": "<=4.2.5",
+ "brotkrueml/codehighlight": "<2.7",
+ "brotkrueml/schema": "<1.13.1|>=2,<2.5.1",
+ "brotkrueml/typo3-matomo-integration": "<1.3.2",
+ "buddypress/buddypress": "<7.2.1",
+ "bugsnag/bugsnag-laravel": ">=2,<2.0.2",
+ "bytefury/crater": "<6.0.2",
+ "cachethq/cachet": "<2.5.1",
+ "cakephp/cakephp": "<3.10.3|>=4,<4.0.10|>=4.2,<4.2.12|>=4.3,<4.3.11|>=4.4,<4.4.10|= 1.3.7|>=4.1,<4.1.4",
+ "cakephp/database": ">=4.2,<4.2.12|>=4.3,<4.3.11|>=4.4,<4.4.10",
+ "cardgate/magento2": "<2.0.33",
+ "cart2quote/module-quotation": ">=4.1.6,<=4.4.5|>=5,<5.4.4",
+ "cartalyst/sentry": "<=2.1.6",
+ "catfan/medoo": "<1.7.5",
+ "centreon/centreon": "<22.10-beta.1",
+ "cesnet/simplesamlphp-module-proxystatistics": "<3.1",
+ "cockpit-hq/cockpit": "<2.3.9",
+ "codeception/codeception": "<3.1.3|>=4,<4.1.22",
+ "codeigniter/framework": "<=3.0.6",
+ "codeigniter4/framework": "<4.2.11",
+ "codeigniter4/shield": "= 1.0.0-beta",
+ "codiad/codiad": "<=2.8.4",
+ "composer/composer": "<1.10.26|>=2-alpha.1,<2.2.12|>=2.3,<2.3.5",
+ "concrete5/concrete5": "<=9.1.3|>= 9.0.0RC1, < 9.1.3",
+ "concrete5/core": "<8.5.8|>=9,<9.1",
+ "contao-components/mediaelement": ">=2.14.2,<2.21.1",
+ "contao/contao": ">=4,<4.4.56|>=4.5,<4.9.18|>=4.10,<4.11.7|>=4.13,<4.13.3",
+ "contao/core": ">=2,<3.5.39",
+ "contao/core-bundle": "<4.9.18|>=4.10,<4.11.7|>=4.13,<4.13.3|= 4.10.0",
+ "contao/listing-bundle": ">=4,<4.4.8",
+ "contao/managed-edition": "<=1.5",
+ "craftcms/cms": "<3.7.55.2|>= 4.0.0-RC1, < 4.2.1",
+ "croogo/croogo": "<3.0.7",
+ "cuyz/valinor": "<0.12",
+ "czproject/git-php": "<4.0.3",
+ "darylldoyle/safe-svg": "<1.9.10",
+ "datadog/dd-trace": ">=0.30,<0.30.2",
+ "david-garcia/phpwhois": "<=4.3.1",
+ "dbrisinajumi/d2files": "<1",
+ "derhansen/fe_change_pwd": "<2.0.5|>=3,<3.0.3",
+ "derhansen/sf_event_mgt": "<4.3.1|>=5,<5.1.1",
+ "directmailteam/direct-mail": "<5.2.4",
+ "doctrine/annotations": ">=1,<1.2.7",
+ "doctrine/cache": ">=1,<1.3.2|>=1.4,<1.4.2",
+ "doctrine/common": ">=2,<2.4.3|>=2.5,<2.5.1",
+ "doctrine/dbal": ">=2,<2.0.8|>=2.1,<2.1.2|>=3,<3.1.4",
+ "doctrine/doctrine-bundle": "<1.5.2",
+ "doctrine/doctrine-module": "<=0.7.1",
+ "doctrine/mongodb-odm": ">=1,<1.0.2",
+ "doctrine/mongodb-odm-bundle": ">=2,<3.0.1",
+ "doctrine/orm": ">=2,<2.4.8|>=2.5,<2.5.1|>=2.8.3,<2.8.4",
+ "dolibarr/dolibarr": "<16|>=16.0.1,<16.0.3|= 12.0.5|>= 3.3.beta1, < 13.0.2",
+ "dompdf/dompdf": "<2.0.2|= 2.0.2",
+ "drupal/core": ">=7,<7.91|>=8,<9.3.19|>=9.4,<9.4.3",
+ "drupal/drupal": ">=7,<7.80|>=8,<8.9.16|>=9,<9.1.12|>=9.2,<9.2.4",
+ "dweeves/magmi": "<=0.7.24",
+ "ecodev/newsletter": "<=4",
+ "ectouch/ectouch": "<=2.7.2",
+ "elefant/cms": "<1.3.13",
+ "elgg/elgg": "<3.3.24|>=4,<4.0.5",
+ "endroid/qr-code-bundle": "<3.4.2",
+ "enshrined/svg-sanitize": "<0.15",
+ "erusev/parsedown": "<1.7.2",
+ "ether/logs": "<3.0.4",
+ "exceedone/exment": "<4.4.3|>=5,<5.0.3",
+ "exceedone/laravel-admin": "= 3.0.0|<2.2.3",
+ "ezsystems/demobundle": ">=5.4,<5.4.6.1",
+ "ezsystems/ez-support-tools": ">=2.2,<2.2.3",
+ "ezsystems/ezdemo-ls-extension": ">=5.4,<5.4.2.1",
+ "ezsystems/ezfind-ls": ">=5.3,<5.3.6.1|>=5.4,<5.4.11.1|>=2017.12,<2017.12.0.1",
+ "ezsystems/ezplatform": "<=1.13.6|>=2,<=2.5.24",
+ "ezsystems/ezplatform-admin-ui": ">=1.3,<1.3.5|>=1.4,<1.4.6|>=1.5,<1.5.29|>=2.3,<2.3.26",
+ "ezsystems/ezplatform-admin-ui-assets": ">=4,<4.2.1|>=5,<5.0.1|>=5.1,<5.1.1",
+ "ezsystems/ezplatform-graphql": ">=1-rc.1,<1.0.13|>=2-beta.1,<2.3.12",
+ "ezsystems/ezplatform-kernel": "<=1.2.5|>=1.3,<1.3.26",
+ "ezsystems/ezplatform-rest": ">=1.2,<=1.2.2|>=1.3,<1.3.8",
+ "ezsystems/ezplatform-richtext": ">=2.3,<=2.3.7",
+ "ezsystems/ezplatform-user": ">=1,<1.0.1",
+ "ezsystems/ezpublish-kernel": "<=6.13.8.1|>=7,<7.5.30",
+ "ezsystems/ezpublish-legacy": "<=2017.12.7.3|>=2018.6,<=2019.3.5.1",
+ "ezsystems/platform-ui-assets-bundle": ">=4.2,<4.2.3",
+ "ezsystems/repository-forms": ">=2.3,<2.3.2.1|>=2.5,<2.5.15",
+ "ezyang/htmlpurifier": "<4.1.1",
+ "facade/ignition": "<1.16.15|>=2,<2.4.2|>=2.5,<2.5.2",
+ "facturascripts/facturascripts": "<=2022.8",
+ "feehi/cms": "<=2.1.1",
+ "feehi/feehicms": "<=2.1.1",
+ "fenom/fenom": "<=2.12.1",
+ "filegator/filegator": "<7.8",
+ "firebase/php-jwt": "<2",
+ "fixpunkt/fp-masterquiz": "<2.2.1|>=3,<3.5.2",
+ "fixpunkt/fp-newsletter": "<1.1.1|>=2,<2.1.2|>=2.2,<3.2.6",
+ "flarum/core": "<1.6.3",
+ "flarum/mentions": "<1.6.3",
+ "flarum/sticky": ">=0.1-beta.14,<=0.1-beta.15",
+ "flarum/tags": "<=0.1-beta.13",
+ "fluidtypo3/vhs": "<5.1.1",
+ "fof/byobu": ">=0.3-beta.2,<1.1.7",
+ "fof/upload": "<1.2.3",
+ "fooman/tcpdf": "<6.2.22",
+ "forkcms/forkcms": "<5.11.1",
+ "fossar/tcpdf-parser": "<6.2.22",
+ "francoisjacquet/rosariosis": "<10.1",
+ "friendsofsymfony/oauth2-php": "<1.3",
+ "friendsofsymfony/rest-bundle": ">=1.2,<1.2.2",
+ "friendsofsymfony/user-bundle": ">=1.2,<1.3.5",
+ "friendsoftypo3/mediace": ">=7.6.2,<7.6.5",
+ "froala/wysiwyg-editor": "<3.2.7",
+ "froxlor/froxlor": "<2.0.10",
+ "fuel/core": "<1.8.1",
+ "gaoming13/wechat-php-sdk": "<=1.10.2",
+ "genix/cms": "<=1.1.11",
+ "getgrav/grav": "<1.7.34",
+ "getkirby/cms": "= 3.8.0|<3.5.8.2|>=3.6,<3.6.6.2|>=3.7,<3.7.5.1",
+ "getkirby/panel": "<2.5.14",
+ "getkirby/starterkit": "<=3.7.0.2",
+ "gilacms/gila": "<=1.11.4",
+ "globalpayments/php-sdk": "<2",
+ "google/protobuf": "<3.15",
+ "gos/web-socket-bundle": "<1.10.4|>=2,<2.6.1|>=3,<3.3",
+ "gree/jose": "<=2.2",
+ "gregwar/rst": "<1.0.3",
+ "grumpydictator/firefly-iii": "<5.8",
+ "guzzlehttp/guzzle": "<6.5.8|>=7,<7.4.5",
+ "guzzlehttp/psr7": "<1.8.4|>=2,<2.1.1",
+ "harvesthq/chosen": "<1.8.7",
+ "helloxz/imgurl": "= 2.31|<=2.31",
+ "hillelcoren/invoice-ninja": "<5.3.35",
+ "himiklab/yii2-jqgrid-widget": "<1.0.8",
+ "hjue/justwriting": "<=1",
+ "hov/jobfair": "<1.0.13|>=2,<2.0.2",
+ "hyn/multi-tenant": ">=5.6,<5.7.2",
+ "ibexa/admin-ui": ">=4.2,<4.2.3",
+ "ibexa/core": ">=4,<4.0.7|>=4.1,<4.1.4|>=4.2,<4.2.3",
+ "ibexa/graphql": ">=2.5,<2.5.31|>=3.3,<3.3.28|>=4.2,<4.2.3",
+ "ibexa/post-install": "<=1.0.4",
+ "icecoder/icecoder": "<=8.1",
+ "idno/known": "<=1.3.1",
+ "illuminate/auth": ">=4,<4.0.99|>=4.1,<=4.1.31|>=4.2,<=4.2.22|>=5,<=5.0.35|>=5.1,<=5.1.46|>=5.2,<=5.2.45|>=5.3,<=5.3.31|>=5.4,<=5.4.36|>=5.5,<5.5.10",
+ "illuminate/cookie": ">=4,<=4.0.11|>=4.1,<=4.1.99999|>=4.2,<=4.2.99999|>=5,<=5.0.99999|>=5.1,<=5.1.99999|>=5.2,<=5.2.99999|>=5.3,<=5.3.99999|>=5.4,<=5.4.99999|>=5.5,<=5.5.49|>=5.6,<=5.6.99999|>=5.7,<=5.7.99999|>=5.8,<=5.8.99999|>=6,<6.18.31|>=7,<7.22.4",
+ "illuminate/database": "<6.20.26|>=7,<7.30.5|>=8,<8.40",
+ "illuminate/encryption": ">=4,<=4.0.11|>=4.1,<=4.1.31|>=4.2,<=4.2.22|>=5,<=5.0.35|>=5.1,<=5.1.46|>=5.2,<=5.2.45|>=5.3,<=5.3.31|>=5.4,<=5.4.36|>=5.5,<5.5.40|>=5.6,<5.6.15",
+ "illuminate/view": "<6.20.42|>=7,<7.30.6|>=8,<8.75",
+ "impresscms/impresscms": "<=1.4.3",
+ "in2code/femanager": "<5.5.3|>=6,<6.3.4|>=7,<7.1",
+ "in2code/lux": "<17.6.1|>=18,<24.0.2",
+ "innologi/typo3-appointments": "<2.0.6",
+ "intelliants/subrion": "<=4.2.1",
+ "islandora/islandora": ">=2,<2.4.1",
+ "ivankristianto/phpwhois": "<=4.3",
+ "jackalope/jackalope-doctrine-dbal": "<1.7.4",
+ "james-heinrich/getid3": "<1.9.21",
+ "jasig/phpcas": "<1.3.3",
+ "joomla/archive": "<1.1.12|>=2,<2.0.1",
+ "joomla/filesystem": "<1.6.2|>=2,<2.0.1",
+ "joomla/filter": "<1.4.4|>=2,<2.0.1",
+ "joomla/input": ">=2,<2.0.2",
+ "joomla/session": "<1.3.1",
+ "joyqi/hyper-down": "<=2.4.27",
+ "jsdecena/laracom": "<2.0.9",
+ "jsmitty12/phpwhois": "<5.1",
+ "kazist/phpwhois": "<=4.2.6",
+ "kelvinmo/simplexrd": "<3.1.1",
+ "kevinpapst/kimai2": "<1.16.7",
+ "kitodo/presentation": "<3.1.2",
+ "klaviyo/magento2-extension": ">=1,<3",
+ "krayin/laravel-crm": "<1.2.2",
+ "kreait/firebase-php": ">=3.2,<3.8.1",
+ "la-haute-societe/tcpdf": "<6.2.22",
+ "laminas/laminas-diactoros": "<2.11.1",
+ "laminas/laminas-form": "<2.17.1|>=3,<3.0.2|>=3.1,<3.1.1",
+ "laminas/laminas-http": "<2.14.2",
+ "laravel/fortify": "<1.11.1",
+ "laravel/framework": "<6.20.42|>=7,<7.30.6|>=8,<8.75",
+ "laravel/socialite": ">=1,<1.0.99|>=2,<2.0.10",
+ "latte/latte": "<2.10.8",
+ "lavalite/cms": "<=5.8",
+ "lcobucci/jwt": ">=3.4,<3.4.6|>=4,<4.0.4|>=4.1,<4.1.5",
+ "league/commonmark": "<0.18.3",
+ "league/flysystem": "<1.1.4|>=2,<2.1.1",
+ "lexik/jwt-authentication-bundle": "<2.10.7|>=2.11,<2.11.3",
+ "librenms/librenms": "<22.10",
+ "liftkit/database": "<2.13.2",
+ "limesurvey/limesurvey": "<3.27.19",
+ "livehelperchat/livehelperchat": "<=3.91",
+ "livewire/livewire": ">2.2.4,<2.2.6",
+ "lms/routes": "<2.1.1",
+ "localizationteam/l10nmgr": "<7.4|>=8,<8.7|>=9,<9.2",
+ "luyadev/yii-helpers": "<1.2.1",
+ "magento/community-edition": ">=2,<2.2.10|>=2.3,<2.3.3",
+ "magento/magento1ce": "<1.9.4.3",
+ "magento/magento1ee": ">=1,<1.14.4.3",
+ "magento/product-community-edition": ">=2,<2.2.10|>=2.3,<2.3.2-p.2",
+ "marcwillmann/turn": "<0.3.3",
+ "matyhtf/framework": "<3.0.6",
+ "mautic/core": "<4.3|= 2.13.1",
+ "mediawiki/core": ">=1.27,<1.27.6|>=1.29,<1.29.3|>=1.30,<1.30.2|>=1.31,<1.31.9|>=1.32,<1.32.6|>=1.32.99,<1.33.3|>=1.33.99,<1.34.3|>=1.34.99,<1.35",
+ "melisplatform/melis-asset-manager": "<5.0.1",
+ "melisplatform/melis-cms": "<5.0.1",
+ "melisplatform/melis-front": "<5.0.1",
+ "mezzio/mezzio-swoole": "<3.7|>=4,<4.3",
+ "mgallegos/laravel-jqgrid": "<=1.3",
+ "microweber/microweber": "<1.3.2",
+ "miniorange/miniorange-saml": "<1.4.3",
+ "mittwald/typo3_forum": "<1.2.1",
+ "modx/revolution": "<= 2.8.3-pl|<2.8",
+ "mojo42/jirafeau": "<4.4",
+ "monolog/monolog": ">=1.8,<1.12",
+ "moodle/moodle": "<4.0.5",
+ "mustache/mustache": ">=2,<2.14.1",
+ "namshi/jose": "<2.2",
+ "neoan3-apps/template": "<1.1.1",
+ "neorazorx/facturascripts": "<2022.4",
+ "neos/flow": ">=1,<1.0.4|>=1.1,<1.1.1|>=2,<2.0.1|>=2.3,<2.3.16|>=3,<3.0.12|>=3.1,<3.1.10|>=3.2,<3.2.13|>=3.3,<3.3.13|>=4,<4.0.6",
+ "neos/form": ">=1.2,<4.3.3|>=5,<5.0.9|>=5.1,<5.1.3",
+ "neos/neos": ">=1.1,<1.1.3|>=1.2,<1.2.13|>=2,<2.0.4|>=2.3,<2.9.99|>=3,<3.0.20|>=3.1,<3.1.18|>=3.2,<3.2.14|>=3.3,<5.3.10|>=7,<7.0.9|>=7.1,<7.1.7|>=7.2,<7.2.6|>=7.3,<7.3.4|>=8,<8.0.2",
+ "neos/swiftmailer": ">=4.1,<4.1.99|>=5.4,<5.4.5",
+ "netgen/tagsbundle": ">=3.4,<3.4.11|>=4,<4.0.15",
+ "nette/application": ">=2,<2.0.19|>=2.1,<2.1.13|>=2.2,<2.2.10|>=2.3,<2.3.14|>=2.4,<2.4.16|>=3,<3.0.6",
+ "nette/nette": ">=2,<2.0.19|>=2.1,<2.1.13",
+ "nilsteampassnet/teampass": "<=2.1.27.36",
+ "notrinos/notrinos-erp": "<=0.7",
+ "noumo/easyii": "<=0.9",
+ "nukeviet/nukeviet": "<4.5.2",
+ "nystudio107/craft-seomatic": "<3.4.12",
+ "nzo/url-encryptor-bundle": ">=4,<4.3.2|>=5,<5.0.1",
+ "october/backend": "<1.1.2",
+ "october/cms": "= 1.1.1|= 1.0.471|= 1.0.469|>=1.0.319,<1.0.469",
+ "october/october": ">=1.0.319,<1.0.466|>=2.1,<2.1.12",
+ "october/rain": "<1.0.472|>=1.1,<1.1.2",
+ "october/system": "<1.0.476|>=1.1,<1.1.12|>=2,<2.2.34|>=3,<3.0.66",
+ "onelogin/php-saml": "<2.10.4",
+ "oneup/uploader-bundle": "<1.9.3|>=2,<2.1.5",
+ "open-web-analytics/open-web-analytics": "<1.7.4",
+ "opencart/opencart": "<=3.0.3.7",
+ "openid/php-openid": "<2.3",
+ "openmage/magento-lts": "<19.4.22|>=20,<20.0.19",
+ "orchid/platform": ">=9,<9.4.4",
+ "oro/commerce": ">=4.1,<5.0.6",
+ "oro/crm": ">=1.7,<1.7.4|>=3.1,<4.1.17|>=4.2,<4.2.7",
+ "oro/platform": ">=1.7,<1.7.4|>=3.1,<3.1.29|>=4.1,<4.1.17|>=4.2,<4.2.8",
+ "packbackbooks/lti-1-3-php-library": "<5",
+ "padraic/humbug_get_contents": "<1.1.2",
+ "pagarme/pagarme-php": ">=0,<3",
+ "pagekit/pagekit": "<=1.0.18",
+ "paragonie/random_compat": "<2",
+ "passbolt/passbolt_api": "<2.11",
+ "paypal/merchant-sdk-php": "<3.12",
+ "pear/archive_tar": "<1.4.14",
+ "pear/crypt_gpg": "<1.6.7",
+ "pegasus/google-for-jobs": "<1.5.1|>=2,<2.1.1",
+ "personnummer/personnummer": "<3.0.2",
+ "phanan/koel": "<5.1.4",
+ "php-mod/curl": "<2.3.2",
+ "phpfastcache/phpfastcache": "<6.1.5|>=7,<7.1.2|>=8,<8.0.7",
+ "phpmailer/phpmailer": "<6.5",
+ "phpmussel/phpmussel": ">=1,<1.6",
+ "phpmyadmin/phpmyadmin": "<5.2.1",
+ "phpmyfaq/phpmyfaq": "<=3.1.7",
+ "phpoffice/phpexcel": "<1.8",
+ "phpoffice/phpspreadsheet": "<1.16",
+ "phpseclib/phpseclib": "<2.0.31|>=3,<3.0.7",
+ "phpservermon/phpservermon": "<=3.5.2",
+ "phpunit/phpunit": ">=4.8.19,<4.8.28|>=5,<5.6.3",
+ "phpwhois/phpwhois": "<=4.2.5",
+ "phpxmlrpc/extras": "<0.6.1",
+ "phpxmlrpc/phpxmlrpc": "<4.9.2",
+ "pimcore/data-hub": "<1.2.4",
+ "pimcore/pimcore": "<10.5.16",
+ "pocketmine/bedrock-protocol": "<8.0.2",
+ "pocketmine/pocketmine-mp": "<4.12.5|>= 4.0.0-BETA5, < 4.4.2",
+ "pressbooks/pressbooks": "<5.18",
+ "prestashop/autoupgrade": ">=4,<4.10.1",
+ "prestashop/blockwishlist": ">=2,<2.1.1",
+ "prestashop/contactform": ">=1.0.1,<4.3",
+ "prestashop/gamification": "<2.3.2",
+ "prestashop/prestashop": "<1.7.8.8",
+ "prestashop/productcomments": "<5.0.2",
+ "prestashop/ps_emailsubscription": "<2.6.1",
+ "prestashop/ps_facetedsearch": "<3.4.1",
+ "prestashop/ps_linklist": "<3.1",
+ "privatebin/privatebin": "<1.4",
+ "processwire/processwire": "<=3.0.200",
+ "propel/propel": ">=2-alpha.1,<=2-alpha.7",
+ "propel/propel1": ">=1,<=1.7.1",
+ "pterodactyl/panel": "<1.7",
+ "ptrofimov/beanstalk_console": "<1.7.14",
+ "pusher/pusher-php-server": "<2.2.1",
+ "pwweb/laravel-core": "<=0.3.6-beta",
+ "pyrocms/pyrocms": "<=3.9.1",
+ "rainlab/debugbar-plugin": "<3.1",
+ "rankmath/seo-by-rank-math": "<=1.0.95",
+ "react/http": ">=0.7,<1.7",
+ "remdex/livehelperchat": "<3.99",
+ "rmccue/requests": ">=1.6,<1.8",
+ "robrichards/xmlseclibs": "<3.0.4",
+ "roots/soil": "<4.1",
+ "rudloff/alltube": "<3.0.3",
+ "s-cart/core": "<6.9",
+ "s-cart/s-cart": "<6.9",
+ "sabberworm/php-css-parser": ">=1,<1.0.1|>=2,<2.0.1|>=3,<3.0.1|>=4,<4.0.1|>=5,<5.0.9|>=5.1,<5.1.3|>=5.2,<5.2.1|>=6,<6.0.2|>=7,<7.0.4|>=8,<8.0.1|>=8.1,<8.1.1|>=8.2,<8.2.1|>=8.3,<8.3.1",
+ "sabre/dav": ">=1.6,<1.6.99|>=1.7,<1.7.11|>=1.8,<1.8.9",
+ "scheb/two-factor-bundle": ">=0,<3.26|>=4,<4.11",
+ "sensiolabs/connect": "<4.2.3",
+ "serluck/phpwhois": "<=4.2.6",
+ "shopware/core": "<=6.4.18",
+ "shopware/platform": "<=6.4.18",
+ "shopware/production": "<=6.3.5.2",
+ "shopware/shopware": "<=5.7.14",
+ "shopware/storefront": "<=6.4.8.1",
+ "shopxo/shopxo": "<2.2.6",
+ "showdoc/showdoc": "<2.10.4",
+ "silverstripe/admin": ">=1,<1.11.3",
+ "silverstripe/assets": ">=1,<1.11.1",
+ "silverstripe/cms": "<4.11.3",
+ "silverstripe/comments": ">=1.3,<1.9.99|>=2,<2.9.99|>=3,<3.1.1",
+ "silverstripe/forum": "<=0.6.1|>=0.7,<=0.7.3",
+ "silverstripe/framework": "<4.11.14",
+ "silverstripe/graphql": "<3.5.2|>=4-alpha.1,<4-alpha.2|= 4.0.0-alpha1",
+ "silverstripe/hybridsessions": ">=1,<2.4.1|>=2.5,<2.5.1",
+ "silverstripe/registry": ">=2.1,<2.1.2|>=2.2,<2.2.1",
+ "silverstripe/restfulserver": ">=1,<1.0.9|>=2,<2.0.4",
+ "silverstripe/silverstripe-omnipay": "<2.5.2|>=3,<3.0.2|>=3.1,<3.1.4|>=3.2,<3.2.1",
+ "silverstripe/subsites": ">=2,<2.6.1",
+ "silverstripe/taxonomy": ">=1.3,<1.3.1|>=2,<2.0.1",
+ "silverstripe/userforms": "<3",
+ "silverstripe/versioned-admin": ">=1,<1.11.1",
+ "simple-updates/phpwhois": "<=1",
+ "simplesamlphp/saml2": "<1.10.6|>=2,<2.3.8|>=3,<3.1.4",
+ "simplesamlphp/simplesamlphp": "<1.18.6",
+ "simplesamlphp/simplesamlphp-module-infocard": "<1.0.1",
+ "simplesamlphp/simplesamlphp-module-openid": "<1",
+ "simplesamlphp/simplesamlphp-module-openidprovider": "<0.9",
+ "simplito/elliptic-php": "<1.0.6",
+ "slim/slim": "<2.6",
+ "smarty/smarty": "<3.1.47|>=4,<4.2.1",
+ "snipe/snipe-it": "<=6.0.14|>= 6.0.0-RC-1, <= 6.0.0-RC-5",
+ "socalnick/scn-social-auth": "<1.15.2",
+ "socialiteproviders/steam": "<1.1",
+ "spatie/browsershot": "<3.57.4",
+ "spipu/html2pdf": "<5.2.4",
+ "spoonity/tcpdf": "<6.2.22",
+ "squizlabs/php_codesniffer": ">=1,<2.8.1|>=3,<3.0.1",
+ "ssddanbrown/bookstack": "<22.2.3",
+ "statamic/cms": "<3.2.39|>=3.3,<3.3.2",
+ "stormpath/sdk": ">=0,<9.9.99",
+ "studio-42/elfinder": "<2.1.59",
+ "subrion/cms": "<=4.2.1",
+ "sukohi/surpass": "<1",
+ "sulu/sulu": "= 2.4.0-RC1|<1.6.44|>=2,<2.2.18|>=2.3,<2.3.8",
+ "sumocoders/framework-user-bundle": "<1.4",
+ "swag/paypal": "<5.4.4",
+ "swiftmailer/swiftmailer": ">=4,<5.4.5",
+ "sylius/admin-bundle": ">=1,<1.0.17|>=1.1,<1.1.9|>=1.2,<1.2.2",
+ "sylius/grid": ">=1,<1.1.19|>=1.2,<1.2.18|>=1.3,<1.3.13|>=1.4,<1.4.5|>=1.5,<1.5.1",
+ "sylius/grid-bundle": "<1.10.1",
+ "sylius/paypal-plugin": ">=1,<1.2.4|>=1.3,<1.3.1",
+ "sylius/resource-bundle": "<1.3.14|>=1.4,<1.4.7|>=1.5,<1.5.2|>=1.6,<1.6.4",
+ "sylius/sylius": "<1.9.10|>=1.10,<1.10.11|>=1.11,<1.11.2",
+ "symbiote/silverstripe-multivaluefield": ">=3,<3.0.99",
+ "symbiote/silverstripe-queuedjobs": ">=3,<3.0.2|>=3.1,<3.1.4|>=4,<4.0.7|>=4.1,<4.1.2|>=4.2,<4.2.4|>=4.3,<4.3.3|>=4.4,<4.4.3|>=4.5,<4.5.1|>=4.6,<4.6.4",
+ "symbiote/silverstripe-seed": "<6.0.3",
+ "symbiote/silverstripe-versionedfiles": "<=2.0.3",
+ "symfont/process": ">=0",
+ "symfony/cache": ">=3.1,<3.4.35|>=4,<4.2.12|>=4.3,<4.3.8",
+ "symfony/dependency-injection": ">=2,<2.0.17|>=2.7,<2.7.51|>=2.8,<2.8.50|>=3,<3.4.26|>=4,<4.1.12|>=4.2,<4.2.7",
+ "symfony/error-handler": ">=4.4,<4.4.4|>=5,<5.0.4",
+ "symfony/form": ">=2.3,<2.3.35|>=2.4,<2.6.12|>=2.7,<2.7.50|>=2.8,<2.8.49|>=3,<3.4.20|>=4,<4.0.15|>=4.1,<4.1.9|>=4.2,<4.2.1",
+ "symfony/framework-bundle": ">=2,<2.3.18|>=2.4,<2.4.8|>=2.5,<2.5.2|>=2.7,<2.7.51|>=2.8,<2.8.50|>=3,<3.4.26|>=4,<4.1.12|>=4.2,<4.2.7|>=5.3.14,<=5.3.14|>=5.4.3,<=5.4.3|>=6.0.3,<=6.0.3|= 6.0.3|= 5.4.3|= 5.3.14",
+ "symfony/http-foundation": ">=2,<2.8.52|>=3,<3.4.35|>=4,<4.2.12|>=4.3,<4.3.8|>=4.4,<4.4.7|>=5,<5.0.7",
+ "symfony/http-kernel": ">=2,<4.4.50|>=5,<5.4.20|>=6,<6.0.20|>=6.1,<6.1.12|>=6.2,<6.2.6",
+ "symfony/intl": ">=2.7,<2.7.38|>=2.8,<2.8.31|>=3,<3.2.14|>=3.3,<3.3.13",
+ "symfony/maker-bundle": ">=1.27,<1.29.2|>=1.30,<1.31.1",
+ "symfony/mime": ">=4.3,<4.3.8",
+ "symfony/phpunit-bridge": ">=2.8,<2.8.50|>=3,<3.4.26|>=4,<4.1.12|>=4.2,<4.2.7",
+ "symfony/polyfill": ">=1,<1.10",
+ "symfony/polyfill-php55": ">=1,<1.10",
+ "symfony/proxy-manager-bridge": ">=2.7,<2.7.51|>=2.8,<2.8.50|>=3,<3.4.26|>=4,<4.1.12|>=4.2,<4.2.7",
+ "symfony/routing": ">=2,<2.0.19",
+ "symfony/security": ">=2,<2.7.51|>=2.8,<3.4.49|>=4,<4.4.24|>=5,<5.2.8",
+ "symfony/security-bundle": ">=2,<4.4.50|>=5,<5.4.20|>=6,<6.0.20|>=6.1,<6.1.12|>=6.2,<6.2.6",
+ "symfony/security-core": ">=2.4,<2.6.13|>=2.7,<2.7.9|>=2.7.30,<2.7.32|>=2.8,<3.4.49|>=4,<4.4.24|>=5,<5.2.9",
+ "symfony/security-csrf": ">=2.4,<2.7.48|>=2.8,<2.8.41|>=3,<3.3.17|>=3.4,<3.4.11|>=4,<4.0.11",
+ "symfony/security-guard": ">=2.8,<3.4.48|>=4,<4.4.23|>=5,<5.2.8",
+ "symfony/security-http": ">=2.3,<2.3.41|>=2.4,<2.7.51|>=2.8,<2.8.50|>=3,<3.4.26|>=4,<4.2.12|>=4.3,<4.3.8|>=4.4,<4.4.7|>=5,<5.0.7|>=5.1,<5.2.8|>=5.3,<5.3.2",
+ "symfony/serializer": ">=2,<2.0.11|>=4.1,<4.4.35|>=5,<5.3.12",
+ "symfony/symfony": ">=2,<4.4.50|>=5,<5.4.20|>=6,<6.0.20|>=6.1,<6.1.12|>=6.2,<6.2.6",
+ "symfony/translation": ">=2,<2.0.17",
+ "symfony/validator": ">=2,<2.0.24|>=2.1,<2.1.12|>=2.2,<2.2.5|>=2.3,<2.3.3",
+ "symfony/var-exporter": ">=4.2,<4.2.12|>=4.3,<4.3.8",
+ "symfony/web-profiler-bundle": ">=2,<2.3.19|>=2.4,<2.4.9|>=2.5,<2.5.4",
+ "symfony/yaml": ">=2,<2.0.22|>=2.1,<2.1.7",
+ "t3/dce": ">=2.2,<2.6.2",
+ "t3g/svg-sanitizer": "<1.0.3",
+ "tastyigniter/tastyigniter": "<3.3",
+ "tecnickcom/tcpdf": "<6.2.22",
+ "terminal42/contao-tablelookupwizard": "<3.3.5",
+ "thelia/backoffice-default-template": ">=2.1,<2.1.2",
+ "thelia/thelia": ">=2.1-beta.1,<2.1.3",
+ "theonedemon/phpwhois": "<=4.2.5",
+ "thinkcmf/thinkcmf": "<=5.1.7",
+ "thorsten/phpmyfaq": "<3.1.11",
+ "tinymce/tinymce": "<5.10.7|>=6,<6.3.1",
+ "titon/framework": ">=0,<9.9.99",
+ "tobiasbg/tablepress": "<= 2.0-RC1",
+ "topthink/framework": "<6.0.14",
+ "topthink/think": "<=6.0.9",
+ "topthink/thinkphp": "<=3.2.3",
+ "tribalsystems/zenario": "<=9.3.57595",
+ "truckersmp/phpwhois": "<=4.3.1",
+ "ttskch/pagination-service-provider": "<1",
+ "twig/twig": "<1.44.7|>=2,<2.15.3|>=3,<3.4.3",
+ "typo3/cms": "<2.0.5|>=3,<3.0.3|>=6.2,<6.2.30|>=7,<7.6.32|>=8,<8.7.38|>=9,<9.5.29|>=10,<10.4.35|>=11,<11.5.23|>=12,<12.2",
+ "typo3/cms-backend": ">=7,<=7.6.50|>=8,<=8.7.39|>=9,<=9.5.24|>=10,<=10.4.13|>=11,<=11.1",
+ "typo3/cms-core": "<8.7.51|>=9,<9.5.40|>=10,<10.4.36|>=11,<11.5.23|>=12,<12.2",
+ "typo3/cms-form": ">=8,<=8.7.39|>=9,<=9.5.24|>=10,<=10.4.13|>=11,<=11.1",
+ "typo3/flow": ">=1,<1.0.4|>=1.1,<1.1.1|>=2,<2.0.1|>=2.3,<2.3.16|>=3,<3.0.12|>=3.1,<3.1.10|>=3.2,<3.2.13|>=3.3,<3.3.13|>=4,<4.0.6",
+ "typo3/html-sanitizer": ">=1,<1.5|>=2,<2.1.1",
+ "typo3/neos": ">=1.1,<1.1.3|>=1.2,<1.2.13|>=2,<2.0.4|>=2.3,<2.3.99|>=3,<3.0.20|>=3.1,<3.1.18|>=3.2,<3.2.14|>=3.3,<3.3.23|>=4,<4.0.17|>=4.1,<4.1.16|>=4.2,<4.2.12|>=4.3,<4.3.3",
+ "typo3/phar-stream-wrapper": ">=1,<2.1.1|>=3,<3.1.1",
+ "typo3/swiftmailer": ">=4.1,<4.1.99|>=5.4,<5.4.5",
+ "typo3fluid/fluid": ">=2,<2.0.8|>=2.1,<2.1.7|>=2.2,<2.2.4|>=2.3,<2.3.7|>=2.4,<2.4.4|>=2.5,<2.5.11|>=2.6,<2.6.10",
+ "ua-parser/uap-php": "<3.8",
+ "unisharp/laravel-filemanager": "<=2.5.1",
+ "userfrosting/userfrosting": ">=0.3.1,<4.6.3",
+ "usmanhalalit/pixie": "<1.0.3|>=2,<2.0.2",
+ "vanilla/safecurl": "<0.9.2",
+ "verot/class.upload.php": "<=1.0.3|>=2,<=2.0.4",
+ "vova07/yii2-fileapi-widget": "<0.1.9",
+ "vrana/adminer": "<4.8.1",
+ "wallabag/tcpdf": "<6.2.22",
+ "wallabag/wallabag": "<2.5.4",
+ "wanglelecc/laracms": "<=1.0.3",
+ "web-auth/webauthn-framework": ">=3.3,<3.3.4",
+ "webcoast/deferred-image-processing": "<1.0.2",
+ "webpa/webpa": "<3.1.2",
+ "wikimedia/parsoid": "<0.12.2",
+ "willdurand/js-translation-bundle": "<2.1.1",
+ "wintercms/winter": "<1.0.475|>=1.1,<1.1.10|>=1.2,<1.2.1",
+ "woocommerce/woocommerce": "<6.6",
+ "wp-cli/wp-cli": "<2.5",
+ "wp-graphql/wp-graphql": "<0.3.5",
+ "wpanel/wpanel4-cms": "<=4.3.1",
+ "wwbn/avideo": "<12.4",
+ "xataface/xataface": "<3",
+ "xpressengine/xpressengine": "<3.0.15",
+ "yeswiki/yeswiki": "<4.1",
+ "yetiforce/yetiforce-crm": "<=6.4",
+ "yidashi/yii2cmf": "<=2",
+ "yii2mod/yii2-cms": "<1.9.2",
+ "yiisoft/yii": "<1.1.27",
+ "yiisoft/yii2": "<2.0.38",
+ "yiisoft/yii2-bootstrap": "<2.0.4",
+ "yiisoft/yii2-dev": "<2.0.43",
+ "yiisoft/yii2-elasticsearch": "<2.0.5",
+ "yiisoft/yii2-gii": "<=2.2.4",
+ "yiisoft/yii2-jui": "<2.0.4",
+ "yiisoft/yii2-redis": "<2.0.8",
+ "yikesinc/yikes-inc-easy-mailchimp-extender": "<6.8.6",
+ "yoast-seo-for-typo3/yoast_seo": "<7.2.3",
+ "yourls/yourls": "<=1.8.2",
+ "zendesk/zendesk_api_client_php": "<2.2.11",
+ "zendframework/zend-cache": ">=2.4,<2.4.8|>=2.5,<2.5.3",
+ "zendframework/zend-captcha": ">=2,<2.4.9|>=2.5,<2.5.2",
+ "zendframework/zend-crypt": ">=2,<2.4.9|>=2.5,<2.5.2",
+ "zendframework/zend-db": ">=2,<2.0.99|>=2.1,<2.1.99|>=2.2,<2.2.10|>=2.3,<2.3.5",
+ "zendframework/zend-developer-tools": ">=1.2.2,<1.2.3",
+ "zendframework/zend-diactoros": "<1.8.4",
+ "zendframework/zend-feed": "<2.10.3",
+ "zendframework/zend-form": ">=2,<2.2.7|>=2.3,<2.3.1",
+ "zendframework/zend-http": "<2.8.1",
+ "zendframework/zend-json": ">=2.1,<2.1.6|>=2.2,<2.2.6",
+ "zendframework/zend-ldap": ">=2,<2.0.99|>=2.1,<2.1.99|>=2.2,<2.2.8|>=2.3,<2.3.3",
+ "zendframework/zend-mail": ">=2,<2.4.11|>=2.5,<2.7.2",
+ "zendframework/zend-navigation": ">=2,<2.2.7|>=2.3,<2.3.1",
+ "zendframework/zend-session": ">=2,<2.0.99|>=2.1,<2.1.99|>=2.2,<2.2.9|>=2.3,<2.3.4",
+ "zendframework/zend-validator": ">=2.3,<2.3.6",
+ "zendframework/zend-view": ">=2,<2.2.7|>=2.3,<2.3.1",
+ "zendframework/zend-xmlrpc": ">=2.1,<2.1.6|>=2.2,<2.2.6",
+ "zendframework/zendframework": "<=3",
+ "zendframework/zendframework1": "<1.12.20",
+ "zendframework/zendopenid": ">=2,<2.0.2",
+ "zendframework/zendxml": ">=1,<1.0.1",
+ "zetacomponents/mail": "<1.8.2",
+ "zf-commons/zfc-user": "<1.2.2",
+ "zfcampus/zf-apigility-doctrine": ">=1,<1.0.3",
+ "zfr/zfr-oauth2-server-module": "<0.1.2",
+ "zoujingli/thinkadmin": "<6.0.22"
+ },
+ "default-branch": true,
+ "type": "metapackage",
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Marco Pivetta",
+ "email": "ocramius@gmail.com",
+ "role": "maintainer"
+ },
+ {
+ "name": "Ilya Tribusean",
+ "email": "slash3b@gmail.com",
+ "role": "maintainer"
+ }
+ ],
+ "description": "Prevents installation of composer packages with known security vulnerabilities: no API, simply require it",
+ "support": {
+ "issues": "https://github.com/Roave/SecurityAdvisories/issues",
+ "source": "https://github.com/Roave/SecurityAdvisories/tree/latest"
+ },
+ "funding": [
+ {
+ "url": "https://github.com/Ocramius",
+ "type": "github"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/roave/security-advisories",
+ "type": "tidelift"
}
],
- "time": "2020-12-04T05:05:53+00:00"
+ "time": "2023-02-14T01:32:29+00:00"
},
{
"name": "sebastian/cli-parser",
@@ -1508,6 +2061,10 @@
],
"description": "Library for parsing CLI options",
"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"
+ },
"funding": [
{
"url": "https://github.com/sebastianbergmann",
@@ -1560,6 +2117,10 @@
],
"description": "Collection of value objects that represent the PHP code units",
"homepage": "https://github.com/sebastianbergmann/code-unit",
+ "support": {
+ "issues": "https://github.com/sebastianbergmann/code-unit/issues",
+ "source": "https://github.com/sebastianbergmann/code-unit/tree/1.0.8"
+ },
"funding": [
{
"url": "https://github.com/sebastianbergmann",
@@ -1611,6 +2172,10 @@
],
"description": "Looks up which function or method a line of code belongs to",
"homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/",
+ "support": {
+ "issues": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/issues",
+ "source": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/tree/2.0.3"
+ },
"funding": [
{
"url": "https://github.com/sebastianbergmann",
@@ -1621,16 +2186,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": {
@@ -1681,13 +2246,17 @@
"compare",
"equality"
],
+ "support": {
+ "issues": "https://github.com/sebastianbergmann/comparator/issues",
+ "source": "https://github.com/sebastianbergmann/comparator/tree/4.0.8"
+ },
"funding": [
{
"url": "https://github.com/sebastianbergmann",
"type": "github"
}
],
- "time": "2020-10-26T15:49:45+00:00"
+ "time": "2022-09-14T12:41:17+00:00"
},
{
"name": "sebastian/complexity",
@@ -1734,6 +2303,10 @@
],
"description": "Library for calculating the complexity of PHP code units",
"homepage": "https://github.com/sebastianbergmann/complexity",
+ "support": {
+ "issues": "https://github.com/sebastianbergmann/complexity/issues",
+ "source": "https://github.com/sebastianbergmann/complexity/tree/2.0.2"
+ },
"funding": [
{
"url": "https://github.com/sebastianbergmann",
@@ -1796,6 +2369,10 @@
"unidiff",
"unified diff"
],
+ "support": {
+ "issues": "https://github.com/sebastianbergmann/diff/issues",
+ "source": "https://github.com/sebastianbergmann/diff/tree/4.0.4"
+ },
"funding": [
{
"url": "https://github.com/sebastianbergmann",
@@ -1806,16 +2383,16 @@
},
{
"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": {
@@ -1855,26 +2432,30 @@
"environment",
"hhvm"
],
+ "support": {
+ "issues": "https://github.com/sebastianbergmann/environment/issues",
+ "source": "https://github.com/sebastianbergmann/environment/tree/5.1.5"
+ },
"funding": [
{
"url": "https://github.com/sebastianbergmann",
"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.5",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/exporter.git",
- "reference": "65e8b7db476c5dd267e65eea9cab77584d3cfff9"
+ "reference": "ac230ed27f0f98f597c8a2b6eb7ac563af5e5b9d"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/65e8b7db476c5dd267e65eea9cab77584d3cfff9",
- "reference": "65e8b7db476c5dd267e65eea9cab77584d3cfff9",
+ "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/ac230ed27f0f98f597c8a2b6eb7ac563af5e5b9d",
+ "reference": "ac230ed27f0f98f597c8a2b6eb7ac563af5e5b9d",
"shasum": ""
},
"require": {
@@ -1928,13 +2509,17 @@
"export",
"exporter"
],
+ "support": {
+ "issues": "https://github.com/sebastianbergmann/exporter/issues",
+ "source": "https://github.com/sebastianbergmann/exporter/tree/4.0.5"
+ },
"funding": [
{
"url": "https://github.com/sebastianbergmann",
"type": "github"
}
],
- "time": "2021-11-11T14:18:36+00:00"
+ "time": "2022-09-14T06:03:37+00:00"
},
{
"name": "sebastian/global-state",
@@ -1988,6 +2573,10 @@
"keywords": [
"global state"
],
+ "support": {
+ "issues": "https://github.com/sebastianbergmann/global-state/issues",
+ "source": "https://github.com/sebastianbergmann/global-state/tree/5.0.5"
+ },
"funding": [
{
"url": "https://github.com/sebastianbergmann",
@@ -2041,6 +2630,10 @@
],
"description": "Library for counting the lines of code in PHP source code",
"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"
+ },
"funding": [
{
"url": "https://github.com/sebastianbergmann",
@@ -2094,6 +2687,10 @@
],
"description": "Traverses array structures and object graphs to enumerate all referenced objects",
"homepage": "https://github.com/sebastianbergmann/object-enumerator/",
+ "support": {
+ "issues": "https://github.com/sebastianbergmann/object-enumerator/issues",
+ "source": "https://github.com/sebastianbergmann/object-enumerator/tree/4.0.4"
+ },
"funding": [
{
"url": "https://github.com/sebastianbergmann",
@@ -2145,6 +2742,10 @@
],
"description": "Allows reflection of object attributes, including inherited and non-public ones",
"homepage": "https://github.com/sebastianbergmann/object-reflector/",
+ "support": {
+ "issues": "https://github.com/sebastianbergmann/object-reflector/issues",
+ "source": "https://github.com/sebastianbergmann/object-reflector/tree/2.0.4"
+ },
"funding": [
{
"url": "https://github.com/sebastianbergmann",
@@ -2155,16 +2756,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": {
@@ -2203,14 +2804,18 @@
}
],
"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.5"
+ },
"funding": [
{
"url": "https://github.com/sebastianbergmann",
"type": "github"
}
],
- "time": "2020-10-26T13:17:30+00:00"
+ "time": "2023-02-03T06:07:39+00:00"
},
{
"name": "sebastian/resource-operations",
@@ -2255,6 +2860,10 @@
],
"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"
+ },
"funding": [
{
"url": "https://github.com/sebastianbergmann",
@@ -2265,28 +2874,28 @@
},
{
"name": "sebastian/type",
- "version": "2.3.4",
+ "version": "3.2.1",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/type.git",
- "reference": "b8cd8a1c753c90bc1a0f5372170e3e489136f914"
+ "reference": "75e2c2a32f5e0b3aef905b9ed0b179b953b3d7c7"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/b8cd8a1c753c90bc1a0f5372170e3e489136f914",
- "reference": "b8cd8a1c753c90bc1a0f5372170e3e489136f914",
+ "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/75e2c2a32f5e0b3aef905b9ed0b179b953b3d7c7",
+ "reference": "75e2c2a32f5e0b3aef905b9ed0b179b953b3d7c7",
"shasum": ""
},
"require": {
"php": ">=7.3"
},
"require-dev": {
- "phpunit/phpunit": "^9.3"
+ "phpunit/phpunit": "^9.5"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "2.3-dev"
+ "dev-master": "3.2-dev"
}
},
"autoload": {
@@ -2307,13 +2916,17 @@
],
"description": "Collection of value objects that represent the types of the PHP type system",
"homepage": "https://github.com/sebastianbergmann/type",
+ "support": {
+ "issues": "https://github.com/sebastianbergmann/type/issues",
+ "source": "https://github.com/sebastianbergmann/type/tree/3.2.1"
+ },
"funding": [
{
"url": "https://github.com/sebastianbergmann",
"type": "github"
}
],
- "time": "2021-06-15T12:49:02+00:00"
+ "time": "2023-02-03T06:13:03+00:00"
},
{
"name": "sebastian/version",
@@ -2356,6 +2969,10 @@
],
"description": "Library that helps with managing the version number of Git-hosted PHP projects",
"homepage": "https://github.com/sebastianbergmann/version",
+ "support": {
+ "issues": "https://github.com/sebastianbergmann/version/issues",
+ "source": "https://github.com/sebastianbergmann/version/tree/3.0.2"
+ },
"funding": [
{
"url": "https://github.com/sebastianbergmann",
@@ -2366,28 +2983,29 @@
},
{
"name": "sirbrillig/phpcs-variable-analysis",
- "version": "v2.11.3",
+ "version": "v2.11.10",
"source": {
"type": "git",
"url": "https://github.com/sirbrillig/phpcs-variable-analysis.git",
- "reference": "c921498b474212fe4552928bbeb68d70250ce5e8"
+ "reference": "0f25a3766f26df91d6bdda0c8931303fc85499d7"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sirbrillig/phpcs-variable-analysis/zipball/c921498b474212fe4552928bbeb68d70250ce5e8",
- "reference": "c921498b474212fe4552928bbeb68d70250ce5e8",
+ "url": "https://api.github.com/repos/sirbrillig/phpcs-variable-analysis/zipball/0f25a3766f26df91d6bdda0c8931303fc85499d7",
+ "reference": "0f25a3766f26df91d6bdda0c8931303fc85499d7",
"shasum": ""
},
"require": {
"php": ">=5.4.0",
- "squizlabs/php_codesniffer": "^3.5"
+ "squizlabs/php_codesniffer": "^3.5.6"
},
"require-dev": {
- "dealerdirect/phpcodesniffer-composer-installer": "^0.7.0",
- "limedeck/phpunit-detailed-printer": "^3.1 || ^4.0 || ^5.0",
- "phpstan/phpstan": "^0.11.8",
- "phpunit/phpunit": "^5.0 || ^6.5 || ^7.0 || ^8.0",
- "sirbrillig/phpcs-import-detection": "^1.1"
+ "dealerdirect/phpcodesniffer-composer-installer": "^0.7 || ^1.0",
+ "phpcsstandards/phpcsdevcs": "^1.1",
+ "phpstan/phpstan": "^1.7",
+ "phpunit/phpunit": "^4.8.36 || ^5.7.21 || ^6.5 || ^7.0 || ^8.0 || ^9.0",
+ "sirbrillig/phpcs-import-detection": "^1.1",
+ "vimeo/psalm": "^0.2 || ^0.3 || ^1.1 || ^4.24 || ^5.0@beta"
},
"type": "phpcodesniffer-standard",
"autoload": {
@@ -2410,7 +3028,16 @@
}
],
"description": "A PHPCS sniff to detect problems with variables.",
- "time": "2022-02-21T17:01:13+00:00"
+ "keywords": [
+ "phpcs",
+ "static analysis"
+ ],
+ "support": {
+ "issues": "https://github.com/sirbrillig/phpcs-variable-analysis/issues",
+ "source": "https://github.com/sirbrillig/phpcs-variable-analysis",
+ "wiki": "https://github.com/sirbrillig/phpcs-variable-analysis/wiki"
+ },
+ "time": "2023-01-05T18:45:16+00:00"
},
{
"name": "squizlabs/php_codesniffer",
@@ -2461,6 +3088,11 @@
"phpcs",
"standards"
],
+ "support": {
+ "issues": "https://github.com/squizlabs/PHP_CodeSniffer/issues",
+ "source": "https://github.com/squizlabs/PHP_CodeSniffer",
+ "wiki": "https://github.com/squizlabs/PHP_CodeSniffer/wiki"
+ },
"time": "2022-06-18T07:21:10+00:00"
},
{
@@ -2501,6 +3133,10 @@
}
],
"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"
+ },
"funding": [
{
"url": "https://github.com/theseer",
@@ -2510,58 +3146,41 @@
"time": "2021-07-28T10:34:58+00:00"
},
{
- "name": "webmozart/assert",
- "version": "1.11.0",
+ "name": "togos/gitignore",
+ "version": "1.1.1",
"source": {
"type": "git",
- "url": "https://github.com/webmozarts/assert.git",
- "reference": "11cb2199493b2f8a3b53e7f19068fc6aac760991"
+ "url": "https://github.com/TOGoS/PHPGitIgnore.git",
+ "reference": "32bc0830e4123f670adcbf5ddda5bef362f4f4d4"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/webmozarts/assert/zipball/11cb2199493b2f8a3b53e7f19068fc6aac760991",
- "reference": "11cb2199493b2f8a3b53e7f19068fc6aac760991",
+ "url": "https://api.github.com/repos/TOGoS/PHPGitIgnore/zipball/32bc0830e4123f670adcbf5ddda5bef362f4f4d4",
+ "reference": "32bc0830e4123f670adcbf5ddda5bef362f4f4d4",
"shasum": ""
},
"require": {
- "ext-ctype": "*",
- "php": "^7.2 || ^8.0"
- },
- "conflict": {
- "phpstan/phpstan": "<0.12.20",
- "vimeo/psalm": "<4.6.1 || 4.6.2"
+ "php": ">=5.2"
},
"require-dev": {
- "phpunit/phpunit": "^8.5.13"
+ "togos/simpler-test": "1.1.1"
},
"type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "1.10-dev"
- }
- },
"autoload": {
- "psr-4": {
- "Webmozart\\Assert\\": "src/"
+ "psr-0": {
+ "TOGoS_GitIgnore_": "src/main/php/"
}
},
"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"
- ],
- "time": "2022-06-03T18:03:27+00:00"
+ "description": "Parser for .gitignore (and sparse-checkout, and anything else using the same format) files",
+ "support": {
+ "issues": "https://github.com/TOGoS/PHPGitIgnore/issues",
+ "source": "https://github.com/TOGoS/PHPGitIgnore/tree/master"
+ },
+ "time": "2019-04-19T19:16:58+00:00"
},
{
"name": "wp-coding-standards/wpcs",
@@ -2607,17 +3226,24 @@
"standards",
"wordpress"
],
+ "support": {
+ "issues": "https://github.com/WordPress/WordPress-Coding-Standards/issues",
+ "source": "https://github.com/WordPress/WordPress-Coding-Standards",
+ "wiki": "https://github.com/WordPress/WordPress-Coding-Standards/wiki"
+ },
"time": "2020-05-13T23:57:56+00:00"
}
],
"aliases": [],
"minimum-stability": "dev",
- "stability-flags": [],
+ "stability-flags": {
+ "roave/security-advisories": 20
+ },
"prefer-stable": true,
"prefer-lowest": false,
"platform": {
"php": ">=7.1"
},
"platform-dev": [],
- "plugin-api-version": "1.1.0"
+ "plugin-api-version": "2.2.0"
}
diff --git a/phpcs.xml b/phpcs.xml
deleted file mode 100644
index 9fea8e34..00000000
--- a/phpcs.xml
+++ /dev/null
@@ -1,60 +0,0 @@
-
-
-
-
-
-
-
- src
- login-with-google.php
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- tests/*
-
-
-
-
-
-
-
-
-
- tests/*
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- */vendor/*
- */node_modules/*
- /lib/*
- */tests/*
- */.github/*
- */.scripts/*
-
diff --git a/phpcs.xml.dist b/phpcs.xml.dist
new file mode 100644
index 00000000..5e50ca69
--- /dev/null
+++ b/phpcs.xml.dist
@@ -0,0 +1,112 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ tests/*
+
+
+
+
+
+
+
+
+
+
+
+
+ tests/*
+
+
+
+
+
+
+
+
+
+
+
+ src/*
+ tests/*
+
+
+
+ src/*
+ tests/*
+
+
+
+ tests/*
+
+
+
+
+
+
+
+
+
+
+
+ src/*
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ bin/*
+ tests/php/src/PhpStan/*
+
+
+
+ templates/*
+ includes/templates/*
+ back-compat/*
+
+
+
+
+
+
+
+ .
+
+
+
+
+
+
+
+ */node_modules/*
+ */vendor/*
+ ^build/*
+ ^logs/*
+ /assets/js/*.asset.php
+ */.github/*
+ */assets/*
+ */languages/*
+ */wp-assets/*
+
diff --git a/src/Interfaces/Container.php b/src/Interfaces/Container.php
index b83e9613..a5ff90ce 100644
--- a/src/Interfaces/Container.php
+++ b/src/Interfaces/Container.php
@@ -16,6 +16,7 @@
* @package WpGuruDev\OrderExport\Interfaces
*/
interface Container {
+
/**
* Define services in container.
*
diff --git a/src/Modules/Block.php b/src/Modules/Block.php
index e854a71a..5c8345c9 100644
--- a/src/Modules/Block.php
+++ b/src/Modules/Block.php
@@ -155,7 +155,7 @@ public function render_login_button( $attributes ): string {
* @since 1.2.3
*/
$force_display = $attributes['forceDisplay'] ?? false;
- if ( $force_display || ! is_user_logged_in() || apply_filters( 'rtcamp.google_login_button_display', false ) ) {
+ if ( $force_display || ! is_user_logged_in() || apply_filters( 'rtcamp.google_login_button_display', false ) ) {
$markup = $this->markup(
[
'login_url' => $this->client->authorization_url(),
diff --git a/src/Modules/Shortcode.php b/src/Modules/Shortcode.php
index 0d9c87a5..05f86bfc 100644
--- a/src/Modules/Shortcode.php
+++ b/src/Modules/Shortcode.php
@@ -134,7 +134,6 @@ public function scan_shortcode( string $output, string $tag, $attrs ): string {
return $output;
}
-
/**
* Filter redirect URL as per shortcode param.
*
diff --git a/src/Utils/GoogleClient.php b/src/Utils/GoogleClient.php
index ea78f887..b162f00e 100644
--- a/src/Utils/GoogleClient.php
+++ b/src/Utils/GoogleClient.php
@@ -244,11 +244,14 @@ public function user(): \stdClass {
* @return string
*/
public function state(): string {
- $state_data['nonce'] = wp_create_nonce( 'login_with_google' );
+
+ $state_data = [
+ 'nonce' => wp_create_nonce( 'login_with_google' ),
+ ];
+
$state_data = apply_filters( 'rtcamp.google_login_state', $state_data );
$state_data['provider'] = 'google';
return base64_encode( wp_json_encode( $state_data ) );
}
-
}
diff --git a/templates/google-login-button.php b/templates/google-login-button.php
index c010785f..93290387 100644
--- a/templates/google-login-button.php
+++ b/templates/google-login-button.php
@@ -20,7 +20,7 @@
if ( is_user_logged_in() ) {
$button_text = __( 'Log out', 'login-with-google' );
- $button_url = wp_logout_url( get_permalink() );
+ $button_url = wp_logout_url( get_permalink() );
}
?>
diff --git a/tests/php/TestCase.php b/tests/php/TestCase.php
index 94c6e820..fb03ffff 100644
--- a/tests/php/TestCase.php
+++ b/tests/php/TestCase.php
@@ -19,14 +19,14 @@
*
* @author Guido Scialfa
*/
-class TestCase extends WPMockTestCase
-{
+class TestCase extends WPMockTestCase {
+
/**
* Sets up the fixture, for example, open a network connection.
* This method is called before a test is executed.
*/
- public function setUp(): void
- {
+ public function setUp(): void {
+
parent::setUp();
\WP_Mock::setUp();
}
@@ -35,8 +35,8 @@ public function setUp(): void
* Tears down the fixture, for example, close a network connection.
* This method is called after a test is executed.
*/
- public function tearDown(): void
- {
+ public function tearDown(): void {
+
parent::tearDown();
\WP_Mock::tearDown();
}
@@ -46,27 +46,28 @@ public function tearDown(): void
*
* Basic configuration available for all of the testee objects, call `getMock` to get the mock.
*
- * @param string $className
- * @param array $constructorArguments
- * @param array $methods
- * @param string $sutMethod
+ * @param string $class_name
+ * @param array $constructor_arguments
+ * @param array $methods
+ * @param string $sut_method
*
* @return PHPUnit_Framework_MockObject_MockBuilder
*/
protected function buildTesteeMock(
- string $className,
- array $constructorArguments,
+ string $class_name,
+ array $constructor_arguments,
array $methods,
- string $sutMethod
- ): object {
+ string $sut_method
+ ): object { // phpcs:ignore PHPCompatibility.FunctionDeclarations.NewReturnTypeDeclarations.objectFound -- Ignoring because assuming php application version greater than 7.1.
+
+ $testee = $this->getMockBuilder( $class_name );
- $testee = $this->getMockBuilder($className);
- $constructorArguments
- ? $testee->setConstructorArgs($constructorArguments)
+ $constructor_arguments
+ ? $testee->setConstructorArgs( $constructor_arguments )
: $testee->disableOriginalConstructor();
- $methods and $testee->setMethods($methods);
- $sutMethod and $testee->setMethodsExcept([$sutMethod]);
+ $methods && $testee->setMethods( $methods );
+ $sut_method && $testee->setMethodsExcept( [ $sut_method ] );
return $testee;
}
@@ -75,31 +76,36 @@ protected function buildTesteeMock(
* Retrieve a Testee Mock to Test Protected Methods
*
* return MockBuilder
- * @param string $className
- * @param array $constructorArguments
+ *
+ * @param string $class_name
+ * @param array $constructor_arguments
* @param string $method
- * @param array $methods
+ * @param array $methods
+ *
* @return array
+ *
* @throws ReflectionException
*/
protected function buildTesteeMethodMock(
- string $className,
- array $constructorArguments,
+ string $class_name,
+ array $constructor_arguments,
string $method,
array $methods
): array {
$testee = $this->buildTesteeMock(
- $className,
- $constructorArguments,
+ $class_name,
+ $constructor_arguments,
$methods,
''
)->getMock();
- $reflectionMethod = new ReflectionMethod($className, $method);
- $reflectionMethod->setAccessible(true);
+
+ $reflection_method = new ReflectionMethod( $class_name, $method );
+ $reflection_method->setAccessible( true );
+
return [
$testee,
- $reflectionMethod,
+ $reflection_method,
];
}
@@ -112,13 +118,14 @@ protected function buildTesteeMethodMock(
//phpcs:disable Inpsyde.CodeQuality.ReturnTypeDeclaration.NoReturnType
protected function getTesteeProperty(
string $property,
- object $object
+ object $object // phpcs:ignore PHPCompatibility.FunctionDeclarations.NewParamTypeDeclarations.objectFound -- Ignoring because assuming php application version greater than 7.1.
) {
- $reflection = new \ReflectionClass($object);
- $reflectionProperty = $reflection->getProperty($property);
- $reflectionProperty->setAccessible(true);
- return $reflectionProperty->getValue($object);
+ $reflection = new \ReflectionClass( $object );
+ $reflection_property = $reflection->getProperty( $property );
+
+ $reflection_property->setAccessible( true );
+ return $reflection_property->getValue( $object );
}
/**
@@ -131,12 +138,17 @@ protected function getTesteeProperty(
* @throws ReflectionException
*/
// phpcs:disable Inpsyde.CodeQuality.ArgumentTypeDeclaration.NoArgumentType
- protected function setTesteeProperty(object $object, string $property, $value): void
- {
- $reflection = new \ReflectionClass($object);
- $reflectionProperty = $reflection->getProperty($property);
- $reflectionProperty->setAccessible(true);
- $reflectionProperty->setValue($object, $value);
+ protected function setTesteeProperty(
+ object $object, // phpcs:ignore PHPCompatibility.FunctionDeclarations.NewParamTypeDeclarations.objectFound -- Ignoring because assuming php application version greater than 7.1.
+ string $property,
+ $value
+ ): void {
+
+ $reflection = new \ReflectionClass( $object );
+ $reflection_property = $reflection->getProperty( $property );
+
+ $reflection_property->setAccessible( true );
+ $reflection_property->setValue( $object, $value );
}
/**
@@ -146,30 +158,32 @@ protected function setTesteeProperty(object $object, string $property, $value):
* @param string $function_name
* @param mixed $args
* @param int $times
+ *
* @param mixed $return
*/
protected function wpMockFunction(
- string $functionName,
+ string $function_name,
$args = [],
int $times = 1,
$return = null
) {
- $funcArgs = [
+ $func_args = [
'times' => $times,
];
- if (!empty($args)) {
- $funcArgs['args'] = $args;
+ if ( ! empty( $args ) ) {
+ $func_args['args'] = $args;
}
- if (!empty($return)) {
- $funcArgs['return'] = $return;
+ if ( ! empty( $return ) ) {
+ $func_args['return'] = $return;
}
\WP_Mock::userFunction(
- $functionName,
- $funcArgs
+ $function_name,
+ $func_args
);
+
}
}
diff --git a/tests/php/Unit/ContainerTest.php b/tests/php/Unit/ContainerTest.php
index be42f480..86aaf586 100644
--- a/tests/php/Unit/ContainerTest.php
+++ b/tests/php/Unit/ContainerTest.php
@@ -27,7 +27,7 @@ class ContainerTest extends TestCase {
/**
* @var PimpleContainer
*/
- private $pimpleMock;
+ private $pimple_mock;
/**
* Object under test.
@@ -40,11 +40,14 @@ class ContainerTest extends TestCase {
* @return void
*/
public function setUp(): void {
- $this->pimpleMock = $this->createMock( PimpleContainer::class );
- $this->testee = new Testee( $this->pimpleMock );
+
+ $this->pimple_mock = $this->createMock( PimpleContainer::class );
+ $this->testee = new Testee( $this->pimple_mock );
+
}
public function testContainerImplementsInterface() {
+
$this->assertInstanceOf( ContainerInterface::class, $this->testee );
}
@@ -52,11 +55,13 @@ public function testContainerImplementsInterface() {
* @covers ::get
*/
public function testGetThrowsExceptionForNonExistentService() {
- $this->pimpleMock->expects( $this->once() )
- ->method( 'keys' )
- ->willReturn( [ 'example_service' ] );
+
+ $this->pimple_mock->expects( $this->once() )
+ ->method( 'keys' )
+ ->willReturn( [ 'example_service' ] );
$this->expectException( InvalidArgumentException::class );
+
$this->testee->get( 'non_existent_service' );
}
@@ -64,21 +69,22 @@ public function testGetThrowsExceptionForNonExistentService() {
* @covers ::get
*/
public function testGetReturnsServiceObject() {
- $dummyService = (object) [
+
+ $dummy_service = (object) [
'some_key' => 'some_value',
'some_other_key' => 'some_other_value',
];
- $this->testee->container['test_service'] = $dummyService;
+ $this->testee->container['test_service'] = $dummy_service;
- $this->pimpleMock->expects( $this->once() )
- ->method( 'keys' )
- ->willReturn( [ 'test_service' ] );
+ $this->pimple_mock->expects( $this->once() )
+ ->method( 'keys' )
+ ->willReturn( [ 'test_service' ] );
- $this->pimpleMock->expects( $this->once() )
- ->method( 'offsetGet' )
- ->with( 'test_service' )
- ->willReturn( $dummyService );
+ $this->pimple_mock->expects( $this->once() )
+ ->method( 'offsetGet' )
+ ->with( 'test_service' )
+ ->willReturn( $dummy_service );
$this->testee->get( 'test_service' );
}
diff --git a/tests/php/Unit/Modules/AssetsTest.php b/tests/php/Unit/Modules/AssetsTest.php
index 4342eaca..008db153 100644
--- a/tests/php/Unit/Modules/AssetsTest.php
+++ b/tests/php/Unit/Modules/AssetsTest.php
@@ -45,7 +45,7 @@ public function testInit() {
'login_enqueue_scripts',
[
$this->testee,
- 'enqueue_login_styles'
+ 'enqueue_login_styles',
]
);
@@ -111,7 +111,7 @@ function () {
'login-with-google',
'https://example.com/assets/js/login.js',
[
- 'some-other-script'
+ 'some-other-script',
],
false,
true,
@@ -124,7 +124,7 @@ function () {
'login-with-google',
'js/login.js',
[
- 'some-other-script'
+ 'some-other-script',
]
);
diff --git a/tests/php/Unit/Modules/BlockTest.php b/tests/php/Unit/Modules/BlockTest.php
index e5edc9e8..096f8c6e 100644
--- a/tests/php/Unit/Modules/BlockTest.php
+++ b/tests/php/Unit/Modules/BlockTest.php
@@ -27,12 +27,12 @@ class BlockTest extends TestCase {
/**
* @var GoogleClient
*/
- private $ghClientMock;
+ private $gh_client_mock;
/**
* @var Assets
*/
- private $assetMock;
+ private $assert_mock;
/**
* @var Testee
@@ -45,15 +45,15 @@ class BlockTest extends TestCase {
* @return void
*/
public function setUp(): void {
- $this->ghClientMock = $this->createMock( GoogleClient::class );
- $this->assetMock = $this->createMock( Assets::class );
- $this->testee = new Testee( $this->assetMock, $this->ghClientMock );
+ $this->gh_client_mock = $this->createMock( GoogleClient::class );
+ $this->assert_mock = $this->createMock( Assets::class );
+ $this->testee = new Testee( $this->assert_mock, $this->gh_client_mock );
}
public function tearDown(): void {
parent::tearDown();
- $this->ghClientMock = null;
- $this->assetMock = null;
+ $this->gh_client_mock = null;
+ $this->assert_mock = null;
unset( $this->testee );
}
@@ -114,20 +114,20 @@ function () use ( $path ) {
true
);
- $this->assetMock->expects( $this->once() )->method( 'register_login_styles' );
- $this->assetMock->expects( $this->once() )->method( 'register_script' )
- ->with(
- 'google-login-block',
- 'build/js/block-button.js',
- [
- 'wp-blocks',
- 'wp-element',
- 'wp-editor',
- 'wp-components',
- ],
- filemtime( $path . 'build/js/block-button.js' ),
- false
- );
+ $this->assert_mock->expects( $this->once() )->method( 'register_login_styles' );
+ $this->assert_mock->expects( $this->once() )->method( 'register_script' )
+ ->with(
+ 'google-login-block',
+ 'build/js/block-button.js',
+ [
+ 'wp-blocks',
+ 'wp-element',
+ 'wp-editor',
+ 'wp-components',
+ ],
+ filemtime( $path . 'build/js/block-button.js' ),
+ false
+ );
$this->testee->enqueue_block_editor_assets();
}
@@ -164,12 +164,12 @@ public function testRegister() {
$this->assertConditionsMet();
}
-
/**
* @covers ::render_login_button, ::markup
*/
public function testRenderLoginButton() {
- $mockAttributes = [
+
+ $mock_attributes = [
'login_url' => '#',
'custom_btn_text' => 'test',
'force_display' => false,
@@ -186,7 +186,7 @@ public function testRenderLoginButton() {
'wp_parse_args',
[],
1,
- $mockAttributes
+ $mock_attributes
);
$this->wpMockFunction(
@@ -219,11 +219,11 @@ function () use ( $path ) {
);
- $helperMock = \Mockery::mock( 'alias:' . Helper::class );
- $helperMock->expects( 'render_template' )->once()->withArgs(
+ $helper_mock = \Mockery::mock( 'alias:' . Helper::class );
+ $helper_mock->expects( 'render_template' )->once()->withArgs(
[
$path . 'google-login-button.php',
- $mockAttributes,
+ $mock_attributes,
false,
]
)->andReturn( '' );
@@ -231,7 +231,7 @@ function () use ( $path ) {
$markup = $this->testee->render_login_button(
[
$path . '/google-login-button.php',
- $mockAttributes,
+ $mock_attributes,
false,
]
);
@@ -243,7 +243,8 @@ function () use ( $path ) {
* @covers ::render_login_button, ::markup
*/
public function testRenderLogoutButton() {
- $mockAttributes = [
+
+ $mock_attributes = [
'login_url' => '#',
'custom_btn_text' => 'test',
'force_display' => true,
@@ -260,7 +261,7 @@ public function testRenderLogoutButton() {
'wp_parse_args',
[],
1,
- $mockAttributes
+ $mock_attributes
);
$this->wpMockFunction(
@@ -293,11 +294,11 @@ function () use ( $path ) {
);
- $helperMock = \Mockery::mock( 'alias:' . Helper::class );
- $helperMock->expects( 'render_template' )->once()->withArgs(
+ $helper_mock = \Mockery::mock( 'alias:' . Helper::class );
+ $helper_mock->expects( 'render_template' )->once()->withArgs(
[
$path . 'google-login-button.php',
- $mockAttributes,
+ $mock_attributes,
false,
]
)->andReturn( '' );
@@ -305,7 +306,7 @@ function () use ( $path ) {
$markup = $this->testee->render_login_button(
[
$path . '/google-login-button.php',
- $mockAttributes,
+ $mock_attributes,
false,
]
);
diff --git a/tests/php/Unit/Modules/LoginTest.php b/tests/php/Unit/Modules/LoginTest.php
index 94c5b958..372f43f0 100644
--- a/tests/php/Unit/Modules/LoginTest.php
+++ b/tests/php/Unit/Modules/LoginTest.php
@@ -31,12 +31,12 @@ class LoginTest extends TestCase {
/**
* @var GoogleClient
*/
- private $ghClientMock;
+ private $gh_client_mock;
/**
* @var Settings
*/
- private $authenticatorMock;
+ private $authenticator_mock;
/**
* @var Testee
@@ -49,16 +49,18 @@ class LoginTest extends TestCase {
* @return void
*/
public function setUp(): void {
- $this->ghClientMock = $this->createMock( GoogleClient::class );
- $this->authenticatorMock = $this->createMock( Authenticator::class );
- $this->testee = new Testee( $this->ghClientMock, $this->authenticatorMock );
+ $this->gh_client_mock = $this->createMock( GoogleClient::class );
+ $this->authenticator_mock = $this->createMock( Authenticator::class );
+
+ $this->testee = new Testee( $this->gh_client_mock, $this->authenticator_mock );
}
/**
* @covers ::name
*/
public function testName() {
+
$this->assertSame( 'login_flow', $this->testee->name() );
}
@@ -66,6 +68,7 @@ public function testName() {
* @covers ::__construct
*/
public function testImplementsModuleInterface() {
+
$this->assertTrue( $this->testee instanceof ModuleInterface );
}
@@ -73,9 +76,10 @@ public function testImplementsModuleInterface() {
* @covers ::init
*/
public function testInit() {
+
WP_Mock::expectActionAdded( 'login_form', [ $this->testee, 'login_button' ] );
WP_Mock::expectActionAdded( 'authenticate', [ $this->testee, 'authenticate' ], 20 );
- WP_Mock::expectActionAdded( 'rtcamp.google_register_user', [ $this->authenticatorMock, 'register' ] );
+ WP_Mock::expectActionAdded( 'rtcamp.google_register_user', [ $this->authenticator_mock, 'register' ] );
WP_Mock::expectActionAdded( 'rtcamp.google_redirect_url', [ $this->testee, 'redirect_url' ] );
WP_Mock::expectActionAdded( 'rtcamp.google_user_created', [ $this->testee, 'user_meta' ] );
WP_Mock::expectFilterAdded( 'rtcamp.google_login_state', [ $this->testee, 'state_redirect' ] );
@@ -89,27 +93,28 @@ public function testInit() {
* @covers ::login_button
*/
public function testLoginButton() {
- $pluginMock = $this->createMock( Plugin::class );
- $pluginMock->template_dir = 'https://example.com/templates/';
- $containerMock = $this->createMock( Container::class );
- $containerMock->expects( $this->once() )
- ->method( 'get' )
- ->willReturn( $this->ghClientMock );
+ $plugin_mock = $this->createMock( Plugin::class );
+ $plugin_mock->template_dir = 'https://example.com/templates/';
+
+ $container_mock = $this->createMock( Container::class );
+ $container_mock->expects( $this->once() )
+ ->method( 'get' )
+ ->willReturn( $this->gh_client_mock );
- $pluginMock->expects( $this->once() )
- ->method( 'container' )
- ->willReturn( $containerMock );
+ $plugin_mock->expects( $this->once() )
+ ->method( 'container' )
+ ->willReturn( $container_mock );
- $this->ghClientMock->expects( $this->once() )
- ->method( 'authorization_url' )
- ->willReturn( 'https://google.com/auth/' );
+ $this->gh_client_mock->expects( $this->once() )
+ ->method( 'authorization_url' )
+ ->willReturn( 'https://google.com/auth/' );
$this->wpMockFunction(
'RtCamp\GoogleLogin\plugin',
[],
2,
- $pluginMock
+ $plugin_mock
);
WP_Mock::userFunction(
@@ -117,19 +122,19 @@ public function testLoginButton() {
[
'times' => 1,
'args' => [
- 'https://example.com/templates/'
+ 'https://example.com/templates/',
],
- 'return_arg' => 0
+ 'return_arg' => 0,
]
);
- $helperMock = Mockery::mock( 'alias:' . Helper::class );
- $helperMock->expects( 'render_template' )->once()->withArgs(
+ $helper_mock = Mockery::mock( 'alias:' . Helper::class );
+ $helper_mock->expects( 'render_template' )->once()->withArgs(
[
'https://example.com/templates/google-login-button.php',
[
'login_url' => 'https://google.com/auth/',
- ]
+ ],
]
);
@@ -141,12 +146,13 @@ public function testLoginButton() {
* @covers ::authenticate
*/
public function testAuthenticationForNoCode() {
- $helperMock = Mockery::mock( 'alias:' . Helper::class );
- $helperMock->expects( 'filter_input' )->once()->withArgs(
+
+ $helper_mock = Mockery::mock( 'alias:' . Helper::class );
+ $helper_mock->expects( 'filter_input' )->once()->withArgs(
[
INPUT_GET,
'code',
- FILTER_SANITIZE_STRING
+ FILTER_SANITIZE_STRING,
]
)->andReturn( null );
@@ -154,7 +160,7 @@ public function testAuthenticationForNoCode() {
$wp_user_mock->login = 'test';
$wp_user_mock->email = 'test@unit.com';
- $returned = $this->testee->authenticate( $wp_user_mock );
+ $returned = $this->testee->authenticate( $wp_user_mock );
$this->assertSame( $returned, $wp_user_mock );
}
@@ -163,12 +169,13 @@ public function testAuthenticationForNoCode() {
* @covers ::authenticate
*/
public function testAuthenticationForAlreadyAuthenticatedUser() {
- $helperMock = Mockery::mock( 'alias:' . Helper::class );
- $helperMock->expects( 'filter_input' )->never()->withArgs(
+
+ $helper_mock = Mockery::mock( 'alias:' . Helper::class );
+ $helper_mock->expects( 'filter_input' )->never()->withArgs(
[
INPUT_GET,
'code',
- FILTER_SANITIZE_STRING
+ FILTER_SANITIZE_STRING,
]
)->andReturn( null );
@@ -182,27 +189,28 @@ public function testAuthenticationForAlreadyAuthenticatedUser() {
* @covers ::authenticate
*/
public function testAuthenticationForDifferentProvider() {
+
$state = [
'nonce' => '1234',
'provider' => 'some_other',
];
- $state = base64_encode( json_encode( $state ) );
+ $state = base64_encode( wp_json_encode( $state ) );
- $helperMock = Mockery::mock( 'alias:' . Helper::class );
- $helperMock->expects( 'filter_input' )->once()->withArgs(
+ $helper_mock = Mockery::mock( 'alias:' . Helper::class );
+ $helper_mock->expects( 'filter_input' )->once()->withArgs(
[
INPUT_GET,
'code',
- FILTER_SANITIZE_STRING
+ FILTER_SANITIZE_STRING,
]
)->andReturn( 'test_code' );
- $helperMock->expects( 'filter_input' )->once()->withArgs(
+ $helper_mock->expects( 'filter_input' )->once()->withArgs(
[
INPUT_GET,
'state',
- FILTER_SANITIZE_STRING
+ FILTER_SANITIZE_STRING,
]
)->andReturn( $state );
@@ -210,7 +218,7 @@ public function testAuthenticationForDifferentProvider() {
$wp_user_mock->login = 'test';
$wp_user_mock->email = 'test@unit.com';
- $returned = $this->testee->authenticate( $wp_user_mock );
+ $returned = $this->testee->authenticate( $wp_user_mock );
$this->assertSame( $returned, $wp_user_mock );
}
@@ -219,20 +227,21 @@ public function testAuthenticationForDifferentProvider() {
* @covers ::authenticate
*/
public function testAuthenticationWithForgedState() {
- $helperMock = Mockery::mock( 'alias:' . Helper::class );
- $helperMock->expects( 'filter_input' )->once()->withArgs(
+
+ $helper_mock = Mockery::mock( 'alias:' . Helper::class );
+ $helper_mock->expects( 'filter_input' )->once()->withArgs(
[
INPUT_GET,
'code',
- FILTER_SANITIZE_STRING
+ FILTER_SANITIZE_STRING,
]
)->andReturn( 'abc' );
- $helperMock->expects( 'filter_input' )->once()->withArgs(
+ $helper_mock->expects( 'filter_input' )->once()->withArgs(
[
INPUT_GET,
'state',
- FILTER_SANITIZE_STRING
+ FILTER_SANITIZE_STRING,
]
)->andReturn( 'eyJwcm92aWRlciI6ImdpdGh1YiJ9' );
@@ -246,26 +255,27 @@ public function testAuthenticationWithForgedState() {
* @covers ::authenticate
*/
public function testAuthenticationWhenUserExists() {
- $helperMock = Mockery::mock( 'alias:' . Helper::class );
- $helperMock->expects( 'filter_input' )->once()->withArgs(
+
+ $helper_mock = Mockery::mock( 'alias:' . Helper::class );
+ $helper_mock->expects( 'filter_input' )->once()->withArgs(
[
INPUT_GET,
'code',
- FILTER_SANITIZE_STRING
+ FILTER_SANITIZE_STRING,
]
)->andReturn( 'abc' );
- $helperMock->expects( 'filter_input' )->once()->withArgs(
+ $helper_mock->expects( 'filter_input' )->once()->withArgs(
[
INPUT_GET,
'state',
- FILTER_SANITIZE_STRING
+ FILTER_SANITIZE_STRING,
]
)->andReturn( 'eyJwcm92aWRlciI6Imdvb2dsZSIsIm5vbmNlIjoidGVzdG5vbmNlIn0=' );
- $this->ghClientMock->expects( $this->never() )
- ->method( 'state' )
- ->willReturn( 'eyJwcm92aWRlciI6Imdvb2dsZSIsIm5vbmNlIjoidGVzdG5vbmNlIn0=' );
+ $this->gh_client_mock->expects( $this->never() )
+ ->method( 'state' )
+ ->willReturn( 'eyJwcm92aWRlciI6Imdvb2dsZSIsIm5vbmNlIjoidGVzdG5vbmNlIn0=' );
$this->wpMockFunction(
'wp_verify_nonce',
@@ -277,26 +287,26 @@ public function testAuthenticationWhenUserExists() {
true
);
- $this->ghClientMock->expects( $this->once() )
- ->method( 'set_access_token' )
- ->with( 'abc' );
+ $this->gh_client_mock->expects( $this->once() )
+ ->method( 'set_access_token' )
+ ->with( 'abc' );
$user = (object) [
'email' => 'fakeemail@domain.com',
];
- $this->ghClientMock->expects( $this->once() )
- ->method( 'user' )
- ->willReturn( $user );
+ $this->gh_client_mock->expects( $this->once() )
+ ->method( 'user' )
+ ->willReturn( $user );
- $userMock = Mockery::mock( 'WP_User' );
- $this->authenticatorMock->expects( $this->once() )
- ->method( 'authenticate' )
- ->willReturn( $userMock );
+ $user_mock = Mockery::mock( 'WP_User' );
+ $this->authenticator_mock->expects( $this->once() )
+ ->method( 'authenticate' )
+ ->willReturn( $user_mock );
$returned = $this->testee->authenticate();
- $this->assertSame( $returned, $userMock );
+ $this->assertSame( $returned, $user_mock );
$this->assertConditionsMet();
}
@@ -305,26 +315,27 @@ public function testAuthenticationWhenUserExists() {
* @covers ::authenticate
*/
public function testAuthenticationCapturesExceptions() {
- $helperMock = Mockery::mock( 'alias:' . Helper::class );
- $helperMock->expects( 'filter_input' )->once()->withArgs(
+
+ $helper_mock = Mockery::mock( 'alias:' . Helper::class );
+ $helper_mock->expects( 'filter_input' )->once()->withArgs(
[
INPUT_GET,
'code',
- FILTER_SANITIZE_STRING
+ FILTER_SANITIZE_STRING,
]
)->andReturn( 'abc' );
- $helperMock->expects( 'filter_input' )->once()->withArgs(
+ $helper_mock->expects( 'filter_input' )->once()->withArgs(
[
INPUT_GET,
'state',
- FILTER_SANITIZE_STRING
+ FILTER_SANITIZE_STRING,
]
)->andReturn( 'eyJwcm92aWRlciI6Imdvb2dsZSIsIm5vbmNlIjoidGVzdG5vbmNlIn0=' );
- $this->ghClientMock->expects( $this->never() )
- ->method( 'state' )
- ->willReturn( 'eyJwcm92aWRlciI6Imdvb2dsZSIsIm5vbmNlIjoidGVzdG5vbmNlIn0=' );
+ $this->gh_client_mock->expects( $this->never() )
+ ->method( 'state' )
+ ->willReturn( 'eyJwcm92aWRlciI6Imdvb2dsZSIsIm5vbmNlIjoidGVzdG5vbmNlIn0=' );
$this->wpMockFunction(
'wp_verify_nonce',
@@ -336,10 +347,10 @@ public function testAuthenticationCapturesExceptions() {
true
);
- $this->ghClientMock->expects( $this->once() )
- ->method( 'set_access_token' )
- ->with( 'abc' )
- ->willThrowException( new Exception( 'Exception for test' ) );
+ $this->gh_client_mock->expects( $this->once() )
+ ->method( 'set_access_token' )
+ ->with( 'abc' )
+ ->willThrowException( new Exception( 'Exception for test' ) );
Mockery::mock( 'WP_Error' );
$returned = $this->testee->authenticate();
@@ -352,7 +363,8 @@ public function testAuthenticationCapturesExceptions() {
* @covers ::user_meta
*/
public function testUserMeta() {
- $user = new \stdClass();
+
+ $user = new \stdClass();
$user->login = 'login';
$this->wpMockFunction(
@@ -387,6 +399,7 @@ public function testUserMeta() {
* @covers ::redirect_url
*/
public function testRedirectURLRetuensWithQueryParam() {
+
$url = 'https://example.com/?redirect_to=https://example.com/wp-admin';
$this->wpMockFunction(
@@ -407,12 +420,13 @@ public function testRedirectURLRetuensWithQueryParam() {
* @covers ::state_redirect
*/
public function testStateRedirectWithRedirectTo() {
- $helperMock = Mockery::mock( 'alias:' . Helper::class );
- $helperMock->expects( 'filter_input' )->once()->withArgs(
+
+ $helper_mock = Mockery::mock( 'alias:' . Helper::class );
+ $helper_mock->expects( 'filter_input' )->once()->withArgs(
[
INPUT_GET,
'redirect_to',
- FILTER_SANITIZE_STRING
+ FILTER_SANITIZE_STRING,
]
)->andReturn( 'https://example.com/state-page' );
@@ -426,12 +440,13 @@ public function testStateRedirectWithRedirectTo() {
* @covers ::state_redirect
*/
public function testStateRedirectWithoutRedirectTo() {
- $helperMock = Mockery::mock( 'alias:' . Helper::class );
- $helperMock->expects( 'filter_input' )->once()->withArgs(
+
+ $helper_mock = Mockery::mock( 'alias:' . Helper::class );
+ $helper_mock->expects( 'filter_input' )->once()->withArgs(
[
INPUT_GET,
'redirect_to',
- FILTER_SANITIZE_STRING
+ FILTER_SANITIZE_STRING,
]
)->andReturn( null );
@@ -452,12 +467,13 @@ public function testStateRedirectWithoutRedirectTo() {
* @covers ::login_redirect
*/
public function testLoginRedirectWithNotStateAuthenticated() {
- $helperMock = Mockery::mock( 'alias:' . Helper::class );
- $helperMock->expects( 'filter_input' )->once()->withArgs(
+
+ $helper_mock = Mockery::mock( 'alias:' . Helper::class );
+ $helper_mock->expects( 'filter_input' )->once()->withArgs(
[
INPUT_GET,
'state',
- FILTER_SANITIZE_STRING
+ FILTER_SANITIZE_STRING,
]
)->andReturn( [] );
diff --git a/tests/php/Unit/Modules/SettingsTest.php b/tests/php/Unit/Modules/SettingsTest.php
index bc2616e1..d095a772 100644
--- a/tests/php/Unit/Modules/SettingsTest.php
+++ b/tests/php/Unit/Modules/SettingsTest.php
@@ -33,6 +33,7 @@ class SettingsTest extends TestCase {
* @return void
*/
public function setUp(): void {
+
$this->testee = new Testee();
}
@@ -40,10 +41,12 @@ public function setUp(): void {
* @covers ::name
*/
public function testName() {
+
$this->assertSame( 'settings', $this->testee->name() );
}
public function testImplementsModuleInterface() {
+
$this->assertTrue( $this->testee instanceof ModuleInterface );
}
@@ -51,6 +54,7 @@ public function testImplementsModuleInterface() {
* @covers ::__get
*/
public function testGetWithNull() {
+
$value = $this->testee->__get( 'some_test_property' );
$this->assertEquals( null, $value );
}
@@ -59,15 +63,16 @@ public function testGetWithNull() {
* @covers ::__get
*/
public function testGetWithProper() {
+
$this->wpMockFunction(
'get_option',
[
'wp_google_login_settings',
- []
+ [],
],
1,
[
- 'client_id' => 'cid'
+ 'client_id' => 'cid',
]
);
@@ -80,11 +85,12 @@ public function testGetWithProper() {
* @covers ::init
*/
public function testInit() {
+
$this->wpMockFunction(
'get_option',
[
'wp_google_login_settings',
- []
+ [],
],
1,
[]
@@ -101,11 +107,12 @@ public function testInit() {
* @covers ::register_settings
*/
public function testRegisterSettings() {
+
$this->wpMockFunction(
'register_setting',
[
'wp_google_login',
- 'wp_google_login_settings'
+ 'wp_google_login_settings',
],
1,
true
@@ -117,7 +124,7 @@ public function testRegisterSettings() {
'wp_google_login_section',
'Log in with Google Settings',
\Closure::class,
- 'login-with-google'
+ 'login-with-google',
],
1
);
@@ -133,7 +140,7 @@ public function testRegisterSettings() {
\WP_Mock\Functions::type( 'string' ),
\WP_Mock\Functions::type( 'array' ),
],
- 'times' => 6
+ 'times' => 6,
]
);
@@ -145,6 +152,7 @@ public function testRegisterSettings() {
* @covers ::settings_page
*/
public function testSettingsPage() {
+
$this->wpMockFunction(
'add_options_page',
[
@@ -154,7 +162,7 @@ public function testSettingsPage() {
'login-with-google',
[
$this->testee,
- 'output'
+ 'output',
],
]
);
@@ -167,6 +175,7 @@ public function testSettingsPage() {
* @covers ::output
*/
public function testOutput() {
+
$this->wpMockFunction(
'settings_fields',
[
@@ -190,7 +199,7 @@ public function testOutput() {
''
);
- $this->setOutputCallback(function() {});
+ $this->setOutputCallback( function() {} );
$this->testee->output();
$this->assertConditionsMet();
}
@@ -199,13 +208,14 @@ public function testOutput() {
* @covers ::client_id_field
*/
public function testClientIdField() {
+
$this->wpMockFunction(
'esc_html__',
[
'Create oAuth Client ID and Client Secret at',
- 'login-with-google'
+ 'login-with-google',
],
- 2,
+ 2
);
$this->wpMockFunction(
@@ -216,12 +226,12 @@ public function testClientIdField() {
esc_html__( 'Create oAuth Client ID and Client Secret at', 'login-with-google' ),
'https://console.developers.google.com/apis/dashboard',
'console.developers.google.com'
- )
+ ),
],
- 1,
+ 1
);
- $this->setOutputCallback(function() {});
+ $this->setOutputCallback( function() {} );
$this->testee->client_id_field();
$this->assertConditionsMet();
}
@@ -230,23 +240,24 @@ public function testClientIdField() {
* @covers ::user_registration
*/
public function testUserRegistration() {
+
$this->testee->registration_enabled = 'yes';
$this->wpMockFunction(
'checked',
[
- 'yes'
+ 'yes',
],
- 1,
+ 1
);
$this->wpMockFunction(
'esc_html_e',
[
'Create a new user account if it does not exist already',
- 'login-with-google'
+ 'login-with-google',
],
- 1,
+ 1
);
$this->wpMockFunction(
@@ -262,10 +273,10 @@ public function testUserRegistration() {
/* translators: %1s will be replaced by page link */
__( 'If this setting is checked, a new user will be created even if membership setting is off.', 'login-with-google' ),
],
- 1,
+ 1
);
- $this->setOutputCallback(function() {});
+ $this->setOutputCallback( function() {} );
$this->testee->user_registration();
$this->assertConditionsMet();
}
@@ -274,6 +285,7 @@ public function testUserRegistration() {
* @covers ::whitelisted_domains
*/
public function testWhitelistedDomains() {
+
$this->testee->whitelisted_domains = 'https://example1.com,https://example2.com';
$this->wpMockFunction(
@@ -281,18 +293,18 @@ public function testWhitelistedDomains() {
[
'https://example1.com,https://example2.com',
],
- 1,
+ 1
);
$this->wpMockFunction(
'esc_html',
[
- __( 'Add each domain comma separated', 'login-with-google' )
+ __( 'Add each domain comma separated', 'login-with-google' ),
],
- 1,
+ 1
);
- $this->setOutputCallback(function() {});
+ $this->setOutputCallback( function() {} );
$this->testee->whitelisted_domains();
$this->assertConditionsMet();
}
@@ -301,18 +313,18 @@ public function testWhitelistedDomains() {
* @covers ::client_secret_field
*/
public function testClientSecretField() {
+
$this->testee->client_secret = 'cis';
$this->wpMockFunction(
'esc_attr',
[
- 'cis'
+ 'cis',
],
1
);
- $this->setOutputCallback(function() {});
+ $this->setOutputCallback( function() {} );
$this->testee->client_secret_field();
$this->assertConditionsMet();
}
-
}
diff --git a/tests/php/Unit/Modules/ShortCodeTest.php b/tests/php/Unit/Modules/ShortCodeTest.php
index 0d1f270a..2e526213 100644
--- a/tests/php/Unit/Modules/ShortCodeTest.php
+++ b/tests/php/Unit/Modules/ShortCodeTest.php
@@ -27,12 +27,12 @@ class ShortCodeTest extends TestCase {
/**
* @var GoogleClient
*/
- private $ghClientMock;
+ private $gh_client_mock;
/**
* @var Assets
*/
- private $assetMock;
+ private $asset_mock;
/**
* @var Testee
@@ -45,10 +45,10 @@ class ShortCodeTest extends TestCase {
* @return void
*/
public function setUp(): void {
- $this->ghClientMock = $this->createMock( GoogleClient::class );
- $this->assetMock = $this->createMock( Assets::class );
+ $this->gh_client_mock = $this->createMock( GoogleClient::class );
+ $this->asset_mock = $this->createMock( Assets::class );
- $this->testee = new Testee( $this->ghClientMock, $this->assetMock );
+ $this->testee = new Testee( $this->gh_client_mock, $this->asset_mock );
}
/**
@@ -76,7 +76,7 @@ public function testInit() {
[
$this->testee,
'callback',
- ]
+ ],
]
);
@@ -91,6 +91,7 @@ public function testInit() {
* @covers ::should_display
*/
public function testCallbackWhenUserIsLoggedIn() {
+
$this->wpMockFunction(
'get_permalink',
[],
@@ -111,7 +112,7 @@ public function testCallbackWhenUserIsLoggedIn() {
'google_login',
],
'times' => 1,
- 'return_arg' => 0
+ 'return_arg' => 0,
]
);
@@ -132,6 +133,7 @@ public function testCallbackWhenUserIsLoggedIn() {
* @covers ::should_display
*/
public function testCallbackWhenUserIsLoggedOut() {
+
WP_Mock::userFunction(
'shortcode_atts',
[
@@ -145,7 +147,7 @@ public function testCallbackWhenUserIsLoggedOut() {
'google_login',
],
'times' => 1,
- 'return_arg' => 0
+ 'return_arg' => 0,
]
);
@@ -174,13 +176,13 @@ public function testCallbackWhenUserIsLoggedOut() {
'/some/path/templates/'
);
- $this->ghClientMock->expects( $this->once() )
- ->method( 'authorization_url' )
- ->willReturn( 'https://google.com/auth/' );
+ $this->gh_client_mock->expects( $this->once() )
+ ->method( 'authorization_url' )
+ ->willReturn( 'https://google.com/auth/' );
- $helperMock = Mockery::mock( 'alias:' . Helper::class );
- $helperMock->expects( 'render_template' )->once()->withArgs(
+ $helper_mock = Mockery::mock( 'alias:' . Helper::class );
+ $helper_mock->expects( 'render_template' )->once()->withArgs(
[
'/some/path/templates/google-login-button.php',
[
@@ -189,7 +191,7 @@ public function testCallbackWhenUserIsLoggedOut() {
'redirect_to' => null,
'login_url' => 'https://google.com/auth/',
],
- false
+ false,
]
)->andReturn( '' );
@@ -202,6 +204,7 @@ public function testCallbackWhenUserIsLoggedOut() {
* @covers ::should_display
*/
public function testScanShortcodeForSinglePage() {
+
$this->wpMockFunction(
'is_single',
[],
@@ -223,7 +226,7 @@ public function testScanShortcodeForSinglePage() {
false
);
- $this->assetMock->expects( $this->once() )->method( 'enqueue_login_styles' );
+ $this->asset_mock->expects( $this->once() )->method( 'enqueue_login_styles' );
$output = $this->testee->scan_shortcode( 'Hello', 'google_login', [] );
$this->assertSame( 'Hello', $output );
@@ -234,6 +237,7 @@ public function testScanShortcodeForSinglePage() {
* @covers ::should_display
*/
public function testScanShortcodeForDifferentTag() {
+
$this->wpMockFunction(
'is_single',
[],
@@ -248,8 +252,7 @@ public function testScanShortcodeForDifferentTag() {
false
);
-
- $this->assetMock->expects( $this->never() )->method( 'enqueue_login_styles' );
+ $this->asset_mock->expects( $this->never() )->method( 'enqueue_login_styles' );
$output = $this->testee->scan_shortcode( 'Hello', 'other_tag', [] );
$this->assertSame( 'Hello', $output );
@@ -259,14 +262,15 @@ public function testScanShortcodeForDifferentTag() {
* @covers ::redirect_url
*/
public function testRedirectURL() {
- $url = 'https://example.com/?redirect_to=https://example.com/wp-admin';
+
+ $url = 'https://example.com/?redirect_to=https://example.com/wp-admin';
$this->testee->redirect_uri = 'https://example.com/some-page';
$this->wpMockFunction(
'remove_query_arg',
[
'redirect_to',
- $url
+ $url,
],
1,
'https://example.com/'
@@ -280,11 +284,12 @@ public function testRedirectURL() {
* @covers ::state_redirect
*/
public function testStateRedirectWithRedirectUrl() {
+
$this->testee->redirect_uri = 'https://example.com';
$state = [
'provider' => 'google',
- 'redirect_to' => 'https://example.com'
+ 'redirect_to' => 'https://example.com',
];
$expected = $this->testee->state_redirect( $state );
@@ -295,10 +300,11 @@ public function testStateRedirectWithRedirectUrl() {
* @covers ::state_redirect
*/
public function testStateRedirectWithoutRedirectUrl() {
+
$this->testee->redirect_uri = null;
$state = [
- 'provider' => 'google'
+ 'provider' => 'google',
];
$expected = $this->testee->state_redirect( $state );
diff --git a/tests/php/Unit/PluginTest.php b/tests/php/Unit/PluginTest.php
index d594aad0..967043bf 100644
--- a/tests/php/Unit/PluginTest.php
+++ b/tests/php/Unit/PluginTest.php
@@ -29,14 +29,14 @@ class PluginTest extends TestCase {
*
* @var ContainerInterface
*/
- private $containerMock;
+ private $container_mock;
/**
* Mock for module.
*
* @var ModuleInterface
*/
- private $moduleMock;
+ private $module_mock;
/**
* Object in test.
@@ -49,9 +49,10 @@ class PluginTest extends TestCase {
* Runs before any test in class is run.
*/
public function setUp(): void {
- $this->moduleMock = $this->createMock( ModuleInterface::class );
- $this->containerMock = $this->createMock( Container::class );
- $this->testee = new Testee( $this->containerMock );
+
+ $this->module_mock = $this->createMock( ModuleInterface::class );
+ $this->container_mock = $this->createMock( Container::class );
+ $this->testee = new Testee( $this->container_mock );
}
/**
@@ -61,22 +62,23 @@ public function setUp(): void {
* @covers ::activate_modules
*/
public function testRun() {
- $this->moduleMock->expects( $this->exactly( 6 ) )
- ->method( 'init' );
- $this->containerMock->expects( $this->once() )
- ->method( 'define_services' );
+ $this->module_mock->expects( $this->exactly( 6 ) )
+ ->method( 'init' );
+
+ $this->container_mock->expects( $this->once() )
+ ->method( 'define_services' );
- $this->containerMock->expects( $this->exactly( 6 ) )
- ->method( 'get' )
- ->withAnyParameters()
- ->willReturn( $this->moduleMock );
+ $this->container_mock->expects( $this->exactly( 6 ) )
+ ->method( 'get' )
+ ->withAnyParameters()
+ ->willReturn( $this->module_mock );
$this->wpMockFunction(
'trailingslashit',
[
- WP_Mock\Functions::type( 'string' )
+ WP_Mock\Functions::type( 'string' ),
],
3,
'slashedstring/'
@@ -85,7 +87,7 @@ public function testRun() {
$this->wpMockFunction(
'plugin_dir_url',
[
- 'slashedstring/login-with-google.php'
+ 'slashedstring/login-with-google.php',
]
);
@@ -100,21 +102,22 @@ public function testRun() {
* @covers ::run
*/
public function testPath() {
- $this->moduleMock->expects( $this->exactly( 6 ) )
- ->method( 'init' );
- $this->containerMock->expects( $this->once() )
- ->method( 'define_services' );
+ $this->module_mock->expects( $this->exactly( 6 ) )
+ ->method( 'init' );
+
+ $this->container_mock->expects( $this->once() )
+ ->method( 'define_services' );
- $this->containerMock->expects( $this->exactly( 6 ) )
- ->method( 'get' )
- ->withAnyParameters()
- ->willReturn( $this->moduleMock );
+ $this->container_mock->expects( $this->exactly( 6 ) )
+ ->method( 'get' )
+ ->withAnyParameters()
+ ->willReturn( $this->module_mock );
$this->wpMockFunction(
'trailingslashit',
[
- WP_Mock\Functions::type( 'string' )
+ WP_Mock\Functions::type( 'string' ),
],
3,
'slashedstring/'
@@ -123,7 +126,7 @@ public function testPath() {
$this->wpMockFunction(
'plugin_dir_url',
[
- 'slashedstring/login-with-google.php'
+ 'slashedstring/login-with-google.php',
]
);
@@ -138,15 +141,16 @@ public function testPath() {
* @covers ::run
*/
public function testTemplateDirPath() {
- $this->containerMock->expects( $this->exactly( 6 ) )
- ->method( 'get' )
- ->withAnyParameters()
- ->willReturn( $this->moduleMock );
+
+ $this->container_mock->expects( $this->exactly( 6 ) )
+ ->method( 'get' )
+ ->withAnyParameters()
+ ->willReturn( $this->module_mock );
$this->wpMockFunction(
'trailingslashit',
[
- WP_Mock\Functions::type( 'string' )
+ WP_Mock\Functions::type( 'string' ),
],
3,
'slashedstring/'
@@ -155,7 +159,7 @@ public function testTemplateDirPath() {
$this->wpMockFunction(
'plugin_dir_url',
[
- 'slashedstring/login-with-google.php'
+ 'slashedstring/login-with-google.php',
]
);
@@ -170,15 +174,15 @@ public function testTemplateDirPath() {
* @covers ::run
*/
public function testPluginURL() {
- $this->containerMock->expects( $this->exactly( 6 ) )
- ->method( 'get' )
- ->withAnyParameters()
- ->willReturn( $this->moduleMock );
+ $this->container_mock->expects( $this->exactly( 6 ) )
+ ->method( 'get' )
+ ->withAnyParameters()
+ ->willReturn( $this->module_mock );
$this->wpMockFunction(
'trailingslashit',
[
- WP_Mock\Functions::type( 'string' )
+ WP_Mock\Functions::type( 'string' ),
],
3,
'slashedstring/'
@@ -188,9 +192,9 @@ public function testPluginURL() {
'plugin_dir_url',
[
'args' => [
- 'slashedstring/login-with-google.php'
+ 'slashedstring/login-with-google.php',
],
- 'return_arg' => 0
+ 'return_arg' => 0,
]
);
@@ -205,15 +209,15 @@ public function testPluginURL() {
* @covers ::run
*/
public function testAssetsDirPath() {
- $this->containerMock->expects( $this->exactly( 6 ) )
- ->method( 'get' )
- ->withAnyParameters()
- ->willReturn( $this->moduleMock );
+ $this->container_mock->expects( $this->exactly( 6 ) )
+ ->method( 'get' )
+ ->withAnyParameters()
+ ->willReturn( $this->module_mock );
$this->wpMockFunction(
'trailingslashit',
[
- WP_Mock\Functions::type( 'string' )
+ WP_Mock\Functions::type( 'string' ),
],
3,
'slashedstring/'
@@ -222,7 +226,7 @@ public function testAssetsDirPath() {
$this->wpMockFunction(
'plugin_dir_url',
[
- 'slashedstring/login-with-google.php'
+ 'slashedstring/login-with-google.php',
]
);
@@ -237,15 +241,16 @@ public function testAssetsDirPath() {
* @covers ::run
*/
public function testHooksAddedOnRun() {
- $this->containerMock->expects( $this->exactly( 6 ) )
- ->method( 'get' )
- ->withAnyParameters()
- ->willReturn( $this->moduleMock );
+
+ $this->container_mock->expects( $this->exactly( 6 ) )
+ ->method( 'get' )
+ ->withAnyParameters()
+ ->willReturn( $this->module_mock );
$this->wpMockFunction(
'trailingslashit',
[
- WP_Mock\Functions::type( 'string' )
+ WP_Mock\Functions::type( 'string' ),
],
3,
'slashedstring/'
@@ -254,7 +259,7 @@ public function testHooksAddedOnRun() {
$this->wpMockFunction(
'plugin_dir_url',
[
- 'slashedstring/login-with-google.php'
+ 'slashedstring/login-with-google.php',
]
);
@@ -272,11 +277,11 @@ public function testHooksAddedOnRun() {
*/
public function testLoadTranslation() {
- $this->moduleMock->expects( $this->never() )
- ->method( 'init' );
+ $this->module_mock->expects( $this->never() )
+ ->method( 'init' );
- $this->containerMock->expects( $this->never() )
- ->method( 'define_services' );
+ $this->container_mock->expects( $this->never() )
+ ->method( 'define_services' );
$this->wpMockFunction(
'get_locale',
@@ -301,7 +306,7 @@ function () {
[
'login-with-google',
false,
- 'path-to-test/languages/en_US'
+ 'path-to-test/languages/en_US',
]
);
@@ -316,6 +321,6 @@ function () {
public function testContainer() {
$container = $this->testee->container();
- $this->assertSame( $container, $this->containerMock );
+ $this->assertSame( $container, $this->container_mock );
}
}
diff --git a/tests/php/Unit/Utils/AuthenticatorTest.php b/tests/php/Unit/Utils/AuthenticatorTest.php
index 0c56f6ca..8284031e 100644
--- a/tests/php/Unit/Utils/AuthenticatorTest.php
+++ b/tests/php/Unit/Utils/AuthenticatorTest.php
@@ -35,20 +35,22 @@ class AuthenticatorTest extends TestCase {
/**
* @var Settings
*/
- private $settingsMock;
+ private $settings_mock;
/**
* @return void
*/
public function setUp(): void {
- $this->settingsMock = $this->createMock( Settings::class );
- $this->testee = new Testee( $this->settingsMock );
+
+ $this->settings_mock = $this->createMock( Settings::class );
+ $this->testee = new Testee( $this->settings_mock );
}
/**
* @covers ::__construct
*/
public function testInstance() {
+
$this->assertInstanceOf( Testee::class, $this->testee );
}
@@ -56,8 +58,9 @@ public function testInstance() {
* @covers ::authenticate
*/
public function testAuthenticateException() {
+
$user = [
- 'name' => 'Test'
+ 'name' => 'Test',
];
$user = (object) $user;
@@ -132,11 +135,11 @@ public function testAuthenticateFilterApplied() {
'test'
);
- $helperMock = Mockery::mock( 'alias:' . Helper::class );
+ $helper_mock = Mockery::mock( 'alias:' . Helper::class );
- $helperMock->expects( 'unique_username' )
- ->once()
- ->withArgs( ['test'] );
+ $helper_mock->expects( 'unique_username' )
+ ->once()
+ ->withArgs( [ 'test' ] );
WP_Mock::onFilter( 'rtcamp.google_register_user' )->with( $user )->reply( $wp_user );
@@ -148,7 +151,7 @@ public function testAuthenticateFilterApplied() {
* @covers ::register
*/
public function testRegisterThrowsExceptionForRegistrationDisabled() {
- $this->settingsMock->registration_enabled = false;
+ $this->settings_mock->registration_enabled = false;
$this->wpMockFunction(
'get_option',
@@ -169,12 +172,14 @@ public function testRegisterThrowsExceptionForRegistrationDisabled() {
* @covers ::register
*/
public function testRegisterThrowsExceptionForInvalidEmailDomain() {
- $user = (object) [
+
+ $user = (object) [
'email' => 'test@example.com',
'login' => 'test',
];
- $this->settingsMock->registration_enabled = true;
- $this->settingsMock->whitelisted_domains = 'somedomain.com';
+
+ $this->settings_mock->registration_enabled = true;
+ $this->settings_mock->whitelisted_domains = 'somedomain.com';
$this->expectException( \Exception::class );
$this->testee->register( $user );
@@ -185,19 +190,20 @@ public function testRegisterThrowsExceptionForInvalidEmailDomain() {
* @covers ::can_register_with_email
*/
public function testRegisterReturnsUserObject() {
+
$user = (object) [
'email' => 'test@example.com',
'login' => 'test',
];
- $this->settingsMock->registration_enabled = true;
- $this->settingsMock->whitelisted_domains = 'example.com,somedomain.com';
+ $this->settings_mock->registration_enabled = true;
+ $this->settings_mock->whitelisted_domains = 'example.com,somedomain.com';
- $helperMock = Mockery::mock( 'alias:' . Helper::class );
- $helperMock->expects( 'unique_username' )
- ->once()
- ->withArgs( ['test'] )
- ->andReturn( 'test' );
+ $helper_mock = Mockery::mock( 'alias:' . Helper::class );
+ $helper_mock->expects( 'unique_username' )
+ ->once()
+ ->withArgs( [ 'test' ] )
+ ->andReturn( 'test' );
$this->wpMockFunction(
'wp_generate_password',
@@ -215,7 +221,7 @@ public function testRegisterReturnsUserObject() {
'user_email' => 'test@example.com',
'first_name' => '',
'last_name' => '',
- ]
+ ],
],
1,
100
@@ -246,20 +252,21 @@ public function testRegisterReturnsUserObject() {
* @covers ::can_register_with_email
*/
public function testRegisterReturnsUserObjectWithFirstNameOnly() {
+
$user = (object) [
'email' => 'test@example.com',
'login' => 'test',
'given_name' => 'Test',
];
- $this->settingsMock->registration_enabled = true;
- $this->settingsMock->whitelisted_domains = 'example.com,somedomain.com';
+ $this->settings_mock->registration_enabled = true;
+ $this->settings_mock->whitelisted_domains = 'example.com,somedomain.com';
- $helperMock = Mockery::mock( 'alias:' . Helper::class );
- $helperMock->expects( 'unique_username' )
- ->once()
- ->withArgs( ['test'] )
- ->andReturn( 'test' );
+ $helper_mock = Mockery::mock( 'alias:' . Helper::class );
+ $helper_mock->expects( 'unique_username' )
+ ->once()
+ ->withArgs( [ 'test' ] )
+ ->andReturn( 'test' );
$this->wpMockFunction(
'wp_generate_password',
@@ -277,7 +284,7 @@ public function testRegisterReturnsUserObjectWithFirstNameOnly() {
'user_email' => 'test@example.com',
'first_name' => 'Test',
'last_name' => '',
- ]
+ ],
],
1,
100
@@ -308,6 +315,7 @@ public function testRegisterReturnsUserObjectWithFirstNameOnly() {
* @covers ::can_register_with_email
*/
public function testRegisterReturnsUserObjectWithFirstLastName() {
+
$user = (object) [
'email' => 'test@example.com',
'login' => 'test',
@@ -315,14 +323,14 @@ public function testRegisterReturnsUserObjectWithFirstLastName() {
'family_name' => 'User',
];
- $this->settingsMock->registration_enabled = true;
- $this->settingsMock->whitelisted_domains = 'example.com,somedomain.com';
+ $this->settings_mock->registration_enabled = true;
+ $this->settings_mock->whitelisted_domains = 'example.com,somedomain.com';
- $helperMock = Mockery::mock( 'alias:' . Helper::class );
- $helperMock->expects( 'unique_username' )
- ->once()
- ->withArgs( ['test'] )
- ->andReturn( 'test' );
+ $helper_mock = Mockery::mock( 'alias:' . Helper::class );
+ $helper_mock->expects( 'unique_username' )
+ ->once()
+ ->withArgs( [ 'test' ] )
+ ->andReturn( 'test' );
$this->wpMockFunction(
'wp_generate_password',
@@ -340,7 +348,7 @@ public function testRegisterReturnsUserObjectWithFirstLastName() {
'user_email' => 'test@example.com',
'first_name' => 'Test',
'last_name' => 'User',
- ]
+ ],
],
1,
100
@@ -370,6 +378,7 @@ public function testRegisterReturnsUserObjectWithFirstLastName() {
* @covers ::set_auth_cookies
*/
public function testSetAuthCookies() {
+
$wp_user = Mockery::mock( \WP_User::class );
$wp_user->ID = 100;
$wp_user->user_login = 'test';
@@ -392,7 +401,7 @@ public function testSetAuthCookies() {
$this->wpMockFunction(
'wp_set_auth_cookie',
[
- 100
+ 100,
],
1
);
diff --git a/tests/php/Unit/Utils/GoogleClientTest.php b/tests/php/Unit/Utils/GoogleClientTest.php
index 8a3b24bb..9e4a6d86 100644
--- a/tests/php/Unit/Utils/GoogleClientTest.php
+++ b/tests/php/Unit/Utils/GoogleClientTest.php
@@ -32,16 +32,20 @@ class GoogleClientTest extends TestCase {
* @return void
*/
public function setUp(): void {
- $this->testee = new Testee( [
- 'client_id' => 'cid',
- 'client_secret' => 'csc',
- ] );
+
+ $this->testee = new Testee(
+ [
+ 'client_id' => 'cid',
+ 'client_secret' => 'csc',
+ ]
+ );
}
/**
* @covers ::__construct
*/
public function testConstruct() {
+
$this->assertSame( 'cid', $this->getTesteeProperty( 'client_id', $this->testee ) );
$this->assertSame( 'csc', $this->getTesteeProperty( 'client_secret', $this->testee ) );
$this->assertSame( '', $this->getTesteeProperty( 'redirect_uri', $this->testee ) );
@@ -51,6 +55,7 @@ public function testConstruct() {
* @covers ::__call
*/
public function testCallWithUser() {
+
$this->expectException( Exception::class );
$this->testee->__call( 'user', null );
}
@@ -59,6 +64,7 @@ public function testCallWithUser() {
* @covers ::__call
*/
public function testCallWithEmails() {
+
$this->expectException( Exception::class );
$this->testee->__call( 'emails', null );
}
@@ -68,6 +74,7 @@ public function testCallWithEmails() {
* @covers ::gt_redirect_url
*/
public function testCallWithOtherMethods() {
+
WP_Mock::expectFilterNotAdded( 'rtcamp.github_redirect_url', '' );
$this->testee->__call( 'some_other_method', null );
@@ -81,6 +88,7 @@ public function testCallWithOtherMethods() {
* @covers ::access_token
*/
public function testSetAccessToken() {
+
WP_Mock::expectFilter( 'rtcamp.google_redirect_url', '' );
$this->wpMockFunction(
@@ -98,7 +106,7 @@ public function testSetAccessToken() {
'code' => 'abc',
'grant_type' => 'authorization_code',
],
- ]
+ ],
],
1,
'response'
@@ -107,7 +115,7 @@ public function testSetAccessToken() {
$this->wpMockFunction(
'wp_remote_retrieve_response_code',
[
- 'response'
+ 'response',
],
1,
200
@@ -121,13 +129,13 @@ public function testSetAccessToken() {
1,
function() {
$token = (object) [
- 'access_token' => 'AccessToken'
+ 'access_token' => 'AccessToken',
];
- return json_encode( $token );
+ return wp_json_encode( $token );
}
);
- $obj = $this->testee->set_access_token( 'abc' );
+ $obj = $this->testee->set_access_token( 'abc' );
$token = $this->getTesteeProperty( 'access_token', $this->testee );
$this->assertSame( $this->testee, $obj );
@@ -139,6 +147,7 @@ function() {
* @covers ::set_access_token
*/
public function testSetAccessTokenThrowsException() {
+
WP_Mock::expectFilter( 'rtcamp.google_redirect_url', '' );
$this->wpMockFunction(
@@ -156,7 +165,7 @@ public function testSetAccessTokenThrowsException() {
'code' => 'abc',
'grant_type' => 'authorization_code',
],
- ]
+ ],
],
1,
'response'
@@ -165,7 +174,7 @@ public function testSetAccessTokenThrowsException() {
$this->wpMockFunction(
'wp_remote_retrieve_response_code',
[
- 'response'
+ 'response',
],
1,
400
@@ -179,11 +188,12 @@ public function testSetAccessTokenThrowsException() {
* @covers ::access_token
*/
public function testAccessTokenThrowsExceptionForNon200Code() {
- $ghClient = $this->createPartialMock( Testee::class, [ 'gt_redirect_url' ] );
- $ghClient->expects( $this->once() )->method( 'gt_redirect_url' )->willReturn( '' );
- $ghClient->client_id = 'cid';
- $ghClient->client_secret = 'csc';
+ $gh_client = $this->createPartialMock( Testee::class, [ 'gt_redirect_url' ] );
+ $gh_client->expects( $this->once() )->method( 'gt_redirect_url' )->willReturn( '' );
+
+ $gh_client->client_id = 'cid';
+ $gh_client->client_secret = 'csc';
$this->wpMockFunction(
'wp_remote_post',
@@ -200,7 +210,7 @@ public function testAccessTokenThrowsExceptionForNon200Code() {
'code' => 'abc',
'grant_type' => 'authorization_code',
],
- ]
+ ],
],
1,
'response'
@@ -209,26 +219,27 @@ public function testAccessTokenThrowsExceptionForNon200Code() {
$this->wpMockFunction(
'wp_remote_retrieve_response_code',
[
- 'response'
+ 'response',
],
1,
400
);
$this->expectException( Exception::class );
- $ghClient->access_token( 'abc' );
+ $gh_client->access_token( 'abc' );
}
/**
* @covers ::user
*/
public function testUserReturnsObject() {
+
$this->setTesteeProperty( $this->testee, 'access_token', 'someToken' );
$this->wpMockFunction(
'trailingslashit',
[
- 'https://www.googleapis.com'
+ 'https://www.googleapis.com',
],
1,
'https://www.googleapis.com/'
@@ -242,7 +253,7 @@ public function testUserReturnsObject() {
'headers' => [
'Accept' => 'application/json',
],
- ]
+ ],
],
1,
'response'
@@ -251,7 +262,7 @@ public function testUserReturnsObject() {
$this->wpMockFunction(
'wp_remote_retrieve_response_code',
[
- 'response'
+ 'response',
],
1,
200
@@ -268,11 +279,12 @@ function() {
'email' => 'user@domain.com',
'login' => 'login',
];
- return json_encode( $token );
+ return wp_json_encode( $token );
}
);
$user = $this->testee->user();
+
$this->assertInstanceOf( \stdClass::class, $user );
$this->assertSame( $user->email, 'user@domain.com' );
$this->assertSame( $user->login, 'login' );
@@ -283,12 +295,13 @@ function() {
* @covers ::user
*/
public function testUserThrowsException() {
+
$this->setTesteeProperty( $this->testee, 'access_token', 'someToken' );
$this->wpMockFunction(
'trailingslashit',
[
- 'https://www.googleapis.com'
+ 'https://www.googleapis.com',
],
1,
'https://www.googleapis.com/'
@@ -302,7 +315,7 @@ public function testUserThrowsException() {
'headers' => [
'Accept' => 'application/json',
],
- ]
+ ],
],
1,
'response'
@@ -311,7 +324,7 @@ public function testUserThrowsException() {
$this->wpMockFunction(
'wp_remote_retrieve_response_code',
[
- 'response'
+ 'response',
],
1,
404
@@ -325,12 +338,16 @@ public function testUserThrowsException() {
* @covers ::authorization_url
*/
public function testAuthorizationURL() {
+
$scope = [ 'email', 'profile', 'openid' ];
+
WP_Mock::onFilter( 'rtcamp.google_scope' )->with( $scope )->reply( $scope );
- $ghClient = $this->createPartialMock( Testee::class, [ 'gt_redirect_url', 'state' ] );
- $ghClient->expects( $this->once() )->method( 'gt_redirect_url' )->willReturn( '' );
- $ghClient->expects( $this->once() )->method( 'state' )->willReturn( 'abcd' );
- $ghClient->client_id = 'cid';
+
+ $gh_client = $this->createPartialMock( Testee::class, [ 'gt_redirect_url', 'state' ] );
+ $gh_client->expects( $this->once() )->method( 'gt_redirect_url' )->willReturn( '' );
+ $gh_client->expects( $this->once() )->method( 'state' )->willReturn( 'abcd' );
+
+ $gh_client->client_id = 'cid';
$client_args = [
'client_id' => 'cid',
@@ -345,6 +362,6 @@ public function testAuthorizationURL() {
$expected = 'https://accounts.google.com/o/oauth2/auth?client_id=cid&redirect_uri=&state=abcd&scope=email+profile+openid&access_type=online&response_type=code';
- $this->assertSame( $expected, $ghClient->authorization_url() );
+ $this->assertSame( $expected, $gh_client->authorization_url() );
}
}
diff --git a/tests/php/Unit/Utils/TokenVerifierTest.php b/tests/php/Unit/Utils/TokenVerifierTest.php
index 1ed359b8..9875798d 100644
--- a/tests/php/Unit/Utils/TokenVerifierTest.php
+++ b/tests/php/Unit/Utils/TokenVerifierTest.php
@@ -35,24 +35,27 @@ class TokenVerifierTest extends TestCase {
/**
* @var Settings
*/
- private $settingsMock;
+ private $settings_mock;
/**
* @return void
*/
public function setUp(): void {
- $this->settingsMock = $this->createMock( Settings::class );
- $this->testee = new Testee( $this->settingsMock );
+
+ $this->settings_mock = $this->createMock( Settings::class );
+ $this->testee = new Testee( $this->settings_mock );
}
/**
* @covers ::__construct
*/
public function testInstance() {
+
$this->assertInstanceOf( Testee::class, $this->testee );
}
public function testCertsURL() {
+
$this->assertSame( 'https://www.googleapis.com/oauth2/v1/certs', $this->testee::CERTS_URL );
}
@@ -60,9 +63,11 @@ public function testCertsURL() {
* @covers ::get_supported_algorithm
*/
public function testGetSupportedAlgorithmDefault() {
+
\WP_Mock::expectFilter( 'rtcamp.default_algorithm', OPENSSL_ALGO_SHA256, '' );
+
$expected = OPENSSL_ALGO_SHA256;
- $algo = $this->testee::get_supported_algorithm();
+ $algo = $this->testee::get_supported_algorithm();
$this->assertSame( $expected, $algo );
}
@@ -71,8 +76,9 @@ public function testGetSupportedAlgorithmDefault() {
* @covers ::get_supported_algorithm
*/
public function testGetSHA256Algo() {
+
$expected = OPENSSL_ALGO_SHA256;
- $algo = $this->testee::get_supported_algorithm( 'RS256' );
+ $algo = $this->testee::get_supported_algorithm( 'RS256' );
$this->assertSame( $expected, $algo );
}
@@ -81,6 +87,7 @@ public function testGetSHA256Algo() {
* @covers ::base64_encode_url
*/
public function testBase64EncodeURL() {
+
$str = 'some+random/string=';
$result = $this->testee->base64_encode_url( $str );
@@ -91,6 +98,7 @@ public function testBase64EncodeURL() {
* @covers ::base64_decode_url
*/
public function testBase64DecodeURL() {
+
$str = 'c29tZStyYW5kb20vc3RyaW5nPQ';
$result = $this->testee->base64_decode_url( $str );
@@ -101,9 +109,11 @@ public function testBase64DecodeURL() {
* @covers ::current_user
*/
public function testCurrentUser() {
+
$wp_user = (object) [
'name' => 'Test',
];
+
$this->setTesteeProperty( $this->testee, 'current_user', $wp_user );
$result = $this->testee->current_user();
@@ -114,6 +124,7 @@ public function testCurrentUser() {
* @covers ::get_public_key
*/
public function testPublicKeyIsNull() {
+
$pk = $this->testee->get_public_key( null );
$this->assertNull( $pk );
@@ -123,10 +134,11 @@ public function testPublicKeyIsNull() {
* @covers ::get_public_key
*/
public function testPublicKeyCachedValue() {
+
$this->wpMockFunction(
'get_transient',
[
- 'lwg_pk_my_public_key'
+ 'lwg_pk_my_public_key',
],
1,
'abcd'
@@ -141,10 +153,11 @@ public function testPublicKeyCachedValue() {
* @covers ::get_public_key
*/
public function testPublicKeyIsNullForNon200Response() {
+
$this->wpMockFunction(
'get_transient',
[
- 'lwg_pk_my_public_key'
+ 'lwg_pk_my_public_key',
],
1,
null
@@ -153,7 +166,7 @@ public function testPublicKeyIsNullForNon200Response() {
$this->wpMockFunction(
'wp_remote_get',
[
- $this->testee::CERTS_URL
+ $this->testee::CERTS_URL,
],
1,
'certificate'
@@ -178,10 +191,11 @@ public function testPublicKeyIsNullForNon200Response() {
* @covers ::get_max_age
*/
public function testPublicKeyRetrievalFromResponse() {
+
$this->wpMockFunction(
'get_transient',
[
- 'lwg_pk_my_public_key'
+ 'lwg_pk_my_public_key',
],
1,
null
@@ -190,7 +204,7 @@ public function testPublicKeyRetrievalFromResponse() {
$this->wpMockFunction(
'wp_remote_get',
[
- $this->testee::CERTS_URL
+ $this->testee::CERTS_URL,
],
1,
'certificate'
@@ -206,6 +220,7 @@ public function testPublicKeyRetrievalFromResponse() {
);
$headers = \Mockery::mock( \Requests_Utility_CaseInsensitiveDictionary::class );
+
$headers->expects( 'offsetExists' )->withArgs( [ 'cache-control' ] )->andReturn( true );
$headers->expects( 'offsetGet' )->withArgs( [ 'cache-control' ] )->andReturn( 'public, max-age=600' );
@@ -213,7 +228,7 @@ public function testPublicKeyRetrievalFromResponse() {
'my_public_key' => 'thisissomerandomkey',
];
- $body = json_encode( $body );
+ $body = wp_json_encode( $body );
$this->wpMockFunction(
'wp_remote_retrieve_headers',
@@ -238,13 +253,14 @@ public function testPublicKeyRetrievalFromResponse() {
[
'lwg_pk_my_public_key',
'thisissomerandomkey',
- 300
+ 300,
],
1,
true
);
$pk = $this->testee->get_public_key( 'my_public_key' );
+
$this->assertSame( 'thisissomerandomkey', $pk );
$this->assertConditionsMet();
}
@@ -253,12 +269,13 @@ public function testPublicKeyRetrievalFromResponse() {
* @covers ::set_transient
*/
public function testSetTransient() {
+
$this->wpMockFunction(
'set_transient',
[
'key',
'val',
- 200
+ 200,
]
);
diff --git a/tests/php/bootstrap.php b/tests/php/bootstrap.php
index 112893e5..ff838cfa 100644
--- a/tests/php/bootstrap.php
+++ b/tests/php/bootstrap.php
@@ -8,20 +8,22 @@
* file that was distributed with this source code.
*/
-declare(strict_types=1);
+declare( strict_types=1 );
$vendor = dirname( __DIR__, 2 ) . '/vendor/';
-if (!file_exists($vendor . 'autoload.php')) {
- die('Please install via Composer before running tests.');
+if ( ! file_exists( $vendor . 'autoload.php' ) ) {
+ die( 'Please install via Composer before running tests.' );
}
require_once __DIR__ . '/stubs/hooks.php';
require_once $vendor . 'autoload.php';
require_once __DIR__ . '/TestCase.php';
-WP_Mock::setUsePatchwork(true);
+
+WP_Mock::setUsePatchwork( true );
WP_Mock::bootstrap();
-unset($vendor);
+
+unset( $vendor );
if ( ! defined( 'GH_PLUGIN_DIR' ) ) {
define( 'GH_PLUGIN_DIR', dirname( __DIR__, 2 ) );
diff --git a/tests/php/stubs/hooks.php b/tests/php/stubs/hooks.php
index c530401d..490ee0bc 100644
--- a/tests/php/stubs/hooks.php
+++ b/tests/php/stubs/hooks.php
@@ -9,6 +9,7 @@ function remove_filter( $tag, $callback, $priority = 10, $args = 0 ) { }
}
if ( ! function_exists( 'apply_filters_deprecated' ) ) {
+
function apply_filters_deprecated( string $tag, array $args, string $version, string $replacement = '', string $message = '' ) {
return $args[0] ?? [];
}
diff --git a/vendor/10up/wp_mock/.github/ISSUE_TEMPLATE/bug_report.md b/vendor/10up/wp_mock/.github/ISSUE_TEMPLATE/bug_report.md
new file mode 100644
index 00000000..dd84ea78
--- /dev/null
+++ b/vendor/10up/wp_mock/.github/ISSUE_TEMPLATE/bug_report.md
@@ -0,0 +1,38 @@
+---
+name: Bug report
+about: Create a report to help us improve
+title: ''
+labels: ''
+assignees: ''
+
+---
+
+**Describe the bug**
+A clear and concise description of what the bug is.
+
+**To Reproduce**
+Steps to reproduce the behavior:
+1. Go to '...'
+2. Click on '....'
+3. Scroll down to '....'
+4. See error
+
+**Expected behavior**
+A clear and concise description of what you expected to happen.
+
+**Screenshots**
+If applicable, add screenshots to help explain your problem.
+
+**Desktop (please complete the following information):**
+ - OS: [e.g. iOS]
+ - Browser [e.g. chrome, safari]
+ - Version [e.g. 22]
+
+**Smartphone (please complete the following information):**
+ - Device: [e.g. iPhone6]
+ - OS: [e.g. iOS8.1]
+ - Browser [e.g. stock browser, safari]
+ - Version [e.g. 22]
+
+**Additional context**
+Add any other context about the problem here.
diff --git a/vendor/10up/wp_mock/.github/ISSUE_TEMPLATE/feature_request.md b/vendor/10up/wp_mock/.github/ISSUE_TEMPLATE/feature_request.md
new file mode 100644
index 00000000..bbcbbe7d
--- /dev/null
+++ b/vendor/10up/wp_mock/.github/ISSUE_TEMPLATE/feature_request.md
@@ -0,0 +1,20 @@
+---
+name: Feature request
+about: Suggest an idea for this project
+title: ''
+labels: ''
+assignees: ''
+
+---
+
+**Is your feature request related to a problem? Please describe.**
+A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
+
+**Describe the solution you'd like**
+A clear and concise description of what you want to happen.
+
+**Describe alternatives you've considered**
+A clear and concise description of any alternative solutions or features you've considered.
+
+**Additional context**
+Add any other context or screenshots about the feature request here.
diff --git a/vendor/10up/wp_mock/.gitignore b/vendor/10up/wp_mock/.gitignore
new file mode 100644
index 00000000..f0d9f56e
--- /dev/null
+++ b/vendor/10up/wp_mock/.gitignore
@@ -0,0 +1,7 @@
+/.idea
+composer.lock
+vendor/
+docs/
+.editorconfig
+.phpunit.result.cache
+build/
\ No newline at end of file
diff --git a/vendor/10up/wp_mock/.gitmodules b/vendor/10up/wp_mock/.gitmodules
new file mode 100644
index 00000000..8b137891
--- /dev/null
+++ b/vendor/10up/wp_mock/.gitmodules
@@ -0,0 +1 @@
+
diff --git a/vendor/10up/wp_mock/.travis.yml b/vendor/10up/wp_mock/.travis.yml
new file mode 100644
index 00000000..2042d80b
--- /dev/null
+++ b/vendor/10up/wp_mock/.travis.yml
@@ -0,0 +1,44 @@
+language: php
+
+matrix:
+ include:
+ - php: '7.1'
+ env: WP_MOCK_INSTALL_LOWEST=0
+ - php: '7.2'
+ env: WP_MOCK_INSTALL_LOWEST=0
+ - php: '7.3'
+ env: WP_MOCK_INSTALL_LOWEST=0
+ - php: nightly
+ env: WP_MOCK_INSTALL_LOWEST=0
+ - php: '7.1'
+ env: WP_MOCK_INSTALL_LOWEST=1
+ - php: '7.2'
+ env: WP_MOCK_INSTALL_LOWEST=1
+ - php: '7.3'
+ env: WP_MOCK_INSTALL_LOWEST=1
+ - php: nightly
+ env: WP_MOCK_INSTALL_LOWEST=1
+ allow_failures:
+ - php: nightly
+ env: WP_MOCK_INSTALL_LOWEST=0
+ - php: nightly
+ env: WP_MOCK_INSTALL_LOWEST=1
+
+before_script:
+ - if [ 1 -eq $WP_MOCK_INSTALL_LOWEST ]; then composer update --prefer-lowest; else composer update; fi
+
+script:
+ - mkdir -p build/logs
+ - composer run-script coverage
+
+cache:
+ directories:
+ - vendor
+
+branches:
+ only:
+ - dev
+ - master
+
+after_success:
+ - travis_retry php vendor/bin/php-coveralls
diff --git a/vendor/10up/wp_mock/CONTRIBUTING.md b/vendor/10up/wp_mock/CONTRIBUTING.md
new file mode 100644
index 00000000..43c81513
--- /dev/null
+++ b/vendor/10up/wp_mock/CONTRIBUTING.md
@@ -0,0 +1,26 @@
+# Contributing
+
+Contributions are **welcome** and will be fully **credited**.
+
+We accept contributions via Pull Requests on [Github](https://github.com/10up/wp_mock)
+
+## Branches
+
+* We try to follow [SemVer](http://semver.org/) in WP Mock
+* The current "stable" release version lives on the **master** branch.
+* If there is a current development release, it will live on a **{version}-dev** branch.
+
+## Pull Requests
+
+* New features must be submitted against the the **master** branch
+* Bug fixes should be submitted against the branch in which the bug exists, which is likely **master**.
+* If you're not sure whether a feature idea would be something we'd be interested in, please open an issue before you start working on it. We'd be happy to discuss your idea with you.
+
+## Merging
+
+* As of 2019, all merges to the **master** branch will be squash merges of features.
+* If there are multiple features pending in a release, we will create a **{version}-dev** branch to track development against that version. Once the version is ready, that branch will be squash-merged into **master** as well.
+
+## Thanks
+
+**You're awesome** - Thanks for being interested in contributing your time and code to this project!
\ No newline at end of file
diff --git a/vendor/10up/wp_mock/LICENSE.md b/vendor/10up/wp_mock/LICENSE.md
new file mode 100644
index 00000000..94f2d395
--- /dev/null
+++ b/vendor/10up/wp_mock/LICENSE.md
@@ -0,0 +1,368 @@
+WP_Mock - WordPress API Mocking Framework
+
+Copyright 2013-2019 by the contributors
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
+This program incorporates work covered by the following copyright and
+permission notices:
+
+ WordPress - Web publishing software
+
+ Copyright 2003-2017 by the contributors
+
+ WordPress is released under the GPL
+
+=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+
+ GNU GENERAL PUBLIC LICENSE
+ Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users. This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it. (Some other Free Software Foundation software is covered by
+the GNU Lesser General Public License instead.) You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+ To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have. You must make sure that they, too, receive or can get the
+source code. And you must show them these terms so they know their
+rights.
+
+ We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+ Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software. If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+ Finally, any free program is threatened constantly by software
+patents. We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary. To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ GNU GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License. The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language. (Hereinafter, translation is included without limitation in
+the term "modification".) Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+ 1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+ 2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+ a) You must cause the modified files to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ b) You must cause any work that you distribute or publish, that in
+ whole or in part contains or is derived from the Program or any
+ part thereof, to be licensed as a whole at no charge to all third
+ parties under the terms of this License.
+
+ c) If the modified program normally reads commands interactively
+ when run, you must cause it, when started running for such
+ interactive use in the most ordinary way, to print or display an
+ announcement including an appropriate copyright notice and a
+ notice that there is no warranty (or else, saying that you provide
+ a warranty) and that users may redistribute the program under
+ these conditions, and telling the user how to view a copy of this
+ License. (Exception: if the Program itself is interactive but
+ does not normally print such an announcement, your work based on
+ the Program is not required to print an announcement.)
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+ 3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+ a) Accompany it with the complete corresponding machine-readable
+ source code, which must be distributed under the terms of Sections
+ 1 and 2 above on a medium customarily used for software interchange; or,
+
+ b) Accompany it with a written offer, valid for at least three
+ years, to give any third party, for a charge no more than your
+ cost of physically performing source distribution, a complete
+ machine-readable copy of the corresponding source code, to be
+ distributed under the terms of Sections 1 and 2 above on a medium
+ customarily used for software interchange; or,
+
+ c) Accompany it with the information you received as to the offer
+ to distribute corresponding source code. (This alternative is
+ allowed only for noncommercial distribution and only if you
+ received the program in object code or executable form with such
+ an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it. For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable. However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+ 4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License. Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+ 5. You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Program or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+ 6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions. You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+ 7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all. For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices. Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+ 8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded. In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+ 9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation. If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+ 10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission. For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this. Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+ NO WARRANTY
+
+ 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+ 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+
+ Copyright (C)
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along
+ with this program; if not, write to the Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this
+when it starts in an interactive mode:
+
+ Gnomovision version 69, Copyright (C) year name of author
+ Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License. Of course, the commands you use may
+be called something other than `show w' and `show c'; they could even be
+mouse-clicks or menu items--whatever suits your program.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the program, if
+necessary. Here is a sample; alter the names:
+
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+ `Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+ , 1 April 1989
+ Ty Coon, President of Vice
+
+This General Public License does not permit incorporating your program into
+proprietary programs. If your program is a subroutine library, you may
+consider it more useful to permit linking proprietary applications with the
+library. If this is what you want to do, use the GNU Lesser General
+Public License instead of this License.
\ No newline at end of file
diff --git a/vendor/10up/wp_mock/README.md b/vendor/10up/wp_mock/README.md
new file mode 100644
index 00000000..c91aacc2
--- /dev/null
+++ b/vendor/10up/wp_mock/README.md
@@ -0,0 +1,407 @@
+# WP_Mock ![PHP 7.1+][php-image] [![Build Status][travis-image]][travis-url] [![Coverage Status][coveralls-image]][coveralls-url] [![Packagist][packagist-image]][packagist-url]
+
+WP_Mock is an API mocking framework, built and maintained by [10up](http://10up.com) for the purpose of making it possible to properly unit test within WordPress.
+
+
+
+## Installation
+
+First, add WP Mock as a dev-dependency with [Composer](http://getcomposer.org):
+
+```bash
+composer require --dev 10up/wp_mock:0.4.2
+```
+
+Then, make sure your bootstrap file is loading the composer autoloader:
+
+```php
+require_once 'vendor/autoload.php';
+```
+
+Finally, register calls inside your test class to instantiate and clean up the `WP_Mock` object:
+
+```php
+class MyTestClass extends \WP_Mock\Tools\TestCase {
+ public function setUp() {
+ \WP_Mock::setUp();
+ }
+
+ public function tearDown() {
+ \WP_Mock::tearDown();
+ }
+}
+```
+
+## Bootstrapping WP_Mock
+
+Before you can start using WP_Mock to test your code, you'll need to bootstrap the library. The easiest way is to use a bootstrap file. See the PHPUnit documentation for how to define a bootstrap script either [from the command line](https://phpunit.de/manual/current/en/textui.html#textui.clioptions) or [from the xml config file](https://phpunit.de/manual/current/en/appendixes.configuration.html). Here is an example of a bootstrap you might use:
+
+```php
+ 42,
+ 'times' => 1,
+ 'return' => 'http://example.com/foo'
+ ) );
+
+ \WP_Mock::passthruFunction( 'absint', array( 'times' => 1 ) );
+
+ \WP_Mock::onFilter( 'special_filter' )
+ ->with( 'http://example.com/foo' )
+ ->reply( 'https://example.com/bar' );
+
+ \WP_Mock::expectAction( 'special_action', 'https://example.com/bar' );
+
+ $result = my_permalink_function( 42 );
+
+ $this->assertEquals( 'https://example.com/bar', $result );
+ }
+}
+```
+
+The function being described by our tests would look something like this:
+
+```php
+/**
+ * Get a post's permalink, then run it through special filters and trigger
+ * the 'special_action' action hook.
+ *
+ * @param int $post_id The post ID being linked to.
+ * @return str|bool The permalink or a boolean false if $post_id does
+ * not exist.
+ */
+function my_permalink_function( $post_id ) {
+ $permalink = get_permalink( absint( $post_id ) );
+ $permalink = apply_filters( 'special_filter', $permalink );
+
+ do_action( 'special_action', $permalink );
+
+ return $permalink;
+}
+```
+
+### Mocking WordPress core functions
+
+Ideally, a unit test will not depend on WordPress being loaded in order to test our code. By constructing **mocks**, it's possible to simulate WordPress core functionality by defining their expected arguments, responses, the number of times they are called, and more. In WP_Mock, this is done via the `\WP_Mock::userFunction()` method:
+
+```php
+public function test_uses_get_post() {
+ global $post;
+
+ $post = new \stdClass;
+ $post->ID = 42;
+ $post->special_meta = 'I am on the end
';
+
+ \WP_Mock::userFunction( 'get_post', array(
+ 'times' => 1,
+ 'args' => array( $post->ID ),
+ 'return' => $post,
+ ) );
+
+ /*
+ * Let's say our function gets the post and appends a value stored in
+ * 'special_meta' to the content.
+ */
+ $results = special_the_content( 'Some content
' );
+
+ /*
+ * In addition to failing if this assertion is false, the test will fail
+ * if get_post is not called with the arguments above.
+ */
+ $this->assertEquals( 'Some content
I am on the end
', $results );
+}
+```
+
+In the example above, we're creating a simple `\stdClass` to represent a response from `get_post()`, setting the `ID` and `special_meta` properties. WP_Mock is expecting `get_post()` to be called exactly once, with a single argument of '42', and for the function to return our `$post` object.
+
+With our expectations set, we call `special_the_content()`, the function we're testing, then asserting that what we get back from it is equal to `Some content
I am on the end
`, which proves that `special_the_content()` appended `$post->special_meta` to `Some content
`.
+
+Calling `\WP_Mock::userFunction()` will dynamically define the function for you if necessary, which means changes the internal WP_Mock API shouldn't break your mocks. If you really want to define your own function mocks, they should always end with this line:
+
+```php
+return \WP_Mock\Handler::handle_function( __FUNCTION__, func_get_args() );
+```
+
+#### Setting expectations
+
+`\WP_Mock::userFunction()` accepts an associative array of arguments for its second parameter:
+
+##### args
+
+Sets expectations about what the arguments passed to the function should be. This value should always be an array with the arguments in order and, like with return, if you use a `\Closure`, its return value will be used to validate the argument expectations. You can also indicate that the argument can be any value of any type by using '`*`'.
+
+WP_Mock has several helper functions to make this feature more flexible. The are static methods on the `\WP_Mock\Functions` class. They are:
+
+* `Functions::type( $type )`: Expects an argument of a certain type. This can be any core PHP data type (`string`, `int`, `resource`, `callable`, etc.) or any class or interface name.
+* `Functions::anyOf( $values )`: Expects the argument to be any value in the `$values` array.
+
+###### Examples
+
+In the following example, we're expecting `get_post_meta()` twice: once each for `some_meta_key` and `another_meta_key`, where an integer (in this case, a post ID) is the first argument, the meta key is the second, and a boolean TRUE is the third.
+
+```php
+\WP_Mock::userFunction( 'get_post_meta', array(
+ 'times' => 1,
+ 'args' => array( \WP_Mock\Functions::type( 'int' ), 'some_meta_key', true )
+) );
+
+\WP_Mock::userFunction( 'get_post_meta', array(
+ 'times' => 1,
+ 'args' => array( \WP_Mock\Functions::type( 'int' ), 'another_meta_key', true )
+) );
+```
+
+##### times
+
+Declares how many times the given function should be called. For an exact number of calls, use a non-negative, numeric value (e.g. `3`). If the function should be called a minimum number of times, append a plus-sign (`+`, e.g. `7+` for seven or more calls). Conversely, if a mocked function should have a maximum number of invocations, append a minus-sign (`-`) to the argument (e.g. `7-` for seven or fewer times).
+
+You may also choose to specify a range, e.g. `3-6` would translate to "this function should be called between three and six times".
+
+The default value for `times` is `0+`, meaning the function should be called any number of times.
+
+##### return
+
+Defines the value (if any) that the function should return. If you pass a `\Closure` as the return value, the function will return whatever the Closure's return value is.
+
+##### return_in_order
+
+Set an array of values that should be returned with each subsequent call, useful if if your function will be called multiple times in the test but needs to return different values.
+
+**Note:** Setting this value overrides whatever may be set `return`.
+
+###### Example
+
+```php
+\WP_Mock::userFunction( 'is_single', array(
+ 'return_in_order' => array( true, false )
+) );
+
+$this->assertTrue( is_single() );
+$this->assertFalse( is_single() );
+$this->assertFalse( is_single() ); // All subsequent calls will use the last defined return value
+```
+##### return_arg
+
+Use this to specify that the function should return one of its arguments. `return_arg` should be the position of the argument in the arguments array, so `0` for the first argument, `1` for the second, etc. You can also set this to `true`, which is equivalent to `0`. This will override both `return` and `return_in_order`.
+
+### Using Mockery expectations
+
+The return value of `\WP_Mock::userFunction` will be a complete `Mockery\Mock` object with any expectations added to match the arguments passed to the function. This enables using [Mockery methods](http://docs.mockery.io/en/latest/reference/expectations.html) to add expectations in addition to, or instead of using the arguments array passed to `userFunction`.
+
+For example, the following are synonymous:
+
+```php
+\WP_Mock::userFunction( 'get_permalink', array( 'args' => 42, 'return' => 'http://example.com/foo' ) );
+```
+
+```php
+\WP_Mock::userFunction( 'get_permalink' )->with( 42 )->andReturn( 'http://example.com/foo' );
+```
+
+### Passthru functions
+
+It's not uncommon for tests to need to declare "passthrough/passthru" functions: empty functions that just return whatever they're passed (remember: you're testing your code, not the framework). In these situations you can use `\WP_Mock::passthruFunction( 'function_name' )`, which is equivalent to the following:
+
+```php
+\WP_Mock::userFunction( 'function_name', array(
+ 'return_arg' => 0
+) );
+```
+
+You can still test things like invocation count by passing the `times` argument in the second parameter, just like `\WP_Mock::userFunction()`.
+
+### Deprecated methods
+
+Please note that `WP_Mock::wpFunction()` and `WP_Mock::wpPassthruFunction()` are both officially deprecated. Replace all uses of them with `WP_Mock::userFunction()` and `WP_Mock::passthruFunction()`. If you use either of the deprecated methods, WP_Mock will mark those tests as risky. Your tests will still count as passing, but PHPUnit will start telling you which tests are causing issues.
+
+### Mocking actions and filters
+
+The [hooks and filters of the WordPress Plugin API](http://codex.wordpress.org/Plugin_API) are common (and preferred) entry points for third-party scripts, and WP_Mock makes it easy to test that these are being registered and executed within your code.
+
+#### Ensuring actions and filters are registered
+
+Rather than attempting to mock `add_action()` or `add_filter()`, WP_Mock has built-in support for both of these functions: instead, use `\WP_Mock::expectActionAdded()` and `\WP_Mock::expectFilterAdded()` (respectively). In the following example, our `test_special_function()` test will fail if `special_function()` doesn't call `add_action( 'save_post', 'special_save_post', 10, 2 )` _and_ `add_filter( 'the_content', 'special_the_content' )`:
+
+```php
+public function test_special_function() {
+ \WP_Mock::expectActionAdded( 'save_post', 'special_save_post', 10, 2 );
+ \WP_Mock::expectFilterAdded( 'the_content', 'special_the_content' );
+
+ special_function();
+}
+```
+
+It's important to note that the `$priority` and `$parameter_count` arguments (parameters 3 and 4 for both `add_action()` and `add_filter()`) are significant. If `special_function()` were to call `add_action( 'save_post', 'special_save_post', 99, 3 )` instead of the expected `add_action( 'save_post', 'special_save_post', 10, 2 )`, our test would fail.
+
+#### Asserting that actions and filters are applied
+
+Now that we're testing whether or not we're adding actions and/or filters, the next step is to ensure our code is calling those hooks when expected.
+
+For actions, we'll want to listen for `do_action()` to be called for our action name, so we'll use `\WP_Mock::expectAction()`:
+
+```php
+function test_action_calling_function () {
+ \WP_Mock::expectAction( 'my_action' );
+
+ action_calling_function();
+}
+```
+
+This test will fail if `action_calling_function()` doesn't call `do_action( 'my_action' )`. In situations where your code needs to trigger actions, this assertion makes sure the appropriate hooks are being triggered.
+
+For filters, we can inject our own response to `apply_filters()` using `\WP_Mock::onFilter()`:
+
+```php
+public function filter_content() {
+ return apply_filters( 'custom_content_filter', 'This is unfiltered' );
+}
+
+public function test_filter_content() {
+ \WP_Mock::onFilter( 'custom_content_filter' )
+ ->with( 'This is unfiltered' )
+ ->reply( 'This is filtered' );
+
+ $response = $this->filter_content();
+
+ $this->assertEquals( 'This is filtered', $response );
+}
+```
+
+Alternatively, there is a method `\WP_Mock::expectFilter()` that will add a bare assertion that the filter will be applied without changing the value:
+
+```php
+class SUT {
+ public function filter_content() {
+ $value = apply_filters( 'custom_content_filter', 'Default' );
+ if ( $value === 'Default' ) {
+ do_action( 'default_value' );
+ }
+
+ return $value;
+ }
+}
+
+class SUTTest {
+ public function test_filter_content() {
+ \WP_Mock::expectFilter( 'custom_content_filter', 'Default' );
+ \WP_Mock::expectAction( 'default_value' );
+
+ $this->assertEquals( 'Default', (new SUT)->filter_content() );
+ }
+}
+```
+
+### Mocking WordPress objects
+
+Mocking calls to `wpdb`, `WP_Query`, etc. can be done using the [mockery](https://github.com/padraic/mockery) framework. While this isn't part of WP Mock itself, complex code will often need these objects and this framework will let you incorporate those into your tests. Since WP Mock requires Mockery, it should already be included as part of your install.
+
+#### $wpdb example
+
+Let's say we have a function that gets three post IDs from the database.
+```php
+function get_post_ids() {
+ global $wpdb;
+ return $wpdb->get_col( "select ID from {$wpdb->posts} LIMIT 3" );
+}
+```
+
+When we mock the `$wpdb` object, we're not performing an actual database call, only mocking the results. We need to call the `get_col` method with an SQL statement, and return three arbitrary post IDs.
+
+```php
+use Mockery;
+
+function test_get_post_ids() {
+ global $wpdb;
+
+ $wpdb = Mockery::mock( '\WPDB' );
+ $wpdb->shouldReceive( 'get_col' )
+ ->once()
+ ->with( "select ID from wp_posts LIMIT 3" )
+ ->andReturn( array( 1, 2, 3 ) );
+ $wpdb->posts = 'wp_posts';
+
+ $post_ids = get_post_ids();
+
+ $this->assertEquals( array( 1, 2, 3 ), $post_ids );
+}
+```
+
+## Credits
+
+* [Eric Mann](https://github.com/ericmann)
+* [John Bloch](https://github.com/johnpbloch)
+* [All Contributors](https://github.com/10up/wp_mock/graphs/contributors)
+
+## Contributing
+
+Thanks so much for being interested in contributing! Please read over our [guidelines](https://github.com/10up/wp_mock/blob/dev/CONTRIBUTING.md) before you get started.
+
+[php-image]: https://img.shields.io/badge/php-7.1%2B-green.svg
+[packagist-image]: https://img.shields.io/packagist/dt/10up/wp_mock.svg
+[packagist-url]: https://packagist.org/packages/10up/wp_mock
+[travis-image]: https://travis-ci.org/10up/wp_mock.svg?branch=master
+[travis-url]: https://travis-ci.org/10up/wp_mock
+[coveralls-image]: https://coveralls.io/repos/github/10up/wp_mock/badge.svg?branch=master
+[coveralls-url]: https://coveralls.io/github/10up/wp_mock?branch=master
diff --git a/vendor/10up/wp_mock/behat.yml b/vendor/10up/wp_mock/behat.yml
new file mode 100644
index 00000000..44bcae1e
--- /dev/null
+++ b/vendor/10up/wp_mock/behat.yml
@@ -0,0 +1,9 @@
+default:
+ suites:
+ default:
+ contexts:
+ - FeatureContext
+ - HooksContext
+ - FunctionsContext
+ formatters:
+ progress: true
diff --git a/vendor/10up/wp_mock/bootstrap.php.dist b/vendor/10up/wp_mock/bootstrap.php.dist
new file mode 100644
index 00000000..7bb24406
--- /dev/null
+++ b/vendor/10up/wp_mock/bootstrap.php.dist
@@ -0,0 +1,5 @@
+=7.1",
+ "phpunit/phpunit" : ">=7.0",
+ "mockery/mockery" : "^1.0",
+ "antecedent/patchwork": "^2.1"
+ },
+ "require-dev": {
+ "behat/behat" : "^3.0",
+ "sebastian/comparator": ">=1.2.3",
+ "php-coveralls/php-coveralls": "^2.1"
+ },
+ "autoload" : {
+ "psr-4" : {"WP_Mock\\": "./php/WP_Mock"},
+ "classmap": ["php/WP_Mock.php"]
+ },
+ "scripts": {
+ "test:behat" : "behat",
+ "test:phpunit" : "phpunit",
+ "test:phpunitcov": "phpunit --coverage-clover build/logs/clover.xml",
+ "test" : [
+ "@test:behat",
+ "@test:phpunit"
+ ],
+ "coverage" : [
+ "@test:behat",
+ "@test:phpunitcov"
+ ]
+ }
+}
diff --git a/vendor/10up/wp_mock/features/bootstrap/FeatureContext.php b/vendor/10up/wp_mock/features/bootstrap/FeatureContext.php
new file mode 100644
index 00000000..8d02f6e3
--- /dev/null
+++ b/vendor/10up/wp_mock/features/bootstrap/FeatureContext.php
@@ -0,0 +1,88 @@
+setAccessible( true );
+ $property->setValue( true );
+ }
+
+ /**
+ * @AfterScenario @strictmode
+ */
+ public function ensureStrictModeOff() {
+ self::forceStrictModeOff();
+ }
+
+ public static function forceStrictModeOff() {
+ $property = new ReflectionProperty( 'WP_Mock', '__strict_mode' );
+ $property->setAccessible( true );
+ $property->setValue( false );
+ }
+
+ /**
+ * @Then tearDown should not fail
+ */
+ public function teardownShouldNotFail() {
+ WP_Mock::tearDown();
+ }
+
+ /**
+ * @When I do nothing
+ */
+ public function iDoNothing() {
+ // Move along...
+ }
+
+ /**
+ * @Then tearDown should fail
+ */
+ public function teardownShouldFail() {
+ try {
+ $this->teardownShouldNotFail();
+ throw new \PHPUnit\Framework\ExpectationFailedException( 'WP_Mock Teardown should have failed!' );
+ } catch ( \Mockery\Exception\InvalidCountException $e ) {
+ // Move along
+ }
+ }
+}
diff --git a/vendor/10up/wp_mock/features/bootstrap/FunctionsContext.php b/vendor/10up/wp_mock/features/bootstrap/FunctionsContext.php
new file mode 100644
index 00000000..8dd3bc8d
--- /dev/null
+++ b/vendor/10up/wp_mock/features/bootstrap/FunctionsContext.php
@@ -0,0 +1,127 @@
+ $args->getRow( 0 ),
+ ) );
+ }
+
+ /**
+ * @Given I mock function :function to return :value
+ */
+ public function iMockFunctionToReturn( $function, $value ) {
+ WP_Mock::userFunction( $function, array( 'return' => $value ) );
+ }
+
+ /**
+ * @Given I alias :alias to :function
+ */
+ public function iAliasTo( $alias, $function ) {
+ WP_Mock::alias( $alias, $function );
+ }
+
+ /**
+ * @Given I mock function :function to echo input
+ */
+ public function iMockFunctionWpMockTestToEcho( $function ) {
+ WP_Mock::echoFunction( $function );
+ }
+
+ /**
+ * @Given strict mode is on
+ */
+ public function strictModeIsOn() {
+ FeatureContext::forceStrictModeOn();
+ \PHPUnit\Framework\Assert::assertTrue( WP_Mock::strictMode() );
+ }
+
+ /**
+ * @Given strict mode is off
+ */
+ public function strictModeIsOff() {
+ FeatureContext::forceStrictModeOff();
+ \PHPUnit\Framework\Assert::assertFalse( WP_Mock::strictMode() );
+ }
+
+ /**
+ * @When I mock function :function
+ */
+ public function iMockFunction( $function ) {
+ WP_Mock::userFunction( $function );
+ }
+
+ /**
+ * @When I tear down the test
+ */
+ public function iTearDownTheTest() {
+ WP_Mock::tearDown();
+ }
+
+ /**
+ * @Then function :function should exist
+ */
+ public function functionShouldExist( $function ) {
+ \PHPUnit\Framework\Assert::assertTrue( function_exists( $function ) );
+ }
+
+ /**
+ * @Then I expect :return when I run :function with args:
+ */
+ public function iExpectWhenIRunWithArgs( $return, $function, TableNode $args ) {
+ \PHPUnit\Framework\Assert::assertEquals( $return, call_user_func_array( $function, $args->getRow( 0 ) ) );
+ }
+
+ /**
+ * @Then I expect :return when I run :function
+ */
+ public function iExcpectWhenIRun( $return, $function ) {
+ $this->iExpectWhenIRunWithArgs( $return, $function, new TableNode( array( array() ) ) );
+ }
+
+ /**
+ * @Then I expect an error when I run :function with args:
+ */
+ public function iExpectAnErrorWhenIRunWithArgs( $function, TableNode $args ) {
+ try {
+ $this->iExpectWhenIRunWithArgs( null, $function, $args );
+ } catch ( NoMatchingExpectationException $e ) {
+ // Move along...
+ } catch ( \PHPUnit\Framework\ExpectationFailedException $e ) {
+ // Move along...
+ }
+ }
+
+ /**
+ * @Then I expect function :function to echo :input
+ */
+ public function iExpectFunctionToEcho( $function, $input ) {
+ ob_start();
+ $function( $input );
+ $output = trim( ob_get_clean() );
+ \PHPUnit\Framework\Assert::assertEquals( trim( $input ), $output );
+ }
+
+ /**
+ * @Then Nothing happens when I run function :function
+ */
+ public function iRunFunction( $function ) {
+ $function();
+ }
+
+}
diff --git a/vendor/10up/wp_mock/features/bootstrap/HooksContext.php b/vendor/10up/wp_mock/features/bootstrap/HooksContext.php
new file mode 100644
index 00000000..ac0d4be4
--- /dev/null
+++ b/vendor/10up/wp_mock/features/bootstrap/HooksContext.php
@@ -0,0 +1,235 @@
+filterResults = array();
+ }
+
+ /**
+ * @AfterScenario
+ */
+ public function tearDownWpMock( AfterScenarioScope $scope ) {
+ $this->filterResults = array();
+ }
+
+ /**
+ * @Given I expect the following actions added:
+ */
+ public function iExpectTheFollowingActionsAdded( TableNode $table ) {
+ foreach ( $this->getActionsWithDefaults( $table ) as $action ) {
+ WP_Mock::expectActionAdded(
+ $action['action'],
+ $action['callback'],
+ $action['priority'],
+ $action['arguments']
+ );
+ }
+ }
+
+ /**
+ * @Given I expect the following actions not to be added:
+ */
+ public function iExpectTheFollowingActionsNotToBeAdded( TableNode $table ) {
+ foreach ( $this->getActionsWithDefaults( $table ) as $action ) {
+ WP_Mock::expectActionNotAdded( $action['action'], $action['callback'] );
+ }
+ }
+
+ /**
+ * @Given I expect the :action action
+ */
+ public function iExpectTheAction( $action ) {
+ $this->iExpectTheActionWith( $action, new TableNode( array() ) );
+ }
+
+ /**
+ * @When I expect the :action action with:
+ */
+ public function iExpectTheActionWith( $action, TableNode $table ) {
+ $args = array( $action );
+ $rows = $table->getRows();
+ if ( isset( $rows[0] ) && is_array( $rows[0] ) ) {
+ $args = array_merge( $args, $rows[0] );
+ }
+ call_user_func_array( array( 'WP_Mock', 'expectAction' ), $args );
+ }
+
+ /**
+ * @Given I expect the :filter filter with :value
+ */
+ public function iExpectTheFilterWith( $filter, $value ) {
+ $this->iExpectTheFilterWithValues( $filter, new TableNode( array( array( $value ) ) ) );
+ }
+
+ /**
+ * @When I expect the :filter filter with:
+ */
+ public function iExpectTheFilterWithValues( $filter, TableNode $table ) {
+ $args = array( $filter );
+ $rows = $table->getRows();
+ if ( isset( $rows[0] ) && is_array( $rows[0] ) ) {
+ $args = array_merge( $args, $rows[0] );
+ }
+ call_user_func_array( array( 'WP_Mock', 'expectFilter' ), $args );
+ }
+
+ /**
+ * @When I add the following actions:
+ */
+ public function iAddTheFollowingActions( TableNode $table ) {
+ foreach ( $this->getActionsWithDefaults( $table ) as $action ) {
+ add_action(
+ $action['action'],
+ $action['callback'],
+ $action['priority'],
+ $action['arguments']
+ );
+ }
+ }
+
+ /**
+ * @When I do the :action action
+ */
+ public function iDoTheAction( $action ) {
+ $this->iDoTheActionWith( $action, new TableNode( array() ) );
+ }
+
+ /**
+ * @When I do the :action action with:
+ */
+ public function iDoTheActionWith( $action, TableNode $table ) {
+ $args = array( $action );
+ $rows = $table->getRows();
+ if ( isset( $rows[0] ) && is_array( $rows[0] ) ) {
+ $args = array_merge( $args, $rows[0] );
+ }
+ call_user_func_array( 'do_action', $args );
+ }
+
+ /**
+ * @Given I expect the following filters added:
+ */
+ public function iExpectTheFollowingFiltersAdded( TableNode $table ) {
+ $filters = $table->getHash();
+ $defaults = array(
+ 'filter' => '',
+ 'callback' => '',
+ 'priority' => 10,
+ 'arguments' => 1,
+ );
+ foreach ( $filters as $filter ) {
+ $filter += $defaults;
+ WP_Mock::expectFilterAdded(
+ $filter['filter'],
+ $filter['callback'],
+ $filter['priority'],
+ $filter['arguments']
+ );
+ }
+ }
+
+ /**
+ * @Given I expect the following filters not to be added:
+ */
+ public function iExpectTheFollowingFiltersNotToBeAdded( TableNode $table ) {
+ foreach ( $this->getFiltersWithDefaults( $table ) as $filter ) {
+ WP_Mock::expectFilterNotAdded( $filter['filter'], $filter['callback'] );
+ }
+ }
+
+ /**
+ * @When I add the following filters:
+ */
+ public function iAddTheFollowingFilters( TableNode $table ) {
+ foreach ( $this->getFiltersWithDefaults( $table ) as $filter ) {
+ add_filter(
+ $filter['filter'],
+ $filter['callback'],
+ $filter['priority'],
+ $filter['arguments']
+ );
+ }
+ }
+
+ /**
+ * @Given I expect filter :filter to respond to :thing with :response
+ */
+ public function iExpectFilterToRespondToWith( $filter, $thing, $response ) {
+ WP_Mock::onFilter( $filter )->with( $thing )->reply( $response );
+ }
+
+ /**
+ * @Given I expect filter :filter to respond with :response
+ */
+ public function iExpectFilterToRespondWith( $filter, $response ) {
+ $this->iExpectFilterToRespondToWith( $filter, null, $response );
+ }
+
+ /**
+ * @When I apply the filter :filter with :with
+ */
+ public function iApplyFilterWith( $filter, $with ) {
+ $this->iApplyFilterWithData( $filter, new TableNode( array( array( $with ) ) ) );
+ }
+
+ /**
+ * @When I apply the filter :filter with:
+ */
+ public function iApplyFilterWithData( $filter, TableNode $table ) {
+ $row = $table->getRow( 0 );
+ array_unshift( $row, $filter );
+ $this->filterResults[ $filter ] = call_user_func_array( 'apply_filters', $row );
+ }
+
+ /**
+ * @Then The filter :filter should return :value
+ */
+ public function theFilterShouldReturn( $filter, $value ) {
+ \PHPUnit\Framework\Assert::assertArrayHasKey( $filter, $this->filterResults );
+ \PHPUnit\Framework\Assert::assertEquals( $this->filterResults[ $filter ], $value );
+ }
+
+ private function getActionsWithDefaults( TableNode $table ) {
+ $actions = $table->getHash();
+ $defaults = array(
+ 'action' => '',
+ 'callback' => '',
+ 'priority' => 10,
+ 'arguments' => 1,
+ );
+ foreach ( $actions as &$action ) {
+ $action += $defaults;
+ }
+ unset( $action );
+
+ return $actions;
+ }
+
+ private function getFiltersWithDefaults( TableNode $table ) {
+ $filters = $table->getHash();
+ $defaults = array(
+ 'filter' => '',
+ 'callback' => '',
+ 'priority' => 10,
+ 'arguments' => 1,
+ );
+ foreach ( $filters as &$filter ) {
+ $filter += $defaults;
+ }
+ unset( $filter );
+
+ return $filters;
+ }
+
+}
diff --git a/vendor/10up/wp_mock/features/function-mocks.feature b/vendor/10up/wp_mock/features/function-mocks.feature
new file mode 100644
index 00000000..9e773a5d
--- /dev/null
+++ b/vendor/10up/wp_mock/features/function-mocks.feature
@@ -0,0 +1,48 @@
+Feature: Function mocking
+ In order to simulate the WordPress functional API
+ As a developer
+ I need to be able to mock WordPress core functions
+
+ Scenario: userFunction creates functions that don't exist
+ Given function wpMockTest does not exist
+ When I mock function wpMockTest
+ Then function wpMockTest should exist
+
+ Scenario: Passthru function returns first argument
+ Given I mock passthru function wpMockPassthruTest with args:
+ | foobar | bazbat |
+ Then I expect foobar when I run wpMockPassthruTest with args:
+ | foobar | bazbat |
+
+ Scenario: return value works correctly
+ Given I mock function wpMockTest to return "test value"
+ Then I expect "test value" when I run wpMockTest
+
+ Scenario: expectations cause error on unexpected use
+ Given I mock passthru function wpMockTest with args:
+ | bazbat | foobar |
+ Then I expect an error when I run wpMockTest with args:
+ | bimbam | bobeep |
+
+ Scenario: alias uses the provided callback when called
+ Given I mock function wpMockTest to return "alias test"
+ And I alias wpAliasTest to wpMockTest
+ Then I expect "alias test" when I run wpAliasTest
+
+ Scenario: echoFunction echoes the correct output
+ Given I mock function wpMockTest to echo input
+ Then I expect function wpMockTest to echo "echo test"
+
+ Scenario: Previously defined functions do not cause failure when called without being expected
+ Given strict mode is off
+ And I mock function wpMockStrictTest
+ And I tear down the test
+ Then Nothing happens when I run function wpMockStrictTest
+
+ @strictmode
+ Scenario: Strict mode causes unexpected but previously defined functions to fail
+ Given strict mode is on
+ And I mock function wpMockTest
+ When I tear down the test
+ Then I expect an error when I run wpMockTest with args:
+ | |
diff --git a/vendor/10up/wp_mock/features/hooks.feature b/vendor/10up/wp_mock/features/hooks.feature
new file mode 100644
index 00000000..45f169a8
--- /dev/null
+++ b/vendor/10up/wp_mock/features/hooks.feature
@@ -0,0 +1,228 @@
+Feature: Hook mocking
+ In order to test common WordPress functionality
+ As a developer
+ I need to be able to mock actions and filters
+
+ Scenario: expectActionAdded sets up expectation
+ Given I expect the following actions added:
+ | action | callback | priority | arguments |
+ | foobar | bazbat | 10 | 2 |
+ When I add the following actions:
+ | action | callback | priority | arguments |
+ | foobar | bazbat | 10 | 2 |
+ Then tearDown should not fail
+
+ Scenario: expectActionAdded fails when not met
+ Given I expect the following actions added:
+ | action | callback |
+ | foobar | bazbat |
+ When I do nothing
+ Then tearDown should fail
+
+ Scenario: expectActionAdded fails when argument count is different
+ Given I expect the following actions added:
+ | action | callback | priority | arguments |
+ | foobar | bazbat | 10 | 2 |
+ When I add the following actions:
+ | action | callback | priority | arguments |
+ | foobar | bazbat | 10 | 3 |
+ Then tearDown should fail
+
+ Scenario: expectActionAdded fails when priority is different
+ Given I expect the following actions added:
+ | action | callback | priority |
+ | foobar | bazbat | 10 |
+ When I add the following actions:
+ | action | callback | priority |
+ | foobar | bazbat | 11 |
+ Then tearDown should fail
+
+ Scenario: expectActionNotAdded fails when action added
+ Given I expect the following actions not to be added:
+ | action | callback |
+ | foobar | bazbat |
+ When I add the following actions:
+ | action | callback |
+ | foobar | bazbat |
+ Then tearDown should fail
+
+ Scenario: expectActionNotAdded passes when action not added
+ Given I expect the following actions not to be added:
+ | action | callback |
+ | foobar | bazbat |
+ When I do nothing
+ Then tearDown should not fail
+
+ Scenario: expectFilterAdded sets up expectation
+ Given I expect the following filters added:
+ | filter | callback | priority | arguments |
+ | foobar | bazbat | 10 | 2 |
+ When I add the following filters:
+ | filter | callback | priority | arguments |
+ | foobar | bazbat | 10 | 2 |
+ Then tearDown should not fail
+
+ Scenario: expectFilterAdded fails when not met
+ Given I expect the following filters added:
+ | filter | callback |
+ | foobar | bazbat |
+ When I do nothing
+ Then tearDown should fail
+
+ Scenario: expectFilterAdded fails when argument count is different
+ Given I expect the following filters added:
+ | filter | callback | priority | arguments |
+ | foobar | bazbat | 10 | 2 |
+ When I add the following filters:
+ | filter | callback | priority | arguments |
+ | foobar | bazbat | 10 | 3 |
+ Then tearDown should fail
+
+ Scenario: expectFilterAdded fails when priority is different
+ Given I expect the following filters added:
+ | filter | callback | priority |
+ | foobar | bazbat | 10 |
+ When I add the following filters:
+ | filter | callback | priority |
+ | foobar | bazbat | 11 |
+ Then tearDown should fail
+
+ Scenario: expectAction sets up expectation
+ Given I expect the "foobar" action
+ When I do the "foobar" action
+ Then tearDown should not fail
+
+ Scenario: expectAction fails when unmet
+ Given I expect the "foobar" action
+ When I do nothing
+ Then tearDown should fail
+
+ Scenario: expectAction with extra arguments
+ Given I expect the "foobar" action with:
+ | some | extra | data |
+ When I do the "foobar" action with:
+ | some | extra | data |
+ Then tearDown should not fail
+
+ Scenario: action with the wrong arguments fails
+ Given I expect the "bazbat" action with:
+ | the correct data |
+ When I do the "bazbat" action with:
+ | Invalid information |
+ Then tearDown should fail
+
+ Scenario: action with extra arguments fails
+ Given I expect the "bazbat" action with:
+ | data |
+ When I do the "bazbat" action with:
+ | data | plus |
+ Then tearDown should fail
+
+ Scenario: expectFilter sets up expectation
+ Given I expect the "foobar" filter with "bazbat"
+ When I apply the filter "foobar" with "bazbat"
+ Then tearDown should not fail
+
+ Scenario: expectFilter fails when unmet
+ Given I expect the "foobar" filter with "bazbat"
+ When I do nothing
+ Then tearDown should fail
+
+ Scenario: expectFilter with extra arguments
+ Given I expect the "foobar" filter with:
+ | some | extra | data |
+ When I apply the filter "foobar" with:
+ | some | extra | data |
+ Then tearDown should not fail
+
+ Scenario: filter with the wrong arguments fails
+ Given I expect the "bazbat" filter with:
+ | the correct data |
+ When I apply the filter "bazbat" with:
+ | Invalid information |
+ Then tearDown should fail
+
+ Scenario: expectFilter fails when called with wrong argument
+ Given I expect the "foobar" filter with "bazbat"
+ When I apply the filter "foobar" with "bimbam"
+ Then tearDown should fail
+
+ Scenario: filter with extra arguments fails
+ Given I expect the "bazbat" filter with:
+ | data |
+ When I apply the filter "bazbat" with:
+ | data | plus |
+ Then tearDown should fail
+
+ @strictmode
+ Scenario: Unexpected action fails in strict mode
+ Given strict mode is on
+ When I do nothing
+ Then I expect an error when I run do_action with args:
+ | bimbam | bazbat |
+
+ Scenario: unexpected action does not fail tests
+ Given I do nothing
+ When I add the following actions:
+ | action | callback |
+ | foobar | bazbat |
+ Then tearDown should not fail
+
+ @strictmode
+ Scenario: Unexpected filter fails in strict mode
+ Given strict mode is on
+ When I do nothing
+ Then I expect an error when I run apply_filters with args:
+ | foobar | bazbat |
+
+ Scenario: unexpected filter does not fail tests
+ Given I do nothing
+ When I add the following filters:
+ | filter | callback |
+ | foobar | bazbat |
+ Then tearDown should not fail
+
+ @strictmode
+ Scenario: unexpected action fails in strict mode
+ Given strict mode is on
+ When I do nothing
+ Then I expect an error when I run add_action with args:
+ | foobar | bazbat |
+
+ @strictmode
+ Scenario: unexpected action fails in strict mode
+ Given strict mode is on
+ When I do nothing
+ Then I expect an error when I run add_filter with args:
+ | foobar | bazbat |
+
+ Scenario: filter responder works
+ Given I expect filter "the_content" to respond to "Test content" with "Responder works"
+ When I apply the filter "the_content" with "Test content"
+ Then The filter "the_content" should return "Responder works"
+
+ Scenario: filter returns default value when no filter defined
+ Given I do nothing
+ When I apply the filter "the_content" with "Apple"
+ Then The filter "the_content" should return "Apple"
+
+ Scenario: filter returns default value when unexpected value used
+ Given I expect filter "the_content" to respond to "Windows" with "OS X"
+ When I apply the filter "the_content" with "Linux"
+ Then The filter "the_content" should return "Linux"
+
+ Scenario: expectFilterNotAdded fails when filter added
+ Given I expect the following filters not to be added:
+ | filter | callback |
+ | foobar | bazbat |
+ When I add the following filters:
+ | filter | callback |
+ | foobar | bazbat |
+ Then tearDown should fail
+
+ Scenario: expectFilterNotAdded passes when filter not added
+ Given I expect the following filters not to be added:
+ | filter | callback |
+ | foobar | bazbat |
+ When I do nothing
+ Then tearDown should not fail
diff --git a/vendor/10up/wp_mock/php/WP_Mock.php b/vendor/10up/wp_mock/php/WP_Mock.php
new file mode 100644
index 00000000..37db9373
--- /dev/null
+++ b/vendor/10up/wp_mock/php/WP_Mock.php
@@ -0,0 +1,557 @@
+flush();
+ self::$function_manager->flush();
+
+ \Mockery::close();
+ \WP_Mock\Handler::cleanup();
+ }
+
+ /**
+ * Fire a specific (mocked) callback when an apply_filters() call is used.
+ *
+ * @param string $filter
+ *
+ * @return \WP_Mock\Filter
+ */
+ public static function onFilter( $filter ) {
+ self::$event_manager->called($filter,'filter');
+ return self::$event_manager->filter( $filter );
+ }
+
+ /**
+ * Fire a specific (mocked) callback when a do_action() call is used.
+ *
+ * @param string $action
+ *
+ * @return \WP_Mock\Action
+ */
+ public static function onAction( $action ) {
+ return self::$event_manager->action( $action );
+ }
+
+ /**
+ * Get a filter or action added callback object
+ *
+ * @param string $hook
+ * @param string $type
+ *
+ * @return \WP_Mock\HookedCallback
+ */
+ public static function onHookAdded( $hook, $type = 'filter' ) {
+ return self::$event_manager->callback( $hook, $type );
+ }
+
+ /**
+ * Get a filter added callback object
+ *
+ * @param string $hook
+ *
+ * @return \WP_Mock\HookedCallback
+ */
+ public static function onFilterAdded( $hook ) {
+ return self::onHookAdded( $hook, 'filter' );
+ }
+
+ /**
+ * Get an action added callback object
+ *
+ * @param string $hook
+ *
+ * @return \WP_Mock\HookedCallback
+ */
+ public static function onActionAdded( $hook ) {
+ return self::onHookAdded( $hook, 'action' );
+ }
+
+ /**
+ * Alert the Event Manager that an action has been invoked.
+ *
+ * @param string $action
+ */
+ public static function invokeAction( $action ) {
+ self::$event_manager->called( $action );
+ }
+
+ public static function addFilter( $hook ) {
+ self::addHook( $hook, 'filter' );
+ }
+
+ public static function addAction( $hook ) {
+ self::addHook( $hook, 'action' );
+ }
+
+ public static function addHook( $hook, $type = 'filter' ) {
+ $type_name = "$type::$hook";
+ self::$event_manager->called( $type_name, 'callback' );
+ }
+
+ /**
+ * Set up the expectation that an action will be called during the test.
+ *
+ * Mock a WordPress action, regardless of the parameters used. This call merely
+ * verifies that the action is invoked by the tested method.
+ *
+ * @param string $action Action we expect the method to call
+ */
+ public static function expectAction( $action ) {
+ $intercept = \Mockery::mock( 'intercept' );
+ $intercept->shouldReceive( 'intercepted' )->atLeast()->once();
+ $args = func_get_args();
+ $args = count( $args ) > 1 ? array_slice( $args, 1 ) : array( null );
+
+ $mocked_action = self::onAction( $action );
+ $responder = call_user_func_array( array( $mocked_action, 'with' ), $args );
+ $responder->perform( array( $intercept, 'intercepted' ) );
+ }
+
+ /**
+ * Set up the expectation that a filter will be applied during the test.
+ *
+ * Mock a WordPress filter with specific arguments. You need all arguments that you expect
+ * in order to fulfill the expectation.
+ *
+ * @param string $filter
+ */
+ public static function expectFilter( $filter ) {
+ $intercept = \Mockery::mock( 'intercept' );
+ $intercept->shouldReceive( 'intercepted' )->atLeast()->once()->andReturnUsing( function( $value ) {
+ return $value;
+ } );
+ $args = func_num_args() > 1 ? array_slice( func_get_args(), 1 ) : array( null );
+
+ $mocked_filter = self::onFilter( $filter );
+ $responder = call_user_func_array( array( $mocked_filter, 'with' ), $args );
+ $responder->reply( new \WP_Mock\InvokedFilterValue( array( $intercept, 'intercepted' ) ) );
+ }
+
+ /**
+ * Assert that all actions are called.
+ */
+ public static function assertActionsCalled() {
+ $allActionsCalled = self::$event_manager->allActionsCalled();
+ $failed = implode( ', ', self::$event_manager->expectedActions() );
+ \PHPUnit\Framework\Assert::assertTrue( $allActionsCalled, 'Method failed to invoke actions: ' . $failed );
+ }
+
+ /**
+ * Assert that all filters are called.
+ */
+ public static function assertFiltersCalled() {
+ $allFiltersCalled = self::$event_manager->allFiltersCalled();
+ $failed = implode( ', ', self::$event_manager->expectedFilters() );
+ \PHPUnit\Framework\Assert::assertTrue( $allFiltersCalled, 'Method failed to invoke filters: ' . $failed );
+ }
+
+ /**
+ * Add an expectation that an action should be added
+ *
+ * Really just a wrapper function for expectHookAdded()
+ *
+ * @param string $action The action name
+ * @param callable $callback The callback that should be registered
+ * @param int $priority The priority it should be registered at
+ * @param int $args The number of arguments that should be allowed
+ */
+ public static function expectActionAdded( $action, $callback, $priority = 10, $args = 1 ) {
+ self::expectHookAdded( 'action', $action, $callback, $priority, $args );
+ }
+
+ /**
+ * Add an expection that an action should not be added. A wrapper
+ * around the expectHookNotAdded function.
+ *
+ * @param string $action The action hook name
+ * @param callable $callback The action callback
+ */
+ public static function expectActionNotAdded( $action, $callback ) {
+ self::expectHookNotAdded( 'action', $action, $callback );
+ }
+
+ /**
+ * Add an expectation that a filter should be added
+ *
+ * Really just a wrapper function for expectHookAdded()
+ *
+ * @param string $filter The action name
+ * @param callable $callback The callback that should be registered
+ * @param int $priority The priority it should be registered at
+ * @param int $args The number of arguments that should be allowed
+ */
+ public static function expectFilterAdded( $filter, $callback, $priority = 10, $args = 1 ) {
+ self::expectHookAdded( 'filter', $filter, $callback, $priority, $args );
+ }
+
+ /**
+ * Adds an expectation that a filter will not be added. A wrapper
+ * around the expectHookNotAdded function.
+ *
+ * @param string $filter The filter hook name
+ * @param callable $callback The filter callback
+ */
+ public static function expectFilterNotAdded( $filter, $callback ) {
+ self::expectHookNotAdded( 'filter', $filter, $callback );
+ }
+
+ /**
+ * Add an expectation that a hook should be added
+ *
+ * @param string $type The type of hook being added
+ * @param string $action The action name
+ * @param callable $callback The callback that should be registered
+ * @param int $priority The priority it should be registered at
+ * @param int $args The number of arguments that should be allowed
+ */
+ public static function expectHookAdded( $type, $action, $callback, $priority = 10, $args = 1 ) {
+ $intercept = \Mockery::mock( 'intercept' );
+ $intercept->shouldReceive( 'intercepted' )->atLeast()->once();
+
+ /** @var WP_Mock\HookedCallbackResponder $responder */
+ $responder = self::onHookAdded( $action, $type )
+ ->with( $callback, $priority, $args );
+ $responder->perform( array( $intercept, 'intercepted' ) );
+ }
+
+ /**
+ * Adds an expectation that a hook should not be added. Based on the
+ * shouldNotReceive API of Mocker.
+ *
+ * @param string $type The hook type, 'action' or 'filter'
+ * @param string $action The name of the hook
+ * @param callable $callback The hooks callback handler.
+ */
+ public static function expectHookNotAdded( $type, $action, $callback ) {
+ $intercept = \Mockery::mock( 'intercept' );
+ $intercept->shouldNotReceive( 'intercepted' );
+
+ /** @var WP_Mock\HookedCallbackResponder $responder */
+ $responder = self::onHookAdded( $action, $type )
+ ->with( $callback, 10, 1 );
+ $responder->perform( array( $intercept, 'intercepted' ) );
+ }
+
+ /**
+ * Assert that all hooks are added.
+ */
+ public static function assertHooksAdded() {
+ $allHooksAdded = self::$event_manager->allHooksAdded();
+ $failed = implode( ', ', self::$event_manager->expectedHooks() );
+ PHPUnit\Framework\Assert::assertTrue( $allHooksAdded, 'Method failed to add hooks: ' . $failed );
+ }
+
+ /**
+ * Mock a WordPress API function
+ *
+ * This function registers a mock object for a WordPress function and, if
+ * necessary, dynamically defines the function. Pass the function name as
+ * the first argument (e.g. wp_remote_get) and pass in details about the
+ * expectations in the $arguments array. The arguments array has a few
+ * options for defining expectations about how the WordPress function should
+ * be used during a test. Currently, it accepts the following settings:
+ *
+ * - times: Defines expectations for the number of times a function should
+ * be called. The default is 0 or more times. To expect the function to be
+ * called an exact amount of times, set times to a non-negative numeric
+ * value. To specify that the function should be called a minimum number
+ * of times, use a string with the minimum followed by '+' (e.g. '3+'
+ * means 3 or more times). Append a '-' to indicate a maximum number of
+ * times a function should be called (e.g. '3-' means no more than 3 times)
+ * To indicate a range, use '-' between two numbers (e.g. '2-5' means at
+ * least 2 times and no more than 5 times)
+ * - return: Defines the value (if any) that the function should return. If
+ * you pass a Closure as the return value, the function will return
+ * whatever the Closure's return value.
+ * - return_in_order: Use this if your function will be called multiple
+ * times in the test but needs to have different return values. Set this to
+ * an array of return values. Each time the function is called, it will
+ * return the next value in the sequence until it reaches the last value,
+ * which will become the return value for all subsequent calls. For
+ * example, if I am mocking is_single(), I can set return_in_order to
+ * array( false, true ). The first time is_single() is called it will
+ * return false. The second and all subsequent times it will return true.
+ * Setting this value overrides return, so if you set both, return will be
+ * ignored.
+ * - return_arg: Use this to specify that the function should return one of
+ * its arguments. return_arg should be the position of the argument in the
+ * arguments array, so 0 for the first argument, 1 for the second, etc.
+ * You can also set this to true, which is equivalent to 0. This will
+ * override both return and return_in_order.
+ * - args: Use this to set expectations about what the arguments passed to
+ * the function should be. This value should always be an array with the
+ * arguments in order. Like with return, if you use a Closure, its return
+ * value will be used to validate the argument expectations. WP_Mock has
+ * several helper functions to make this feature more flexible. The are
+ * static methods on the \WP_Mock\Functions class. They are:
+ * - Functions::type( $type ) Expects an argument of a certain type. This
+ * can be any core PHP data type (string, int, resource, callable, etc.)
+ * or any class or interface name.
+ * - Functions::anyOf( $values ) Expects the argument to be any value in
+ * the $values array
+ * In addition to these helper functions, you can indicate that the
+ * argument can be any value of any type by using '*'. So, for example, if
+ * I am expecting get_post_meta to be called, the args array might look
+ * something like this:
+ * array( $post->ID, 'some_meta_key', true )
+ *
+ * Returns the Mockery\Expectation object with the function expectations
+ * added. It is possible to use Mockery methods to add expectations to the
+ * object returned, which will then be combined with any expectations that
+ * may have been passed as arguments.
+ *
+ * @param string $function_name
+ * @param array $arguments
+ *
+ * @return Mockery\Expectation
+ */
+ public static function userFunction( $function_name, $arguments = array() ) {
+ return self::$function_manager->register( $function_name, $arguments );
+ }
+
+ /**
+ * Alias for userFunction
+ *
+ * @deprecated since 1.0
+ *
+ * @param string $function_name
+ * @param array $arguments
+ *
+ * @return Mockery\Expectation
+ */
+ public static function wpFunction( $function_name, $arguments = array() ) {
+ static::getDeprecatedListener()->logDeprecatedCall( __METHOD__, array( $function_name, $arguments ) );
+ return self::userFunction( $function_name, $arguments );
+ }
+
+ /**
+ * A wrapper for userFunction that will simply set/override the return to be
+ * a function that echoes the value that its passed. For example, esc_attr_e
+ * may need to be mocked, and it must echo some value. echoFunction will set
+ * esc_attr_e to echo the value its passed.
+ *
+ * \WP_Mock::echoFunction( 'esc_attr_e' );
+ * esc_attr_e( 'some_value' ); // echoes (translated) "some_value"
+ *
+ * @param string $function_name Function name.
+ * @param array $arguments Optional. Arguments. Defaults to array().
+ *
+ * @return Mockery\Expectation
+ */
+ public static function echoFunction( $function_name, $arguments = array() ) {
+ $arguments = (array) $arguments;
+ $arguments['return'] = function ( $param ) {
+ echo $param;
+ };
+ return self::$function_manager->register( $function_name, $arguments );
+ }
+
+ /**
+ * A wrapper for userFunction that will simply set/override the return to be
+ * a function that returns the value that its passed. For example, esc_attr
+ * may need to be mocked, and it must return some value. passthruFunction
+ * will set esc_attr to return the value its passed.
+ *
+ * \WP_Mock::passthruFunction( 'esc_attr' );
+ * echo esc_attr( 'some_value' ); // echoes "some_value"
+ *
+ * @param string $function_name
+ * @param array $arguments
+ *
+ * @return Mockery\Expectation
+ */
+ public static function passthruFunction( $function_name, $arguments = array() ) {
+ $arguments = (array) $arguments;
+ $arguments['return'] = function ( $param ) {
+ return $param;
+ };
+ return self::$function_manager->register( $function_name, $arguments );
+ }
+
+ /**
+ * Alias for passthruFunction
+ *
+ * @deprecated since 1.0
+ *
+ * @param string $function_name
+ * @param array $arguments
+ *
+ * @return Mockery\Expectation
+ */
+ public static function wpPassthruFunction( $function_name, $arguments = array() ) {
+ static::getDeprecatedListener()->logDeprecatedCall( __METHOD__, array( $function_name, $arguments ) );
+ return self::passthruFunction( $function_name, $arguments );
+ }
+
+ /**
+ * Add a function mock that aliases another callable.
+ *
+ * e.g.: WP_Mock::alias( 'wp_hash', 'md5' );
+ *
+ * @param string $function_name
+ * @param callable $alias
+ * @param array $arguments
+ *
+ * @return Mockery\Expectation
+ */
+ public static function alias( $function_name, $alias, $arguments = array() ) {
+ $arguments = (array) $arguments;
+ if ( is_callable( $alias ) ) {
+ $arguments['return'] = function () use ( $alias ) {
+ return call_user_func_array( $alias, func_get_args() );
+ };
+ }
+ return self::$function_manager->register( $function_name, $arguments );
+ }
+
+ /**
+ * Generate a fuzzy object match expectation
+ *
+ * This will let you fuzzy match objects based on their properties without
+ * needing to use the identical (===) operator. This is helpful when the
+ * object being passed to a function is constructed inside the scope of the
+ * function being tested but where you want to make assertions on more than
+ * just the type of the object.
+ *
+ * @param $thing
+ *
+ * @return FuzzyObject
+ */
+ public static function fuzzyObject( $thing ) {
+ return new FuzzyObject( $thing );
+ }
+
+ /**
+ * @return \WP_Mock\DeprecatedListener
+ */
+ public static function getDeprecatedListener() {
+ return static::$deprecated_listener;
+ }
+}
diff --git a/vendor/10up/wp_mock/php/WP_Mock/API/constant-mocks.php b/vendor/10up/wp_mock/php/WP_Mock/API/constant-mocks.php
new file mode 100644
index 00000000..aa8f92bf
--- /dev/null
+++ b/vendor/10up/wp_mock/php/WP_Mock/API/constant-mocks.php
@@ -0,0 +1,72 @@
+react( $function_to_add, (int) $priority, (int) $accepted_args );
+ }
+}
+
+if ( ! function_exists( 'do_action' ) ) {
+ /**
+ * Execute functions hooked on a specific action hook.
+ *
+ * @param string $tag The name of the action to be executed.
+ * @param mixed $arg,... Optional additional arguments which are passed on to the functions hooked to the action.
+ *
+ * @return null Will return null if $tag does not exist in $wp_filter array
+ */
+ function do_action( $tag, $arg = '' ) {
+ $args = func_get_args();
+ $args = array_slice( $args, 1 );
+
+ return \WP_Mock::onAction( $tag )->react( $args );
+ }
+}
+
+if ( ! function_exists( 'add_filter' ) ) {
+ /**
+ * Dummy method to prevent filter hooks in constructor from failing.
+ */
+ function add_filter( $tag, $function_to_add, $priority = 10, $accepted_args = 1 ) {
+ \WP_Mock::onFilterAdded( $tag )->react( $function_to_add, (int) $priority, (int) $accepted_args );
+ }
+}
+
+if ( ! function_exists( 'apply_filters' ) ) {
+ /**
+ * Call the functions added to a filter hook.
+ *
+ * @param string $tag The name of the filter hook.
+ * @param mixed $value The value on which the filters hooked to $tag are applied on.
+ * @param mixed $var,... Additional variables passed to the functions hooked to $tag .
+ *
+ * @return mixed The filtered value after all hooked functions are applied to it.
+ */
+ function apply_filters( $tag, $value ) {
+ $args = func_get_args();
+ $args = array_slice( $args, 1 );
+ $args[0] = $value;
+
+ return \WP_Mock::onFilter( $tag )->apply( $args );
+ }
+}
+
+if ( ! function_exists( 'esc_html' ) ) {
+ function esc_html() {
+ return \WP_Mock\Handler::predefined_return_function_helper( __FUNCTION__, func_get_args() );
+ }
+}
+
+if ( ! function_exists( 'esc_attr' ) ) {
+ function esc_attr() {
+ return \WP_Mock\Handler::predefined_return_function_helper( __FUNCTION__, func_get_args() );
+ }
+}
+
+if ( ! function_exists( 'esc_url' ) ) {
+ function esc_url() {
+ return \WP_Mock\Handler::predefined_return_function_helper( __FUNCTION__, func_get_args() );
+ }
+}
+
+if ( ! function_exists( 'esc_url_raw' ) ) {
+ function esc_url_raw() {
+ return \WP_Mock\Handler::predefined_return_function_helper( __FUNCTION__, func_get_args() );
+ }
+}
+
+if ( ! function_exists( 'esc_js' ) ) {
+ function esc_js() {
+ return \WP_Mock\Handler::predefined_return_function_helper( __FUNCTION__, func_get_args() );
+ }
+}
+
+if ( ! function_exists( 'esc_textarea' ) ) {
+ function esc_textarea() {
+ return \WP_Mock\Handler::predefined_return_function_helper( __FUNCTION__, func_get_args() );
+ }
+}
+
+if ( ! function_exists( '__' ) ) {
+ function __() {
+ return \WP_Mock\Handler::predefined_return_function_helper( __FUNCTION__, func_get_args() );
+ }
+}
+
+if ( ! function_exists( '_e' ) ) {
+ function _e() {
+ \WP_Mock\Handler::predefined_echo_function_helper( __FUNCTION__, func_get_args() );
+ }
+}
+
+if ( ! function_exists( '_x' ) ) {
+ function _x() {
+ return \WP_Mock\Handler::predefined_return_function_helper( __FUNCTION__, func_get_args() );
+ }
+}
+
+if ( ! function_exists( 'esc_html__' ) ) {
+ function esc_html__() {
+ return \WP_Mock\Handler::predefined_return_function_helper( __FUNCTION__, func_get_args() );
+ }
+}
+
+if ( ! function_exists( 'esc_html_e' ) ) {
+ function esc_html_e() {
+ \WP_Mock\Handler::predefined_echo_function_helper( __FUNCTION__, func_get_args() );
+ }
+}
+
+if ( ! function_exists( 'esc_html_x' ) ) {
+ function esc_html_x() {
+ return \WP_Mock\Handler::predefined_return_function_helper( __FUNCTION__, func_get_args() );
+ }
+}
+
+if ( ! function_exists( 'esc_attr__' ) ) {
+ function esc_attr__() {
+ return \WP_Mock\Handler::predefined_return_function_helper( __FUNCTION__, func_get_args() );
+ }
+}
+
+if ( ! function_exists( 'esc_attr_e' ) ) {
+ function esc_attr_e() {
+ \WP_Mock\Handler::predefined_echo_function_helper( __FUNCTION__, func_get_args() );
+ }
+}
+
+if ( ! function_exists( 'esc_attr_x' ) ) {
+ function esc_attr_x() {
+ return \WP_Mock\Handler::predefined_return_function_helper( __FUNCTION__, func_get_args() );
+ }
+}
+
+if ( ! function_exists( '_n' ) ) {
+ function _n() {
+ return \WP_Mock\Handler::predefined_return_function_helper( __FUNCTION__, func_get_args() );
+ }
+}
diff --git a/vendor/10up/wp_mock/php/WP_Mock/Action.php b/vendor/10up/wp_mock/php/WP_Mock/Action.php
new file mode 100644
index 00000000..b984b422
--- /dev/null
+++ b/vendor/10up/wp_mock/php/WP_Mock/Action.php
@@ -0,0 +1,77 @@
+name );
+
+ $arg_num = count( $args );
+
+ if ( 0 === $arg_num ) {
+ if ( ! isset( $this->processors['argsnull'] ) ) {
+ $this->strict_check();
+
+ return;
+ }
+
+ $this->processors['argsnull']->react();
+ } else {
+ $processors = $this->processors;
+ for ( $i = 0; $i < $arg_num - 1; $i ++ ) {
+ $arg = $this->safe_offset( $args[ $i ] );
+
+ if ( ! isset( $processors[ $arg ] ) ) {
+ $this->strict_check();
+
+ return;
+ }
+
+ $processors = $processors[ $arg ];
+ }
+
+ $arg = $this->safe_offset( $args[ $arg_num - 1 ] );
+ if ( ! is_array( $processors ) || ! isset( $processors[ $arg ] ) ) {
+ $this->strict_check();
+
+ return;
+ }
+
+ $processors[ $arg ]->react();
+ }
+ }
+
+ protected function new_responder() {
+ return new Action_Responder();
+ }
+
+ /**
+ * @return string
+ */
+ protected function get_strict_mode_message() {
+ return sprintf( 'Unexpected use of do_action for action %s', $this->name );
+ }
+}
+
+class Action_Responder {
+ /**
+ * @var mixed
+ */
+ protected $callable;
+
+ public function perform( $callable ) {
+ $this->callable = $callable;
+ }
+
+ public function react() {
+ call_user_func( $this->callable );
+ }
+}
diff --git a/vendor/10up/wp_mock/php/WP_Mock/DeprecatedListener.php b/vendor/10up/wp_mock/php/WP_Mock/DeprecatedListener.php
new file mode 100644
index 00000000..155a6403
--- /dev/null
+++ b/vendor/10up/wp_mock/php/WP_Mock/DeprecatedListener.php
@@ -0,0 +1,119 @@
+calls[] = array( $method, $args );
+ }
+
+ public function reset() {
+ $this->calls = array();
+ }
+
+ public function checkCalls() {
+ if ( empty( $this->calls ) ) {
+ return;
+ }
+ $e = new \PHPUnit\Framework\RiskyTestError( $this->getMessage() );
+ $this->testResult->addFailure( $this->testCase, $e, 0 );
+ }
+
+ /**
+ * @param \PHPUnit\Framework\TestResult $testResult
+ */
+ public function setTestResult( $testResult ) {
+ $this->testResult = $testResult;
+ }
+
+ /**
+ * @param mixed $testName
+ */
+ public function setTestName( $testName ) {
+ $this->testName = $testName;
+ }
+
+ public function setTestCase( \PHPUnit\Framework\TestCase $testCase ) {
+ $this->testCase = $testCase;
+ }
+
+ protected function getMessage() {
+ $maxLength = array_reduce( $this->getDeprecatedMethods(), function ( $carry, $item ) {
+ return max( $carry, strlen( $item ) );
+ }, 0 ) + 1;
+ $message = 'Deprecated WP Mock calls inside ' . $this->testName . ":";
+ foreach ( $this->getDeprecatedMethodsWithArgs() as $method => $args ) {
+ $firstRun = true;
+ $extra = $maxLength - strlen( $method );
+ foreach ( $args as $arg ) {
+ $message .= "\n ";
+ if ( $firstRun ) {
+ $message .= $method . str_repeat( ' ', $extra );
+ $firstRun = false;
+ $extra = $maxLength;
+ } else {
+ $message .= str_repeat( ' ', $extra );
+ }
+ $message .= $arg;
+ }
+ }
+
+ return $message;
+ }
+
+ protected function getDeprecatedMethods() {
+ $methods = array();
+ foreach ( $this->calls as $call ) {
+ $methods[] = $call[0];
+ }
+
+ return array_unique( $methods );
+ }
+
+ protected function getDeprecatedMethodsWithArgs() {
+ $collection = array();
+ foreach ( $this->calls as $call ) {
+ $method = $call[0];
+ $args = json_encode( array_map( array( $this, 'scalarizeArg' ), $call[1] ) );
+ if ( empty( $collection[ $method ] ) ) {
+ $collection[ $method ] = array();
+ }
+ $collection[ $method ][] = $args;
+ }
+
+ return array_map( 'array_unique', $collection );
+ }
+
+ protected function scalarizeArg( $value ) {
+ if ( is_scalar( $value ) ) {
+ return $value;
+ } elseif ( is_object( $value ) ) {
+ return '<' . get_class( $value ) . ':' . spl_object_hash( $value ) . '>';
+ } elseif ( is_array( $value ) ) {
+ if ( is_callable( $value ) ) {
+ return '[' . implode( ',', array_map( array( $this, 'scalarizeArg' ), $value ) ) . ']';
+ } else {
+ return 'Array([' . count( $value ) . '] ...)';
+ }
+ } elseif ( is_resource( $value ) ) {
+ return 'Resource';
+ } else {
+ return 'Unknown Value';
+ }
+ }
+}
diff --git a/vendor/10up/wp_mock/php/WP_Mock/EventManager.php b/vendor/10up/wp_mock/php/WP_Mock/EventManager.php
new file mode 100644
index 00000000..652daa81
--- /dev/null
+++ b/vendor/10up/wp_mock/php/WP_Mock/EventManager.php
@@ -0,0 +1,156 @@
+flush();
+ }
+
+ /**
+ * Clear internal storage.
+ */
+ public function flush() {
+ $this->filters = array();
+ $this->actions = array();
+ $this->expected = array();
+ }
+
+ /**
+ * @param string $name Action handler to retrieve
+ *
+ * @return Action
+ */
+ public function action( $name ) {
+ if ( ! isset( $this->actions[ $name ] ) ) {
+ $this->actions[ $name ] = new Action( $name );
+ $this->expected[] = 'action::' . $name;
+ }
+
+ return $this->actions[ $name ];
+ }
+
+ /**
+ * @param string $name Filter handler to retrieve
+ *
+ * @return Filter
+ */
+ public function filter( $name ) {
+ if ( ! isset( $this->filters[ $name ] ) ) {
+ $this->filters[ $name ] = new Filter( $name );
+ $this->expected[] = 'filter::' . $name;
+ }
+
+ return $this->filters[ $name ];
+ }
+
+ public function callback( $name, $type = 'filter' ) {
+ $type_name = "$type::$name";
+ if ( ! isset( $this->callbacks[ $type_name ] ) ) {
+ $hookedCallback = new HookedCallback( $name );
+ $hookedCallback->setType( $type );
+ $this->callbacks[ $type_name ] = $hookedCallback;
+ $this->expected[] = "callback::$type_name";
+ }
+
+ return $this->callbacks[ $type_name ];
+ }
+
+ /**
+ * Remember that a particular hook has been invoked during operation.
+ *
+ * @param string $hook
+ * @param string $type
+ */
+ public function called( $hook, $type = 'action' ) {
+ $position = array_search( $type . '::' . $hook, $this->expected );
+ array_splice( $this->expected, $position, 1 );
+ }
+
+ /**
+ * Return a list of all the actions we're expecting a test to invoke.
+ *
+ * @return array
+ */
+ public function expectedActions() {
+ return array_keys( $this->actions );
+ }
+
+ /**
+ * Return a list of all the filters we're expecting a test to invoke.
+ * @return array
+ */
+ public function expectedFilters() {
+ return array_keys( $this->filters );
+ }
+
+ /**
+ * Return a list of all the hooks we're expecting a test to invoke.
+ * @return array
+ */
+ public function expectedHooks() {
+ return array_keys( $this->callbacks );
+ }
+
+ /**
+ * Check whether or not all actions have been invoked at least once.
+ *
+ * @return bool
+ */
+ public function allActionsCalled() {
+ foreach( $this->expected as $hook ) {
+ if ( 0 === strpos( $hook, 'action::' ) ) {
+ return false;
+ }
+ }
+
+ return true;
+ }
+
+ /**
+ * Check whether or not all filters have been invoked at least once.
+ *
+ * @return bool
+ */
+ public function allFiltersCalled() {
+ foreach ( $this->expected as $hook ) {
+ if ( 0 === strpos( $hook, 'filter::' ) ) {
+ return false;
+ }
+ }
+
+ return true;
+ }
+
+ /**
+ * Check whether or not all hooks have been invoked at least once.
+ *
+ * @return bool
+ */
+ public function allHooksAdded() {
+ foreach( $this->expected as $hook ) {
+ if ( 0 === strpos( $hook, 'callback::' ) ) {
+ return false;
+ }
+ }
+
+ return true;
+ }
+}
diff --git a/vendor/10up/wp_mock/php/WP_Mock/Filter.php b/vendor/10up/wp_mock/php/WP_Mock/Filter.php
new file mode 100644
index 00000000..d1503e98
--- /dev/null
+++ b/vendor/10up/wp_mock/php/WP_Mock/Filter.php
@@ -0,0 +1,76 @@
+processors['argsnull'] ) ) {
+ return $this->processors['argsnull']->send();
+ }
+ $this->strict_check();
+
+ return null;
+ }
+
+ $processors = $this->processors;
+ foreach ( $args as $arg ) {
+ $key = $this->safe_offset( $arg );
+ if ( ! is_array( $processors ) || ! isset( $processors[ $key ] ) ) {
+ $this->strict_check();
+
+ return $arg;
+ }
+
+ $processors = $processors[ $key ];
+ }
+
+ return call_user_func_array( array($processors, 'send'), $args );
+ }
+
+ protected function new_responder() {
+ return new Filter_Responder();
+ }
+
+ /**
+ * @return string
+ */
+ protected function get_strict_mode_message() {
+ return sprintf( 'Unexpected use of apply_filters for filter %s', $this->name );
+ }
+}
+
+class Filter_Responder {
+ /**
+ * @var mixed
+ */
+ protected $value;
+
+ public function reply( $value ) {
+ $this->value = $value;
+ }
+
+ public function send() {
+ if ( $this->value instanceof InvokedFilterValue ) {
+ return call_user_func_array( $this->value, func_get_args() );
+ }
+
+ return $this->value;
+ }
+}
+
diff --git a/vendor/10up/wp_mock/php/WP_Mock/Functions.php b/vendor/10up/wp_mock/php/WP_Mock/Functions.php
new file mode 100644
index 00000000..8fdd3279
--- /dev/null
+++ b/vendor/10up/wp_mock/php/WP_Mock/Functions.php
@@ -0,0 +1,295 @@
+flush();
+ }
+
+ /**
+ * Emptys the mocked_functions array
+ */
+ public function flush() {
+ $this->mocked_functions = array();
+ Handler::cleanup();
+ $this->patchwork_functions = array();
+ if ( function_exists( 'Patchwork\undoAll' ) ) {
+ \Patchwork\restoreAll();
+ }
+ if ( empty( self::$wp_mocked_functions ) ) {
+ self::$wp_mocked_functions = array(
+ 'add_action',
+ 'do_action',
+ 'add_filter',
+ 'apply_filters',
+ 'esc_attr',
+ 'esc_html',
+ 'esc_js',
+ 'esc_textarea',
+ 'esc_url',
+ 'esc_url_raw',
+ '__',
+ '_e',
+ '_x',
+ 'esc_attr__',
+ 'esc_attr_e',
+ 'esc_attr_x',
+ 'esc_html__',
+ 'esc_html_e',
+ 'esc_html_x',
+ '_n',
+ );
+ }
+ }
+
+ /**
+ * Registers the function to be mocked and sets up its expectations
+ *
+ * @param string $function
+ * @param array $arguments
+ *
+ * @throws \Exception If the function name is invalid
+ *
+ * @return Mockery\Expectation
+ */
+ public function register( $function, $arguments ) {
+ $expectation = null;
+ try {
+ $this->generate_function( $function );
+ if ( empty( $this->mocked_functions[$function] ) ) {
+ $this->mocked_functions[$function] = Mockery::mock( 'wp_api' );
+ }
+ $mock = $this->mocked_functions[$function];
+
+ $method = preg_replace( '/\\\\+/', '_', $function );
+ $expectation = $this->set_up_mock( $mock, $method, $arguments );
+ Handler::register_handler( $function, array( $mock, $method ) );
+ } catch ( \Exception $e ) {
+ throw $e;
+ }
+ return $expectation;
+ }
+
+ /**
+ * Sets up an argument placeholder that allows it to be any of an enumerated
+ * list of possibilities
+ *
+ * @return \Mockery\Matcher\anyOf
+ */
+ public static function anyOf() {
+ return call_user_func_array( array( '\\Mockery', 'anyOf' ), func_get_args() );
+ }
+
+ /**
+ * Sets up an argument placeholder that requires the argument to be of a
+ * certain type
+ *
+ * This may be any type for which there is a "is_*" function, or any class or
+ * interface.
+ *
+ * @param string $expected
+ *
+ * @return Mockery\Matcher\Type
+ */
+ public static function type( $expected ) {
+ return Mockery::type( $expected );
+ }
+
+ /**
+ * Set up the mock object with an expectation for this test.
+ *
+ * @param \Mockery\Mock $mock
+ * @param string $function
+ * @param array $arguments
+ *
+ * @return Mockery\Expectation
+ */
+ protected function set_up_mock( $mock, $function, $arguments ) {
+ $expectation = $mock->shouldReceive( $function );
+
+ if ( isset( $arguments['times'] ) ) {
+ $times = $arguments['times'];
+ if ( is_int( $times ) || preg_match( '/^\d+$/', $times ) ) {
+ $expectation->times( (int) $times );
+ } elseif ( preg_match( '/^(\d+)([\-+])$/', $times, $matches ) ) {
+ $method = '+' === $matches[2] ? 'atLeast' : 'atMost';
+ $expectation->$method()->times( (int) $matches[1] );
+ } elseif ( preg_match( '/^(\d+)-(\d+)$/', $times, $matches ) ) {
+ $num1 = (int) $matches[1];
+ $num2 = (int) $matches[2];
+ if ( $num1 === $num2 ) {
+ $expectation->times( $num1 );
+ } else {
+ $expectation->between( min( $num1, $num2 ), max( $num1, $num2 ) );
+ }
+ }
+ }
+ if ( isset( $arguments['args'] ) ) {
+ $arguments['args'] = array_map( function ( $argument ) {
+ if ( $argument instanceof \Closure ) {
+ return Mockery::on( $argument );
+ }
+ if ( $argument === '*' ) {
+ return Mockery::any();
+ }
+ return $argument;
+ }, (array) $arguments['args'] );
+ call_user_func_array( array( $expectation, 'with' ), $arguments['args'] );
+ }
+ if ( isset( $arguments['return_arg'] ) ) {
+ $argument_position = true === $arguments['return_arg'] ? 0 : (int) $arguments['return_arg'];
+ $arguments['return'] = function () use ( $argument_position ) {
+ if ( $argument_position >= func_num_args() ) {
+ return null;
+ }
+ return func_get_arg( $argument_position );
+ };
+ } elseif ( isset( $arguments['return_in_order'] ) ) {
+ $arguments['return'] = new ReturnSequence();
+ $arguments['return']->setReturnValues( (array) $arguments['return_in_order'] );
+ }
+ if ( isset( $arguments['return'] ) ) {
+ $return = $arguments['return'];
+ if ( $return instanceof ReturnSequence ) {
+ $expectation->andReturnValues( $return->getReturnValues() );
+ } elseif ( $return instanceof \Closure ) {
+ $expectation->andReturnUsing( $return );
+ } else {
+ $expectation->andReturn( $return );
+ }
+ }
+ return $expectation;
+ }
+
+ /**
+ * Dynamically declares a function if it doesn't already exist
+ *
+ * This function is namespace-aware.
+ *
+ * @param $function_name
+ */
+ private function generate_function( $function_name ) {
+ $function_name = $this->sanitize_function_name( $function_name );
+
+ $this->validate_function_name( $function_name );
+
+ $this->create_function( $function_name ) OR $this->replace_function( $function_name );
+ }
+
+ /**
+ * Create a function with WP_Mock
+ *
+ * @param string $function_name
+ *
+ * @return bool True if this function created the mock, false otherwise
+ */
+ private function create_function( $function_name ) {
+ if ( in_array( $function_name, self::$wp_mocked_functions ) ) {
+ return true;
+ }
+ if ( function_exists( $function_name ) ) {
+ return false;
+ }
+
+ $parts = explode( '\\', $function_name );
+ $name = array_pop( $parts );
+ $namespace = empty( $parts ) ? '' : 'namespace ' . implode( '\\', $parts ) . ';' . PHP_EOL;
+
+ $declaration = <<patchwork_functions ) ) {
+ return true;
+ }
+ if ( ! function_exists( 'Patchwork\\replace' ) ) {
+ return true;
+ }
+ $this->patchwork_functions[] = $function_name;
+ \Patchwork\redefine( $function_name, function () use ( $function_name ) {
+ return Handler::handle_function( $function_name, func_get_args() );
+ } );
+ return true;
+ }
+
+ /**
+ * Clean the function name to be of a standard shape
+ *
+ * @param string $function_name
+ *
+ * @return string
+ */
+ private function sanitize_function_name( $function_name ) {
+ $function_name = trim( $function_name, '\\' );
+ return $function_name;
+ }
+
+ /**
+ * Validate the function name for format and other considerations
+ *
+ * Validation will fail if the string doesn't match the regex, if it's an
+ * internal function, or if it is a reserved word in PHP.
+ *
+ * @param string $function_name
+ *
+ * @throws \InvalidArgumentException
+ */
+ private function validate_function_name( $function_name ) {
+ if ( function_exists( $function_name ) ) {
+ if ( empty( $this->internal_functions ) ) {
+ $defined_functions = get_defined_functions();
+ $this->internal_functions = $defined_functions['internal'];
+ }
+ if ( in_array( $function_name, $this->internal_functions ) ) {
+ throw new \InvalidArgumentException( 'Cannot override internal PHP functions!' );
+ }
+ }
+
+ $parts = explode( '\\', $function_name );
+ $name = array_pop( $parts );
+
+ if ( ! preg_match( '/[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/', $function_name ) ) {
+ throw new \InvalidArgumentException( 'Function name not properly formatted!' );
+ }
+
+ $reserved_words = ' __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 __CLASS__ __DIR__ __FILE__ __FUNCTION__ __LINE__ __METHOD__ __NAMESPACE__ __TRAIT__ ';
+ if ( false !== strpos( $reserved_words, " $name " ) ) {
+ throw new \InvalidArgumentException( 'Function name can not be a reserved word!' );
+ }
+ }
+
+}
+
diff --git a/vendor/10up/wp_mock/php/WP_Mock/Handler.php b/vendor/10up/wp_mock/php/WP_Mock/Handler.php
new file mode 100644
index 00000000..9b701668
--- /dev/null
+++ b/vendor/10up/wp_mock/php/WP_Mock/Handler.php
@@ -0,0 +1,110 @@
+name = $name;
+ }
+
+ protected function safe_offset( $value ) {
+ if ( is_null( $value ) ) {
+ return 'null';
+ } elseif ( is_scalar( $value ) ) {
+ return $value;
+ } elseif ( is_object( $value ) ) {
+ return spl_object_hash( $value );
+ } elseif ( is_array( $value ) ) {
+ $return = '';
+ foreach ( $value as $k => $v ) {
+ $k = is_numeric( $k ) ? '' : $k;
+ $return .= $k . $this->safe_offset( $v );
+ }
+
+ return $return;
+ }
+
+ return '';
+ }
+
+ /** @return Action_Responder|Filter_Responder */
+ public function with() {
+ $args = func_get_args();
+ $responder = $this->new_responder();
+
+ if ( $args === array( null ) ) {
+ $this->processors['argsnull'] = $responder;
+ } else {
+ $num_args = count( $args );
+
+ $processors = &$this->processors;
+ for ( $i = 0; $i < $num_args - 1; $i ++ ) {
+ $arg = $this->safe_offset( $args[ $i ] );
+
+ if ( ! isset( $processors[ $arg ] ) ) {
+ $processors[ $arg ] = array();
+ }
+
+ $processors = &$processors[ $arg ];
+ }
+
+ $processors[ $this->safe_offset( $args[ $num_args - 1 ] ) ] = $responder;
+ }
+
+ return $responder;
+ }
+
+ protected abstract function new_responder();
+
+ /**
+ * Throw an exception if strict mode is on
+ *
+ * @throws \PHPUnit\Framework\ExpectationFailedException
+ */
+ protected function strict_check() {
+ if ( \WP_Mock::strictMode() ) {
+ throw new \PHPUnit\Framework\ExpectationFailedException( $this->get_strict_mode_message() );
+ }
+ }
+
+ /**
+ * @return string
+ */
+ abstract protected function get_strict_mode_message();
+
+}
diff --git a/vendor/10up/wp_mock/php/WP_Mock/HookedCallback.php b/vendor/10up/wp_mock/php/WP_Mock/HookedCallback.php
new file mode 100644
index 00000000..e064788f
--- /dev/null
+++ b/vendor/10up/wp_mock/php/WP_Mock/HookedCallback.php
@@ -0,0 +1,107 @@
+type = $type;
+ }
+
+ public function react( $callback, $priority, $argument_count ) {
+ \WP_Mock::addHook( $this->name );
+
+ $safe_callback = $this->safe_offset( $callback );
+ if (
+ empty( $this->processors[ $safe_callback ] ) ||
+ empty( $this->processors[ $safe_callback ][ $priority ] ) ||
+ empty( $this->processors[ $safe_callback ][ $priority ][ $argument_count ] )
+ ) {
+ $this->callback = $callback;
+ $this->strict_check();
+
+ return null;
+ }
+
+ return $this->processors[ $this->safe_offset( $callback ) ][ $priority ][ $argument_count ]->react();
+ }
+
+ protected function new_responder() {
+ return new HookedCallbackResponder();
+ }
+
+ protected function safe_offset( $value ) {
+ if ( $value instanceof \Closure ) {
+ $value = '__CLOSURE__';
+ }
+
+ return parent::safe_offset( $value );
+ }
+
+ /**
+ * Converts a callable to a string
+ *
+ * Closures get returned as 'Closure', objects (those with an __invoke() method get turned into ::__invoke,
+ * and arrays get turned into ::
+ *
+ * @param callable $callback
+ *
+ * @return string
+ */
+ protected function callback_to_string( $callback ) {
+ if ( ! is_string( $callback ) ) {
+ if ( $callback instanceof \Closure ) {
+ $callback = 'Closure';
+ } elseif ( is_object( $callback ) ) {
+ $callback = get_class( $callback ) . '::__invoke';
+ } else {
+ $class = $callback[0];
+ $method = $callback[1];
+ if ( ! is_string( $class ) ) {
+ $class = get_class( $class );
+ }
+ $callback = "{$class}::$method";
+ }
+ }
+
+ return $callback;
+ }
+
+ /**
+ * @param $callback
+ *
+ * @return string
+ */
+ protected function get_strict_mode_message() {
+ return sprintf(
+ 'Unexpected use of add_%s for action %s with callback %s',
+ $this->type,
+ $this->name,
+ $this->callback_to_string( $this->callback )
+ );
+ }
+
+}
+
+class HookedCallbackResponder {
+
+ /**
+ * @var callable
+ */
+ protected $callable;
+
+ public function perform( $callable ) {
+ $this->callable = $callable;
+ }
+
+ public function react() {
+ call_user_func( $this->callable );
+ }
+
+}
diff --git a/vendor/10up/wp_mock/php/WP_Mock/InvokedFilterValue.php b/vendor/10up/wp_mock/php/WP_Mock/InvokedFilterValue.php
new file mode 100644
index 00000000..bf7a56a5
--- /dev/null
+++ b/vendor/10up/wp_mock/php/WP_Mock/InvokedFilterValue.php
@@ -0,0 +1,25 @@
+callback = $callable;
+ }
+
+ public function __invoke() {
+ return call_user_func_array( $this->callback, func_get_args() );
+ }
+
+}
diff --git a/vendor/10up/wp_mock/php/WP_Mock/Loader.php b/vendor/10up/wp_mock/php/WP_Mock/Loader.php
new file mode 100644
index 00000000..91277cbc
--- /dev/null
+++ b/vendor/10up/wp_mock/php/WP_Mock/Loader.php
@@ -0,0 +1,149 @@
+register();
+ *
+ * @author Jonathan H. Wage
+ * @author Roman S. Borschel
+ * @author Matthew Weier O'Phinney
+ * @author Kris Wallsmith
+ * @author Fabien Potencier
+ */
+
+namespace WP_Mock;
+
+
+class Loader {
+ private $_fileExtension = '.php';
+ private $_namespace;
+ private $_includePath;
+ private $_namespaceSeparator = '\\';
+
+ /**
+ * Creates a new Loader that loads classes of the
+ * specified namespace.
+ *
+ * @param string $ns The namespace to use.
+ */
+ public function __construct( $ns = 'WP_Mock', $includePath = null ) {
+ $this->_namespace = $ns;
+ $this->_includePath = $includePath;
+ }
+
+ /**
+ * Sets the namespace separator used by classes in the namespace of this class loader.
+ *
+ * @param string $sep The separator to use.
+ */
+ public function setNamespaceSeparator( $sep ) {
+ $this->_namespaceSeparator = $sep;
+ }
+
+ /**
+ * Gets the namespace seperator used by classes in the namespace of this class loader.
+ *
+ * @return void
+ */
+ public function getNamespaceSeparator() {
+ return $this->_namespaceSeparator;
+ }
+
+ /**
+ * Sets the base include path for all class files in the namespace of this class loader.
+ *
+ * @param string $includePath
+ */
+ public function setIncludePath( $includePath ) {
+ $this->_includePath = $includePath;
+ }
+
+ /**
+ * Gets the base include path for all class files in the namespace of this class loader.
+ *
+ * @return string $includePath
+ */
+ public function getIncludePath() {
+ return $this->_includePath;
+ }
+
+ /**
+ * Sets the file extension of class files in the namespace of this class loader.
+ *
+ * @param string $fileExtension
+ */
+ public function setFileExtension( $fileExtension ) {
+ $this->_fileExtension = $fileExtension;
+ }
+
+ /**
+ * Gets the file extension of class files in the namespace of this class loader.
+ *
+ * @return string $fileExtension
+ */
+ public function getFileExtension() {
+ return $this->_fileExtension;
+ }
+
+ /**
+ * Installs this class loader on the SPL autoload stack.
+ *
+ * @param bool $prepend If true, prepend autoloader on the autoload stack
+ */
+ public function register( $prepend = false ) {
+ //spl_autoload_register( array( $this, 'loadClass' ), true, $prepend );
+ }
+
+ /**
+ * Uninstalls this class loader from the SPL autoloader stack.
+ */
+ public function unregister() {
+ //spl_autoload_unregister( array( $this, 'loadClass' ) );
+ }
+
+ /**
+ * Loads the given class or interface.
+ *
+ * @param string $className The name of the class to load.
+ *
+ * @return void
+ */
+ public function loadClass( $className ) {
+ return;
+ if ( $className === 'WP_Mock' ) {
+ require $this->getFullPath( 'WP_Mock.php' );
+
+ return;
+ }
+ if ( null === $this->_namespace
+ || $this->_namespace . $this->_namespaceSeparator === substr( $className, 0, strlen( $this->_namespace . $this->_namespaceSeparator ) )
+ ) {
+ $fileName = '';
+ $namespace = '';
+ if ( false !== ( $lastNsPos = strripos( $className, $this->_namespaceSeparator ) ) ) {
+ $namespace = substr( $className, 0, $lastNsPos );
+ $className = substr( $className, $lastNsPos + 1 );
+ $fileName = str_replace( $this->_namespaceSeparator, DIRECTORY_SEPARATOR, $namespace ) . DIRECTORY_SEPARATOR;
+ }
+ $fileName .= str_replace( '_', DIRECTORY_SEPARATOR, $className ) . $this->_fileExtension;
+ require $this->getFullPath( $fileName );
+ }
+ }
+
+ /**
+ * Returns full path for $fileName if _includePath is set, or leaves as-is for PHP's internal search in 'require'.
+ *
+ * @param string $fileName relative to include path.
+ *
+ * @return string
+ */
+ private function getFullPath( $fileName ) {
+ return ($this->_includePath !== null ? $this->_includePath . DIRECTORY_SEPARATOR : '') . $fileName;
+ }
+}
diff --git a/vendor/10up/wp_mock/php/WP_Mock/Matcher/FuzzyObject.php b/vendor/10up/wp_mock/php/WP_Mock/Matcher/FuzzyObject.php
new file mode 100644
index 00000000..a3ee3fd4
--- /dev/null
+++ b/vendor/10up/wp_mock/php/WP_Mock/Matcher/FuzzyObject.php
@@ -0,0 +1,101 @@
+haveCommonAncestor( $actual, $this->_expected ) ) {
+ return false;
+ }
+
+ $expected_properties = get_object_vars( $this->_expected );
+
+ foreach ( $expected_properties as $prop => $value ) {
+ if ( ! isset( $actual->$prop ) || $value !== $actual->$prop ) {
+ return false;
+ }
+ }
+
+ $actual_keys = array_keys( get_object_vars( $actual ) );
+ $extra_actual = array_diff( $actual_keys, array_keys( $expected_properties ) );
+ if ( ! empty( $extra_actual ) ) {
+ return false;
+ }
+
+ return true;
+ }
+
+ /**
+ * Return a string representation of this Matcher
+ *
+ * @return string
+ */
+ public function __toString() {
+ $values = array_values( get_object_vars( $this->_expected ) );
+ $values = array_map( function ( $value ) {
+ if ( ! is_scalar( $value ) ) {
+ if ( is_array( $value ) ) {
+ $value = 'Array';
+ } elseif ( is_object( $value ) ) {
+ $value = get_class( $value );
+ } elseif ( is_resource( $value ) ) {
+ $value = get_resource_type( $value );
+ } else {
+ $value = 'unknown';
+ }
+ }
+ return $value;
+ }, $values );
+ return '';
+ }
+
+ /**
+ * @param object $object1
+ * @param object $object2
+ *
+ * @return bool
+ */
+ protected function haveCommonAncestor( $object1, $object2 ) {
+ $class1 = get_class( $object1 );
+ $class2 = get_class( $object2 );
+ if ( $class1 === $class2 ) {
+ return true;
+ }
+ $inheritance1 = class_parents( $class1 );
+ $inheritance2 = class_parents( $class2 );
+ return (bool) array_intersect_assoc( $inheritance1, $inheritance2 );
+ }
+}
diff --git a/vendor/10up/wp_mock/php/WP_Mock/ReturnSequence.php b/vendor/10up/wp_mock/php/WP_Mock/ReturnSequence.php
new file mode 100644
index 00000000..a7c55a32
--- /dev/null
+++ b/vendor/10up/wp_mock/php/WP_Mock/ReturnSequence.php
@@ -0,0 +1,39 @@
+return_values = func_get_args();
+ }
+
+ /**
+ * Retrieve the $return_values array
+ *
+ * @return array
+ */
+ public function getReturnValues() {
+ return $this->return_values;
+ }
+
+ /**
+ * Set the return_values array
+ *
+ * Values should be passed in as one array. Keys will be discarded.
+ *
+ * @param array $return_values
+ */
+ public function setReturnValues( $return_values ) {
+ $this->return_values = array_values( (array) $return_values );
+ }
+
+}
\ No newline at end of file
diff --git a/vendor/10up/wp_mock/php/WP_Mock/Tools/Constraints/ExpectationsMet.php b/vendor/10up/wp_mock/php/WP_Mock/Tools/Constraints/ExpectationsMet.php
new file mode 100644
index 00000000..6feba966
--- /dev/null
+++ b/vendor/10up/wp_mock/php/WP_Mock/Tools/Constraints/ExpectationsMet.php
@@ -0,0 +1,40 @@
+mockery_verify();
+ } catch ( Exception $e ) {
+ $this->_mockery_message = $e->getMessage();
+ return false;
+ }
+ return true;
+ }
+
+ /**
+ * Returns a string representation of the object.
+ *
+ * @return string
+ */
+ public function toString(): string {
+ return 'WP Mock expectations are met';
+ }
+
+ protected function additionalFailureDescription( $other ): string {
+ return str_replace( array( "\r", "\n" ), '', (string) $this->_mockery_message );
+ }
+
+ protected function failureDescription( $other ): string {
+ return $this->toString();
+ }
+
+}
diff --git a/vendor/10up/wp_mock/php/WP_Mock/Tools/Constraints/IsEqualHtml.php b/vendor/10up/wp_mock/php/WP_Mock/Tools/Constraints/IsEqualHtml.php
new file mode 100644
index 00000000..38bed5a0
--- /dev/null
+++ b/vendor/10up/wp_mock/php/WP_Mock/Tools/Constraints/IsEqualHtml.php
@@ -0,0 +1,57 @@
+value = $value;
+ $this->delta = $delta;
+ $this->maxDepth = $maxDepth;
+ $this->canonicalize = $canonicalize;
+ $this->ignoreCase = $ignoreCase;
+ }
+
+ private function clean( $thing ) {
+ $thing = preg_replace( '/\n\s+/', '', $thing );
+ $thing = preg_replace( '/\s\s+/', ' ', $thing );
+ return str_replace( array( "\r", "\n", "\t" ), '', $thing );
+ }
+
+ public function evaluate( $other, $description = '', $returnResult = FALSE ) {
+ $other = $this->clean( $other );
+ $this->value = $this->clean( $this->value );
+ $isEqual = new IsEqual( $this->value, $this->delta, $this->maxDepth, $this->canonicalize, $this->ignoreCase );
+ return $isEqual->evaluate( $other, $description, $returnResult );
+ }
+}
diff --git a/vendor/10up/wp_mock/php/WP_Mock/Tools/TestCase.php b/vendor/10up/wp_mock/php/WP_Mock/Tools/TestCase.php
new file mode 100644
index 00000000..995d7bfa
--- /dev/null
+++ b/vendor/10up/wp_mock/php/WP_Mock/Tools/TestCase.php
@@ -0,0 +1,319 @@
+requireFileDependencies();
+
+ WP_Mock::setUp();
+
+ $_GET = (array) $this->__default_get;
+ $_POST = (array) $this->__default_post;
+ $_REQUEST = (array) $this->__default_request;
+
+ $this->setUpContentFiltering();
+
+ $this->cleanGlobals();
+ }
+
+ public function tearDown() : void {
+ WP_Mock::tearDown();
+
+ $this->cleanGlobals();
+
+ $this->mockedStaticMethods = array();
+
+ $_GET = array();
+ $_POST = array();
+ $_REQUEST = array();
+ }
+
+ public function assertActionsCalled() {
+ $actions_not_added = $expected_actions = 0;
+ try {
+ WP_Mock::assertActionsCalled();
+ } catch ( Exception $e ) {
+ $actions_not_added = 1;
+ $expected_actions = $e->getMessage();
+ }
+ $this->assertEmpty( $actions_not_added, $expected_actions );
+ }
+
+ public function assertHooksAdded() {
+ $hooks_not_added = $expected_hooks = 0;
+ try {
+ WP_Mock::assertHooksAdded();
+ } catch ( Exception $e ) {
+ $hooks_not_added = 1;
+ $expected_hooks = $e->getMessage();
+ }
+ $this->assertEmpty( $hooks_not_added, $expected_hooks );
+ }
+
+ public function ns( $function ) {
+ if ( ! is_string( $function ) || false !== strpos( $function, '\\' ) ) {
+ return $function;
+ }
+
+ $thisClassName = trim( get_class( $this ), '\\' );
+
+ if ( ! strpos( $thisClassName, '\\' ) ) {
+ return $function;
+ }
+
+ // $thisNamespace is constructed by exploding the current class name on
+ // namespace separators, running array_slice on that array starting at 0
+ // and ending one element from the end (chops the class name off) and
+ // imploding that using namespace separators as the glue.
+ $thisNamespace = implode( '\\', array_slice( explode( '\\', $thisClassName ), 0, - 1 ) );
+
+ return "$thisNamespace\\$function";
+ }
+
+ public function stripTabsAndNewlines( $content ) {
+ return str_replace( array( "\t", "\r", "\n" ), '', $content );
+ }
+
+ public function expectOutputString( string $expectedString ): void {
+ if ( is_callable( $this->__contentFilterCallback ) ) {
+ $expectedString = call_user_func( $this->__contentFilterCallback, $expectedString );
+ }
+ parent::expectOutputString( $expectedString );
+ }
+
+ public function assertCurrentConditionsMet( $message = '' ) {
+ $this->assertThat( null, new ExpectationsMet, $message );
+ }
+
+ public function assertConditionsMet( $message = '' ) {
+ $this->assertCurrentConditionsMet( $message );
+ }
+
+ public function assertEqualsHTML( $expected, $actual, $message = '' ) {
+ $constraint = new IsEqualHtml( $expected );
+ $this->assertThat( $actual, $constraint, $message );
+ }
+
+ /**
+ * Nuke the globals from orbit for process isolation
+ *
+ * See http://kpayne.me/2012/07/02/phpunit-process-isolation-and-constant-already-defined/
+ * for more details
+ *
+ * {@inheritdoc}
+ */
+ protected function prepareTemplate( Text_Template $template ) {
+ $template->setVar( array(
+ 'globals' => '$GLOBALS[\'__PHPUNIT_BOOTSTRAP\'] = \'' . $GLOBALS['__PHPUNIT_BOOTSTRAP'] . '\';',
+ ) );
+ parent::prepareTemplate( $template );
+ }
+
+
+ /**
+ * Mock a static method of a class
+ *
+ * @param string $class The classname or class::method name
+ * @param null|string $method The method name. Optional if class::method used for $class
+ *
+ * @return \Mockery\Expectation
+ * @throws Exception
+ */
+ protected function mockStaticMethod( $class, $method = null ) {
+ if ( ! $method ) {
+ list( $class, $method ) = ( explode( '::', $class ) + array( null, null ) );
+ }
+ if ( ! $method ) {
+ throw new Exception( sprintf( 'Could not mock %s::%s', $class, $method ) );
+ }
+ if ( ! WP_Mock::usingPatchwork() || ! function_exists( 'Patchwork\Interceptor\patch' ) ) {
+ throw new Exception( 'Patchwork is not loaded! Please load patchwork before mocking static methods!' );
+ }
+
+ $safe_method = "wp_mock_safe_$method";
+ $signature = md5( "$class::$method" );
+ if ( ! empty( $this->mockedStaticMethods[ $signature ] ) ) {
+ $mock = $this->mockedStaticMethods[ $signature ];
+ } else {
+
+ $rMethod = false;
+ if ( class_exists( $class ) ) {
+ $rMethod = new ReflectionMethod( $class, $method );
+ }
+ if (
+ $rMethod &&
+ (
+ ! $rMethod->isUserDefined() ||
+ ! $rMethod->isStatic() ||
+ $rMethod->isPrivate()
+ )
+ ) {
+ throw new Exception( sprintf( '%s::%s is not a user-defined non-private static method!', $class, $method ) );
+ }
+
+ /** @var \Mockery\Mock $mock */
+ $mock = Mockery::mock( $class );
+ $mock->shouldAllowMockingProtectedMethods();
+ $this->mockedStaticMethods[ $signature ] = $mock;
+
+ \Patchwork\redefine( "$class::$method", function () use ( $mock, $safe_method ) {
+ return call_user_func_array( array( $mock, $safe_method ), func_get_args() );
+ }, ! ( $rMethod ) );
+ }
+ $expectation = $mock->shouldReceive( $safe_method );
+
+ return $expectation;
+ }
+
+ /**
+ * @param array|object $data The post data to add to the post
+ *
+ * @return \WP_Post
+ */
+ protected function mockPost( $data ) {
+ /** @var \WP_Post $post */
+ $post = \Mockery::mock( 'WP_Post' );
+ $data = array_merge( array(
+ 'ID' => 0,
+ 'post_author' => 0,
+ 'post_type' => '',
+ 'post_title' => '',
+ 'post_date' => '',
+ 'post_date_gmt' => '',
+ 'post_content' => '',
+ 'post_excerpt' => '',
+ 'post_status' => '',
+ 'comment_status' => '',
+ 'ping_status' => '',
+ 'post_password' => '',
+ 'post_parent' => 0,
+ 'post_modified' => '',
+ 'post_modified_gmt' => '',
+ 'comment_count' => 0,
+ 'menu_order' => 0,
+ ), (array) $data );
+ array_walk( $data, function ( $value, $prop ) use ( $post ) {
+ $post->$prop = $value;
+ } );
+
+ return $post;
+ }
+
+ /**
+ * @param array $query_vars
+ *
+ * @return \WP
+ */
+ protected function mockWp( array $query_vars = array() ) {
+ /** @var \WP $wp */
+ $wp = \Mockery::mock( 'WP' );
+ $wp->query_vars = $query_vars;
+
+ return $wp;
+ }
+
+ protected function cleanGlobals() {
+ $common_globals = array(
+ 'post',
+ 'wp_query',
+ );
+ foreach ( $common_globals as $var ) {
+ if ( isset( $GLOBALS[ $var ] ) ) {
+ unset( $GLOBALS[ $var ] );
+ }
+ }
+
+ }
+
+ /**
+ * Require any testFiles that are defined in a subclass
+ *
+ * This will only work if the WP_MOCK_INCLUDE_DIR is defined to point to the root directory you want to include
+ * files from.
+ */
+ protected function requireFileDependencies() {
+ if ( ! empty( $this->testFiles ) && defined( 'WP_MOCK_INCLUDE_DIR' ) ) {
+ foreach ( $this->testFiles as $file ) {
+ if ( file_exists( WP_MOCK_INCLUDE_DIR . $file ) ) {
+ require_once( WP_MOCK_INCLUDE_DIR . $file );
+ }
+ }
+ }
+ }
+
+ protected function setUpContentFiltering() {
+ $this->__contentFilterCallback = false;
+
+ $annotations = $this->getAnnotations();
+ if (
+ ! isset( $annotations['stripTabsAndNewlinesFromOutput'] ) ||
+ $annotations['stripTabsAndNewlinesFromOutput'][0] !== 'disabled' ||
+ (
+ is_numeric( $annotations['stripTabsAndNewlinesFromOutput'][0] ) &&
+ (int) $annotations['stripTabsAndNewlinesFromOutput'][0] !== 0
+ )
+ ) {
+ $this->__contentFilterCallback = array( $this, 'stripTabsAndNewlines' );
+ $this->setOutputCallback( $this->__contentFilterCallback );
+ }
+ }
+
+ public function run( TestResult $result = null ): TestResult {
+ if ( $result === null ) {
+ $result = $this->createResult();
+ }
+
+ WP_Mock::getDeprecatedListener()->setTestResult( $result );
+ WP_Mock::getDeprecatedListener()->setTestCase($this);
+
+ return parent::run( $result );
+ }
+
+ /**
+ * @after
+ */
+ public function checkDeprecatedCalls() {
+ WP_Mock::getDeprecatedListener()->checkCalls();
+ WP_Mock::getDeprecatedListener()->reset();
+ }
+
+}
+
diff --git a/vendor/10up/wp_mock/phpdoc.xml b/vendor/10up/wp_mock/phpdoc.xml
new file mode 100644
index 00000000..d954812d
--- /dev/null
+++ b/vendor/10up/wp_mock/phpdoc.xml
@@ -0,0 +1,16 @@
+
+
+
+ WP_Mock
+ docs
+ utf-8
+
+
+ docs
+
+
+ WP_Mock
+ tests/*
+ vendor/*
+
+
\ No newline at end of file
diff --git a/vendor/10up/wp_mock/phpunit.xml.dist b/vendor/10up/wp_mock/phpunit.xml.dist
new file mode 100644
index 00000000..3c6875f0
--- /dev/null
+++ b/vendor/10up/wp_mock/phpunit.xml.dist
@@ -0,0 +1,22 @@
+
+
+
+ ./tests/
+
+
+
+
+
+ php
+
+
+
diff --git a/vendor/10up/wp_mock/tests/DeprecatedMethodsTest.php b/vendor/10up/wp_mock/tests/DeprecatedMethodsTest.php
new file mode 100644
index 00000000..b953ab73
--- /dev/null
+++ b/vendor/10up/wp_mock/tests/DeprecatedMethodsTest.php
@@ -0,0 +1,43 @@
+reset();
+ }
+
+ protected function tearDown() : void {
+ WP_Mock::getDeprecatedListener()->reset();
+ WP_Mock::tearDown();
+ }
+
+ public function testWpFunctionLogsDeprecationNotice() {
+ $listener = WP_Mock::getDeprecatedListener();
+ $testResult = new \PHPUnit\Framework\TestResult();
+ $result = Mockery::mock( $testResult );
+ $case = Mockery::mock( '\PHPUnit\Framework\TestCase' );
+ $listener->setTestCase( $case );
+ $listener->setTestResult( $result );
+ $result->shouldReceive( 'addFailure' )
+ ->once()
+ ->with( $case, Mockery::type( '\PHPUnit\Framework\RiskyTestError' ), 0 );
+ WP_Mock::wpFunction( 'foobar' );
+ $this->assertNull($listener->checkCalls());
+ }
+
+ public function testWpPassthruFunctionLogsDeprecationNotice() {
+ $listener = WP_Mock::getDeprecatedListener();
+ $testResult = new \PHPUnit\Framework\TestResult();
+ $result = Mockery::mock( $testResult );
+ $case = Mockery::mock( '\PHPUnit\Framework\TestCase' );
+ $listener->setTestCase( $case );
+ $listener->setTestResult( $result );
+ $result->shouldReceive( 'addFailure' )
+ ->once()
+ ->with( $case, Mockery::type( '\PHPUnit\Framework\RiskyTestError' ), 0 );
+ WP_Mock::wpPassthruFunction( 'foobar' );
+ $this->assertNull( $listener->checkCalls() );
+ }
+
+}
diff --git a/vendor/10up/wp_mock/tests/FunctionMocksTest.php b/vendor/10up/wp_mock/tests/FunctionMocksTest.php
new file mode 100644
index 00000000..e832d9c2
--- /dev/null
+++ b/vendor/10up/wp_mock/tests/FunctionMocksTest.php
@@ -0,0 +1,85 @@
+isInIsolation() ) {
+ WP_Mock::setUp();
+ }
+ }
+
+ /**
+ * @runInSeparateProcess
+ * @preserveGlobalState disabled
+ */
+ public function testCommonFunctionsAreDefined() {
+ // First we assert that all common functions get removed from the returned array. If any one of these functions
+ // doesn't get removed, that means it already exists.
+ $this->assertEmpty( array_filter( $this->common_functions, 'function_exists' ) );
+ WP_Mock::bootstrap();
+ // Now we assert that the array doesn't lose any items after bootstrap, meaning all expected functions got
+ // defined correctly.
+ $this->assertEquals( $this->common_functions, array_filter( $this->common_functions, 'function_exists' ) );
+ }
+
+ /**
+ * @dataProvider dataCommonFunctionsDefaultFunctionality
+ */
+ public function testCommonFunctionsDefaultFunctionality( $function, $action ) {
+ $input = $expected = 'Something Random ' . rand( 0, 99 );
+ if ( 'echo' === $action ) {
+ $this->expectOutputString( $input );
+ $expected = null;
+ }
+ $this->assertEquals( $expected, call_user_func( $function, $input ) );
+ }
+
+ /**
+ * @runInSeparateProcess
+ * @preserveGlobalState disabled
+ */
+ public function testDefaultFailsInStrictMode() {
+ $this->expectExceptionMessageRegExp('/No handler found for \w+/');
+ $this->expectException('\PHPUnit\Framework\ExpectationFailedException');
+ WP_Mock::activateStrictMode();
+ WP_Mock::bootstrap();
+ _e('Test');
+ }
+
+ public function dataCommonFunctionsDefaultFunctionality() {
+ return array_map( function ( $function ) {
+ return array( $function, '_e' === substr( $function, - 2 ) ? 'echo' : 'return' );
+ }, $this->common_functions );
+ }
+
+ public function testMockingOverridesDefaults() {
+ $this->assertEquals( 'Input', __( 'Input' ) );
+ WP_Mock::userFunction( '__' )->andReturn( 'Output' );
+ $this->assertEquals( 'Output', __( 'Input' ) );
+ }
+
+ public function testBotchedMocksStillOverrideDefault() {
+ WP_Mock::userFunction( 'esc_html' );
+ $this->assertEmpty( esc_html( 'Input' ) );
+ }
+
+}
diff --git a/vendor/10up/wp_mock/tests/WP_Mock/DeprecatedListenerTest.php b/vendor/10up/wp_mock/tests/WP_Mock/DeprecatedListenerTest.php
new file mode 100644
index 00000000..67cfd659
--- /dev/null
+++ b/vendor/10up/wp_mock/tests/WP_Mock/DeprecatedListenerTest.php
@@ -0,0 +1,131 @@
+object = new DeprecatedListener();
+ }
+
+ public function tearDown() : void {
+ $this->object->reset();
+ }
+
+ public function testLogDeprecatedCall() {
+ $method = 'Foobar::asdf' . rand( 0, 9 );
+ $args = array( rand( 10, 99 ) );
+ $this->object->logDeprecatedCall( $method, $args );
+
+ $this->assertEquals( array( array( $method, $args ) ), $this->getCalls( $this->object ) );
+ }
+
+ public function testReset() {
+ $this->object->logDeprecatedCall( 'Asdf', array( 'foobar' ) );
+ $this->object->reset();
+
+ $this->assertEquals( array(), $this->getCalls( $this->object ) );
+ }
+
+ public function testCheckCallsNoCalls() {
+ $testResult = new \PHPUnit\Framework\TestResult();
+ $result = Mockery::mock( $testResult );
+ $result->shouldReceive( 'addFailure' )->never();
+ /** @var \\PHPUnit\Framework\TestResult $result */
+ $this->object->setTestResult( $result );
+
+ /** @noinspection PhpVoidFunctionResultUsedInspection */
+ $this->assertNull($this->object->checkCalls());
+ }
+
+ public function testCheckCalls_scalar_only() {
+ $this->object->logDeprecatedCall( 'FooBar::bazBat', array( 'string', true, 42 ) );
+ $this->object->setTestName( 'TestName' );
+ $testCase = Mockery::mock( '\PHPUnit\Framework\TestCase' );
+ /** @var \PHPUnit\Framework\TestCase $testCase */
+ $this->object->setTestCase( $testCase );
+ $testResult = new \PHPUnit\Framework\TestResult();
+ $result = Mockery::mock( $testResult );
+ $result->shouldReceive( 'addFailure' )
+ ->once()
+ ->andReturnUsing( function ( $case, $exception, $int ) use ( $testCase ) {
+ $int = (int) $int; // It's coming as 0.0
+ \PHPUnit\Framework\Assert::assertSame( $testCase, $case );
+ \PHPUnit\Framework\Assert::assertTrue( $exception instanceof \PHPUnit\Framework\RiskyTest );
+ $message = <<getMessage() );
+ \PHPUnit\Framework\Assert::assertTrue( 0 === $int );
+ } );
+ /** @var \\PHPUnit\Framework\TestResult $result */
+ $this->object->setTestResult( $result );
+
+ $this->object->checkCalls();
+ }
+
+ public function testCheckCalls_non_scalars() {
+ $callback1 = function () {
+ };
+ $object1 = Mockery::mock( 'WP_Query' );
+ $range = rand( 5, 10 );
+ $resource = fopen( 'php://temp', 'r' );
+ $this->object->logDeprecatedCall( 'BazBat::fooBar', array( $callback1 ) );
+ $this->object->logDeprecatedCall( 'BazBat::fooBar', array( $object1 ) );
+ $this->object->logDeprecatedCall( 'LongerClassName::callback', array( array( $object1, 'shouldReceive' ) ) );
+ $this->object->logDeprecatedCall( 'BazBat::fooBar', array( range( 1, $range ), $resource ) );
+ $this->object->setTestName( 'OtherTest' );
+ $testCase = Mockery::mock( '\PHPUnit\Framework\TestCase' );
+ /** @var \PHPUnit\Framework\TestCase $testCase */
+ $this->object->setTestCase( $testCase );
+ $testResult = new \PHPUnit\Framework\TestResult();
+ $result = Mockery::mock( $testResult );;
+ $testClosure = function ( $case, $exception, $int ) use ( $testCase, $callback1, $object1, $range ) {
+ $int = (int) $int; // It's coming as 0.0
+ $callback1 = get_class( $callback1 ) . ':' . spl_object_hash( $callback1 );
+ $object1 = get_class( $object1 ) . ':' . spl_object_hash( $object1 );
+ \PHPUnit\Framework\Assert::assertSame( $testCase, $case );
+ \PHPUnit\Framework\Assert::assertTrue( $exception instanceof \PHPUnit\Framework\RiskyTest );
+ $message = <<"]
+ ["<$object1>"]
+ ["Array([$range] ...)","Resource"]
+ LongerClassName::callback ["[<$object1>,shouldReceive]"]
+EOT;
+ \PHPUnit\Framework\Assert::assertEquals( $message, $exception->getMessage() );
+ \PHPUnit\Framework\Assert::assertTrue( 0 === $int );
+ };
+ $result->shouldReceive( 'addFailure' )
+ ->once()
+ ->andReturnUsing( $testClosure );
+ /** @var \\PHPUnit\Framework\TestResult $result */
+ $this->object->setTestResult( $result );
+
+ try {
+ $this->object->checkCalls();
+ } catch ( \Exception $e ) {
+ fclose( $resource );
+ throw $e;
+ }
+ fclose( $resource );
+ }
+
+ protected function getCalls( $listener ) {
+ $prop = new ReflectionProperty( $listener, 'calls' );
+ $prop->setAccessible( true );
+
+ return $prop->getValue( $listener );
+ }
+
+}
diff --git a/vendor/10up/wp_mock/tests/WP_MockTest.php b/vendor/10up/wp_mock/tests/WP_MockTest.php
new file mode 100644
index 00000000..d82d1a1c
--- /dev/null
+++ b/vendor/10up/wp_mock/tests/WP_MockTest.php
@@ -0,0 +1,110 @@
+assertFalse( WP_Mock::strictMode() );
+ }
+
+ /**
+ * @runInSeparateProcess
+ */
+ public function test_activateStrictMode_turns_strict_mode_on() {
+ WP_Mock::activateStrictMode();
+ $this->assertTrue( WP_Mock::strictMode() );
+ }
+
+ /**
+ * @runInSeparateProcess
+ */
+ public function test_activateStrictMode_does_not_work_after_bootstrap() {
+ WP_Mock::bootstrap();
+ WP_Mock::activateStrictMode();
+ $this->assertFalse( WP_Mock::strictMode() );
+ }
+
+ /**
+ * @runInSeparateProcess
+ */
+ public function test_userFunction_returns_expectation() {
+ WP_Mock::bootstrap();
+ $this->assertInstanceOf(
+ '\Mockery\ExpectationInterface',
+ WP_Mock::userFunction( 'testWpMockFunction' )
+ );
+ }
+
+ /**
+ * @runInSeparateProcess
+ */
+ public function test_assertHooksAdded_for_filters_and_actions() {
+ WP_Mock::bootstrap();
+ WP_Mock::expectFilterAdded( 'testFilter', 'testCallback' ,10, 1);
+ WP_Mock::expectActionAdded( 'testAction', 'testCallback', 10, 1 );
+ add_action( 'testAction', 'testCallback',10, 1 );
+ add_filter('testFilter','testCallback', 10, 1);
+ WP_Mock::assertHooksAdded();
+ \Mockery::close();
+ }
+
+ /**
+ * @runInSeparateProcess
+ */
+ public function test_assertHooksAdded_for_filters_and_actions_fails() {
+ WP_Mock::bootstrap();
+ WP_Mock::expectFilterAdded( 'testFilter', 'testCallback', 10, 1 );
+ WP_Mock::expectActionAdded( 'testAction', 'testCallback', 10, 1 );
+ $this->expectException('PHPUnit\Framework\ExpectationFailedException');
+ WP_Mock::assertHooksAdded();
+ \Mockery::close();
+ }
+
+ /**
+ * @runInSeparateProcess
+ */
+ public function test_assertActionsCalled_actions() {
+ WP_Mock::bootstrap();
+ WP_Mock::expectAction( 'testAction' );
+ do_action('testAction');
+ WP_Mock::assertActionsCalled();
+ \Mockery::close();
+ }
+
+ /**
+ * @runInSeparateProcess
+ */
+ public function test_assertActionsCalled_actions_fails() {
+ WP_Mock::bootstrap();
+ WP_Mock::expectAction( 'testAction' );
+ $this->expectException( 'PHPUnit\Framework\ExpectationFailedException' );
+ WP_Mock::assertActionsCalled();
+ \Mockery::close();
+ }
+
+ /**
+ * @runInSeparateProcess
+ */
+ public function test_assertActionsCalled_filters() {
+
+ WP_Mock::bootstrap();
+ WP_Mock::expectFilter( 'testFilter','testVal' );
+ apply_filters( 'testFilter','testVal' );
+ WP_Mock::assertFiltersCalled();
+ \Mockery::close();
+ }
+
+ /**
+ * @runInSeparateProcess
+ */
+ public function test_assertActionsCalled_filters_fails() {
+
+ WP_Mock::bootstrap();
+ WP_Mock::expectFilter( 'testFilter2', 'testVal' );
+
+ $this->expectException( 'Mockery\Exception\InvalidCountException' );
+ \Mockery::close();
+ }
+}
\ No newline at end of file
diff --git a/vendor/antecedent/patchwork/LICENSE b/vendor/antecedent/patchwork/LICENSE
new file mode 100644
index 00000000..d1ccb7a5
--- /dev/null
+++ b/vendor/antecedent/patchwork/LICENSE
@@ -0,0 +1,21 @@
+The MIT License
+
+Copyright (c) 2010-2018 Ignas Rudaitis
+
+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/antecedent/patchwork/Patchwork.php b/vendor/antecedent/patchwork/Patchwork.php
new file mode 100644
index 00000000..bf25f65f
--- /dev/null
+++ b/vendor/antecedent/patchwork/Patchwork.php
@@ -0,0 +1,149 @@
+
+ * @copyright 2010-2018 Ignas Rudaitis
+ * @license http://www.opensource.org/licenses/mit-license.html
+ */
+namespace Patchwork;
+
+if (function_exists('Patchwork\replace')) {
+ return;
+}
+
+require_once __DIR__ . '/src/Exceptions.php';
+require_once __DIR__ . '/src/CallRerouting.php';
+require_once __DIR__ . '/src/CodeManipulation.php';
+require_once __DIR__ . '/src/Utils.php';
+require_once __DIR__ . '/src/Stack.php';
+require_once __DIR__ . '/src/Config.php';
+
+function redefine($subject, callable $content)
+{
+ $handle = null;
+ foreach (array_slice(func_get_args(), 1) as $content) {
+ $handle = CallRerouting\connect($subject, $content, $handle);
+ }
+ $handle->silence();
+ return $handle;
+}
+
+function relay(array $args = null)
+{
+ return CallRerouting\relay($args);
+}
+
+function fallBack()
+{
+ throw new Exceptions\NoResult;
+}
+
+function restore(CallRerouting\Handle $handle)
+{
+ $handle->expire();
+}
+
+function restoreAll()
+{
+ CallRerouting\disconnectAll();
+}
+
+function silence(CallRerouting\Handle $handle)
+{
+ $handle->silence();
+}
+
+function assertEventuallyDefined(CallRerouting\Handle $handle)
+{
+ $handle->unsilence();
+}
+
+function getClass()
+{
+ return Stack\top('class');
+}
+
+function getCalledClass()
+{
+ return Stack\topCalledClass();
+}
+
+function getFunction()
+{
+ return Stack\top('function');
+}
+
+function getMethod()
+{
+ return getClass() . '::' . getFunction();
+}
+
+function configure()
+{
+ Config\locate();
+}
+
+function hasMissed($callable)
+{
+ return Utils\callableWasMissed($callable);
+}
+
+function always($value)
+{
+ return function() use ($value) {
+ return $value;
+ };
+}
+
+Utils\alias('Patchwork', [
+ 'redefine' => ['replace', 'replaceLater'],
+ 'relay' => 'callOriginal',
+ 'fallBack' => 'pass',
+ 'restore' => 'undo',
+ 'restoreAll' => 'undoAll',
+]);
+
+configure();
+
+Utils\markMissedCallables();
+
+if (Utils\runningOnHHVM()) {
+ # no preprocessor needed on HHVM;
+ # just let Patchwork become a wrapper for fb_intercept()
+ spl_autoload_register('Patchwork\CallRerouting\deployQueue');
+ return;
+}
+
+CodeManipulation\Stream::wrap();
+
+CodeManipulation\register([
+ CodeManipulation\Actions\CodeManipulation\propagateThroughEval(),
+ CodeManipulation\Actions\CallRerouting\injectCallInterceptionCode(),
+ CodeManipulation\Actions\RedefinitionOfInternals\spliceNamedFunctionCalls(),
+ CodeManipulation\Actions\RedefinitionOfInternals\spliceDynamicCalls(),
+ CodeManipulation\Actions\RedefinitionOfNew\spliceAllInstantiations,
+ CodeManipulation\Actions\RedefinitionOfNew\publicizeConstructors,
+ CodeManipulation\Actions\ConflictPrevention\preventImportingOtherCopiesOfPatchwork(),
+]);
+
+CodeManipulation\onImport([
+ CodeManipulation\Actions\CallRerouting\markPreprocessedFiles(),
+]);
+
+Utils\clearOpcodeCaches();
+
+register_shutdown_function('Patchwork\Utils\clearOpcodeCaches');
+
+CallRerouting\createStubsForInternals();
+CallRerouting\connectDefaultInternals();
+
+require __DIR__ . '/src/Redefinitions/LanguageConstructs.php';
+
+CodeManipulation\register([
+ CodeManipulation\Actions\RedefinitionOfLanguageConstructs\spliceAllConfiguredLanguageConstructs(),
+ CodeManipulation\Actions\CallRerouting\injectQueueDeploymentCode(),
+]);
+
+if (Utils\wasRunAsConsoleApp()) {
+ require __DIR__ . '/src/Console.php';
+}
diff --git a/vendor/antecedent/patchwork/box.json b/vendor/antecedent/patchwork/box.json
new file mode 100644
index 00000000..9dc3317b
--- /dev/null
+++ b/vendor/antecedent/patchwork/box.json
@@ -0,0 +1,17 @@
+{
+ "base-path": null,
+ "output": "patchwork.phar",
+ "check-requirements": false,
+ "compactors": [
+ "KevinGH\\Box\\Compactor\\Php"
+ ],
+ "main": "Patchwork.php",
+ "directories": [
+ "src"
+ ],
+ "files": [
+ "Patchwork.php",
+ "LICENSE"
+ ],
+ "dump-autoload": false
+}
diff --git a/vendor/antecedent/patchwork/composer.json b/vendor/antecedent/patchwork/composer.json
new file mode 100644
index 00000000..2868b883
--- /dev/null
+++ b/vendor/antecedent/patchwork/composer.json
@@ -0,0 +1,20 @@
+{
+ "name": "antecedent/patchwork",
+ "homepage": "http://patchwork2.org/",
+ "description": "Method redefinition (monkey-patching) functionality for PHP.",
+ "keywords": ["testing", "redefinition", "runkit", "monkeypatching", "interception", "aop", "aspect"],
+ "license": "MIT",
+ "authors": [
+ {
+ "name": "Ignas Rudaitis",
+ "email": "ignas.rudaitis@gmail.com"
+ }
+ ],
+ "minimum-stability": "stable",
+ "require": {
+ "php": ">=5.4.0"
+ },
+ "require-dev": {
+ "phpunit/phpunit": ">=4"
+ }
+}
diff --git a/vendor/antecedent/patchwork/src/CallRerouting.php b/vendor/antecedent/patchwork/src/CallRerouting.php
new file mode 100644
index 00000000..6980cc25
--- /dev/null
+++ b/vendor/antecedent/patchwork/src/CallRerouting.php
@@ -0,0 +1,619 @@
+
+ * @copyright 2010-2018 Ignas Rudaitis
+ * @license http://www.opensource.org/licenses/mit-license.html
+ */
+namespace Patchwork\CallRerouting;
+
+require __DIR__ . '/CallRerouting/Handle.php';
+require __DIR__ . '/CallRerouting/Decorator.php';
+
+use Patchwork\Utils;
+use Patchwork\Stack;
+use Patchwork\Config;
+use Patchwork\Exceptions;
+use Patchwork\CodeManipulation;
+use Patchwork\CodeManipulation\Actions\RedefinitionOfLanguageConstructs;
+use Patchwork\CodeManipulation\Actions\RedefinitionOfNew;
+
+const INTERNAL_REDEFINITION_NAMESPACE = 'Patchwork\Redefinitions';
+const EVALUATED_CODE_FILE_NAME_SUFFIX = '/\(\d+\) : eval\(\)\'d code$/';
+const INSTANTIATOR_NAMESPACE = 'Patchwork\Instantiators';
+const INSTANTIATOR_DEFAULT_ARGUMENT = 'Patchwork\CallRerouting\INSTANTIATOR_DEFAULT_ARGUMENT';
+
+const INTERNAL_STUB_CODE = '
+ namespace @ns_for_redefinitions;
+ function @name(@signature) {
+ $__pwArgs = \array_slice(\debug_backtrace()[0]["args"], 1);
+ if (!empty($__pwNamespace) && \function_exists($__pwNamespace . "\\\\@name")) {
+ return \call_user_func_array($__pwNamespace . "\\\\@name", $__pwArgs);
+ }
+ @interceptor;
+ return \call_user_func_array("@name", $__pwArgs);
+ }
+';
+
+const INSTANTIATOR_CODE = '
+ namespace @namespace;
+ class @instantiator {
+ function instantiate(@parameters) {
+ $__pwArgs = \debug_backtrace()[0]["args"];
+ foreach ($__pwArgs as $__pwOffset => $__pwValue) {
+ if ($__pwValue === \Patchwork\CallRerouting\INSTANTIATOR_DEFAULT_ARGUMENT) {
+ unset($__pwArgs[$__pwOffset]);
+ }
+ }
+ switch (count($__pwArgs)) {
+ case 0:
+ return new \@class;
+ case 1:
+ return new \@class($__pwArgs[0]);
+ case 2:
+ return new \@class($__pwArgs[0], $__pwArgs[1]);
+ case 3:
+ return new \@class($__pwArgs[0], $__pwArgs[1], $__pwArgs[2]);
+ case 4:
+ return new \@class($__pwArgs[0], $__pwArgs[1], $__pwArgs[2], $__pwArgs[3]);
+ case 5:
+ return new \@class($__pwArgs[0], $__pwArgs[1], $__pwArgs[2], $__pwArgs[3], $__pwArgs[4]);
+ default:
+ $__pwReflector = new \ReflectionClass(\'@class\');
+ return $__pwReflector->newInstanceArgs($__pwArgs);
+ }
+ }
+ }
+';
+
+function connect($source, callable $target, Handle $handle = null, $partOfWildcard = false)
+{
+ $source = translateIfLanguageConstruct($source);
+ $handle = $handle ?: new Handle;
+ list($class, $method) = Utils\interpretCallable($source);
+ if (constitutesWildcard($source)) {
+ return applyWildcard($source, $target, $handle);
+ }
+ if (Utils\isOwnName($class) || Utils\isOwnName($method)) {
+ return $handle;
+ }
+ validate($source, $partOfWildcard);
+ if (empty($class)) {
+ if (Utils\callableDefined($source) && (new \ReflectionFunction($method))->isInternal()) {
+ $stub = INTERNAL_REDEFINITION_NAMESPACE . '\\' . $source;
+ return connect($stub, $target, $handle, $partOfWildcard);
+ }
+ $handle = connectFunction($method, $target, $handle);
+ } else {
+ if (Utils\callableDefined($source)) {
+ if ($method === 'new') {
+ $handle = connectInstantiation($class, $target, $handle);
+ } elseif ((new \ReflectionMethod($class, $method))->isUserDefined()) {
+ $handle = connectMethod($source, $target, $handle);
+ } else {
+ throw new InternalMethodsNotSupported($source);
+ }
+ } else {
+ $handle = queueConnection($source, $target, $handle);
+ if (Utils\runningOnHHVM()) {
+ connectOnHHVM("$class::$method", $handle);
+ }
+ }
+ }
+ attachExistenceAssertion($handle, $source);
+ return $handle;
+}
+
+function constitutesWildcard($source)
+{
+ $source = Utils\interpretCallable($source);
+ $source = Utils\callableToString($source);
+ return strcspn($source, '*{,}') != strlen($source);
+}
+
+function applyWildcard($wildcard, callable $target, Handle $handle = null)
+{
+ $handle = $handle ?: new Handle;
+ list($class, $method, $instance) = Utils\interpretCallable($wildcard);
+ if (!empty($instance)) {
+ foreach (Utils\matchWildcard($method, get_class_methods($instance)) as $item) {
+ if (!$handle->hasTag($item)) {
+ connect([$instance, $item], $target, $handle);
+ $handle->tag($item);
+ }
+ }
+ return $handle;
+ }
+
+ $callables = Utils\matchWildcard($wildcard, Utils\getRedefinableCallables());
+ foreach ($callables as $callable) {
+ if (!inPreprocessedFile($callable) || $handle->hasTag($callable)) {
+ continue;
+ }
+ if (function_exists($callable)) {
+ # Restore lower/upper case distinction
+ $callable = (new \ReflectionFunction($callable))->getName();
+ }
+ connect($callable, $target, $handle, true);
+ $handle->tag($callable);
+ }
+ if (!isset($class) || !class_exists($class, false)) {
+ queueConnection($wildcard, $target, $handle);
+ }
+ return $handle;
+}
+
+function attachExistenceAssertion(Handle $handle, $function)
+{
+ $handle->addExpirationHandler(function() use ($function) {
+ if (!Utils\callableDefined($function)) {
+ # Not using exceptions because this might happen during PHP shutdown
+ $message = '%s() was never defined during the lifetime of its redefinition';
+ trigger_error(sprintf($message, Utils\callableToString($function)), E_USER_WARNING);
+ }
+ });
+}
+
+function validate($function, $partOfWildcard = false)
+{
+ list($class, $method) = Utils\interpretCallable($function);
+ if (!Utils\callableDefined($function) || $method === 'new') {
+ return;
+ }
+ $reflection = Utils\reflectCallable($function);
+ $name = Utils\callableToString($function);
+ if ($reflection->isInternal() && !in_array($name, Config\getRedefinableInternals())) {
+ throw new Exceptions\NotUserDefined($function);
+ }
+ if (Utils\runningOnHHVM()) {
+ if ($reflection->isInternal()) {
+ throw new Exceptions\InternalsNotSupportedOnHHVM($function);
+ }
+ return;
+ }
+ if (!$reflection->isInternal() && !inPreprocessedFile($function) && !$partOfWildcard) {
+ throw new Exceptions\DefinedTooEarly($function);
+ }
+}
+
+function inPreprocessedFile($callable)
+{
+ if (Utils\runningOnHHVM()) {
+ return true;
+ }
+ if (Utils\isOwnName(Utils\callableToString($callable))) {
+ return false;
+ }
+ $file = Utils\reflectCallable($callable)->getFileName();
+ $evaluated = preg_match(EVALUATED_CODE_FILE_NAME_SUFFIX, $file);
+ return $evaluated || !empty(State::$preprocessedFiles[$file]);
+}
+
+function connectFunction($function, callable $target, Handle $handle = null)
+{
+ $handle = $handle ?: new Handle;
+ $routes = &State::$routes[null][$function];
+ $offset = Utils\append($routes, [$target, $handle]);
+ $handle->addReference($routes[$offset]);
+ if (Utils\runningOnHHVM()) {
+ connectOnHHVM($function, $handle);
+ }
+ return $handle;
+}
+
+function queueConnection($source, callable $target, Handle $handle = null)
+{
+ $handle = $handle ?: new Handle;
+ $offset = Utils\append(State::$queue, [$source, $target, $handle]);
+ $handle->addReference(State::$queue[$offset]);
+ return $handle;
+}
+
+function deployQueue()
+{
+ foreach (State::$queue as $offset => $item) {
+ if (empty($item)) {
+ unset(State::$queue[$offset]);
+ continue;
+ }
+ list($source, $target, $handle) = $item;
+ if (Utils\callableDefined($source) || constitutesWildcard($source)) {
+ connect($source, $target, $handle);
+ unset(State::$queue[$offset]);
+ }
+ }
+}
+
+function connectMethod($function, callable $target, Handle $handle = null)
+{
+ $handle = $handle ?: new Handle;
+ list($class, $method, $instance) = Utils\interpretCallable($function);
+ $target = new Decorator($target);
+ $target->superclass = $class;
+ $target->method = $method;
+ $target->instance = $instance;
+ $reflection = Utils\reflectCallable($function);
+ $declaringClass = $reflection->getDeclaringClass();
+ $class = $declaringClass->getName();
+ if (!Utils\runningOnHHVM()) {
+ $aliases = $declaringClass->getTraitAliases();
+ if (isset($aliases[$method])) {
+ list($trait, $method) = explode('::', $aliases[$method]);
+ }
+ }
+ $routes = &State::$routes[$class][$method];
+ $offset = Utils\append($routes, [$target, $handle]);
+ $handle->addReference($routes[$offset]);
+ if (Utils\runningOnHHVM()) {
+ connectOnHHVM("$class::$method", $handle);
+ }
+ return $handle;
+}
+
+function connectInstantiation($class, callable $target, Handle $handle = null)
+{
+ if (!Config\isNewKeywordRedefinable()) {
+ throw new Exceptions\NewKeywordNotRedefinable;
+ }
+ $handle = $handle ?: new Handle;
+ $class = strtr($class, ['\\' => '__']);
+ $routes = &State::$routes["Patchwork\\Instantiators\\$class"]['instantiate'];
+ $offset = Utils\append($routes, [$target, $handle]);
+ $handle->addReference($routes[$offset]);
+ return $handle;
+}
+
+function disconnectAll()
+{
+ foreach (State::$routes as $class => $routesByClass) {
+ foreach ($routesByClass as $method => $routes) {
+ foreach ($routes as $route) {
+ list($callback, $handle) = $route;
+ if ($handle !== null) {
+ $handle->expire();
+ }
+ }
+ }
+ }
+ State::$routes = [];
+ connectDefaultInternals();
+}
+
+function dispatchTo(callable $target)
+{
+ return call_user_func_array($target, Stack\top('args'));
+}
+
+function dispatch($class, $calledClass, $method, $frame, &$result, array $args = null)
+{
+ $isInternalStub = strpos($method, INTERNAL_REDEFINITION_NAMESPACE) === 0;
+ $isLanguageConstructStub = strpos($method, RedefinitionOfLanguageConstructs\LANGUAGE_CONSTRUCT_PREFIX) === 0;
+ $isInstantiator = strpos($method, INSTANTIATOR_NAMESPACE) === 0;
+ if ($isInternalStub && !$isLanguageConstructStub && $args === null) {
+ # Mind the namespace-of-origin argument
+ $trace = debug_backtrace();
+ $args = array_reverse($trace)[$frame - 1]['args'];
+ array_shift($args);
+ }
+ if ($isInstantiator) {
+ $trace = debug_backtrace();
+ $args = $args ?: array_reverse($trace)[$frame - 1]['args'];
+ foreach ($args as $offset => $value) {
+ if ($value === INSTANTIATOR_DEFAULT_ARGUMENT) {
+ unset($args[$offset]);
+ }
+ }
+ }
+ $success = false;
+ Stack\pushFor($frame, $calledClass, function() use ($class, $method, &$result, &$success) {
+ foreach (getRoutesFor($class, $method) as $offset => $route) {
+ if (empty($route)) {
+ unset(State::$routes[$class][$method][$offset]);
+ continue;
+ }
+ State::$routeStack[] = [$class, $method, $offset];
+ try {
+ $result = dispatchTo(reset($route));
+ $success = true;
+ } catch (Exceptions\NoResult $e) {
+ array_pop(State::$routeStack);
+ continue;
+ }
+ array_pop(State::$routeStack);
+ if ($success) {
+ break;
+ }
+ }
+ }, $args);
+ return $success;
+}
+
+function relay(array $args = null)
+{
+ list($class, $method, $offset) = end(State::$routeStack);
+ $route = &State::$routes[$class][$method][$offset];
+ $backup = $route;
+ $route = ['Patchwork\fallBack', new Handle];
+ $top = Stack\top();
+ if ($args === null) {
+ $args = $top['args'];
+ }
+ $isInternalStub = strpos($method, INTERNAL_REDEFINITION_NAMESPACE) === 0;
+ $isLanguageConstructStub = strpos($method, RedefinitionOfLanguageConstructs\LANGUAGE_CONSTRUCT_PREFIX) === 0;
+ if ($isInternalStub && !$isLanguageConstructStub) {
+ array_unshift($args, '');
+ }
+ try {
+ if (isset($top['class'])) {
+ $reflection = new \ReflectionMethod(Stack\topCalledClass(), $top['function']);
+ $reflection->setAccessible(true);
+ $result = $reflection->invokeArgs(Stack\top('object'), $args);
+ } else {
+ $result = call_user_func_array($top['function'], $args);
+ }
+ } catch (\Exception $e) {
+ $exception = $e;
+ }
+ $route = $backup;
+ if (isset($exception)) {
+ throw $exception;
+ }
+ return $result;
+}
+
+function connectOnHHVM($function, Handle $handle)
+{
+ fb_intercept($function, function($name, $obj, $args, $data, &$done) {
+ deployQueue();
+ list($class, $method) = Utils\interpretCallable($name);
+ $calledClass = null;
+ if (is_string($obj)) {
+ $calledClass = $obj;
+ } elseif (is_object($obj)) {
+ $calledClass = get_class($obj);
+ }
+ $frame = count(debug_backtrace(0)) - 1;
+ $result = null;
+ $done = dispatch($class, $calledClass, $method, $frame, $result, $args);
+ return $result;
+ });
+ $handle->addExpirationHandler(getHHVMExpirationHandler($function));
+}
+
+function getHHVMExpirationHandler($function)
+{
+ return function() use ($function) {
+ list($class, $method) = Utils\interpretCallable($function);
+ $empty = true;
+ foreach (getRoutesFor($class, $method) as $offset => $route) {
+ if (!empty($route)) {
+ $empty = false;
+ break;
+ } else {
+ unset(State::$routes[$class][$method][$offset]);
+ }
+ }
+ if ($empty) {
+ fb_intercept($function, null);
+ }
+ };
+}
+
+function getRoutesFor($class, $method)
+{
+ if (!isset(State::$routes[$class][$method])) {
+ return [];
+ }
+ return array_reverse(State::$routes[$class][$method], true);
+}
+
+function dispatchDynamic($callable, array $arguments)
+{
+ list($class, $method) = Utils\interpretCallable($callable);
+ $translation = INTERNAL_REDEFINITION_NAMESPACE . '\\' . $method;
+ if ($class === null && function_exists($translation)) {
+ $callable = $translation;
+ # Mind the namespace-of-origin argument
+ array_unshift($arguments, '');
+ }
+ return call_user_func_array($callable, $arguments);
+}
+
+function createStubsForInternals()
+{
+ $namespace = INTERNAL_REDEFINITION_NAMESPACE;
+ foreach (Config\getRedefinableInternals() as $name) {
+ if (function_exists($namespace . '\\' . $name)) {
+ continue;
+ }
+ $signature = ['$__pwNamespace'];
+ foreach ((new \ReflectionFunction($name))->getParameters() as $offset => $argument) {
+ $formal = '';
+ if ($argument->isPassedByReference()) {
+ $formal .= '&';
+ }
+ $formal .= '$' . $argument->getName();
+ $isVariadic = is_callable([$argument, 'isVariadic']) ? $argument->isVariadic() : false;
+ if ($argument->isOptional() || $isVariadic || ($name === 'define' && $offset === 2)) {
+ continue;
+ }
+ $signature[] = $formal;
+ }
+ $refs = sprintf('[%s]', join(', ', $signature));
+ $interceptor = sprintf(
+ str_replace(
+ '$__pwRefOffset = 0;',
+ '$__pwRefOffset = 1;',
+ \Patchwork\CodeManipulation\Actions\CallRerouting\CALL_INTERCEPTION_CODE
+ ),
+ $refs
+ );
+ eval(strtr(INTERNAL_STUB_CODE, [
+ '@name' => $name,
+ '@signature' => join(', ', $signature),
+ '@interceptor' => $interceptor,
+ '@ns_for_redefinitions' => INTERNAL_REDEFINITION_NAMESPACE,
+ ]));
+ }
+}
+
+/**
+ * This is needed, for instance, to intercept the time() call in call_user_func('time').
+ *
+ * For that to happen, we require that if at least one internal function is redefinable, then
+ * call_user_func, preg_replace_callback and other callback-taking internal functions also be
+ * redefinable: see Patchwork\Config.
+ *
+ * Here, we go through the callback-taking internals and add argument-inspecting patches
+ * (redefinitions) to them.
+ *
+ * The patches are then expected to find the "nested" internal calls, such as the 'time' argument
+ * in call_user_func('time'), and invoke their respective redefinitions, if any.
+ */
+function connectDefaultInternals()
+{
+ # call_user_func() etc. are not a problem if no other internal functions are redefined
+ if (Config\getRedefinableInternals() === []) {
+ return;
+ }
+ foreach (Config\getDefaultRedefinableInternals() as $function) {
+ # Which arguments are callbacks? Store their offsets in the following array.
+ $offsets = [];
+ foreach ((new \ReflectionFunction($function))->getParameters() as $offset => $argument) {
+ $name = $argument->getName();
+ if (strpos($name, 'call') !== false || strpos($name, 'func') !== false) {
+ $offsets[] = $offset;
+ }
+ }
+ connect($function, function() use ($function, $offsets) {
+ # This is the argument-inspecting patch.
+ $args = Stack\top('args');
+ $caller = Stack\all()[1];
+ foreach ($offsets as $offset) {
+ # Callback absent
+ if (!isset($args[$offset])) {
+ continue;
+ }
+ $callable = $args[$offset];
+ # Callback is a closure => definitely not internal
+ if ($callable instanceof \Closure) {
+ continue;
+ }
+ list($class, $method, $instance) = Utils\interpretCallable($callable);
+ if (empty($class)) {
+ # Callback is global function, which might be internal too.
+ $args[$offset] = function() use ($callable) {
+ return dispatchDynamic($callable, func_get_args());
+ };
+ }
+ # Callback involves a class => not internal either, since the only internals that
+ # Patchwork can handle as of 2.0 are global functions.
+ # However, we must handle all kinds of opaque access here too, such as self:: and
+ # private methods, because we're actually patching a stub (see INTERNAL_STUB_CODE)
+ # and not directly call_user_func itself (or usort, or any other of those).
+ # We must compensate for scope that is lost, and that callback-taking functions
+ # can make use of.
+ if (!empty($class)) {
+ if ($class === 'self' || $class === 'static' || $class === 'parent') {
+ # We do not discriminate between early and late static binding here: FIXME.
+ $actualClass = $caller['class'];
+ if ($class === 'parent') {
+ $actualClass = get_parent_class($actualClass);
+ }
+ $class = $actualClass;
+ }
+
+ # When calling a parent constructor, the reference to the object being
+ # constructed needs to be extracted from the stack info.
+ # Also turned out to be necessary to solve this, without any parent
+ # constructors involved: https://github.com/antecedent/patchwork/issues/99
+ if (is_null($instance) && isset($caller['object'])) {
+ $instance = $caller['object'];
+ }
+ try {
+ $reflection = new \ReflectionMethod($class, $method);
+ $reflection->setAccessible(true);
+ $args[$offset] = function() use ($reflection, $instance) {
+ return $reflection->invokeArgs($instance, func_get_args());
+ };
+ } catch (\ReflectionException $e) {
+ # If it's an invalid callable, then just prevent the unexpected propagation
+ # of ReflectionExceptions.
+ }
+ }
+ }
+ # Give the inspected arguments back to the *original* definition of the
+ # callback-taking function, e.g. \array_map(). This works given that the
+ # present patch is the innermost.
+ return call_user_func_array($function, $args);
+ });
+ }
+}
+
+/**
+ * @since 2.0.5
+ *
+ * As of version 2.0.5, this is used to accommodate language constructs
+ * (echo, eval, exit and others) within the concept of callable.
+ */
+function translateIfLanguageConstruct($callable)
+{
+ if (!is_string($callable)) {
+ return $callable;
+ }
+ if (in_array($callable, Config\getRedefinableLanguageConstructs())) {
+ return RedefinitionOfLanguageConstructs\LANGUAGE_CONSTRUCT_PREFIX . $callable;
+ } elseif (in_array($callable, Config\getSupportedLanguageConstructs())) {
+ throw new Exceptions\NotUserDefined($callable);
+ } else {
+ return $callable;
+ }
+}
+
+function resolveClassToInstantiate($class, $calledClass)
+{
+ $pieces = explode('\\', $class);
+ $last = array_pop($pieces);
+ if (in_array($last, ['self', 'static', 'parent'])) {
+ $frame = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 3)[2];
+ if ($last == 'self') {
+ $class = $frame['class'];
+ } elseif ($last == 'parent') {
+ $class = get_parent_class($frame['class']);
+ } elseif ($last == 'static') {
+ $class = $calledClass;
+ }
+ }
+ return ltrim($class, '\\');
+}
+
+function getInstantiator($class, $calledClass)
+{
+ $namespace = INSTANTIATOR_NAMESPACE;
+ $class = resolveClassToInstantiate($class, $calledClass);
+ $adaptedName = strtr($class, ['\\' => '__']);
+ if (!class_exists("$namespace\\$adaptedName")) {
+ $constructor = (new \ReflectionClass($class))->getConstructor();
+ list($parameters, $arguments) = Utils\getParameterAndArgumentLists($constructor);
+ $code = strtr(INSTANTIATOR_CODE, [
+ '@namespace' => INSTANTIATOR_NAMESPACE,
+ '@instantiator' => $adaptedName,
+ '@class' => $class,
+ '@parameters' => $parameters,
+ ]);
+ RedefinitionOfNew\suspendFor(function() use ($code) {
+ eval(CodeManipulation\transformForEval($code));
+ });
+ }
+ $instantiator = "$namespace\\$adaptedName";
+ return new $instantiator;
+}
+
+class State
+{
+ static $routes = [];
+ static $queue = [];
+ static $preprocessedFiles = [];
+ static $routeStack = [];
+}
diff --git a/vendor/antecedent/patchwork/src/CallRerouting/Decorator.php b/vendor/antecedent/patchwork/src/CallRerouting/Decorator.php
new file mode 100644
index 00000000..1a641df0
--- /dev/null
+++ b/vendor/antecedent/patchwork/src/CallRerouting/Decorator.php
@@ -0,0 +1,62 @@
+
+ * @copyright 2010-2018 Ignas Rudaitis
+ * @license http://www.opensource.org/licenses/mit-license.html
+ */
+namespace Patchwork\CallRerouting;
+
+use Patchwork;
+use Patchwork\Stack;
+
+class Decorator
+{
+ public $superclass;
+ public $instance;
+ public $method;
+
+ private $patch;
+
+ public function __construct($patch)
+ {
+ $this->patch = $patch;
+ }
+
+ public function __invoke()
+ {
+ $top = Stack\top();
+ $superclassMatches = $this->superclassMatches();
+ $instanceMatches = $this->instanceMatches($top);
+ $methodMatches = $this->methodMatches($top);
+ if ($superclassMatches && $instanceMatches && $methodMatches) {
+ $patch = $this->patch;
+ if (isset($top["object"]) && $patch instanceof \Closure) {
+ $patch = $patch->bindTo($top["object"], $this->superclass);
+ }
+ return dispatchTo($patch);
+ }
+ Patchwork\fallBack();
+ }
+
+ private function superclassMatches()
+ {
+ return $this->superclass === null ||
+ Stack\topCalledClass() === $this->superclass ||
+ is_subclass_of(Stack\topCalledClass(), $this->superclass);
+ }
+
+ private function instanceMatches(array $top)
+ {
+ return $this->instance === null ||
+ (isset($top["object"]) && $top["object"] === $this->instance);
+ }
+
+ private function methodMatches(array $top)
+ {
+ return $this->method === null ||
+ $this->method === 'new' ||
+ $top["function"] === $this->method;
+ }
+}
diff --git a/vendor/antecedent/patchwork/src/CallRerouting/Handle.php b/vendor/antecedent/patchwork/src/CallRerouting/Handle.php
new file mode 100644
index 00000000..2c0d96d3
--- /dev/null
+++ b/vendor/antecedent/patchwork/src/CallRerouting/Handle.php
@@ -0,0 +1,65 @@
+
+ * @copyright 2010-2018 Ignas Rudaitis
+ * @license http://www.opensource.org/licenses/mit-license.html
+ */
+namespace Patchwork\CallRerouting;
+
+class Handle
+{
+ private $references = [];
+ private $expirationHandlers = [];
+ private $silenced = false;
+ private $tags = [];
+
+ public function __destruct()
+ {
+ $this->expire();
+ }
+
+ public function tag($tag)
+ {
+ $this->tags[] = $tag;
+ }
+
+ public function hasTag($tag)
+ {
+ return in_array($tag, $this->tags);
+ }
+
+ public function addReference(&$reference)
+ {
+ $this->references[] = &$reference;
+ }
+
+ public function expire()
+ {
+ foreach ($this->references as &$reference) {
+ $reference = null;
+ }
+ if (!$this->silenced) {
+ foreach ($this->expirationHandlers as $expirationHandler) {
+ $expirationHandler();
+ }
+ }
+ $this->expirationHandlers = [];
+ }
+
+ public function addExpirationHandler(callable $expirationHandler)
+ {
+ $this->expirationHandlers[] = $expirationHandler;
+ }
+
+ public function silence()
+ {
+ $this->silenced = true;
+ }
+
+ public function unsilence()
+ {
+ $this->silenced = false;
+ }
+}
diff --git a/vendor/antecedent/patchwork/src/CodeManipulation.php b/vendor/antecedent/patchwork/src/CodeManipulation.php
new file mode 100644
index 00000000..44c992b0
--- /dev/null
+++ b/vendor/antecedent/patchwork/src/CodeManipulation.php
@@ -0,0 +1,161 @@
+
+ * @copyright 2010-2018 Ignas Rudaitis
+ * @license http://www.opensource.org/licenses/mit-license.html
+ */
+namespace Patchwork\CodeManipulation;
+
+require __DIR__ . '/CodeManipulation/Source.php';
+require __DIR__ . '/CodeManipulation/Stream.php';
+require __DIR__ . '/CodeManipulation/Actions/Generic.php';
+require __DIR__ . '/CodeManipulation/Actions/CallRerouting.php';
+require __DIR__ . '/CodeManipulation/Actions/CodeManipulation.php';
+require __DIR__ . '/CodeManipulation/Actions/Namespaces.php';
+require __DIR__ . '/CodeManipulation/Actions/RedefinitionOfInternals.php';
+require __DIR__ . '/CodeManipulation/Actions/RedefinitionOfLanguageConstructs.php';
+require __DIR__ . '/CodeManipulation/Actions/ConflictPrevention.php';
+require __DIR__ . '/CodeManipulation/Actions/RedefinitionOfNew.php';
+require __DIR__ . '/CodeManipulation/Actions/Arguments.php';
+
+use Patchwork\Exceptions;
+use Patchwork\Utils;
+use Patchwork\Config;
+
+const OUTPUT_DESTINATION = 'php://memory';
+const OUTPUT_ACCESS_MODE = 'rb+';
+
+function transform(Source $s)
+{
+ foreach (State::$actions as $action) {
+ $action($s);
+ }
+}
+
+function transformString($code)
+{
+ $source = new Source($code);
+ transform($source);
+ return (string) $source;
+}
+
+function transformForEval($code)
+{
+ $prefix = "file), $source);
+}
+
+function availableCached($file)
+{
+ if (!cacheEnabled()) {
+ return false;
+ }
+ $cached = getCachedPath($file);
+ return file_exists($cached) &&
+ filemtime($file) <= filemtime($cached) &&
+ Config\getTimestamp() <= filemtime($cached);
+}
+
+function internalToCache($file)
+{
+ if (!cacheEnabled()) {
+ return false;
+ }
+ return strpos($file, Config\getCachePath() . '/') === 0
+ || strpos($file, Config\getCachePath() . DIRECTORY_SEPARATOR) === 0;
+}
+
+function transformAndOpen($file)
+{
+ foreach (State::$importListeners as $listener) {
+ $listener($file);
+ }
+ if (!internalToCache($file) && availableCached($file)) {
+ return fopen(getCachedPath($file), 'r');
+ }
+ $resource = fopen(OUTPUT_DESTINATION, OUTPUT_ACCESS_MODE);
+ $code = file_get_contents($file, true);
+ $source = new Source($code);
+ $source->file = $file;
+ transform($source);
+ if (!internalToCache($file) && cacheEnabled()) {
+ storeInCache($source);
+ return transformAndOpen($file);
+ }
+ fwrite($resource, $source);
+ rewind($resource);
+ return $resource;
+}
+
+function prime($file)
+{
+ fclose(transformAndOpen($file));
+}
+
+function shouldTransform($file)
+{
+ return !Config\isBlacklisted($file) || Config\isWhitelisted($file);
+}
+
+function register($actions)
+{
+ State::$actions = array_merge(State::$actions, (array) $actions);
+}
+
+function onImport($listeners)
+{
+ State::$importListeners = array_merge(State::$importListeners, (array) $listeners);
+}
+
+class State
+{
+ static $actions = [];
+ static $importListeners = [];
+ static $cacheIndex = [];
+ static $cacheIndexFile;
+}
diff --git a/vendor/antecedent/patchwork/src/CodeManipulation/Actions/Arguments.php b/vendor/antecedent/patchwork/src/CodeManipulation/Actions/Arguments.php
new file mode 100644
index 00000000..d0c9e77e
--- /dev/null
+++ b/vendor/antecedent/patchwork/src/CodeManipulation/Actions/Arguments.php
@@ -0,0 +1,49 @@
+
+ * @copyright 2010-2021 Ignas Rudaitis
+ * @license http://www.opensource.org/licenses/mit-license.html
+ */
+namespace Patchwork\CodeManipulation\Actions\Arguments;
+
+use Patchwork\CodeManipulation\Source;
+use Patchwork\CodeManipulation\Actions\Generic;
+
+/**
+ * @since 2.1.13
+ */
+function readNames(Source $s, $pos)
+{
+ $result = [];
+ $pos++;
+ while (!$s->is(Generic\RIGHT_ROUND, $pos)) {
+ if ($s->is([Generic\LEFT_ROUND, Generic\LEFT_SQUARE, Generic\LEFT_CURLY], $pos)) {
+ $pos = $s->match($pos);
+ } else {
+ if ($s->is(T_VARIABLE, $pos)) {
+ $result[] = $s->read($pos);
+ } elseif ($s->is(Generic\ELLIPSIS, $pos)) {
+ $pos = $s->skip(Source::junk(), $pos);
+ $result[] = '...' . $s->read($pos);
+ }
+ $pos++;
+ }
+ }
+ return $result;
+}
+
+/**
+ * @since 2.1.13
+ */
+function constructReferenceArray(array $names)
+{
+ $names = array_map(function($name) {
+ if ($name[0] === '.') {
+ return '], ' . substr($name, 3) . ', [';
+ }
+ return '&' . $name;
+ }, $names);
+ return 'array_merge([' . join(', ', $names) . '])';
+}
\ No newline at end of file
diff --git a/vendor/antecedent/patchwork/src/CodeManipulation/Actions/CallRerouting.php b/vendor/antecedent/patchwork/src/CodeManipulation/Actions/CallRerouting.php
new file mode 100644
index 00000000..a0488ef6
--- /dev/null
+++ b/vendor/antecedent/patchwork/src/CodeManipulation/Actions/CallRerouting.php
@@ -0,0 +1,70 @@
+
+ * @link http://patchwork2.org/
+ * @copyright 2010-2018 Ignas Rudaitis
+ * @license http://www.opensource.org/licenses/mit-license.html
+ */
+namespace Patchwork\CodeManipulation\Actions\CallRerouting;
+
+use Patchwork\CodeManipulation\Actions\Generic;
+use Patchwork\CallRerouting;
+use Patchwork\Utils;
+
+const CALL_INTERCEPTION_CODE = '
+ $__pwClosureName = __NAMESPACE__ ? __NAMESPACE__ . "\\\\{closure}" : "\\\\{closure}";
+ $__pwClass = (__CLASS__ && __FUNCTION__ !== $__pwClosureName) ? __CLASS__ : null;
+ if (!empty(\Patchwork\CallRerouting\State::$routes[$__pwClass][__FUNCTION__])) {
+ $__pwCalledClass = $__pwClass ? \get_called_class() : null;
+ $__pwFrame = \count(\debug_backtrace(0));
+ $__pwRefs = %s;
+ $__pwRefOffset = 0;
+ if (\Patchwork\CallRerouting\dispatch($__pwClass, $__pwCalledClass, __FUNCTION__, $__pwFrame, $__pwResult, \array_merge(\array_slice($__pwRefs, $__pwRefOffset, \func_num_args()), \array_slice(\func_get_args(), \count($__pwRefs))))) {
+ return $__pwResult;
+ }
+ }
+ unset($__pwClass, $__pwCalledClass, $__pwResult, $__pwClosureName, $__pwFrame, $__pwRefs, $__pwRefOffset);
+';
+
+const CALL_INTERCEPTION_CODE_VOID_TYPED = '
+ $__pwClosureName = __NAMESPACE__ ? __NAMESPACE__ . "\\\\{closure}" : "\\\\{closure}";
+ $__pwClass = (__CLASS__ && __FUNCTION__ !== $__pwClosureName) ? __CLASS__ : null;
+ if (!empty(\Patchwork\CallRerouting\State::$routes[$__pwClass][__FUNCTION__])) {
+ $__pwCalledClass = $__pwClass ? \get_called_class() : null;
+ $__pwFrame = \count(\debug_backtrace(0));
+ $__pwRefs = %s;
+ $__pwRefOffset = 0;
+ if (\Patchwork\CallRerouting\dispatch($__pwClass, $__pwCalledClass, __FUNCTION__, $__pwFrame, $__pwResult, \array_merge(\array_slice($__pwRefs, $__pwRefOffset, \func_num_args()), \array_slice(\func_get_args(), \count($__pwRefs))))) {
+ if ($__pwResult !== null) {
+ throw new \Patchwork\Exceptions\NonNullToVoid;
+ }
+ return;
+ }
+ }
+ unset($__pwClass, $__pwCalledClass, $__pwResult, $__pwClosureName, $__pwFrame, $__pwRefOffset);
+';
+
+const QUEUE_DEPLOYMENT_CODE = '\Patchwork\CallRerouting\deployQueue()';
+
+function markPreprocessedFiles()
+{
+ return Generic\markPreprocessedFiles(CallRerouting\State::$preprocessedFiles);
+}
+
+function injectCallInterceptionCode()
+{
+ return Generic\prependCodeToFunctions(
+ Utils\condense(CALL_INTERCEPTION_CODE),
+ Utils\condense(CALL_INTERCEPTION_CODE_VOID_TYPED),
+ true
+ );
+}
+
+function injectQueueDeploymentCode()
+{
+ return Generic\chain(array(
+ Generic\injectFalseExpressionAtBeginnings(QUEUE_DEPLOYMENT_CODE),
+ Generic\injectCodeAfterClassDefinitions(QUEUE_DEPLOYMENT_CODE . ';'),
+ ));
+}
diff --git a/vendor/antecedent/patchwork/src/CodeManipulation/Actions/CodeManipulation.php b/vendor/antecedent/patchwork/src/CodeManipulation/Actions/CodeManipulation.php
new file mode 100644
index 00000000..cbf96973
--- /dev/null
+++ b/vendor/antecedent/patchwork/src/CodeManipulation/Actions/CodeManipulation.php
@@ -0,0 +1,26 @@
+
+ * @copyright 2010-2018 Ignas Rudaitis
+ * @license http://www.opensource.org/licenses/mit-license.html
+ */
+namespace Patchwork\CodeManipulation\Actions\CodeManipulation;
+
+use Patchwork\CodeManipulation\Actions\Generic;
+use Patchwork\CodeManipulation\Source;
+
+const EVAL_ARGUMENT_WRAPPER = '\Patchwork\CodeManipulation\transformForEval';
+
+function propagateThroughEval()
+{
+ return Generic\wrapUnaryConstructArguments(T_EVAL, EVAL_ARGUMENT_WRAPPER);
+}
+
+function flush()
+{
+ return function(Source $s) {
+ $s->flush();
+ };
+}
diff --git a/vendor/antecedent/patchwork/src/CodeManipulation/Actions/ConflictPrevention.php b/vendor/antecedent/patchwork/src/CodeManipulation/Actions/ConflictPrevention.php
new file mode 100644
index 00000000..634296b7
--- /dev/null
+++ b/vendor/antecedent/patchwork/src/CodeManipulation/Actions/ConflictPrevention.php
@@ -0,0 +1,33 @@
+
+ * @copyright 2010-2018 Ignas Rudaitis
+ * @license http://www.opensource.org/licenses/mit-license.html
+ */
+namespace Patchwork\CodeManipulation\Actions\ConflictPrevention;
+
+use Patchwork\CodeManipulation\Source;
+
+/**
+ * @since 2.0.1
+ *
+ * Serves to avoid "Cannot redeclare Patchwork\redefine()" errors.
+ */
+function preventImportingOtherCopiesOfPatchwork()
+{
+ return function(Source $s) {
+ $namespaceKeyword = $s->next(T_NAMESPACE, -1);
+ if ($namespaceKeyword === INF || $namespaceKeyword < 2) {
+ return;
+ }
+ if ($s->read($namespaceKeyword, 4) == 'namespace Patchwork;') {
+ $pattern = '/@copyright\s+2010(-\d+)? Ignas Rudaitis/';
+ if (preg_match($pattern, $s->read($namespaceKeyword - 2))) {
+ # Clear the file completely (in memory)
+ $s->splice('', 0, count($s->tokens));
+ }
+ }
+ };
+}
diff --git a/vendor/antecedent/patchwork/src/CodeManipulation/Actions/Generic.php b/vendor/antecedent/patchwork/src/CodeManipulation/Actions/Generic.php
new file mode 100644
index 00000000..e4550cd0
--- /dev/null
+++ b/vendor/antecedent/patchwork/src/CodeManipulation/Actions/Generic.php
@@ -0,0 +1,162 @@
+
+ * @copyright 2010-2018 Ignas Rudaitis
+ * @license http://www.opensource.org/licenses/mit-license.html
+ */
+namespace Patchwork\CodeManipulation\Actions\Generic;
+
+use Patchwork\CodeManipulation\Actions\Arguments;
+use Patchwork\CodeManipulation\Source;
+use Patchwork\Utils;
+
+const LEFT_ROUND = '(';
+const RIGHT_ROUND = ')';
+const LEFT_CURLY = '{';
+const RIGHT_CURLY = '}';
+const LEFT_SQUARE = '[';
+const RIGHT_SQUARE = ']';
+const SEMICOLON = ';';
+
+foreach (['NAME_FULLY_QUALIFIED', 'NAME_QUALIFIED', 'NAME_RELATIVE', 'ELLIPSIS', 'ATTRIBUTE'] as $constant) {
+ if (defined('T_' . $constant)) {
+ define(__NAMESPACE__ . '\\' . $constant, constant('T_' . $constant));
+ } else {
+ define(__NAMESPACE__ . '\\' . $constant, -1);
+ }
+}
+
+function markPreprocessedFiles(&$target)
+{
+ return function($file) use (&$target) {
+ $target[$file] = true;
+ };
+}
+
+function prependCodeToFunctions($code, $voidTypedVariant = null, $fillArgRefs = false)
+{
+ if ($voidTypedVariant === null) {
+ $voidTypedVariant = $code;
+ }
+ return function(Source $s) use ($code, $voidTypedVariant, $fillArgRefs) {
+ foreach ($s->all(T_FUNCTION) as $function) {
+ # Skip "use function"
+ $previous = $s->skipBack(Source::junk(), $function);
+ if ($s->is(T_USE, $previous)) {
+ continue;
+ }
+ $voidTyped = isVoidTyped($s, $function);
+ $argRefs = null;
+ if ($fillArgRefs) {
+ $parenthesis = $s->next(LEFT_ROUND, $function);
+ $args = Arguments\readNames($s, $parenthesis);
+ $argRefs = Arguments\constructReferenceArray($args);
+ }
+ $bracket = $s->next(LEFT_CURLY, $function);
+ if (Utils\generatorsSupported()) {
+ # Skip generators
+ $yield = $s->next(T_YIELD, $bracket);
+ if ($yield < $s->match($bracket)) {
+ continue;
+ }
+ }
+ $semicolon = $s->next(SEMICOLON, $function);
+ if ($bracket < $semicolon) {
+ $variant = $voidTyped ? $voidTypedVariant : $code;
+ if ($fillArgRefs) {
+ $variant = sprintf($variant, $argRefs);
+ }
+ $s->splice($variant, $bracket + 1);
+ }
+ }
+ };
+}
+
+function isVoidTyped(Source $s, $function)
+{
+ $parenthesis = $s->next(LEFT_ROUND, $function);
+ $next = $s->skip(Source::junk(), $s->match($parenthesis));
+ if ($s->is(T_USE, $next)) {
+ $next = $s->skip(Source::junk(), $s->match($s->next(LEFT_ROUND, $next)));
+ }
+ if ($s->is(':', $next)) {
+ return $s->read($s->skip(Source::junk(), $next), 1) === 'void';
+ }
+ return false;
+}
+
+function wrapUnaryConstructArguments($construct, $wrapper)
+{
+ return function(Source $s) use ($construct, $wrapper) {
+ foreach ($s->all($construct) as $match) {
+ $pos = $s->next(LEFT_ROUND, $match);
+ $s->splice($wrapper . LEFT_ROUND, $pos + 1);
+ $s->splice(RIGHT_ROUND, $s->match($pos));
+ }
+ };
+}
+
+function injectFalseExpressionAtBeginnings($expression)
+{
+ return function(Source $s) use ($expression) {
+ $openingTags = $s->all(T_OPEN_TAG);
+ $openingTagsWithEcho = $s->all(T_OPEN_TAG_WITH_ECHO);
+ if (empty($openingTags) && empty($openingTagsWithEcho)) {
+ return;
+ }
+ if (!empty($openingTags) &&
+ (empty($openingTagsWithEcho) || reset($openingTags) < reset($openingTagsWithEcho))) {
+ $pos = reset($openingTags);
+ # Skip initial declare() statements
+ while ($s->read($s->skip(Source::junk(), $pos)) === 'declare') {
+ $pos = $s->next(SEMICOLON, $pos);
+ }
+ # Enter first namespace
+ $namespaceKeyword = $s->next(T_NAMESPACE, $pos);
+ if ($namespaceKeyword !== INF) {
+ $semicolon = $s->next(SEMICOLON, $namespaceKeyword);
+ $leftBracket = $s->next(LEFT_CURLY, $namespaceKeyword);
+ $pos = min($semicolon, $leftBracket);
+ }
+ $s->splice(' ' . $expression . ';', $pos + 1);
+ } else {
+ $openingTag = reset($openingTagsWithEcho);
+ $closingTag = $s->next(T_CLOSE_TAG, $openingTag);
+ $semicolon = $s->next(SEMICOLON, $openingTag);
+ $s->splice(' (' . $expression . ') ?: (', $openingTag + 1);
+ $s->splice(') ', min($closingTag, $semicolon));
+ }
+ };
+}
+
+function injectCodeAfterClassDefinitions($code)
+{
+ return function(Source $s) use ($code) {
+ foreach ($s->all(T_CLASS) as $match) {
+ if ($s->is([T_DOUBLE_COLON, T_NEW], $s->skipBack(Source::junk(), $match))) {
+ # Not a proper class definition: either ::class syntax or anonymous class
+ continue;
+ }
+ $leftBracket = $s->next(LEFT_CURLY, $match);
+ if ($leftBracket === INF) {
+ continue;
+ }
+ $rightBracket = $s->match($leftBracket);
+ if ($rightBracket === INF) {
+ continue;
+ }
+ $s->splice($code, $rightBracket + 1);
+ }
+ };
+}
+
+function chain(array $callbacks)
+{
+ return function(Source $s) use ($callbacks) {
+ foreach ($callbacks as $callback) {
+ $callback($s);
+ }
+ };
+}
diff --git a/vendor/antecedent/patchwork/src/CodeManipulation/Actions/Namespaces.php b/vendor/antecedent/patchwork/src/CodeManipulation/Actions/Namespaces.php
new file mode 100644
index 00000000..f2545336
--- /dev/null
+++ b/vendor/antecedent/patchwork/src/CodeManipulation/Actions/Namespaces.php
@@ -0,0 +1,185 @@
+
+ * @copyright 2010-2018 Ignas Rudaitis
+ * @license http://www.opensource.org/licenses/mit-license.html
+ */
+namespace Patchwork\CodeManipulation\Actions\Namespaces;
+
+use Patchwork\CodeManipulation\Source;
+use Patchwork\CodeManipulation\Actions\Generic;
+
+/**
+ * @since 2.1.0
+ */
+function resolveName(Source $s, $pos, $type = 'class')
+{
+ $name = scanQualifiedName($s, $pos);
+ $pieces = explode('\\', $name);
+ if ($pieces[0] === '') {
+ return $name;
+ }
+ $uses = collectUseDeclarations($s, $pos);
+ if (isset($uses[$type][$name])) {
+ return '\\' . ltrim($uses[$type][$name], ' \\');
+ }
+ if (isset($uses['class'][$pieces[0]])) {
+ $name = '\\' . ltrim($uses['class'][$pieces[0]] . '\\' . join('\\', array_slice($pieces, 1)), '\\');
+ } else {
+ $name = '\\' . ltrim(getNamespaceAt($s, $pos) . '\\' . $name, '\\');
+ }
+ return $name;
+}
+
+/**
+ * @since 2.1.0
+ */
+function getNamespaceAt(Source $s, $pos)
+{
+ foreach (collectNamespaceBoundaries($s) as $namespace => $boundaryPairs) {
+ foreach ($boundaryPairs as $boundaries) {
+ list($begin, $end) = $boundaries;
+ if ($begin <= $pos && $pos <= $end) {
+ return $namespace;
+ }
+ }
+ }
+ return '';
+}
+
+function collectNamespaceBoundaries(Source $s)
+{
+ return $s->cache([], function() {
+ if (!$this->has(T_NAMESPACE)) {
+ return ['' => [[0, INF]]];
+ }
+ $result = [];
+ foreach ($this->all(T_NAMESPACE) as $keyword) {
+ if ($this->next(';', $keyword) < $this->next(Generic\LEFT_CURLY, $keyword)) {
+ return [scanQualifiedName($this, $keyword + 1) => [[0, INF]]];
+ }
+ $begin = $this->next(Generic\LEFT_CURLY, $keyword) + 1;
+ $end = $this->match($begin - 1) - 1;
+ $name = scanQualifiedName($this, $keyword + 1);
+ if (!isset($result[$name])) {
+ $result[$name] = [];
+ }
+ $result[$name][] = [$begin, $end];
+ }
+ return $result;
+ });
+}
+
+function collectUseDeclarations(Source $s, $begin)
+{
+ foreach (collectNamespaceBoundaries($s) as $boundaryPairs) {
+ foreach ($boundaryPairs as $boundaries) {
+ list($leftBoundary, $rightBoundary) = $boundaries;
+ if ($leftBoundary <= $begin && $begin <= $rightBoundary) {
+ $begin = $leftBoundary;
+ break;
+ }
+ }
+ }
+ return $s->cache([$begin], function($begin) {
+ $result = ['class' => [], 'function' => [], 'const' => []];
+ # only tokens that are siblings bracket-wise are considered,
+ # so trait-use instances are not an issue
+ foreach ($this->siblings(T_USE, $begin) as $keyword) {
+ # skip if closure-use
+ $next = $this->skip(Source::junk(), $keyword);
+ if ($this->is(Generic\LEFT_ROUND, $next)) {
+ continue;
+ }
+ parseUseDeclaration($this, $next, $result);
+ }
+ return $result;
+ });
+}
+
+function parseUseDeclaration(Source $s, $pos, array &$aliases, $prefix = '', $type = 'class')
+{
+ $lastPart = null;
+ $whole = $prefix;
+ while (true) {
+ switch ($s->tokens[$pos][Source::TYPE_OFFSET]) {
+ case T_FUNCTION:
+ $type = 'function';
+ break;
+ case T_CONST:
+ $type = 'const';
+ break;
+ case T_NS_SEPARATOR:
+ if (!empty($whole)) {
+ $whole .= '\\';
+ }
+ break;
+ case T_STRING:
+ case Generic\NAME_FULLY_QUALIFIED:
+ case Generic\NAME_QUALIFIED:
+ case Generic\NAME_RELATIVE:
+ $update = $s->tokens[$pos][Source::STRING_OFFSET];
+ $parts = explode('\\', $update);
+ $whole .= $update;
+ $lastPart = end($parts);
+ break;
+ case T_AS:
+ $pos = $s->skip(Source::junk(), $pos);
+ $aliases[$type][$s->tokens[$pos][Source::STRING_OFFSET]] = $whole;
+ $lastPart = null;
+ $whole = $prefix;
+ break;
+ case ',':
+ if ($lastPart !== null) {
+ $aliases[$type][$lastPart] = $whole;
+ }
+ $lastPart = null;
+ $whole = $prefix;
+ $type = 'class';
+ break;
+ case Generic\LEFT_CURLY:
+ parseUseDeclaration($s, $pos + 1, $aliases, $prefix . '\\', $type);
+ break;
+ case T_WHITESPACE:
+ case T_COMMENT:
+ case T_DOC_COMMENT:
+ break;
+ default:
+ if ($lastPart !== null) {
+ $aliases[$type][$lastPart] = $whole;
+ }
+ return;
+ }
+ $pos++;
+ }
+}
+
+function scanQualifiedName(Source $s, $begin)
+{
+ $result = '';
+ while (true) {
+ switch ($s->tokens[$begin][Source::TYPE_OFFSET]) {
+ case T_NS_SEPARATOR:
+ if (!empty($result)) {
+ $result .= '\\';
+ }
+ # fall through
+ case T_STRING:
+ case Generic\NAME_FULLY_QUALIFIED:
+ case Generic\NAME_QUALIFIED:
+ case Generic\NAME_RELATIVE:
+ case T_STATIC:
+ $result .= $s->tokens[$begin][Source::STRING_OFFSET];
+ break;
+ case T_WHITESPACE:
+ case T_COMMENT:
+ case T_DOC_COMMENT:
+ break;
+ default:
+ return str_replace('\\\\', '\\', $result);
+ }
+ $begin++;
+ }
+}
diff --git a/vendor/antecedent/patchwork/src/CodeManipulation/Actions/RedefinitionOfInternals.php b/vendor/antecedent/patchwork/src/CodeManipulation/Actions/RedefinitionOfInternals.php
new file mode 100644
index 00000000..3a4f834d
--- /dev/null
+++ b/vendor/antecedent/patchwork/src/CodeManipulation/Actions/RedefinitionOfInternals.php
@@ -0,0 +1,142 @@
+
+ * @copyright 2010-2018 Ignas Rudaitis
+ * @license http://www.opensource.org/licenses/mit-license.html
+ */
+namespace Patchwork\CodeManipulation\Actions\RedefinitionOfInternals;
+
+use Patchwork\Config;
+use Patchwork\CallRerouting;
+use Patchwork\CodeManipulation\Source;
+use Patchwork\CodeManipulation\Actions\Generic;
+use Patchwork\CodeManipulation\Actions\Namespaces;
+
+const DYNAMIC_CALL_REPLACEMENT = '\Patchwork\CallRerouting\dispatchDynamic(%s, \Patchwork\Utils\args(%s))';
+
+function spliceNamedFunctionCalls()
+{
+ if (Config\getRedefinableInternals() === []) {
+ return function() {};
+ }
+ $names = [];
+ foreach (Config\getRedefinableInternals() as $name) {
+ $names[strtolower($name)] = true;
+ }
+ return function(Source $s) use ($names) {
+ foreach (Namespaces\collectNamespaceBoundaries($s) as $namespace => $boundaryList) {
+ foreach ($boundaryList as $boundaries) {
+ list($begin, $end) = $boundaries;
+ $aliases = Namespaces\collectUseDeclarations($s, $begin)['function'];
+ # Receive all aliases, leave only those for redefinable internals
+ foreach ($aliases as $alias => $qualified) {
+ if (!isset($names[$qualified])) {
+ unset($aliases[$alias]);
+ } else {
+ $aliases[strtolower($alias)] = strtolower($qualified);
+ }
+ }
+ spliceNamedCallsWithin($s, $begin, $end, $names, $aliases);
+ }
+ }
+ };
+}
+
+function spliceNamedCallsWithin(Source $s, $begin, $end, array $names, array $aliases)
+{
+ foreach ($s->within([T_STRING, Generic\NAME_FULLY_QUALIFIED, Generic\NAME_QUALIFIED, Generic\NAME_RELATIVE], $begin, $end) as $string) {
+ $original = strtolower($s->read($string));
+ if ($original[0] == '\\') {
+ $original = substr($original, 1);
+ }
+ if (isset($names[$original]) || isset($aliases[$original])) {
+ $previous = $s->skipBack(Source::junk(), $string);
+ $hadBackslash = false;
+ if ($s->is(T_NS_SEPARATOR, $previous) || $s->is(Generic\NAME_FULLY_QUALIFIED, $string)) {
+ if (!isset($names[$original])) {
+ # use-aliased name cannot have a leading backslash
+ continue;
+ }
+ if ($s->is(T_NS_SEPARATOR, $previous)) {
+ $s->splice('', $previous, 1);
+ $previous = $s->skipBack(Source::junk(), $previous);
+ }
+ $hadBackslash = true;
+ }
+ if ($s->is([T_FUNCTION, T_OBJECT_OPERATOR, T_DOUBLE_COLON, T_STRING, T_NEW, Generic\NAME_FULLY_QUALIFIED, Generic\NAME_QUALIFIED, Generic\NAME_RELATIVE], $previous)) {
+ continue;
+ }
+ $next = $s->skip(Source::junk(), $string);
+ if (!$s->is(Generic\LEFT_ROUND, $next)) {
+ continue;
+ }
+ if (isset($aliases[$original])) {
+ $original = $aliases[$original];
+ }
+ $secondNext = $s->skip(Source::junk(), $next);
+ $splice = '\\' . CallRerouting\INTERNAL_REDEFINITION_NAMESPACE . '\\';
+ $splice .= $original . Generic\LEFT_ROUND;
+ # prepend a namespace-of-origin argument to handle cases like Acme\time() vs time()
+ $splice .= !$hadBackslash ? '__NAMESPACE__' : '""';
+ if (!$s->is(Generic\RIGHT_ROUND, $secondNext)) {
+ # right parenthesis doesn't follow immediately => there are arguments
+ $splice .= ', ';
+ }
+ $s->splice($splice, $string, $secondNext - $string);
+ }
+ }
+}
+
+function spliceDynamicCalls()
+{
+ if (Config\getRedefinableInternals() === []) {
+ return function() {};
+ }
+ return function(Source $s) {
+ spliceDynamicCallsWithin($s, 0, count($s->tokens) - 1);
+ };
+}
+
+function spliceDynamicCallsWithin(Source $s, $first, $last)
+{
+ $pos = $first;
+ $anchor = INF;
+ $suppress = false;
+ while ($pos <= $last) {
+ switch ($s->tokens[$pos][Source::TYPE_OFFSET]) {
+ case '$':
+ case T_VARIABLE:
+ $anchor = min($pos, $anchor);
+ break;
+ case Generic\LEFT_ROUND:
+ if ($anchor !== INF && !$suppress) {
+ $callable = $s->read($anchor, $pos - $anchor);
+ $arguments = $s->read($pos + 1, $s->match($pos) - $pos - 1);
+ $pos = $s->match($pos);
+ $replacement = sprintf(DYNAMIC_CALL_REPLACEMENT, $callable, $arguments);
+ $s->splice($replacement, $anchor, $pos - $anchor + 1);
+ }
+ break;
+ case Generic\LEFT_SQUARE:
+ case Generic\LEFT_CURLY:
+ spliceDynamicCallsWithin($s, $pos + 1, $s->match($pos) - 1);
+ $pos = $s->match($pos);
+ break;
+ case T_WHITESPACE:
+ case T_COMMENT:
+ case T_DOC_COMMENT:
+ break;
+ case T_OBJECT_OPERATOR:
+ case T_DOUBLE_COLON:
+ case T_NEW:
+ $suppress = true;
+ break;
+ default:
+ $suppress = false;
+ $anchor = INF;
+ }
+ $pos++;
+ }
+}
diff --git a/vendor/antecedent/patchwork/src/CodeManipulation/Actions/RedefinitionOfLanguageConstructs.php b/vendor/antecedent/patchwork/src/CodeManipulation/Actions/RedefinitionOfLanguageConstructs.php
new file mode 100644
index 00000000..371ec6da
--- /dev/null
+++ b/vendor/antecedent/patchwork/src/CodeManipulation/Actions/RedefinitionOfLanguageConstructs.php
@@ -0,0 +1,128 @@
+
+ * @copyright 2010-2018 Ignas Rudaitis
+ * @license http://www.opensource.org/licenses/mit-license.html
+ */
+namespace Patchwork\CodeManipulation\Actions\RedefinitionOfLanguageConstructs;
+
+use Patchwork\CodeManipulation\Source;
+use Patchwork\CodeManipulation\Actions\Generic;
+use Patchwork\Exceptions;
+use Patchwork\Config;
+
+const LANGUAGE_CONSTRUCT_PREFIX = 'Patchwork\Redefinitions\LanguageConstructs\_';
+
+/**
+ * @since 2.0.5
+ */
+function spliceAllConfiguredLanguageConstructs()
+{
+ $mapping = getMappingOfConstructs();
+ $used = [];
+ $actions = [];
+ foreach (Config\getRedefinableLanguageConstructs() as $construct) {
+ if (isset($used[$mapping[$construct]])) {
+ continue;
+ }
+ $used[$mapping[$construct]] = true;
+ $actions[] = spliceLanguageConstruct($mapping[$construct]);
+ }
+ return Generic\chain($actions);
+}
+
+function getMappingOfConstructs()
+{
+ return [
+ 'echo' => T_ECHO,
+ 'print' => T_PRINT,
+ 'eval' => T_EVAL,
+ 'die' => T_EXIT,
+ 'exit' => T_EXIT,
+ 'isset' => T_ISSET,
+ 'unset' => T_UNSET,
+ 'empty' => T_EMPTY,
+ 'require' => T_REQUIRE,
+ 'require_once' => T_REQUIRE_ONCE,
+ 'include' => T_INCLUDE,
+ 'include_once' => T_INCLUDE_ONCE,
+ 'clone' => T_CLONE,
+ ];
+}
+
+function getInnerTokens()
+{
+ return [
+ '$',
+ ',',
+ T_OBJECT_OPERATOR,
+ T_DOUBLE_COLON,
+ T_NS_SEPARATOR,
+ T_STRING,
+ T_LNUMBER,
+ T_DNUMBER,
+ T_WHITESPACE,
+ T_CONSTANT_ENCAPSED_STRING,
+ T_COMMENT,
+ T_DOC_COMMENT,
+ T_VARIABLE,
+ T_ENCAPSED_AND_WHITESPACE,
+ Generic\NAME_FULLY_QUALIFIED,
+ Generic\NAME_QUALIFIED,
+ Generic\NAME_RELATIVE,
+ ];
+}
+
+function getBracketTokens()
+{
+ return [
+ Generic\LEFT_ROUND,
+ Generic\LEFT_SQUARE,
+ Generic\LEFT_CURLY,
+ T_CURLY_OPEN,
+ T_DOLLAR_OPEN_CURLY_BRACES,
+ Generic\ATTRIBUTE,
+ ];
+}
+
+function spliceLanguageConstruct($token)
+{
+ return function(Source $s) use ($token) {
+ foreach ($s->all($token) as $pos) {
+ $s->splice('\\' . LANGUAGE_CONSTRUCT_PREFIX, $pos, 0, Source::PREPEND);
+ if (lacksParentheses($s, $pos)) {
+ addParentheses($s, $pos);
+ }
+ }
+ };
+}
+
+function lacksParentheses(Source $s, $pos)
+{
+ if ($s->is(T_ECHO, $pos)) {
+ return true;
+ }
+ $next = $s->skip(Source::junk(), $pos);
+ return !$s->is(Generic\LEFT_ROUND, $next);
+}
+
+function addParentheses(Source $s, $pos)
+{
+ $pos = $s->skip(Source::junk(), $pos);
+ $s->splice(Generic\LEFT_ROUND, $pos, 0, Source::PREPEND);
+ while ($pos < count($s->tokens)) {
+ if ($s->is(getInnerTokens(), $pos)) {
+ $pos++;
+ } elseif ($s->is(getBracketTokens(), $pos)) {
+ $pos = $s->match($pos) + 1;
+ } else {
+ break;
+ }
+ }
+ if ($s->is(Source::junk(), $pos)) {
+ $pos = $s->skipBack(Source::junk(), $pos);
+ }
+ $s->splice(Generic\RIGHT_ROUND, $pos, 0, Source::APPEND);
+}
diff --git a/vendor/antecedent/patchwork/src/CodeManipulation/Actions/RedefinitionOfNew.php b/vendor/antecedent/patchwork/src/CodeManipulation/Actions/RedefinitionOfNew.php
new file mode 100644
index 00000000..02344d87
--- /dev/null
+++ b/vendor/antecedent/patchwork/src/CodeManipulation/Actions/RedefinitionOfNew.php
@@ -0,0 +1,199 @@
+
+ * @copyright 2010-2018 Ignas Rudaitis
+ * @license http://www.opensource.org/licenses/mit-license.html
+ */
+namespace Patchwork\CodeManipulation\Actions\RedefinitionOfNew;
+
+use Patchwork\CodeManipulation\Source;
+use Patchwork\CodeManipulation\Actions\Generic;
+use Patchwork\CodeManipulation\Actions\Namespaces;
+use Patchwork\Config;
+
+const STATIC_INSTANTIATION_REPLACEMENT = '\Patchwork\CallRerouting\getInstantiator(\'%s\', %s)->instantiate(%s)';
+const DYNAMIC_INSTANTIATION_REPLACEMENT = '\Patchwork\CallRerouting\getInstantiator(%s, %s)->instantiate(%s)';
+const CALLED_CLASS = '((__CLASS__ && __FUNCTION__ !== (__NAMESPACE__ ? __NAMESPACE__ . "\\\\{closure}" : "\\\\{closure}")) ? \get_called_class() : null)';
+
+const spliceAllInstantiations = 'Patchwork\CodeManipulation\Actions\RedefinitionOfNew\spliceAllInstantiations';
+const publicizeConstructors = 'Patchwork\CodeManipulation\Actions\RedefinitionOfNew\publicizeConstructors';
+
+/**
+ * @since 2.1.0
+ */
+function spliceAllInstantiations(Source $s)
+{
+ if (!State::$enabled || !Config\isNewKeywordRedefinable()) {
+ return;
+ }
+ foreach ($s->all(T_NEW) as $new) {
+ $begin = $s->skip(Source::junk(), $new);
+ if ($s->is(T_CLASS, $begin)) {
+ # Anonymous class
+ continue;
+ }
+ $end = scanInnerTokens($s, $begin, $dynamic);
+ $afterEnd = $s->skip(Source::junk(), $end);
+ list($argsOpen, $argsClose) = [null, null];
+ if ($s->is(Generic\LEFT_ROUND, $afterEnd)) {
+ list($argsOpen, $argsClose) = [$afterEnd, $s->match($afterEnd)];
+ }
+ spliceInstantiation($s, $new, $begin, $end, $argsOpen, $argsClose, $dynamic);
+ if (hasExtraParentheses($s, $new)) {
+ removeExtraParentheses($s, $new);
+ }
+ }
+}
+
+function publicizeConstructors(Source $s)
+{
+ if (!Config\isNewKeywordRedefinable()) {
+ return;
+ }
+ foreach ($s->all([T_PRIVATE, T_PROTECTED]) as $first) {
+ $second = $s->skip(Source::junk(), $first);
+ $third = $s->skip(Source::junk(), $second);
+ if ($s->is(T_FUNCTION, $second) && $s->read($third, 1) === '__construct') {
+ $s->splice('public', $first, 1);
+ }
+ }
+}
+
+function spliceInstantiation(Source $s, $new, $begin, $end, $argsOpen, $argsClose, $dynamic)
+{
+ $class = $s->read($begin, $end - $begin + 1);
+ $args = '';
+ $length = $end - $new + 1;
+ if ($argsOpen !== null) {
+ $args = $s->read($argsOpen + 1, $argsClose - $argsOpen - 1);
+ $length = $argsClose - $new + 1;
+ }
+ $replacement = DYNAMIC_INSTANTIATION_REPLACEMENT;
+ if (!$dynamic) {
+ $class = Namespaces\resolveName($s, $begin);
+ $replacement = STATIC_INSTANTIATION_REPLACEMENT;
+ }
+ $s->splice(sprintf($replacement, $class, CALLED_CLASS, $args), $new, $length);
+}
+
+function getInnerTokens()
+{
+ return [
+ '$',
+ T_OBJECT_OPERATOR,
+ T_DOUBLE_COLON,
+ T_NS_SEPARATOR,
+ T_STRING,
+ T_LNUMBER,
+ T_DNUMBER,
+ T_WHITESPACE,
+ T_CONSTANT_ENCAPSED_STRING,
+ T_COMMENT,
+ T_DOC_COMMENT,
+ T_VARIABLE,
+ T_ENCAPSED_AND_WHITESPACE,
+ T_STATIC,
+ Generic\NAME_FULLY_QUALIFIED,
+ Generic\NAME_QUALIFIED,
+ Generic\NAME_RELATIVE,
+ ];
+}
+
+function getBracketTokens()
+{
+ return [
+ Generic\LEFT_SQUARE,
+ Generic\LEFT_CURLY,
+ T_CURLY_OPEN,
+ T_DOLLAR_OPEN_CURLY_BRACES,
+ Generic\ATTRIBUTE,
+ ];
+}
+
+function getDynamicTokens()
+{
+ return [
+ '$',
+ T_OBJECT_OPERATOR,
+ T_DOUBLE_COLON,
+ T_LNUMBER,
+ T_DNUMBER,
+ T_CONSTANT_ENCAPSED_STRING,
+ T_VARIABLE,
+ T_ENCAPSED_AND_WHITESPACE,
+ ];
+}
+
+function scanInnerTokens(Source $s, $begin, &$dynamic = null)
+{
+ $dynamic = false;
+ $pos = $begin;
+ while ($s->is(getInnerTokens(), $pos) || $s->is(getBracketTokens(), $pos)) {
+ if ($s->is(getBracketTokens(), $pos)) {
+ $dynamic = true;
+ $pos = $s->match($pos) + 1;
+ } else {
+ if ($s->is(getDynamicTokens(), $pos)) {
+ $dynamic = true;
+ }
+ $pos++;
+ }
+ }
+ return $pos - 1;
+}
+
+function hasExtraParentheses(Source $s, $new)
+{
+ $doNotRemoveAfter = [
+ T_STRING,
+ T_STATIC,
+ T_VARIABLE,
+ T_FOREACH,
+ T_FOR,
+ T_IF,
+ T_ELSEIF,
+ T_WHILE,
+ T_ARRAY,
+ T_PRINT,
+ T_ECHO,
+ T_CLASS,
+ Generic\NAME_FULLY_QUALIFIED,
+ Generic\NAME_QUALIFIED,
+ Generic\NAME_RELATIVE,
+ ];
+ $left = $s->skipBack(Source::junk(), $new);
+ if (!$s->is(Generic\LEFT_ROUND, $left)) {
+ return false;
+ }
+ $beforeLeft = $s->skipBack(Source::junk(), $left);
+ return !$s->is($doNotRemoveAfter, $beforeLeft);
+}
+
+function removeExtraParentheses(Source $s, $new)
+{
+ $left = $s->skipBack(Source::junk(), $new);
+ $s->splice('', $left, 1);
+ $s->splice('', $s->match($left), 1);
+}
+
+function suspendFor(callable $function)
+{
+ State::$enabled = false;
+ $exception = null;
+ try {
+ $function();
+ } catch (\Exception $e) {
+ $exception = $e;
+ }
+ State::$enabled = true;
+ if ($exception) {
+ throw $exception;
+ }
+}
+
+class State
+{
+ static $enabled = true;
+}
diff --git a/vendor/antecedent/patchwork/src/CodeManipulation/Source.php b/vendor/antecedent/patchwork/src/CodeManipulation/Source.php
new file mode 100644
index 00000000..f16bc120
--- /dev/null
+++ b/vendor/antecedent/patchwork/src/CodeManipulation/Source.php
@@ -0,0 +1,318 @@
+
+ * @copyright 2010-2018 Ignas Rudaitis
+ * @license http://www.opensource.org/licenses/mit-license.html
+ */
+namespace Patchwork\CodeManipulation;
+
+use Patchwork\CodeManipulation\Actions\Generic;
+use Patchwork\Utils;
+
+class Source
+{
+ const TYPE_OFFSET = 0;
+ const STRING_OFFSET = 1;
+
+ const PREPEND = 'PREPEND';
+ const APPEND = 'APPEND';
+ const OVERWRITE = 'OVERWRITE';
+
+ const ANY = null;
+
+ public $tokens;
+ public $tokensByType;
+ public $splices;
+ public $spliceLengths;
+ public $code;
+ public $file;
+ public $matchingBrackets;
+ public $levels;
+ public $levelBeginnings;
+ public $levelEndings;
+ public $tokensByLevel;
+ public $tokensByLevelAndType;
+ public $cache;
+
+ function __construct($string)
+ {
+ $this->code = $string;
+ $this->initialize();
+ }
+
+ function initialize()
+ {
+ $this->tokens = Utils\tokenize($this->code);
+ $this->tokens[] = [T_WHITESPACE, ""];
+ $this->indexTokensByType();
+ $this->collectBracketMatchings();
+ $this->collectLevelInfo();
+ $this->splices = [];
+ $this->spliceLengths = [];
+ $this->cache = [];
+ }
+
+ function indexTokensByType()
+ {
+ $this->tokensByType = [];
+ foreach ($this->tokens as $offset => $token) {
+ $this->tokensByType[$token[self::TYPE_OFFSET]][] = $offset;
+ }
+ }
+
+ function collectBracketMatchings()
+ {
+ $this->matchingBrackets = [];
+ $stack = [];
+ foreach ($this->tokens as $offset => $token) {
+ $type = $token[self::TYPE_OFFSET];
+ switch ($type) {
+ case '(':
+ case '[':
+ case '{':
+ case T_CURLY_OPEN:
+ case T_DOLLAR_OPEN_CURLY_BRACES:
+ case Generic\ATTRIBUTE:
+ $stack[] = $offset;
+ break;
+ case ')':
+ case ']':
+ case '}':
+ $top = array_pop($stack);
+ $this->matchingBrackets[$top] = $offset;
+ $this->matchingBrackets[$offset] = $top;
+ break;
+ }
+ }
+ }
+
+ function collectLevelInfo()
+ {
+ $level = 0;
+ $this->levels = [];
+ $this->tokensByLevel = [];
+ $this->levelBeginnings = [];
+ $this->levelEndings = [];
+ $this->tokensByLevelAndType = [];
+ foreach ($this->tokens as $offset => $token) {
+ $type = $token[self::TYPE_OFFSET];
+ switch ($type) {
+ case '(':
+ case '[':
+ case '{':
+ case T_CURLY_OPEN:
+ case T_DOLLAR_OPEN_CURLY_BRACES:
+ case Generic\ATTRIBUTE:
+ $level++;
+ Utils\appendUnder($this->levelBeginnings, $level, $offset);
+ break;
+ case ')':
+ case ']':
+ case '}':
+ Utils\appendUnder($this->levelEndings, $level, $offset);
+ $level--;
+ }
+ $this->levels[$offset] = $level;
+ Utils\appendUnder($this->tokensByLevel, $level, $offset);
+ Utils\appendUnder($this->tokensByLevelAndType, [$level, $type], $offset);
+ }
+ Utils\appendUnder($this->levelBeginnings, 0, 0);
+ Utils\appendUnder($this->levelEndings, 0, count($this->tokens) - 1);
+ }
+
+ function has($types)
+ {
+ foreach ((array) $types as $type) {
+ if ($this->all($type) !== []) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ function is($types, $offset)
+ {
+ foreach ((array) $types as $type) {
+ if ($this->tokens[$offset][self::TYPE_OFFSET] === $type) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ function skip($types, $offset, $direction = 1)
+ {
+ $offset += $direction;
+ $types = (array) $types;
+ while ($offset < count($this->tokens) && $offset >= 0) {
+ if (!in_array($this->tokens[$offset][self::TYPE_OFFSET], $types)) {
+ return $offset;
+ }
+ $offset += $direction;
+ }
+ return ($direction > 0) ? INF : -1;
+ }
+
+ function skipBack($types, $offset)
+ {
+ return $this->skip($types, $offset, -1);
+ }
+
+ function within($types, $low, $high)
+ {
+ $result = [];
+ foreach ((array) $types as $type) {
+ $candidates = isset($this->tokensByType[$type]) ? $this->tokensByType[$type] : [];
+ $result = array_merge(Utils\allWithinRange($candidates, $low, $high), $result);
+ }
+ return $result;
+ }
+
+ function read($offset, $count = 1)
+ {
+ $result = '';
+ $pos = $offset;
+ while ($pos < $offset + $count) {
+ if (isset($this->tokens[$pos][self::STRING_OFFSET])) {
+ $result .= $this->tokens[$pos][self::STRING_OFFSET];
+ } else {
+ $result .= $this->tokens[$pos];
+ }
+ $pos++;
+ }
+ return $result;
+ }
+
+ function siblings($types, $offset)
+ {
+ $level = $this->levels[$offset];
+ $begin = Utils\lastNotGreaterThan(Utils\access($this->levelBeginnings, $level, []), $offset);
+ $end = Utils\firstGreaterThan(Utils\access($this->levelEndings, $level, []), $offset);
+ if ($types === self::ANY) {
+ return Utils\allWithinRange($this->tokensByLevel[$level], $begin, $end);
+ } else {
+ $result = [];
+ foreach ((array) $types as $type) {
+ $candidates = Utils\access($this->tokensByLevelAndType, [$level, $type], []);
+ $result = array_merge(Utils\allWithinRange($candidates, $begin, $end), $result);
+ }
+ return $result;
+ }
+ }
+
+ function next($types, $offset)
+ {
+ if (!is_array($types)) {
+ $candidates = Utils\access($this->tokensByType, $types, []);
+ return Utils\firstGreaterThan($candidates, $offset);
+ }
+ $result = INF;
+ foreach ($types as $type) {
+ $result = min($this->next($type, $offset), $result);
+ }
+ return $result;
+ }
+
+ function all($types)
+ {
+ if (!is_array($types)) {
+ return Utils\access($this->tokensByType, $types, []);
+ }
+ $result = [];
+ foreach ($types as $type) {
+ $result = array_merge($result, $this->all($type));
+ }
+ sort($result);
+ return $result;
+ }
+
+ function match($offset)
+ {
+ $offset = (string) $offset;
+ return isset($this->matchingBrackets[$offset]) ? $this->matchingBrackets[$offset] : INF;
+ }
+
+ function splice($splice, $offset, $length = 0, $policy = self::OVERWRITE)
+ {
+ if ($policy === self::OVERWRITE) {
+ $this->splices[$offset] = $splice;
+ } elseif ($policy === self::PREPEND || $policy === self::APPEND) {
+ if (!isset($this->splices[$offset])) {
+ $this->splices[$offset] = '';
+ }
+ if ($policy === self::PREPEND) {
+ $this->splices[$offset] = $splice . $this->splices[$offset];
+ } elseif ($policy === self::APPEND) {
+ $this->splices[$offset] .= $splice;
+ }
+ }
+ if (!isset($this->spliceLengths[$offset])) {
+ $this->spliceLengths[$offset] = 0;
+ }
+ $this->spliceLengths[$offset] = max($length, $this->spliceLengths[$offset]);
+ $this->code = null;
+ }
+
+ function createCodeFromTokens()
+ {
+ $splices = $this->splices;
+ $code = "";
+ $count = count($this->tokens);
+ for ($offset = 0; $offset < $count; $offset++) {
+ if (isset($splices[$offset])) {
+ $code .= $splices[$offset];
+ unset($splices[$offset]);
+ $offset += $this->spliceLengths[$offset] - 1;
+ } else {
+ $t = $this->tokens[$offset];
+ $code .= isset($t[self::STRING_OFFSET]) ? $t[self::STRING_OFFSET] : $t;
+ }
+ }
+ $this->code = $code;
+ }
+
+ static function junk()
+ {
+ return [T_WHITESPACE, T_COMMENT, T_DOC_COMMENT];
+ }
+
+ function __toString()
+ {
+ if ($this->code === null) {
+ $this->createCodeFromTokens();
+ }
+ return (string) $this->code;
+ }
+
+ function flush()
+ {
+ $this->initialize(Utils\tokenize($this));
+ }
+
+ /**
+ * @since 2.1.0
+ */
+ function cache(array $args, \Closure $function)
+ {
+ $found = true;
+ $trace = debug_backtrace()[1];
+ $location = $trace['file'] . ':' . $trace['line'];
+ $result = &$this->cache;
+ foreach (array_merge([$location], $args) as $step) {
+ if (!is_scalar($step)) {
+ throw new \LogicException;
+ }
+ if (!isset($result[$step])) {
+ $result[$step] = [];
+ $found = false;
+ }
+ $result = &$result[$step];
+ }
+ if (!$found) {
+ $result = call_user_func_array($function->bindTo($this), $args);
+ }
+ return $result;
+ }
+}
diff --git a/vendor/antecedent/patchwork/src/CodeManipulation/Stream.php b/vendor/antecedent/patchwork/src/CodeManipulation/Stream.php
new file mode 100644
index 00000000..0a1c50e9
--- /dev/null
+++ b/vendor/antecedent/patchwork/src/CodeManipulation/Stream.php
@@ -0,0 +1,273 @@
+
+ * @copyright 2010-2018 Ignas Rudaitis
+ * @license http://www.opensource.org/licenses/mit-license.html
+ */
+namespace Patchwork\CodeManipulation;
+
+use Patchwork\Utils;
+
+class Stream
+{
+ const STREAM_OPEN_FOR_INCLUDE = 128;
+ const STAT_MTIME_NUMERIC_OFFSET = 9;
+ const STAT_MTIME_ASSOC_OFFSET = 'mtime';
+
+ protected static $protocols = ['file', 'phar'];
+
+ public $context;
+ public $resource;
+
+ public static function wrap()
+ {
+ foreach (static::$protocols as $protocol) {
+ stream_wrapper_unregister($protocol);
+ stream_wrapper_register($protocol, get_called_class());
+ }
+ }
+
+ public static function unwrap()
+ {
+ foreach (static::$protocols as $protocol) {
+ set_error_handler(function() {});
+ stream_wrapper_restore($protocol);
+ restore_error_handler();
+ }
+ }
+
+ public function stream_open($path, $mode, $options, &$openedPath)
+ {
+ $this->unwrap();
+ $including = (bool) ($options & self::STREAM_OPEN_FOR_INCLUDE);
+
+ // In PHP 7 and 8, `parse_ini_file()` also sets STREAM_OPEN_FOR_INCLUDE.
+ if ($including) {
+ $frame = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 2)[1];
+ if (empty($frame['class']) && $frame['function'] === 'parse_ini_file') {
+ $including = false;
+ }
+ }
+
+ if ($including && shouldTransform($path)) {
+ $this->resource = transformAndOpen($path);
+ $this->wrap();
+ return true;
+ }
+ if (isset($this->context)) {
+ $this->resource = fopen($path, $mode, $options, $this->context);
+ } else {
+ $this->resource = fopen($path, $mode, $options);
+ }
+ $this->wrap();
+ return $this->resource !== false;
+ }
+
+ public function stream_close()
+ {
+ return fclose($this->resource);
+ }
+
+ public function stream_eof()
+ {
+ return feof($this->resource);
+ }
+
+ public function stream_flush()
+ {
+ return fflush($this->resource);
+ }
+
+ public function stream_read($count)
+ {
+ return fread($this->resource, $count);
+ }
+
+ public function stream_seek($offset, $whence = SEEK_SET)
+ {
+ return fseek($this->resource, $offset, $whence) === 0;
+ }
+
+ public function stream_stat()
+ {
+ $result = fstat($this->resource);
+ if ($result) {
+ $result[self::STAT_MTIME_ASSOC_OFFSET]++;
+ $result[self::STAT_MTIME_NUMERIC_OFFSET]++;
+ }
+ return $result;
+ }
+
+ public function stream_tell()
+ {
+ return ftell($this->resource);
+ }
+
+ public function url_stat($path, $flags)
+ {
+ $func = ($flags & STREAM_URL_STAT_LINK) ? 'lstat' : 'stat';
+ $this->unwrap();
+ clearstatcache();
+ if ($flags & STREAM_URL_STAT_QUIET) {
+ set_error_handler(function() {});
+ try {
+ $result = call_user_func($func, $path);
+ } catch (\Exception $e) {
+ $result = null;
+ }
+ restore_error_handler();
+ } else {
+ $result = call_user_func($func, $path);
+ }
+ clearstatcache();
+ $this->wrap();
+ if ($result) {
+ $result[self::STAT_MTIME_ASSOC_OFFSET]++;
+ $result[self::STAT_MTIME_NUMERIC_OFFSET]++;
+ }
+ return $result;
+ }
+
+ public function dir_closedir()
+ {
+ closedir($this->resource);
+ return true;
+ }
+
+ public function dir_opendir($path, $options)
+ {
+ $this->unwrap();
+ if (isset($this->context)) {
+ $this->resource = opendir($path, $this->context);
+ } else {
+ $this->resource = opendir($path);
+ }
+ $this->wrap();
+ return $this->resource !== false;
+ }
+
+ public function dir_readdir()
+ {
+ return readdir($this->resource);
+ }
+
+ public function dir_rewinddir()
+ {
+ rewinddir($this->resource);
+ return true;
+ }
+
+ public function mkdir($path, $mode, $options)
+ {
+ $this->unwrap();
+ if (isset($this->context)) {
+ $result = mkdir($path, $mode, $options, $this->context);
+ } else {
+ $result = mkdir($path, $mode, $options);
+ }
+ $this->wrap();
+ return $result;
+ }
+
+ public function rename($path_from, $path_to)
+ {
+ $this->unwrap();
+ if (isset($this->context)) {
+ $result = rename($path_from, $path_to, $this->context);
+ } else {
+ $result = rename($path_from, $path_to);
+ }
+ $this->wrap();
+ return $result;
+ }
+
+ public function rmdir($path, $options)
+ {
+ $this->unwrap();
+ if (isset($this->context)) {
+ $result = rmdir($path, $this->context);
+ } else {
+ $result = rmdir($path);
+ }
+ $this->wrap();
+ return $result;
+ }
+
+ public function stream_cast($cast_as)
+ {
+ return $this->resource;
+ }
+
+ public function stream_lock($operation)
+ {
+ if ($operation === '0' || $operation === 0) {
+ $operation = LOCK_EX;
+ }
+ return flock($this->resource, $operation);
+ }
+
+ public function stream_set_option($option, $arg1, $arg2)
+ {
+ switch ($option) {
+ case STREAM_OPTION_BLOCKING:
+ return stream_set_blocking($this->resource, $arg1);
+ case STREAM_OPTION_READ_TIMEOUT:
+ return stream_set_timeout($this->resource, $arg1, $arg2);
+ case STREAM_OPTION_WRITE_BUFFER:
+ return stream_set_write_buffer($this->resource, $arg1);
+ case STREAM_OPTION_READ_BUFFER:
+ return stream_set_read_buffer($this->resource, $arg1);
+ }
+ }
+
+ public function stream_write($data)
+ {
+ return fwrite($this->resource, $data);
+ }
+
+ public function unlink($path)
+ {
+ $this->unwrap();
+ if (isset($this->context)) {
+ $result = unlink($path, $this->context);
+ } else {
+ $result = unlink($path);
+ }
+ $this->wrap();
+ return $result;
+ }
+
+ public function stream_metadata($path, $option, $value)
+ {
+ $this->unwrap();
+ switch ($option) {
+ case STREAM_META_TOUCH:
+ if (empty($value)) {
+ $result = touch($path);
+ } else {
+ $result = touch($path, $value[0], $value[1]);
+ }
+ break;
+ case STREAM_META_OWNER_NAME:
+ case STREAM_META_OWNER:
+ $result = chown($path, $value);
+ break;
+ case STREAM_META_GROUP_NAME:
+ case STREAM_META_GROUP:
+ $result = chgrp($path, $value);
+ break;
+ case STREAM_META_ACCESS:
+ $result = chmod($path, $value);
+ break;
+ }
+ $this->wrap();
+ return $result;
+ }
+
+ public function stream_truncate($new_size)
+ {
+ return ftruncate($this->resource, $new_size);
+ }
+}
diff --git a/vendor/antecedent/patchwork/src/Config.php b/vendor/antecedent/patchwork/src/Config.php
new file mode 100644
index 00000000..9da67a86
--- /dev/null
+++ b/vendor/antecedent/patchwork/src/Config.php
@@ -0,0 +1,233 @@
+
+ * @copyright 2010-2018 Ignas Rudaitis
+ * @license http://www.opensource.org/licenses/mit-license.html
+ */
+namespace Patchwork\Config;
+
+use Patchwork\Utils;
+use Patchwork\Exceptions;
+use Patchwork\CodeManipulation\Actions\RedefinitionOfLanguageConstructs;
+
+const FILE_NAME = 'patchwork.json';
+
+function locate()
+{
+ $alreadyRead = [];
+ $paths = array_map('dirname', get_included_files());
+ $paths[] = dirname($_SERVER['PHP_SELF']);
+ $paths[] = getcwd();
+ foreach ($paths as $path) {
+ while (dirname($path) !== $path) {
+ $file = $path . DIRECTORY_SEPARATOR . FILE_NAME;
+ if (is_file($file) && !isset($alreadyRead[$file])) {
+ read($file);
+ State::$timestamp = max(filemtime($file), State::$timestamp);
+ $alreadyRead[$file] = true;
+ }
+ $path = dirname($path);
+ }
+ }
+}
+
+function read($file)
+{
+ $data = json_decode(file_get_contents($file), true);
+ if (json_last_error() !== JSON_ERROR_NONE) {
+ $message = json_last_error_msg();
+ throw new Exceptions\ConfigMalformed($file, $message);
+ }
+ set($data, $file);
+}
+
+function set(array $data, $file)
+{
+ $keys = array_keys($data);
+ $list = ['blacklist', 'whitelist', 'cache-path', 'redefinable-internals', 'new-keyword-redefinable'];
+ $unknown = array_diff($keys, $list);
+ if ($unknown != []) {
+ throw new Exceptions\ConfigKeyNotRecognized(reset($unknown), $list, $file);
+ }
+ $root = dirname($file);
+ setBlacklist(get($data, 'blacklist'), $root);
+ setWhitelist(get($data, 'whitelist'), $root);
+ setCachePath(get($data, 'cache-path'), $root);
+ setRedefinableInternals(get($data, 'redefinable-internals'), $root);
+ setNewKeywordRedefinability(get($data, 'new-keyword-redefinable'), $root);
+}
+
+function get(array $data, $key)
+{
+ return isset($data[$key]) ? $data[$key] : null;
+}
+
+function setBlacklist($data, $root)
+{
+ merge(State::$blacklist, resolvePaths($data, $root));
+}
+
+function isListed($path, array $list)
+{
+ $path = rtrim($path, '\\/');
+ foreach ($list as $item) {
+ if (!is_string($item)) {
+ $item = chr($item);
+ }
+ if (strpos($path, $item) === 0) {
+ return true;
+ }
+ }
+ return false;
+}
+
+function isBlacklisted($path)
+{
+ return isListed($path, State::$blacklist);
+}
+
+function setWhitelist($data, $root)
+{
+ merge(State::$whitelist, resolvePaths($data, $root));
+}
+
+function isWhitelisted($path)
+{
+ return isListed($path, State::$whitelist);
+}
+
+function setCachePath($data, $root)
+{
+ if ($data === null) {
+ return;
+ }
+ $path = resolvePath($data, $root);
+ if (State::$cachePath !== null && State::$cachePath !== $path) {
+ throw new Exceptions\CachePathConflict(State::$cachePath, $path);
+ }
+ State::$cachePath = $path;
+}
+
+function getDefaultRedefinableInternals()
+{
+ return [
+ 'preg_replace_callback',
+ 'spl_autoload_register',
+ 'iterator_apply',
+ 'header_register_callback',
+ 'call_user_func',
+ 'call_user_func_array',
+ 'forward_static_call',
+ 'forward_static_call_array',
+ 'register_shutdown_function',
+ 'register_tick_function',
+ 'unregister_tick_function',
+ 'ob_start',
+ 'usort',
+ 'uasort',
+ 'uksort',
+ 'array_reduce',
+ 'array_intersect_ukey',
+ 'array_uintersect',
+ 'array_uintersect_assoc',
+ 'array_intersect_uassoc',
+ 'array_uintersect_uassoc',
+ 'array_uintersect_uassoc',
+ 'array_diff_ukey',
+ 'array_udiff',
+ 'array_udiff_assoc',
+ 'array_diff_uassoc',
+ 'array_udiff_uassoc',
+ 'array_udiff_uassoc',
+ 'array_filter',
+ 'array_map',
+ 'libxml_set_external_entity_loader',
+ ];
+}
+
+function getRedefinableInternals()
+{
+ if (!empty(State::$redefinableInternals)) {
+ return array_merge(State::$redefinableInternals, getDefaultRedefinableInternals());
+ }
+ return [];
+}
+
+function setRedefinableInternals($names)
+{
+ merge(State::$redefinableInternals, $names);
+ $constructs = array_intersect(State::$redefinableInternals, getSupportedLanguageConstructs());
+ State::$redefinableLanguageConstructs = array_merge(State::$redefinableLanguageConstructs, $constructs);
+ State::$redefinableInternals = array_diff(State::$redefinableInternals, $constructs);
+}
+
+function setNewKeywordRedefinability($value)
+{
+ State::$newKeywordRedefinable = State::$newKeywordRedefinable || $value;
+}
+
+function getRedefinableLanguageConstructs()
+{
+ return State::$redefinableLanguageConstructs;
+}
+
+function getSupportedLanguageConstructs()
+{
+ return array_keys(RedefinitionOfLanguageConstructs\getMappingOfConstructs());
+}
+
+function isNewKeywordRedefinable()
+{
+ return State::$newKeywordRedefinable;
+}
+
+function getCachePath()
+{
+ return State::$cachePath;
+}
+
+function resolvePath($path, $root)
+{
+ if ($path === null) {
+ return null;
+ }
+ if (file_exists($path) && realpath($path) === $path) {
+ return $path;
+ }
+ return realpath($root . '/' . $path);
+}
+
+function resolvePaths($paths, $root)
+{
+ if ($paths === null) {
+ return [];
+ }
+ $result = [];
+ foreach ((array) $paths as $path) {
+ $result[] = resolvePath($path, $root);
+ }
+ return $result;
+}
+
+function merge(array &$target, $source)
+{
+ $target = array_merge($target, (array) $source);
+}
+
+function getTimestamp()
+{
+ return State::$timestamp;
+}
+
+class State
+{
+ static $blacklist = [];
+ static $whitelist = [];
+ static $cachePath;
+ static $redefinableInternals = [];
+ static $redefinableLanguageConstructs = [];
+ static $newKeywordRedefinable = false;
+ static $timestamp = 0;
+}
diff --git a/vendor/antecedent/patchwork/src/Console.php b/vendor/antecedent/patchwork/src/Console.php
new file mode 100644
index 00000000..466130d1
--- /dev/null
+++ b/vendor/antecedent/patchwork/src/Console.php
@@ -0,0 +1,57 @@
+
+ * @copyright 2010-2018 Ignas Rudaitis
+ * @license http://www.opensource.org/licenses/mit-license.html
+ */
+namespace Patchwork\Console;
+
+use Patchwork\CodeManipulation as CM;
+
+error_reporting(E_ALL | E_STRICT);
+
+$argc > 2 && $argv[1] == 'prime'
+ or exit("\nUsage: php patchwork.phar prime DIR1 DIR2 ... DIRn\n" .
+ " (to recursively prime all PHP files under given directories)\n\n");
+
+try {
+ CM\cacheEnabled()
+ or exit("\nError: no cache location set.\n\n");
+} catch (Patchwork\Exceptions\CachePathUnavailable $e) {
+ exit("\nError: " . $e->getMessage() . "\n\n");
+}
+
+echo "\nCounting files...\n";
+
+$files = [];
+
+foreach (array_slice($argv, 2) as $path) {
+ $path = realpath($path);
+ foreach (new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($path)) as $file) {
+ if (substr($file, -4) == '.php' && !CM\internalToCache($file) && !CM\availableCached($file)) {
+ $files[] = $file;
+ }
+ }
+}
+
+$count = count($files);
+
+$count > 0 or exit("\nNothing to do.\n\n");
+
+echo "\nPriming ($count files total):\n";
+
+const CONSOLE_WIDTH = 80;
+
+$progress = 0;
+
+for ($i = 0; $i < $count; $i++) {
+ CM\prime($files[$i]->getRealPath());
+ while ((int) (($i + 1) / $count * CONSOLE_WIDTH) > $progress) {
+ echo '.';
+ $progress++;
+ }
+}
+
+echo "\n\n";
diff --git a/vendor/antecedent/patchwork/src/Exceptions.php b/vendor/antecedent/patchwork/src/Exceptions.php
new file mode 100644
index 00000000..c02c7df3
--- /dev/null
+++ b/vendor/antecedent/patchwork/src/Exceptions.php
@@ -0,0 +1,121 @@
+
+ * @copyright 2010-2018 Ignas Rudaitis
+ * @license http://www.opensource.org/licenses/mit-license.html
+ */
+namespace Patchwork\Exceptions;
+
+use Patchwork\Utils;
+
+abstract class Exception extends \Exception
+{
+}
+
+class NoResult extends Exception
+{
+}
+
+class StackEmpty extends Exception
+{
+ protected $message = "There are no calls in the dispatch stack";
+}
+
+abstract class CallbackException extends Exception
+{
+ function __construct($callback)
+ {
+ parent::__construct(sprintf($this->message, Utils\callableToString($callback)));
+ }
+}
+
+class NotUserDefined extends CallbackException
+{
+ protected $message = 'Please include {"redefinable-internals": ["%s"]} in your patchwork.json.';
+}
+
+class DefinedTooEarly extends CallbackException
+{
+
+ function __construct($callback)
+ {
+ $this->message = "The file that defines %s() was included earlier than Patchwork. " .
+ "This is likely a result of an improper setup; see readme for details.";
+ parent::__construct($callback);
+ }
+}
+
+class InternalMethodsNotSupported extends CallbackException
+{
+ protected $message = "Methods of internal classes (such as %s) are not yet redefinable in Patchwork 2.1.";
+}
+
+class InternalsNotSupportedOnHHVM extends CallbackException
+{
+ protected $message = "As of version 2.1, Patchwork cannot redefine internal functions and methods (such as %s) on HHVM.";
+}
+
+class CachePathUnavailable extends Exception
+{
+ function __construct($location)
+ {
+ parent::__construct(sprintf(
+ "The specified cache path is inexistent or read-only: %s",
+ $location
+ ));
+ }
+}
+
+class ConfigException extends Exception
+{
+}
+
+class ConfigMalformed extends ConfigException
+{
+ function __construct($file, $message)
+ {
+ parent::__construct(sprintf(
+ 'The configuration file %s is malformed: %s',
+ $file,
+ $message
+ ));
+ }
+}
+
+class ConfigKeyNotRecognized extends ConfigException
+{
+ function __construct($key, $list, $file)
+ {
+ parent::__construct(sprintf(
+ "The key '%s' in the configuration file %s was not recognized. " .
+ "You might have meant one of these: %s",
+ $key,
+ $file,
+ join(', ', $list)
+ ));
+ }
+}
+
+class CachePathConflict extends ConfigException
+{
+ function __construct($first, $second)
+ {
+ parent::__construct(sprintf(
+ "Detected configuration files provide conflicting cache paths: %s and %s",
+ $first,
+ $second
+ ));
+ }
+}
+
+class NewKeywordNotRedefinable extends ConfigException
+{
+ protected $message = 'Please set {"new-keyword-redefinable": true} to redefine instantiations';
+}
+
+class NonNullToVoid extends Exception
+{
+ protected $message = 'A redefinition of a void-typed callable attempted to return a non-null result';
+}
diff --git a/vendor/antecedent/patchwork/src/Redefinitions/LanguageConstructs.php b/vendor/antecedent/patchwork/src/Redefinitions/LanguageConstructs.php
new file mode 100644
index 00000000..66172661
--- /dev/null
+++ b/vendor/antecedent/patchwork/src/Redefinitions/LanguageConstructs.php
@@ -0,0 +1,76 @@
+
+ * @copyright 2010-2018 Ignas Rudaitis
+ * @license http://www.opensource.org/licenses/mit-license.html
+ */
+namespace Patchwork\Redefinitions\LanguageConstructs;
+
+function _echo($string)
+{
+ foreach (func_get_args() as $argument) {
+ echo $argument;
+ }
+}
+
+function _print($string)
+{
+ return print($string);
+}
+
+function _eval($code)
+{
+ return eval($code);
+}
+
+function _die($message = null)
+{
+ die($message);
+}
+
+function _exit($message = null)
+{
+ exit($message);
+}
+
+function _isset(&$lvalue)
+{
+ return isset($lvalue);
+}
+
+function _unset(&$lvalue)
+{
+ unset($lvalue);
+}
+
+function _empty(&$lvalue)
+{
+ return empty($lvalue);
+}
+
+function _require($path)
+{
+ return require($path);
+}
+
+function _require_once($path)
+{
+ return require_once($path);
+}
+
+function _include($path)
+{
+ return include($path);
+}
+
+function _include_once($path)
+{
+ return include_once($path);
+}
+
+function _clone($object)
+{
+ return clone $object;
+}
diff --git a/vendor/antecedent/patchwork/src/Stack.php b/vendor/antecedent/patchwork/src/Stack.php
new file mode 100644
index 00000000..aab8f040
--- /dev/null
+++ b/vendor/antecedent/patchwork/src/Stack.php
@@ -0,0 +1,95 @@
+
+ * @copyright 2010-2018 Ignas Rudaitis
+ * @license http://www.opensource.org/licenses/mit-license.html
+ */
+namespace Patchwork\Stack;
+
+use Patchwork\Exceptions;
+
+function push($offset, $calledClass, array $argsOverride = null)
+{
+ State::$items[] = [$offset, $calledClass, $argsOverride];
+}
+
+function pop()
+{
+ array_pop(State::$items);
+}
+
+function pushFor($offset, $calledClass, $callback, array $argsOverride = null)
+{
+ push($offset, $calledClass, $argsOverride);
+ try {
+ $callback();
+ } catch (\Exception $e) {
+ $exception = $e;
+ }
+ pop();
+ if (isset($exception)) {
+ throw $exception;
+ }
+}
+
+function top($property = null)
+{
+ $all = all();
+ $frame = reset($all);
+ $argsOverride = topArgsOverride();
+ if ($argsOverride !== null) {
+ $frame["args"] = $argsOverride;
+ }
+ if ($property) {
+ return isset($frame[$property]) ? $frame[$property] : null;
+ }
+ return $frame;
+}
+
+function topOffset()
+{
+ if (empty(State::$items)) {
+ throw new Exceptions\StackEmpty;
+ }
+ list($offset, $calledClass) = end(State::$items);
+ return $offset;
+}
+
+function topCalledClass()
+{
+ if (empty(State::$items)) {
+ throw new Exceptions\StackEmpty;
+ }
+ list($offset, $calledClass) = end(State::$items);
+ return $calledClass;
+}
+
+function topArgsOverride()
+{
+ if (empty(State::$items)) {
+ throw new Exceptions\StackEmpty;
+ }
+ list($offset, $calledClass, $argsOverride) = end(State::$items);
+ return $argsOverride;
+}
+
+function all()
+{
+ $backtrace = debug_backtrace();
+ return array_slice($backtrace, count($backtrace) - topOffset());
+}
+
+function allCalledClasses()
+{
+ return array_map(function($item) {
+ list($offset, $calledClass) = $item;
+ return $calledClass;
+ }, State::$items);
+}
+
+class State
+{
+ static $items = [];
+}
diff --git a/vendor/antecedent/patchwork/src/Utils.php b/vendor/antecedent/patchwork/src/Utils.php
new file mode 100644
index 00000000..c6f9261c
--- /dev/null
+++ b/vendor/antecedent/patchwork/src/Utils.php
@@ -0,0 +1,392 @@
+
+ * @copyright 2010-2018 Ignas Rudaitis
+ * @license http://www.opensource.org/licenses/mit-license.html
+ */
+namespace Patchwork\Utils;
+
+use Patchwork\Config;
+use Patchwork\CallRerouting;
+use Patchwork\CodeManipulation;
+
+const ALIASING_CODE = '
+ namespace %s;
+ function %s() {
+ return call_user_func_array("%s", func_get_args());
+ }
+';
+
+function clearOpcodeCaches()
+{
+ if (function_exists('opcache_reset')) {
+ opcache_reset();
+ }
+ if (ini_get('wincache.ocenabled')) {
+ wincache_refresh_if_changed();
+ }
+ if (ini_get('apc.enabled') && function_exists('apc_clear_cache')) {
+ apc_clear_cache();
+ }
+}
+
+function generatorsSupported()
+{
+ return version_compare(PHP_VERSION, "5.5", ">=");
+}
+
+function runningOnHHVM()
+{
+ return defined("HHVM_VERSION");
+}
+
+function condense($string)
+{
+ return preg_replace('/\s*/', '', $string);
+}
+
+function indexOfFirstGreaterThan(array $array, $value)
+{
+ $low = 0;
+ $high = count($array) - 1;
+ if (empty($array) || $array[$high] <= $value) {
+ return -1;
+ }
+ while ($low < $high) {
+ $mid = (int)(($low + $high) / 2);
+ if ($array[$mid] <= $value) {
+ $low = $mid + 1;
+ } else {
+ $high = $mid;
+ }
+ }
+ return $low;
+}
+
+function indexOfLastNotGreaterThan(array $array, $value)
+{
+ if (empty($array)) {
+ return -1;
+ }
+ $result = indexOfFirstGreaterThan($array, $value);
+ if ($result === -1) {
+ $result = count($array) - 1;
+ }
+ while ($array[$result] > $value) {
+ $result--;
+ }
+ return $result;
+}
+
+function firstGreaterThan(array $array, $value, $default = INF)
+{
+ $index = indexOfFirstGreaterThan($array, $value);
+ return ($index !== -1) ? $array[$index] : $default;
+}
+
+function lastNotGreaterThan(array $array, $value, $default = INF)
+{
+ $index = indexOfLastNotGreaterThan($array, $value);
+ return ($index !== -1) ? $array[$index] : $default;
+}
+
+function allWithinRange(array $array, $low, $high)
+{
+ $low--;
+ $high++;
+ $index = indexOfFirstGreaterThan($array, $low);
+ if ($index === -1) {
+ return [];
+ }
+ $result = [];
+ while ($index < count($array) && $array[$index] < $high) {
+ $result[] = $array[$index];
+ $index++;
+ }
+ return $result;
+}
+
+function interpretCallable($callback)
+{
+ if (is_object($callback)) {
+ return interpretCallable([$callback, "__invoke"]);
+ }
+ if (is_array($callback)) {
+ list($class, $method) = $callback;
+ $instance = null;
+ if (is_object($class)) {
+ $instance = $class;
+ $class = get_class($class);
+ }
+ $class = isset($class) ? ltrim($class, "\\") : '';
+ return [$class, $method, $instance];
+ }
+ if (substr($callback, 0, 4) === 'new ') {
+ return [ltrim(substr($callback, 4)), 'new', null];
+ }
+ $callback = ltrim($callback, "\\");
+ if (strpos($callback, "::")) {
+ list($class, $method) = explode("::", $callback);
+ return [$class, $method, null];
+ }
+ return [null, $callback, null];
+}
+
+function callableDefined($callable, $shouldAutoload = false)
+{
+ list($class, $method, $instance) = interpretCallable($callable);
+ if ($instance !== null) {
+ return true;
+ }
+ if (isset($class)) {
+ return classOrTraitExists($class, $shouldAutoload) &&
+ (method_exists($class, $method) || $method === 'new');
+ }
+ return function_exists($method);
+}
+
+function classOrTraitExists($classOrTrait, $shouldAutoload = true)
+{
+ return class_exists($classOrTrait, $shouldAutoload)
+ || trait_exists($classOrTrait, $shouldAutoload);
+}
+
+function append(&$array, $value)
+{
+ $array[] = $value;
+ end($array);
+ return key($array);
+}
+
+function appendUnder(&$array, $path, $value)
+{
+ foreach ((array) $path as $key) {
+ if (!isset($array[$key])) {
+ $array[$key] = [];
+ }
+ $array = &$array[$key];
+ }
+ return append($array, $value);
+}
+
+function access($array, $path, $default = null)
+{
+ foreach ((array) $path as $key) {
+ if (!isset($array[$key])) {
+ return $default;
+ }
+ $array = $array[$key];
+ }
+ return $array;
+}
+
+function normalizePath($path)
+{
+ return rtrim(strtr($path, "\\", "/"), "/");
+}
+
+function reflectCallable($callback)
+{
+ if ($callback instanceof \Closure) {
+ return new \ReflectionFunction($callback);
+ }
+ list($class, $method) = interpretCallable($callback);
+ if (isset($class)) {
+ return new \ReflectionMethod($class, $method);
+ }
+ return new \ReflectionFunction($method);
+}
+
+function callableToString($callback)
+{
+ list($class, $method) = interpretCallable($callback);
+ if (isset($class)) {
+ return $class . "::" . $method;
+ }
+ return $method;
+}
+
+function alias($namespace, array $mapping)
+{
+ foreach ($mapping as $original => $aliases) {
+ $original = ltrim(str_replace('\\', '\\\\', $namespace) . '\\\\' . $original, '\\');
+ foreach ((array) $aliases as $alias) {
+ eval(sprintf(ALIASING_CODE, $namespace, $alias, $original));
+ }
+ }
+}
+
+function getUserDefinedCallables()
+{
+ return array_merge(get_defined_functions()['user'], getUserDefinedMethods());
+}
+
+function getRedefinableCallables()
+{
+ return array_merge(getUserDefinedCallables(), Config\getRedefinableInternals());
+}
+
+function getUserDefinedMethods()
+{
+ static $result = [];
+ static $classCount = 0;
+ static $traitCount = 0;
+ $classes = getUserDefinedClasses();
+ $traits = getUserDefinedTraits();
+ if (runningOnHHVM()) {
+ # cannot rely on the order of get_declared_classes()
+ static $previousClasses = [];
+ static $previousTraits = [];
+ $newClasses = array_diff($classes, $previousClasses);
+ $newTraits = array_diff($traits, $previousTraits);
+ $previousClasses = $classes;
+ $previousTraits = $traits;
+ } else {
+ $newClasses = array_slice($classes, $classCount);
+ $newTraits = array_slice($traits, $traitCount);
+ }
+ foreach (array_merge($newClasses, $newTraits) as $newClass) {
+ foreach (get_class_methods($newClass) as $method) {
+ $result[] = $newClass . '::' . $method;
+ }
+ }
+ $classCount = count($classes);
+ $traitCount = count($traits);
+ return $result;
+}
+
+function getUserDefinedClasses()
+{
+ static $classCutoff;
+ $classes = get_declared_classes();
+ if (!isset($classCutoff)) {
+ $classCutoff = count($classes);
+ for ($i = 0; $i < count($classes); $i++) {
+ if ((new \ReflectionClass($classes[$i]))->isUserDefined()) {
+ $classCutoff = $i;
+ break;
+ }
+ }
+ }
+ return array_slice($classes, $classCutoff);
+}
+
+function getUserDefinedTraits()
+{
+ static $traitCutoff;
+ $traits = get_declared_traits();
+ if (!isset($traitCutoff)) {
+ $traitCutoff = count($traits);
+ for ($i = 0; $i < count($traits); $i++) {
+ $methods = get_class_methods($traits[$i]);
+ if (empty($methods)) {
+ continue;
+ }
+ list($first) = $methods;
+ if ((new \ReflectionMethod($traits[$i], $first))->isUserDefined()) {
+ $traitCutoff = $i;
+ break;
+ }
+ }
+ }
+ return array_slice($traits, $traitCutoff);
+}
+
+function matchWildcard($wildcard, array $subjects)
+{
+ $table = ['*' => '.*', '{' => '(', '}' => ')', ' ' => '', '\\' => '\\\\'];
+ $pattern = '/' . strtr($wildcard, $table) . '/i';
+ return preg_grep($pattern, $subjects);
+}
+
+function wildcardMatches($wildcard, $subject)
+{
+ return matchWildcard($wildcard, [$subject]) == [$subject];
+}
+
+function isOwnName($name)
+{
+ return stripos((string) $name, 'Patchwork\\') === 0
+ && stripos((string) $name, CallRerouting\INTERNAL_REDEFINITION_NAMESPACE . '\\') !== 0;
+}
+
+function isForeignName($name)
+{
+ return !isOwnName($name);
+}
+
+function markMissedCallables()
+{
+ State::$missedCallables = array_map('strtolower', getUserDefinedCallables());
+}
+
+function getMissedCallables()
+{
+ return State::$missedCallables;
+}
+
+function callableWasMissed($name)
+{
+ return in_array(strtolower($name), getMissedCallables());
+}
+
+function endsWith($haystack, $needle)
+{
+ if (strlen($haystack) === strlen($needle)) {
+ return $haystack === $needle;
+ }
+ if (strlen($haystack) < strlen($needle)) {
+ return false;
+ }
+ return substr($haystack, -strlen($needle)) === $needle;
+}
+
+function wasRunAsConsoleApp()
+{
+ global $argv;
+ return isset($argv) && (
+ endsWith($argv[0], 'patchwork.phar') || endsWith($argv[0], 'Patchwork.php')
+ );
+}
+
+function getParameterAndArgumentLists(\ReflectionMethod $reflection = null)
+{
+ $parameters = [];
+ $arguments = [];
+ if ($reflection) {
+ foreach ($reflection->getParameters() as $p) {
+ $parameter = '$' . $p->name;
+ if ($p->isOptional()) {
+ try {
+ $value = var_export($p->getDefaultValue(), true);
+ } catch (\ReflectionException $e) {
+ $value = var_export(CallRerouting\INSTANTIATOR_DEFAULT_ARGUMENT, true);
+ }
+ $parameter .= ' = ' . $value;
+ }
+ $parameters[] = $parameter;
+ $arguments[] = '$' . $p->name;
+ }
+ }
+ return [join(', ' , $parameters), join(', ', $arguments)];
+}
+
+function args()
+{
+ return func_get_args();
+}
+
+function tokenize($string)
+{
+ if (defined('TOKEN_PARSE')) {
+ return token_get_all($string, TOKEN_PARSE);
+ }
+ return token_get_all($string);
+}
+
+class State
+{
+ static $missedCallables = [];
+}
diff --git a/vendor/automattic/vipwpcs/CHANGELOG.md b/vendor/automattic/vipwpcs/CHANGELOG.md
new file mode 100644
index 00000000..b3a805c8
--- /dev/null
+++ b/vendor/automattic/vipwpcs/CHANGELOG.md
@@ -0,0 +1,589 @@
+# Change Log for VIP Coding Standards
+
+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).
+
+## [2.3.3] - 2021-09-29
+
+Props: gudmdharalds, jrfnl, BrookeDot, rebeccahum
+
+## Changed
+- [#690](https://github.com/Automattic/VIP-Coding-Standards/pull/690): Ruleset: do not flag undefined variables in file scope or unused variables before require statement.
+- [#691](https://github.com/Automattic/VIP-Coding-Standards/pull/691): Composer: use VariableAnalysis 2.11.1.
+- [#694](https://github.com/Automattic/VIP-Coding-Standards/pull/694): PHPCS: enable caching for quicker scanning.
+- [#697](https://github.com/Automattic/VIP-Coding-Standards/pull/697): ProperEscapingFunction: upgrade htmlAttrNotByEscHTML to default severity level.
+
+## Removed
+- [#692](https://github.com/Automattic/VIP-Coding-Standards/pull/692): RestrictedFunctions: remove dbDelta group.
+
+## [2.3.2] - 2021-04-28
+
+Props: jrfnl
+
+### Fixed
+- [#681](https://github.com/Automattic/VIP-Coding-Standards/pull/681): ProperEscapingFunction: improve attribute matching accuracy for notAttrEscAttr.
+
+## [2.3.1] - 2021-04-23
+
+Props: jrfnl
+
+### Fixed
+- [#668](https://github.com/Automattic/VIP-Coding-Standards/pull/668): ProperEscapingFunction: fix overreach of comma usage in non-echo expressions for notAttrEscAttr.
+- [#670](https://github.com/Automattic/VIP-Coding-Standards/pull/670): ProperEscapingFunction: improve "action" match precision for hrefSrcEscUrl.
+
+### Deprecated
+- [#670](https://github.com/Automattic/VIP-Coding-Standards/pull/670): ProperEscapingFunction: private properties `$url_attrs` and `$attr_endings` are deprecated along with the public methods `is_html_attr()` and `attr_expects_url()`.
+
+## [2.3.0] - 2021-04-19
+
+Props: jrfnl, rebeccahum, kevinfodness, GaryJones.
+
+** There is a minor breaking change in the ProperEscapingFunction sniff from PR [#624](https://github.com/Automattic/VIP-Coding-Standards/pull/624). The `escaping_function` property can no longer be overruled via custom rulesets. Please remove any usages of the property in custom rulesets.
+
+** Composer now requires the [phpcodesniffer-composer-installer](https://github.com/Dealerdirect/phpcodesniffer-composer-installer) plugin per [#583](https://github.com/Automattic/VIP-Coding-Standards/pull/583). Note: If you either include it in the "require-dev" of your `composer.json`, use another Composer PHPCS plugin, or run bash commands to register PHPCS standards, please remove it from those sources to prevent interferences or version constraint conflicts.
+
+### Added
+- [#581](https://github.com/Automattic/VIP-Coding-Standards/pull/581): AlwaysReturnInFilter: flag abstract methods for manual inspection.
+- [#583](https://github.com/Automattic/VIP-Coding-Standards/pull/583): Composer: require phpcs-composer-installer plugin.
+- [#586](https://github.com/Automattic/VIP-Coding-Standards/pull/586): IncludingNonPHPFile: recognition of .phar file extensions.
+- [#589](https://github.com/Automattic/VIP-Coding-Standards/pull/589): WPQueryParams: flags 'exclude' array key.
+- [#595](https://github.com/Automattic/VIP-Coding-Standards/pull/595): Underscorejs: checks for additional print syntaxes and now throws an additional error for each occurrence of unescaped notation.
+- [#624](https://github.com/Automattic/VIP-Coding-Standards/pull/624): ProperEscapingFunction: account for additional escaping functions and check for `esc_attr()` usage in non-HTML attributes.
+- [#638](https://github.com/Automattic/VIP-Coding-Standards/pull/638): IncludingFile: new public property `$allowedKeywords` for allowing custom partial keywords in constants to reduce false positives.
+
+### Changed
+- [#586](https://github.com/Automattic/VIP-Coding-Standards/pull/586): IncludingNonPHPFile: various performance improvements.
+- [#587](https://github.com/Automattic/VIP-Coding-Standards/pull/587): LowExpiryCacheTime: new warning added for manual inspection along with various improvements.
+- [#592](https://github.com/Automattic/VIP-Coding-Standards/pull/592): DynamicCalls: various improvements.
+- [#595](https://github.com/Automattic/VIP-Coding-Standards/pull/595): Underscorejs: various improvements.
+- [#618](https://github.com/Automattic/VIP-Coding-Standards/pull/618): RestrictedFunctions: upgrade setcookie() to error at sniff level and remove Batcache references from messaging.
+- [#620](https://github.com/Automattic/VIP-Coding-Standards/pull/620): Ruleset: silence UnusedVariable from VariableAnalysis to reduce noise.
+- [#630](https://github.com/Automattic/VIP-Coding-Standards/pull/630): VariableAnalysis: fix incompatibility for VariableAnalysis standard with previously deprecated native VIPCS sniff.
+- [#639](https://github.com/Automattic/VIP-Coding-Standards/pull/639): RestrictedFunctions: remove site_option group.
+- [#644](https://github.com/Automattic/VIP-Coding-Standards/pull/644): RestrictedFunctions: remove wp_cache_get_multi group.
+- [#645](https://github.com/Automattic/VIP-Coding-Standards/pull/645): Ruleset: silence WordPress.WP.AlternativeFunctions.file_system_read_readfile.
+- [#646](https://github.com/Automattic/VIP-Coding-Standards/pull/646): Ruleset: silence WordPress.WP.AlternativeFunctions.file_system_read_fclose.
+- [#647](https://github.com/Automattic/VIP-Coding-Standards/pull/647): RestrictedFunctions: remove get_super_admins group.
+- [#649](https://github.com/Automattic/VIP-Coding-Standards/pull/649): RestrictedFunctions: downgrade switch_to_blog() to warning and change messaging.
+- [#652](https://github.com/Automattic/VIP-Coding-Standards/pull/652): RestrictedFunctions/RestrictedVariables: remove usermeta related errors.
+
+### Fixed
+- [#444](https://github.com/Automattic/VIP-Coding-Standards/pull/444): ConstantString: only error when a plain constant is passed as constant name parameter.
+- [#581](https://github.com/Automattic/VIP-Coding-Standards/pull/581): AlwaysReturnInFilter: fix runtime failure on abstract methods.
+- [#584](https://github.com/Automattic/VIP-Coding-Standards/pull/584): Performance: more selective sniffing for efficiency.
+- [#586](https://github.com/Automattic/VIP-Coding-Standards/pull/586): IncludingNonPHPFile: various bug fixes such as recognition of interpolated strings and case insensitivity in file extensions.
+- [#587](https://github.com/Automattic/VIP-Coding-Standards/pull/587): LowExpiryCacheTime: allow arithmetic operators, simple floats, numerical strings, zeroes and parentheses in calculations, and FQN time constants.
+- [#592](https://github.com/Automattic/VIP-Coding-Standards/pull/592): DynamicCalls: ignore comments, allow double quotes and remove potential memory leak.
+- [#595](https://github.com/Automattic/VIP-Coding-Standards/pull/595): Underscorejs: fixed false positive for when a variable is `_.escape()`-ed.
+- [#624](https://github.com/Automattic/VIP-Coding-Standards/pull/624): ProperEscapingFunction: slash escaped quotes and non-quoted strings in HTML attributes are now parsed as expected.
+
+### Removed
+- [#624](https://github.com/Automattic/VIP-Coding-Standards/pull/624): ProperEscapingFunction: remove `$escaping_functions` public property.
+
+### Maintenance
+- [#582](https://github.com/Automattic/VIP-Coding-Standards/pull/582): CI: re-try composer install on failure.
+- [#599](https://github.com/Automattic/VIP-Coding-Standards/pull/599): CI: add build against PHP 8.
+- [#606](https://github.com/Automattic/VIP-Coding-Standards/pull/606): Ruleset: remove redundant rule ref.
+- [#607](https://github.com/Automattic/VIP-Coding-Standards/pull/607): Ruleset: remove redundant rule ref.
+- [#608](https://github.com/Automattic/VIP-Coding-Standards/pull/608): Ruleset: remove duplicate rule ref.
+- [#611](https://github.com/Automattic/VIP-Coding-Standards/pull/611): Ruleset: remove redundant notice type declaration.
+- [#617](https://github.com/Automattic/VIP-Coding-Standards/pull/617): Ruleset: remove redundant notice type declaration.
+- [#619](https://github.com/Automattic/VIP-Coding-Standards/pull/619): Docs: Update links to wpvip.com.
+- [#631](https://github.com/Automattic/VIP-Coding-Standards/pull/631): QA: remove unused use statements.
+- [#632](https://github.com/Automattic/VIP-Coding-Standards/pull/632): Docs: various minor improvements (typos, alignment and code examples).
+- [#633](https://github.com/Automattic/VIP-Coding-Standards/pull/633): CI: switch to GitHub Actions.
+- [#635](https://github.com/Automattic/VIP-Coding-Standards/pull/635): Ruleset: remove redundant rule ref.
+- [#653](https://github.com/Automattic/VIP-Coding-Standards/pull/653): CI: use parallel linting of PHP files.
+- [#655](https://github.com/Automattic/VIP-Coding-Standards/pull/655): QA: remove redundant ignore annotations.
+- [#656](https://github.com/Automattic/VIP-Coding-Standards/pull/656): CI: always check that sniffs are feature complete.
+- [#657](https://github.com/Automattic/VIP-Coding-Standards/pull/657): CI: add "quicktest" stage for non-PR/merge builds.
+- [#658](https://github.com/Automattic/VIP-Coding-Standards/pull/658): Release template: add checkbox for dependency check.
+
+## [2.2.0] - 2020-09-09
+
+Props: GaryJones, jrfnl, rebeccahum.
+
+Technically, there's a breaking change due to the use of the VariableAnalysis package over the previous sniff. If you have `WordPressVIPMinimum.Variables.Variables` references in your PHPCS config file or in inline ignore comments, then these will need to be updated to `VariableAnalysis.CodeAnalysis.VariableAnalysis`.
+
+### Added
+- [#494](https://github.com/Automattic/VIP-Coding-Standards/pull/494): `.gitattributes` file.
+- [#495](https://github.com/Automattic/VIP-Coding-Standards/pull/495): `CODEOWNERS` file.
+- [#450](https://github.com/Automattic/VIP-Coding-Standards/pull/450): [VariableAnalysis](https://github.com/sirbrillig/phpcs-variable-analysis/) package.
+- [#560](https://github.com/Automattic/VIP-Coding-Standards/pull/560): Allow checking test code coverage.
+- [#579](https://github.com/Automattic/VIP-Coding-Standards/pull/560): Docs: Add comparisons and props to change log for old versions.
+
+### Changed
+- [#500](https://github.com/Automattic/VIP-Coding-Standards/pull/500): Travis: change from "trusty" to "xenial".
+- [#501](https://github.com/Automattic/VIP-Coding-Standards/pull/501): Move and improve `CONTRIBUTING.md`.
+- [#502](https://github.com/Automattic/VIP-Coding-Standards/pull/502): CS Ruleset: minor tweaks.
+- [#508](https://github.com/Automattic/VIP-Coding-Standards/pull/508): RulesetTest: don't use the system default version of PHP.
+- [#558](https://github.com/Automattic/VIP-Coding-Standards/pull/558): Test bootstrap: various minor tweaks.
+- [#571](https://github.com/Automattic/VIP-Coding-Standards/pull/571): CS: change yoda conditions to non-yoda.
+- [#573](https://github.com/Automattic/VIP-Coding-Standards/pull/573): Composer: Change minimum stability to stable.
+
+### Fixed
+- [#503](https://github.com/Automattic/VIP-Coding-Standards/pull/503): RulesetTest, fix compatibility with Windows.
+- [#504](https://github.com/Automattic/VIP-Coding-Standards/pull/504): RulesetTest: fail the build on failing ruleset tests, fix the failing ruleset test, and fix the test script to handle 0 values.
+- [#505](https://github.com/Automattic/VIP-Coding-Standards/pull/505): DeclarationCompatibility: fix incorrect signature check for `Walker::walk()`.
+- [#509](https://github.com/Automattic/VIP-Coding-Standards/pull/509): RulesetTest: Revert #485 and fix one of the three causes properly.
+- [#559](https://github.com/Automattic/VIP-Coding-Standards/pull/559): Variables/RestrictedVariables: fix namespace of unit test file, fix the test.
+- [#561](https://github.com/Automattic/VIP-Coding-Standards/pull/561): Functions/RestrictedFunctions: fix false positive on class instantiation.
+- [#563](https://github.com/Automattic/VIP-Coding-Standards/pull/563): Hooks/AlwaysReturnInFilter: add support for hook-ins using short arrays.
+- [#564](https://github.com/Automattic/VIP-Coding-Standards/pull/564): Hooks/PreGetPosts: add support for hook-ins using short arrays.
+- [#565](https://github.com/Automattic/VIP-Coding-Standards/pull/565): PreGetPosts: improve the `isEarlyMainQueryCheck()` method.
+- [#566](https://github.com/Automattic/VIP-Coding-Standards/pull/566): RestrictedFunctions: fix false negative - functions in `config_settings` would never match.
+- [#569](https://github.com/Automattic/VIP-Coding-Standards/pull/569): RestrictedVariables: don't report on "use" in `isset()`.
+- [#575](https://github.com/Automattic/VIP-Coding-Standards/pull/575): ProperEscaping: Fix message for action attribute.
+- [#576](https://github.com/Automattic/VIP-Coding-Standards/pull/576): Docs: Update notes for releasing.
+
+### Deprecated
+- [#450](https://github.com/Automattic/VIP-Coding-Standards/pull/450): Deprecate Variables/VariableAnalysisSniff. Will be removed in the next major release.
+
+## [2.1.0] - 2020-07-07
+
+Bumps requirements to PHPCS 3.5.5+ and WPCS 2.3.0+.
+
+Props: GaryJones, jenkoian, kevinfodness, rebeccahum.
+
+### Added
+- `get_page_by_path()` restricted function warning, to suggest `wpcom_vip_get_page_by_path()` function.
+- `stats_get_csv()` restricted function error, since this is a Jetpack-only function.
+- Expanded list of HTMLExecutingFunctions to include `after`, `appendTo`, `before`, `insertAfter`, `insertBefore`, `prepend`, `prependTo`, `replaceAll` and `replaceWith`.
+- Support PHP 5.4+ (down from 5.6+).
+- PHP 8 nightly testing.
+
+### Changed
+- Expand message for `wp_remote_get()` usage.
+- Downgrade `append()` usage violation from Error to Warning for VIP Go, to be consistent with the other HTMLExecutingFunctions.
+- Downgrade AdminBarRemoval sniff from Error to Warning for VIP Go.
+- Add `get_parent_theme_file_path()` to safelist of path functions for `WordPressVIPMinimum.Files.IncludingFile` sniff.
+- Allow short array syntax and fix tests within the VIPCS own coding standards.
+- Update issue templates.
+
+### Fixed
+- Use new `WordPress.DateTime.RestrictedFunctions` sniff instead of deprecated `WordPress.WP.TimezoneChange`.
+- Fixed warnings and information items in Travis.
+
+### Removed
+- `get_super_admins()` restricted function rule for VIP Go.
+- `WordPressVIPMinimum.VersionControl.MergeConflict` sniff in favour of `Generic.VersionControl.GitMergeConflict`.
+
+## [2.0.0] - 2019-07-12
+
+This release switches from having WPCS `1.*` as a dependency, to WPCS `2.*`. It is not compatible with WPCS `1.*`.
+
+The sniffs in WPCS `2.*` are more accurate, so you may see new violations there weren't being reported before, and a reduction in violations for false positives.
+
+Props: GaryJones, hanifn, paulscreiber, rebeccahum, tomjn.
+
+### Added
+- Switch to using WPCS `2.*`.
+ - Remove reference to WPCS's `PHPAliases.php`.
+ - Remove WPCS `1.*`'s `WordPress.VIP` references from rulesets.
+ - Bump PHPCS minimum required version to 3.3.1.
+ - Update the WPCS namespace.
+ - Update ruleset and ruleset test to account for WPCS 2's switch to `WordPress.PHP.IniSet` sniff.
+ - Update ruleset test for WPCS security sniffs.
+ - Update `DiscouragedPHPFunctions` group exclusion in `WordPressVIPMinimum` ruleset.
+
+### Changed
+- Downgrade use of file operation functions from Error to Warning:
+ - `delete`
+ - `file_put_contents`
+ - `flock`
+ - `fputcsv`
+ - `fputs`
+ - `fwrite`
+ - `ftruncate`
+ - `is_writable`
+ - `is_writeable`
+ - `link`
+ - `rename`
+ - `symlink`
+ - `tempnam`
+ - `touch`
+ - `unlink`
+ - `fclose`
+ - `fopen`
+ - `file_get_contents`
+- Simplify Travis config.
+- Switch references from `vip.wordpress.com` to `wpvip.com`.
+- Documentation updates.
+- Switch development to a `git-flow` workflow.
+
+## Fixed
+- Fixed CS violations in VIPCS code.
+
+## [1.0.0] - 2019-04-24
+
+This release contains many breaking changes.
+
+It requires PHP `>= 5.6`, PHPCS `3.2.3+`, and WPCS `1.*`. It does not work with WPCS `2.*`.
+
+Props: GaryJones, rebeccahum, whyisjake, WPprodigy.
+
+### Reorganisation and Renaming
+The sniffs in VIPCS have been reorganised into different categories, with new sniff names and new violation codes. The changes are detailed in the table below. If you reference any of the old violations in your custom ruleset (to change severity, type, or message), or with `// phpcs:ignore` or `// phpcs:disable`, you will need to updates these references to the new violation codes.
+
+| Original Violation | New Violation |
+|--------------------|---------------|
+| `WordPressVIPMinimum.Actions.PreGetPostSniff.PreGetPosts` | `WordPressVIPMinimum.Hooks.PreGetPosts.PreGetPosts` |
+| `WordPressVIPMinimum.Cache.BatcacheWhitelistedParams.strippedGetParam` | `WordPressVIPMinimum.Performance.BatcacheWhitelistedParams.StrippedGetParam` |
+| `WordPressVIPMinimum.Cache.CacheValueOverride.CacheValueOverride` | `WordPressVIPMinimum.Performance.CacheValueOverride.CacheValueOverride` |
+| `WordPressVIPMinimum.Cache.LowExpiryCacheTime.LowCacheTime` | `WordPressVIPMinimum.Performance.LowExpiryCacheTime.LowCacheTime` |
+| `WordPressVIPMinimum.Classes.DeclarationCompatibility.DeclarationCompatibility` | No change |
+| `WordPressVIPMinimum.Classes.RestrictedExtendClasses.wp_cli_wp_cli_command` | `WordPressVIPMinimum.Classes.RestrictedExtendClasses.wp_cli` |
+| `WordPressVIPMinimum.Constants.ConstantsRestrictions.ConstantRestrictions` | `WordPressVIPMinimum.Constants.RestrictedConstants.DefiningRestrictedConstant` `WordPressVIPMinimum.Constants.RestrictedConstants.UsingRestrictedConstant` |
+| `WordPressVIPMinimum.Constants.ConstantString.NotCheckingConstantName` | No change |
+| `WordPressVIPMinimum.Files.IncludingFile.IncludingFile` | `WordPressVIPMinimum.Files.IncludingFile.UsingVariable` `WordPressVIPMinimum.Files.IncludingFile.UsingCustomConstant` `WordPressVIPMinimum.Files.IncludingFile.UsingCustomFunction` `WordPressVIPMinimum.Files.IncludingFile.NotAbsolutePath` `WordPressVIPMinimum.Files.IncludingFile.ExternalURL` `WordPressVIPMinimum.Files.IncludingFile.RestrictedConstant` |
+| `WordPressVIPMinimum.Files.IncludingNonPHPFile.IncludingSVGCSSFile` | `WordPressVIPMinimum.Files.IncludingNonPHPFile.IncludingSVGCSSFile` |
+| `WordPressVIPMinimum.Files.IncludingNonPHPFile.IncludingNonPHPFile` | `WordPressVIPMinimum.Files.IncludingNonPHPFile.IncludingNonPHPFile` |
+| `WordPressVIPMinimum.Filters.AlwaysReturn.voidReturn` | `WordPressVIPMinimum.Hooks.AlwaysReturnInFilter.VoidReturn` |
+| `WordPressVIPMinimum.Filters.AlwaysReturn.missingReturnStatement` | `WordPressVIPMinimum.Hooks.AlwaysReturnInFilter.MissingReturnStatement` |
+| `WordPressVIPMinimum.Filters.RestrictedHook.UploadMimes` | `WordPressVIPMinimum.Hooks.RestrictedHooks.upload_mimes_upload_mimes` |
+| `WordPressVIPMinimum.Filters.RestrictedHook.HighTimeout` | `WordPressVIPMinimum.Hooks.RestrictedHooks.http_request_http_request_args` `WordPressVIPMinimum.Hooks.RestrictedHooks.http_request_http_request_timeout` |
+| `WordPressVIPMinimum.Functions.CheckReturnValue.CheckReturnValue` | `WordPressVIPMinimum.Functions.CheckReturnValue.DirectFunctionCall` `WordPressVIPMinimum.Functions.CheckReturnValue.NonCheckedVariable` |
+| `WordPressVIPMinimum.Functions.CreateFunction.CreateFunction` | `WordPressVIPMinimum.Functions.RestrictedFunctions.create_function_create_function` |
+| `WordPressVIPMinimum.Functions.DynamicCalls.DynamicCalls` | No change |
+| `WordPressVIPMinimum.Functions.StripTags.StripTagsOneParameter` | No change |
+| `WordPressVIPMinimum.Functions.StripTags.StripTagsTwoParameters` | No change |
+| `WordPressVIPMinimum.JS.DangerouslySetInnerHTML.dangerouslySetInnerHTML` | `WordPressVIPMinimum.JS.DangerouslySetInnerHTML.Found` |
+| `WordPressVIPMinimum.JS.HTMLExecutingFunctions.html` | No change |
+| `WordPressVIPMinimum.JS.HTMLExecutingFunctions.append` | No change |
+| `WordPressVIPMinimum.JS.HTMLExecutingFunctions.write` | No change |
+| `WordPressVIPMinimum.JS.HTMLExecutingFunctions.writeln` | No change |
+| `WordPressVIPMinimum.JS.InnerHTML.innerHTML` | `WordPressVIPMinimum.JS.InnerHTML.Found` |
+| `WordPressVIPMinimum.JS.StringConcat.StringConcatNext` | `WordPressVIPMinimum.JS.StringConcat.Found` |
+| `WordPressVIPMinimum.JS.StrippingTags.VulnerableTagStripping` | No change |
+| `WordPressVIPMinimum.JS.Window.VarAssignment` | No change |
+| `WordPressVIPMinimum.JS.Window.location` | No change |
+| `WordPressVIPMinimum.JS.Window.name` | No change |
+| `WordPressVIPMinimum.JS.Window.status` | No change |
+| `WordPressVIPMinimum.Plugins.Zoninator.Zoninator` | `WordPressVIPMinimum.Compatibility.Zoninator.RequiresRESTAPI` |
+| `WordPressVIPMinimum.TemplatingEngines.UnescapedOutputMustache.{{{` | `WordPressVIPMinimum.Security.Mustache.OutputNotation` |
+| `WordPressVIPMinimum.TemplatingEngines.UnescapedOutputMustache.{{&` | `WordPressVIPMinimum.Security.Mustache.VariableNotation` |
+| `WordPressVIPMinimum.TemplatingEngines.UnescapedOutputMustache.delimeterChange` | `WordPressVIPMinimum.Security.Mustache.DelimiterChange` |
+| `WordPressVIPMinimum.TemplatingEngines.UnescapedOutputMustache.SafeString` | `WordPressVIPMinimum.Security.Mustache.SafeString` |
+| `WordPressVIPMinimum.TemplatingEngines.UnescapedOutputTwig.autoescape false` | `WordPressVIPMinimum.Security.Twig.AutoescapeFalse` |
+| `WordPressVIPMinimum.TemplatingEngines.UnescapedOutputTwig.raw` | `WordPressVIPMinimum.Security.Twig.RawFound` |
+| `WordPressVIPMinimum.TemplatingEngines.UnescapedOutputUnderscorejs.<%=` | `WordPressVIPMinimum.Security.Underscorejs.OutputNotation` |
+| `WordPressVIPMinimum.TemplatingEngines.UnescapedOutputUnderscorejs.interpolate` | `WordPressVIPMinimum.Security.Underscorejs.InterpolateFound` |
+| `WordPressVIPMinimum.TemplatingEngines.UnescapedOutputVuejs.v-html` | `WordPressVIPMinimum.Security.Vuejs.Found` |
+| `WordPressVIPMinimum.Variables.ServerVariables.BasicAuthentication` | No change |
+| `WordPressVIPMinimum.Variables.ServerVariables.UserControlledHeaders` | No change |
+| `WordPressVIPMinimum.Variables.VariableAnalysis.VariableRedeclaration` | No change |
+| `WordPressVIPMinimum.Variables.VariableAnalysis.UndefinedVariables` | `WordPressVIPMinimum.Variables.VariableAnalysis.UndefinedVariable` |
+| `WordPressVIPMinimum.Variables.VariableAnalysis.$...` | `WordPressVIPMinimum.Variables.VariableAnalysis.SelfInsideClosure` `WordPressVIPMinimum.Variables.VariableAnalysis.SelfOutsideClass` `WordPressVIPMinimum.Variables.VariableAnalysis.StaticInsideClosure` `WordPressVIPMinimum.Variables.VariableAnalysis.StaticOutsideClass` |
+| `WordPressVIPMinimum.Variables.VariableAnalysis.UnusedVariable` | No change |
+| `WordPressVIPMinimum.VIP.ErrorControl.ErrorControl` | Replaced with `Generic.PHP.NoSilencedErrors` |
+| `WordPressVIPMinimum.VIP.EscapingVoidReturnFunctions.escapingVoidReturningFunction` | `WordPressVIPMinimum.Security.EscapingVoidReturnFunctions.Found` |
+| `WordPressVIPMinimum.VIP.ExitAfterRedirect.NoExitInConditional` | `WordPressVIPMinimum.Security.ExitAfterRedirect.NoExitInConditional` |
+| `WordPressVIPMinimum.VIP.ExitAfterRedirect.NoExit` | `WordPressVIPMinimum.Security.ExitAfterRedirect.NoExit` |
+| `WordPressVIPMinimum.VIP.FetchingRemoteData.fileGetContentsUknown` | `WordPressVIPMinimum.Performance.FetchingRemoteData.FileGetContentsUnknown` |
+| `WordPressVIPMinimum.VIP.FetchingRemoteData.fileGetContentsRemoteFile` | `WordPressVIPMinimum.Performance.FetchingRemoteData.FileGetContentsRemoteFile` |
+| `WordPressVIPMinimum.VIP.FlushRewriteRules.FlushRewriteRules` | Replaced with `WordPressVIPMinimum.Functions.RestrictedFunctions.flush_rewrite_rules_flush_rewrite_rules` and `WordPressVIPMinimum.Functions.RestrictedFunctions.flush_rewrite_rules_flush_rewrite_rules` |
+| `WordPressVIPMinimum.VIP.MergeConflict.HEAD` | `WordPressVIPMinimum.MergeConflict.MergeConflict.Start` |
+| `WordPressVIPMinimum.VIP.MergeConflict.DELIMITER` | `WordPressVIPMinimum.MergeConflict.MergeConflict.End` `WordPressVIPMinimum.MergeConflict.MergeConflict.Separator` |
+| `WordPressVIPMinimum.VIP.PHPFilterFunctions.MissingThirdParameter` | `WordPressVIPMinimum.Security.PHPFilterFunctions.MissingThirdParameter` |
+| `WordPressVIPMinimum.VIP.PHPFilterFunctions.RestrictedFilter` | `WordPressVIPMinimum.Security.PHPFilterFunctions.RestrictedFilter` |
+| `WordPressVIPMinimum.VIP.PHPFilterFunctions.MissingSecondParameter` | `WordPressVIPMinimum.Security.PHPFilterFunctions.MissingSecondParameter` |
+| `WordPressVIPMinimum.VIP.ProperEscapingFunction.hrefSrcEscUrl` | `WordPressVIPMinimum.Security.ProperEscapingFunction.hrefSrcEscUrl` |
+| `WordPressVIPMinimum.VIP.ProperEscapingFunction.htmlAttrNotByEscHTML` | `WordPressVIPMinimum.Security.ProperEscapingFunction.htmlAttrNotByEscHTML` |
+| `WordPressVIPMinimum.VIP.RegexpCompare.compare_compare` | `WordPressVIPMinimum.Performance.RegexCompare.compare_compare` |
+| `WordPressVIPMinimum.VIP.RegexpCompare.compare_meta_compare` | `WordPressVIPMinimum.Performance.RegexCompare.compare_meta_compare` |
+| `WordPressVIPMinimum.VIP.RemoteRequestTimeout.timeout_timeout` | `WordPressVIPMinimum.Performance.RemoteRequestTimeout.timeout_timeout` |
+| `WordPressVIPMinimum.VIP.RestrictedFunctions.wp_cache_get_multi.wp_cache_get_multi` | `WordPressVIPMinimum.Functions.RestrictedFunctions.wp_cache_get_multi_wp_cache_get_multi` |
+| `WordPressVIPMinimum.VIP.RestrictedFunctions.opcache_opcache_reset` | `WordPressVIPMinimum.Functions.RestrictedFunctions.opcache_opcache_reset` |
+| `WordPressVIPMinimum.VIP.RestrictedFunctions.opcache_opcache_invalidate` | `WordPressVIPMinimum.Functions.RestrictedFunctions.opcache_opcache_invalidate` |
+| `WordPressVIPMinimum.VIP.RestrictedFunctions.opcache_opcache_compile_file` | `WordPressVIPMinimum.Functions.RestrictedFunctions.opcache_opcache_compile_file` |
+| `WordPressVIPMinimum.VIP.RestrictedFunctions.config_settings_opcache_is_script_cached` | `WordPressVIPMinimum.Functions.RestrictedFunctions.config_settings_opcache_is_script_cached` |
+| `WordPressVIPMinimum.VIP.RestrictedFunctions.config_settings_opcache_get_status` | `WordPressVIPMinimum.Functions.RestrictedFunctions.config_settings_opcache_get_status` |
+| `WordPressVIPMinimum.VIP.RestrictedFunctions.config_settings_opcache_get_configuration` | `WordPressVIPMinimum.Functions.RestrictedFunctions.config_settings_opcache_get_configuration` |
+| `WordPressVIPMinimum.VIP.RestrictedFunctions.get_super_admins_get_super_admins` | `WordPressVIPMinimum.Functions.RestrictedFunctions.get_super_admins_get_super_admins` |
+| `WordPressVIPMinimum.VIP.RestrictedFunctions.internal_wpcom_vip_irc` | `WordPressVIPMinimum.Functions.RestrictedFunctions.internal_wpcom_vip_irc` |
+| `WordPressVIPMinimum.VIP.RestrictedFunctions.rewrite_rules_flush_rewrite_rules` | `WordPressVIPMinimum.Functions.RestrictedFunctions.flush_rewrite_rules_flush_rewrite_rules` |
+| `WordPressVIPMinimum.VIP.RestrictedFunctions.attachment_url_to_postid_attachment_url_to_postid` | `WordPressVIPMinimum.Functions.RestrictedFunctions.attachment_url_to_postid_attachment_url_to_postid` |
+| `WordPressVIPMinimum.VIP.RestrictedFunctions.dbDelta_dbDelta` | `WordPressVIPMinimum.Functions.RestrictedFunctions.dbDelta_dbDelta` |
+| `WordPressVIPMinimum.VIP.RestrictedFunctions.switch_to_blog_switch_to_blog` | `WordPressVIPMinimum.Functions.RestrictedFunctions.switch_to_blog_switch_to_blog` |
+| `WordPressVIPMinimum.VIP.RestrictedFunctions.get_page_by_title_get_page_by_title` | `WordPressVIPMinimum.Functions.RestrictedFunctions.get_page_by_title_get_page_by_title` |
+| `WordPressVIPMinimum.VIP.RestrictedFunctions.url_to_postid_url_to_postid` | `WordPressVIPMinimum.Functions.RestrictedFunctions.url_to_postid_url_to_postid` |
+| `WordPressVIPMinimum.VIP.RestrictedFunctions.url_to_postid_url_to_post_id` | Removed |
+| `WordPressVIPMinimum.VIP.RestrictedFunctions.custom_role_add_role` | `WordPressVIPMinimum.Functions.RestrictedFunctions.custom_role_add_role` |
+| `WordPressVIPMinimum.VIP.RestrictedFunctions.user_meta_get_user_meta` | `WordPressVIPMinimum.Functions.RestrictedFunctions.user_meta_get_user_meta` |
+| `WordPressVIPMinimum.VIP.RestrictedFunctions.user_meta_update_user_meta` | `WordPressVIPMinimum.Functions.RestrictedFunctions.user_meta_update_user_meta` |
+| `WordPressVIPMinimum.VIP.RestrictedFunctions.user_meta_delete_user_meta` | `WordPressVIPMinimum.Functions.RestrictedFunctions.user_meta_delete_user_meta` |
+| `WordPressVIPMinimum.VIP.RestrictedFunctions.user_meta_add_user_meta` | `WordPressVIPMinimum.Functions.RestrictedFunctions.user_meta_add_user_meta` |
+| `WordPressVIPMinimum.VIP.RestrictedFunctions.term_exists_term_exists` | `WordPressVIPMinimum.Functions.RestrictedFunctions.term_exists_term_exists` |
+| `WordPressVIPMinimum.VIP.RestrictedFunctions.count_user_posts_count_user_posts` | `WordPressVIPMinimum.Functions.RestrictedFunctions.count_user_posts_count_user_posts` |
+| `WordPressVIPMinimum.VIP.RestrictedFunctions.wp_old_slug_redirect_wp_old_slug_redirect` | `WordPressVIPMinimum.Functions.RestrictedFunctions.wp_old_slug_redirect_wp_old_slug_redirect` |
+| `WordPressVIPMinimum.VIP.RestrictedFunctions.get_adjacent_post_get_adjacent_post` | `WordPressVIPMinimum.Functions.RestrictedFunctions.get_adjacent_post_get_adjacent_post` |
+| `WordPressVIPMinimum.VIP.RestrictedFunctions.get_adjacent_post_get_previous_post` | `WordPressVIPMinimum.Functions.RestrictedFunctions.get_adjacent_post_get_previous_post` |
+| `WordPressVIPMinimum.VIP.RestrictedFunctions.get_adjacent_post_get_previous_post_link` | `WordPressVIPMinimum.Functions.RestrictedFunctions.get_adjacent_post_get_previous_post_link` |
+| `WordPressVIPMinimum.VIP.RestrictedFunctions.get_adjacent_post_get_next_post` | `WordPressVIPMinimum.Functions.RestrictedFunctions.get_adjacent_post_get_next_post` |
+| `WordPressVIPMinimum.VIP.RestrictedFunctions.get_adjacent_post_get_next_post_link` | `WordPressVIPMinimum.Functions.RestrictedFunctions.get_adjacent_post_get_next_post_link` |
+| `WordPressVIPMinimum.VIP.RestrictedFunctions.get_intermediate_image_sizes_get_intermediate_image_sizes` | `WordPressVIPMinimum.Functions.RestrictedFunctions.get_intermediate_image_sizes_get_intermediate_image_sizes` |
+| `WordPressVIPMinimum.VIP.RestrictedFunctions.wp_is_mobile_wp_is_mobile` | `WordPressVIPMinimum.Functions.RestrictedFunctions.wp_is_mobile_wp_is_mobile` |
+| `WordPressVIPMinimum.VIP.RestrictedFunctions.wp_mail_wp_mail` | `WordPressVIPMinimum.Functions.RestrictedFunctions.wp_mail_wp_mail` |
+| `WordPressVIPMinimum.VIP.RestrictedFunctions.wp_mail_mail` | `WordPressVIPMinimum.Functions.RestrictedFunctions.wp_mail_mail` |
+| `WordPressVIPMinimum.VIP.RestrictedFunctions.is_multi_author_is_multi_author` | `WordPressVIPMinimum.Functions.RestrictedFunctions.is_multi_author_is_multi_author` |
+| `WordPressVIPMinimum.VIP.RestrictedFunctions.advanced_custom_fields_the_sub_field` | `WordPressVIPMinimum.Functions.RestrictedFunctions.advanced_custom_fields_the_sub_field` |
+| `WordPressVIPMinimum.VIP.RestrictedFunctions.advanced_custom_fields_the_field` | `WordPressVIPMinimum.Functions.RestrictedFunctions.advanced_custom_fields_the_field` |
+| `WordPressVIPMinimum.VIP.RestrictedFunctions.wp_remote_get_wp_remote_get` | `WordPressVIPMinimum.Functions.RestrictedFunctions.wp_remote_get_wp_remote_get` |
+| `WordPressVIPMinimum.VIP.RestrictedFunctions.cookies_setcookie` | `WordPressVIPMinimum.Functions.RestrictedFunctions.cookies_setcookie` |
+| `WordPressVIPMinimum.VIP.RestrictedFunctions.get_posts_get_posts` | `WordPressVIPMinimum.Functions.RestrictedFunctions.get_posts_get_posts` |
+| `WordPressVIPMinimum.VIP.RestrictedFunctions.get_posts_wp_get_recent_posts` | `WordPressVIPMinimum.Functions.RestrictedFunctions.get_posts_wp_get_recent_posts` |
+| `WordPressVIPMinimum.VIP.RestrictedFunctions.get_posts_get_children` | `WordPressVIPMinimum.Functions.RestrictedFunctions.get_posts_get_children` |
+| `WordPressVIPMinimum.VIP.RestrictedFunctions.wpcom_vip_get_term_link_wpcom_vip_get_term_link` | `WordPressVIPMinimum.Functions.RestrictedFunctions.wpcom_vip_get_term_link_wpcom_vip_get_term_link` |
+| `WordPressVIPMinimum.VIP.RestrictedFunctions.wpcom_vip_get_term_by_wpcom_vip_get_term_by` | `WordPressVIPMinimum.Functions.RestrictedFunctions.wpcom_vip_get_term_by_wpcom_vip_get_term_by` |
+| `WordPressVIPMinimum.VIP.RestrictedFunctions.wpcom_vip_get_category_by_slug_wpcom_vip_get_category_by_slug` | `WordPressVIPMinimum.Functions.RestrictedFunctions.wpcom_vip_get_category_by_slug_wpcom_vip_get_category_by_slug` |
+| `WordPressVIPMinimum.VIP.Robotstxt.RobotstxtSniff` | `WordPressVIPMinimum.Hooks.RestrictedHooks.robotstxt_do_robotstxt` `WordPressVIPMinimum.Hooks.RestrictedHooks.robotstxt_robots_txt` |
+| `WordPressVIPMinimum.VIP.StaticStrreplace.StaticStrreplace` | `WordPressVIPMinimum.Security.StaticStrreplace.StaticStrreplace` |
+| `WordPressVIPMinimum.VIP.TaxonomyMetaInOptions.PossibleTermMetaInOptions` | `WordPressVIPMinimum.Performance.TaxonomyMetaInOptions.PossibleTermMetaInOptions` |
+| `WordPressVIPMinimum.VIP.WPQueryParams.suppressFiltersTrue` | `WordPressVIPMinimum.Performance.WPQueryParams.SuppressFiltersTrue` |
+| `WordPressVIPMinimum.VIP.WPQueryParams.post__not_in` | `WordPressVIPMinimum.Performance.WPQueryParams.PostNotIn` |
+
+### Added
+- New violations:
+ - `WordPressVIPMinimum.Functions.RestrictedFunctions.chmod_chgrp`
+ - `WordPressVIPMinimum.Functions.RestrictedFunctions.chmod_chown`
+ - `WordPressVIPMinimum.Functions.RestrictedFunctions.chmod_chmod`
+ - `WordPressVIPMinimum.Functions.RestrictedFunctions.chmod_lchgrp`
+ - `WordPressVIPMinimum.Functions.RestrictedFunctions.chmod_lchown`
+ - `WordPressVIPMinimum.Functions.RestrictedFunctions.directory_mkdir`
+ - `WordPressVIPMinimum.Functions.RestrictedFunctions.directory_rmdir`
+ - `WordPressVIPMinimum.Functions.RestrictedFunctions.file_ops_delete`
+ - `WordPressVIPMinimum.Functions.RestrictedFunctions.file_ops_file_put_contents`
+ - `WordPressVIPMinimum.Functions.RestrictedFunctions.file_ops_flock`
+ - `WordPressVIPMinimum.Functions.RestrictedFunctions.file_ops_fputcsv`
+ - `WordPressVIPMinimum.Functions.RestrictedFunctions.file_ops_fputs`
+ - `WordPressVIPMinimum.Functions.RestrictedFunctions.file_ops_ftruncate`
+ - `WordPressVIPMinimum.Functions.RestrictedFunctions.file_ops_fwrite`
+ - `WordPressVIPMinimum.Functions.RestrictedFunctions.file_ops_is_writable`
+ - `WordPressVIPMinimum.Functions.RestrictedFunctions.file_ops_is_writeable`
+ - `WordPressVIPMinimum.Functions.RestrictedFunctions.file_ops_link`
+ - `WordPressVIPMinimum.Functions.RestrictedFunctions.file_ops_rename`
+ - `WordPressVIPMinimum.Functions.RestrictedFunctions.file_ops_symlink`
+ - `WordPressVIPMinimum.Functions.RestrictedFunctions.file_ops_tempnam`
+ - `WordPressVIPMinimum.Functions.RestrictedFunctions.file_ops_touch`
+ - `WordPressVIPMinimum.Functions.RestrictedFunctions.file_ops_unlink`
+ - `WordPressVIPMinimum.Functions.RestrictedFunctions.session_session_abort`
+ - `WordPressVIPMinimum.Functions.RestrictedFunctions.session_session_cache_expire`
+ - `WordPressVIPMinimum.Functions.RestrictedFunctions.session_session_cache_limiter`
+ - `WordPressVIPMinimum.Functions.RestrictedFunctions.session_session_commit`
+ - `WordPressVIPMinimum.Functions.RestrictedFunctions.session_session_create_id`
+ - `WordPressVIPMinimum.Functions.RestrictedFunctions.session_session_decode`
+ - `WordPressVIPMinimum.Functions.RestrictedFunctions.session_session_destroy`
+ - `WordPressVIPMinimum.Functions.RestrictedFunctions.session_session_encode`
+ - `WordPressVIPMinimum.Functions.RestrictedFunctions.session_session_gc`
+ - `WordPressVIPMinimum.Functions.RestrictedFunctions.session_session_get_cookie_params`
+ - `WordPressVIPMinimum.Functions.RestrictedFunctions.session_session_id`
+ - `WordPressVIPMinimum.Functions.RestrictedFunctions.session_session_is_registered`
+ - `WordPressVIPMinimum.Functions.RestrictedFunctions.session_session_module_name`
+ - `WordPressVIPMinimum.Functions.RestrictedFunctions.session_session_name`
+ - `WordPressVIPMinimum.Functions.RestrictedFunctions.session_session_regenerate_id`
+ - `WordPressVIPMinimum.Functions.RestrictedFunctions.session_session_register_shutdown`
+ - `WordPressVIPMinimum.Functions.RestrictedFunctions.session_session_register`
+ - `WordPressVIPMinimum.Functions.RestrictedFunctions.session_session_reset`
+ - `WordPressVIPMinimum.Functions.RestrictedFunctions.session_session_save_path`
+ - `WordPressVIPMinimum.Functions.RestrictedFunctions.session_session_set_cookie_params`
+ - `WordPressVIPMinimum.Functions.RestrictedFunctions.session_session_set_save_handler`
+ - `WordPressVIPMinimum.Functions.RestrictedFunctions.session_session_start`
+ - `WordPressVIPMinimum.Functions.RestrictedFunctions.session_session_status`
+ - `WordPressVIPMinimum.Functions.RestrictedFunctions.session_session_unregister`
+ - `WordPressVIPMinimum.Functions.RestrictedFunctions.session_session_unset`
+ - `WordPressVIPMinimum.Functions.RestrictedFunctions.session_session_write_close`
+ - `WordPressVIPMinimum.Functions.RestrictedFunctions.site_option_add_site_option`
+ - `WordPressVIPMinimum.Functions.RestrictedFunctions.site_option_delete_site_option`
+ - `WordPressVIPMinimum.Functions.RestrictedFunctions.site_option_update_site_option`
+ - `WordPressVIPMinimum.Performance.NoPaging.nopaging_nopaging`
+ - `WordPressVIPMinimum.Performance.OrderByRand.orderby_orderby`
+ - `WordPressVIPMinimum.UserExperience.AdminBarRemoval.HidingDetected`
+ - `WordPressVIPMinimum.UserExperience.AdminBarRemoval.RemovalDetected`
+ - `WordPressVIPMinimum.Variables.RestrictedVariables.user_meta__wpdb__users`
+ - `WordPressVIPMinimum.Variables.RestrictedVariables.user_meta__wpdb__usermeta`
+ - `WordPressVIPMinimum.Variables.RestrictedVariables.cache_constraints___COOKIE`
+ - `WordPressVIPMinimum.Variables.RestrictedVariables.cache_constraints___SERVER__HTTP_USER_AGENT__`
+ - `WordPressVIPMinimum.Variables.RestrictedVariables.cache_constraints___SERVER__REMOTE_ADDR__`
+ - `WordPressVIPMinimum.Variables.RestrictedVariables.session___session`
+- `WordPress-VIP-Go` ruleset test.
+- docs about ruleset tests.
+- XSD reference and ruleset validation.
+- `phpcodesniffer-composer-installer` plugin.
+- Copy `has_html_open_tag()` from WPCS.
+- Copy `AbstractVariableRestrictionsSniff` from WPCS.
+
+### Changed
+- Switch from PHPCS 2.* class names to PHPCS 3.* namespaced classes.
+- Refactor all sniffs to extend `VIPCS\Sniff`, which is an extension of `WordPress\Sniff`.
+- Tidied up:
+ - unused imports
+ - unused local variables
+ - unused parameters
+ - unused private field
+ - duplicate array keys
+ - redundant self-assignment
+ - assignment in conditions
+ - not returning void function calls
+ - undefined class fields
+ - strict comparisons
+ - missing scope keywords
+ - parentheses to clarify one specific conditional
+ - consolidate multiple `isset()` calls
+ - consolidate positive nested `if()`’s
+ - difference in case for function calls
+ - simplified return statements
+ - switched to `__DIR__`
+ - switched FQCN to import statements
+ - use static property
+ - use more performant `strpos()` instead of `substr()`
+ - split or remove `else` / `elseif` workflows for lower complexity and more comprehension
+ - misuse of `array_push()`
+ - misuse of `array_values()`
+ - misuse of `in_array()`
+ - useless `return`
+ - redundant `continue`
+ - comments that were naming parameters
+ - default assignments of `null` to class properties
+ - function parameters that match default arg values
+ - redundant parentheses
+- Ruleset Test improvements:
+ - Move mostly duplicate `PHPCS_Ruleset_Test` classes into new `RulesetTest` class.
+ - Refactor new class:
+ - Accept a ruleset name in the constructor
+ - Change public method from `run()` to `passes()`.
+ - Break out logic into smaller private methods to make the logic more self-documenting.
+ - Refactor variable names in some methods.
+ - Decode JSON into objects, not arrays
+ - Fix incorrect reference to local `$expected` to `$this->expected`. Somehow, this was still working regardless.
+ - Fix bug where it doesn't catch proper number of errors/warnings on a line basis due to order of operations of incrementating after assignment.
+ - Add further documentation.
+ - Change ruleset test class usage, including adding the name to the "tests passed!" message.
+ - Replaced WPCS whitelisting `// XSS OK` comments in this files with `// phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped` comments.
+ - Change naming of tests from "integration test" to "ruleset tests", to make it more intuitive exactly what these are (composer script, Travis, bin filename).
+- Improve `addError()` and `addWarning()` calls
+- Remove `Generic.NamingConventions.ConstructorName.OldStyle` from `WordPress-VIP-Go` ruleset
+- Travis: Restrict PHPUnit versions to match PHPCS
+- Travis: Use `7.4snapshot` instead of nightly, switch from Trusty to Xenial, remove `sudo: false`.
+- `EscapingVoidReturnFunctions`: Fix docs and improve logic
+- `AlwaysReturnSniff`: trigger errors instead of warnings, don't give violation for when callback args is passed by reference
+- Change `exec()` and `shell_exec()` to be flagged as Error.
+- Disallow long array syntax in VIPCS sniff code.
+- Remove a `WordPress.CodeAnalysis.AssignmentInCondition.FoundInWhileCondition` exclusion in the PHPCS config for VIPCS itself.
+- Update docs.
+
+### Fixed
+- Bumped PHPCompatibility `testVersion` to match PHP requirement.
+- Silence `Generic.PHP.DisallowShortOpenTag.EchoFound` for `WordPress-VIP-Go` ruleset: `=` is no longer reported.
+- Silence `WordPress.WP.AlternativeFunctions.file_system_read_fwrite` and `WordPress.WP.AlternativeFunctions.file_system_read_file_put_contents` since we have `WordPressVIPMinimum.Functions.RestrictedFunctions.file_ops_*`.
+- Silence Short Echo tags on `WordPress-VIP-Go`.
+
+## [0.4.0] - 2018-12-19
+
+This release contains breaking changes.
+
+Props: GaryJones, nickdaugherty, rebeccahum, tomjn.
+
+### Added
+ - `WordPressVIPMinimum.Cache.LowExpiryCacheTime` sniff.
+ - `WordPressVIPMinimum.Classes.RestrictedExtendedClasses` sniff, for `WP_CLI_Command`.
+ - `WordPressVIPMinimum.Filters.RestrictedHooks` sniff, for `upload_mimes`, as well as `http_request_timeout` and `http_request_args` filters which change timeouts, as we typically don't recommend anything above 3s.
+ - `WordPressVIPMinimum.Functions.StripTags` sniff.
+ - `WordPressVIPMinimum.JS.DangerouslySetInnerHTML` sniff.
+ - `WordPressVIPMinimum.JS.Window` sniff.
+ - `WordPressVIPMinimum.VIP.PHPFilterFunctions` sniff.
+ - GitHub issue templates.
+ - `opcache_*()` functions to list of restricted functions.
+ - ACF templating function to list of restricted functions.
+ - `.editorconfig` to repo.
+ - `Generic.PHP.Syntax` to `WordPressVIPMinimum` ruleset.
+
+### Changed
+ - Allow unused `$e` when catching exceptions.
+ - Improved accuracy of `WordPressVIPMinimum.Files.IncludingFile`
+ - Refactor `WordPressVIPMinimum.VIP.RestrictedFunctions` sniff.
+ - Include documentation links directly in error message for `WordPressVIPMinimum.VIP.WPQueryParams.post__not_in`.
+ - Composer: Normalized `composer.json`.
+ - Composer: Bump to PHPCompatibility ^9.
+ - Change severity of `WordPress.CodeAnalysis.AssignmentInCondition.Found` to 1 instead of removing it.
+ - Increases the PHPCS (3.2.3) and PHP (5.6+) minimum versions to supported and known good values.
+ - Travis: Remove PHPUnit 6 workaround.
+ - Travis: updates the PHPCS referenced in the Travis file, and remove the PHP 5.5 and 5.4 checks.
+ - Travis: Switch to using build stages.
+ - Travis: Extract shell scripts out of Travis config file.
+ - Silence `WordPressVIPMinimum.Cache.BatcacheWhitelistedParams` for VIP Go ruleset.
+ - Silence variable assignment condition rule.
+ - Docs: Updated Readme for more accuracy.
+ - Docs: Updated VIP link references.
+ - Removed string concatenation for messages for better readability.
+
+### Fixed
+ - Unreplaced placeholders for violation messages in `WordPressVIPMinimum.VIP.FetchingRemoteDataSniff`.
+ - `WordPressVIPMinimum.Filters.AlwaysReturnSniff` not reporting filter callbacks that don't `return` _anywhere_ inside the function body.
+ - Incorrect severity level parameters in `WordPressVIPMinimum.Variables.VariableAnalysis` sniff since they are passed in as a string.
+ - Detection of double quotes in `WordPressVIPMinimum.Variables.ServerVariables`, add additional server variables and update unit tests.
+ - Typo: `WordPressVIPMinimum.Files.IncludingNonPHPFile` messages, switching `get_file_contents` to `file_get_contents`.
+ - Typo: "returning" in `WordPressVIPMinimum.Filters.AlwaysReturn.voidReturn` message.
+ - Typo: `WordPressVIPMinimum.VIP.WPQueryParameters.suppressFiltersTrue`, switching `probihted` to `prohibited`.
+ - ~~Integration~~ Ruleset tests not running in Travis.
+
+### Removed
+ - BREAKING: `WordPressVIPMinimum.SVG.HTMLCodeSniff` (SVG support), since it was not working well. You should remove any reference to this in your custom ruleset.
+ - `var_dump` from `WordPressVIPMinimum` ruleset since it should be the same type as `var_export`
+ - `wpcom_vip_get_page_by_path` from `WordPressVIPMinimum.VIP.RestrictedFunctions`
+ - Version check for PHP 7 or less in `WordPressVIPMinimum.Variables.VariableAnalysis` unit test since tests are not failing anymore.
+
+## [0.3.1] - 2018-12-04
+
+Originally tagged as 0.2.5.
+
+Props: emrikol, GaryJones, gudmdharalds, mikeyarce, nickdaugherty, paulschreiber, rebeccahum, sboisvert, tomjn.
+
+## [0.3.0] - 2018-08-15
+
+Props: BrookeDot, david-binda, GaryJones, gudmdharalds, rebeccahum, sboisvert, tomjn, uxcitizen.
+
+## [0.2.4] - 2018-07-18
+
+Props: david-binda, sboisvert, tessneedham, trepmal.
+
+## [0.2.3] - 2018-03-29
+
+Props: david-binda, jacklenox, pyronaur, sboisvert, trepmal, vaurdan.
+
+## [0.2.2] - 2018-01-19
+
+Props: david-binda.
+
+## [0.2.1] - 2017-12-01
+
+Props: david-binda, philipjohn, tomjn.
+
+## [0.2.0] - 2017-08-15
+
+Props: david-binda.
+
+## [0.1.0] - 2017-08-14
+
+Initial release.
+
+Props: david-binda, pkevan.
+
+
+[2.3.3]: https://github.com/Automattic/VIP-Coding-Standards/compare/2.3.2...2.3.3
+[2.3.2]: https://github.com/Automattic/VIP-Coding-Standards/compare/2.3.1...2.3.2
+[2.3.1]: https://github.com/Automattic/VIP-Coding-Standards/compare/2.3.0...2.3.1
+[2.3.0]: https://github.com/Automattic/VIP-Coding-Standards/compare/2.2.0...2.3.0
+[2.2.0]: https://github.com/Automattic/VIP-Coding-Standards/compare/2.1.0...2.2.0
+[2.1.0]: https://github.com/Automattic/VIP-Coding-Standards/compare/2.0.0...2.1.0
+[2.0.0]: https://github.com/Automattic/VIP-Coding-Standards/compare/1.0.0...2.0.0
+[1.0.0]: https://github.com/Automattic/VIP-Coding-Standards/compare/0.4.0...1.0.0
+[0.4.0]: https://github.com/automattic/vip-coding-standards/compare/0.3.1...0.4.0
+[0.3.1]: https://github.com/automattic/vip-coding-standards/compare/0.3.0...0.3.1
+[0.3.0]: https://github.com/automattic/vip-coding-standards/compare/0.2.4...0.3.0
+[0.2.4]: https://github.com/automattic/vip-coding-standards/compare/0.2.3...0.2.4
+[0.2.3]: https://github.com/automattic/vip-coding-standards/compare/0.2.2...0.2.3
+[0.2.2]: https://github.com/automattic/vip-coding-standards/compare/0.2.1...0.2.2
+[0.2.1]: https://github.com/automattic/vip-coding-standards/compare/0.2.0...0.2.1
+[0.2.0]: https://github.com/automattic/vip-coding-standards/compare/0.1.0...0.2.0
+[0.1.0]: https://github.com/automattic/vip-coding-standards/compare/f0e821c0b91f7e5b3850c5ae7bfab4f38d24e406...0.1.0
diff --git a/vendor/automattic/vipwpcs/LICENSE.md b/vendor/automattic/vipwpcs/LICENSE.md
new file mode 100644
index 00000000..b6197d02
--- /dev/null
+++ b/vendor/automattic/vipwpcs/LICENSE.md
@@ -0,0 +1,67 @@
+The files in this project--except those listed under the section "Included Files"--are Copyright © Automattic Inc, 2016, and licensed under the The GPLv2 (or later) from the [Free Software Foundation](http://www.fsf.org/). Its text follows.
+
+Version 2, June 1991
+
+Copyright © 1989, 1991 Free Software Foundation, Inc.
+51 Franklin St, Fifth Floor, Boston, MA 02110, USA
+
+Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.
+
+### Preamble
+
+The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software --- to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too.
+
+When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things.
+
+To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it.
+
+For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights.
+
+We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software.
+
+Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations.
+
+Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all.
+
+The precise terms and conditions for copying, distribution and modification follow.
+
+### GNU General Public License Terms and Conditions for Copying, Distribution, and Modification
+
+
+
+
+ This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does.
+ You may copy and distribute verbatim copies of the Program’s source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee.
+ You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions:
+
+ You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change.
+ You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License.
+ If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.)
+
+ These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License.
+ You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following:
+
+ Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or,
+ Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or,
+ Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code.
+
+
+ You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance.
+ You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it.
+ Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License.
+ If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License.
+ If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License.
+ The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation.
+ If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally.
+ BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+ IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+
+
+
+Included Files
+==========================
+
+This project includes:
+
+- [WordPress-Coding-Standards](https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards), which is Copyright © 2009 John Godley and contributors. Released under the MIT license https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards/blob/develop/LICENSE
+- [PHP_CodeSniffer](https://github.com/squizlabs/PHP_CodeSniffer), Copyright © 2012, Squiz Pty Ltd (ABN 77 084 670 600). Released under the following license: https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt
diff --git a/vendor/automattic/vipwpcs/README.md b/vendor/automattic/vipwpcs/README.md
new file mode 100644
index 00000000..8a7c31ae
--- /dev/null
+++ b/vendor/automattic/vipwpcs/README.md
@@ -0,0 +1,39 @@
+# VIP Coding Standards
+
+This project contains [PHP_CodeSniffer (PHPCS) sniffs and rulesets](https://github.com/squizlabs/PHP_CodeSniffer) to validate code developed for [WordPress VIP](https://wpvip.com/).
+
+This project contains two rulesets:
+
+ - `WordPressVIPMinimum` - for use with projects on the (older) WordPress.com VIP platform.
+ - `WordPress-VIP-Go` - for use with projects on the (newer) VIP Go platform.
+
+These rulesets contain only the rules which are considered to be ["errors"](https://docs.wpvip.com/technical-references/code-review/vip-errors/) and ["warnings"](https://docs.wpvip.com/technical-references/code-review/vip-warnings/) according to the WordPress VIP Go documentation.
+
+The rulesets use rules from the [WordPress Coding Standards](https://github.com/WordPress/WordPress-Coding-Standards) (WPCS) project, as well as the [VariableAnalysis](https://github.com/sirbrillig/phpcs-variable-analysis) standard.
+
+Go to https://docs.wpvip.com/technical-references/code-review/phpcs-report/ to learn about why violations are flagged as errors vs warnings and what the levels mean.
+
+## Minimal requirements
+
+* PHP 5.4+
+* [PHPCS 3.5.5+](https://github.com/squizlabs/PHP_CodeSniffer/releases)
+* [WPCS 2.3.0+](https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards/releases)
+* [VariableAnalysis 2.8.3+](https://github.com/sirbrillig/phpcs-variable-analysis/releases)
+
+## Installation
+
+`composer require automattic/vipwpcs`, or `composer g require automattic/vipwpcs` if installing globally.
+
+This will install the latest compatible versions of PHPCS, WPCS and VariableAnalysis and register the external standards with PHP_CodeSniffer.
+
+Please refer to the [installation instructions for installing PHP_CodeSniffer for WordPress.com VIP](https://docs.wpvip.com/how-tos/code-review/php_codesniffer/) for more details.
+
+As of VIPCS version 2.3.0, there is no need to `require` the [PHP_CodeSniffer Standards Composer Installer Plugin](https://github.com/Dealerdirect/phpcodesniffer-composer-installer) anymore as it is now a requirement of VIPCS itself.
+
+## Contribution
+
+Please see [CONTRIBUTION.md](.github/CONTRIBUTING.md).
+
+## License
+
+Licensed under [GPL-2.0-or-later](LICENSE.md).
diff --git a/vendor/automattic/vipwpcs/WordPress-VIP-Go/ruleset-test.inc b/vendor/automattic/vipwpcs/WordPress-VIP-Go/ruleset-test.inc
new file mode 100644
index 00000000..61e56955
--- /dev/null
+++ b/vendor/automattic/vipwpcs/WordPress-VIP-Go/ruleset-test.inc
@@ -0,0 +1,574 @@
+ 999, // Warning + Message.
+ 'posts_per_page' => 1, // OK.
+ 'posts_per_page' => '1', // OK.
+);
+_query_posts( 'posts_per_page=999' ); // Warning + Message.
+$query_args['posts_per_page'] = 999; // Warning + Message.
+$query_args['posts_per_page'] = 1; // OK.
+
+// WordPressVIPMinimum.Hooks.RestrictedHooks.upload_mimes
+add_filter( 'upload_mimes', 'foo' ); // Warning.
+
+// WordPressVIPMinimum.Security.PHPFilterFunctions
+filter_var( $url ); // Warning.
+filter_var_array( $array ); // Warning.
+filter_input_array( $array ); // Warning.
+filter_var( $url, FILTER_SANITIZE_URL ); // Ok.
+filter_input( INPUT_GET, 'foo' ); // Warning.
+filter_input( INPUT_GET, 'foo', FILTER_SANITIZE_STRING ); // Ok.
+filter_var( $url, FILTER_DEFAULT ); // Warning.
+filter_var_array( $array, FILTER_UNSAFE_RAW ); // Warning.
+filter_var_array( $array, FILTER_SANITIZE_STRING ); // Ok.
+filter_input_array( $array,FILTER_SANITIZE_STRING ); // Ok.
+filter_input( INPUT_GET, 'foo', FILTER_DEFAULT ); // Warning.
+
+
+
+
+// WordPressVIPMinimum.Functions.RestrictedFunctions.wp_mail_wp_mail
+wp_mail(); // Warning.
+mail(); // Warning.
+
+// WordPressVIPMinimum.Functions.RestrictedFunctions.attachment_url_to_postid_attachment_url_to_postid
+wpcom_vip_attachment_url_to_postid( $url ); // Ok.
+attachment_url_to_postid( $url ); // Warning + Message.
+
+// WordPressVIPMinimum.Functions.RestrictedFunctions.get_adjacent_post_get_adjacent_post
+wpcom_vip_get_adjacent_post(); // Ok.
+get_adjacent_post(); // Warning.
+get_previous_post(); // Warning.
+get_next_post(); // Warning.
+get_previous_post_link(); // Warning.
+get_next_post_link(); // Warning.
+
+// WordPressVIPMinimum.Functions.RestrictedFunctions.get_page_by_title_get_page_by_title
+wpcom_vip_get_page_by_title(); // Ok.
+get_page_by_title( $page_title ); // Warning + Message.
+
+// WordPressVIPMinimum.Functions.RestrictedFunctions.get_posts_get_children
+get_child(); // Ok.
+get_children(); // Warning + Message.
+
+// WordPressVIPMinimum.Functions.RestrictedFunctions.get_posts_get_posts
+get_posts(); // Warning.
+get_post( 123 ); // Ok.
+
+// WordPressVIPMinimum.Functions.RestrictedFunctions.get_posts_wp_get_recent_posts
+wp_get_recent_posts(); // Warning.
+
+// WordPressVIPMinimum.Functions.RestrictedFunctions.url_to_postid_url_to_postid
+wpcom_vip_url_to_postid( $url ); // Ok.
+url_to_postid( $url ); // Warning + Message.
+
+// WordPressVIPMinimum.Functions.RestrictedFunctions.wp_old_slug_redirect_wp_old_slug_redirect
+wpcom_vip_old_slug_redirect(); // Ok.
+wp_old_slug_redirect(); // Warning.
+
+// WordPress.CodeAnalysis.AssignmentInCondition.Found
+if ($a = 123) { // Warning.
+}
+
+// WordPress.PHP.DiscouragedPHPFunctions.urlencode_urlencode
+urlencode(); // Warning.
+rawurlencode(); // Ok.
+
+// WordPress.PHP.DontExtract
+extract( array( 'a' => 1 ) ); // Error.
+$obj->extract(); // Ok.
+
+// WordPress.PHP.StrictComparisons.LooseComparison
+true == $true; // Warning.
+false === $true; // Ok.
+
+// WordPress.PHP.StrictInArray.MissingTrueStrict
+in_array( 1, array( '1', 1, true ), true ); // Ok.
+in_array( 1, array( '1', 1, true ) ); // Warning.
+in_array( 1, array( '1', 1, true ), false ); // Warning.
+array_search( 1, $array, false ); // Warning.
+array_keys( array( '1', 1, true ), 'my_key' ); // Warning.
+
+// WordPress.Security.EscapeOutput.UnsafePrintingFunction
+_e( $some_nasty_var ); // Error.
+_ex( $some_nasty_var, 'context' ); // Error.
+echo esc_html_x( 'Something', 'context' ); // Ok.
+echo esc_html_x( $some_nasty_var, 'context' ); // Ok.
+
+// WordPress.WP.GlobalVariablesOverride.OverrideProhibited
+global $wpdb;
+$wpdb = 'test'; // Error.
+$GLOBALS['domain']['subkey'] = 'something else'; // Error.
+
+// WordPress.WP.EnqueuedResources.NonEnqueuedScript
+echo wp_kses( '
+
+
+
+'; // Warning + Message.
+
+// WordPressVIPMinimum.Performance.LowExpiryCacheTime.LowCacheTime
+wp_cache_set( 'test', $data, $group, 100 ); // Warning.
+wp_cache_add( 'test', $data, $group, 2*MINUTE_IN_SECONDS ); // Warning.
+wp_cache_replace( $testing, $data, '', 1.5 * MINUTE_IN_SECONDS ); // Warning.
+
+// WordPressVIPMinimum.Files.IncludingFile
+include_once ( MY_CONSTANT . "my_file.php" ); // Warning.
+require_once( custom_function( 'test_file.php' ) ); // Warning.
+require_once "my_file.php"; // Warning.
+require '../../my_file.php'; // Warning.
+include("http://www.google.com/bad_file.php"); // Warning.
+
+// VariableAnalysis.CodeAnalysis.VariableAnalysis.UndefinedVariable
+function foo_bar_bar() {
+ $b . 'test'; // Warning.
+}
+
+// VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable
+function foo_bar_foo() {
+ $a = 'Hello'; // OK. Unused variables warning silenced.
+}
+
+// WordPressVIPMinimum.UserExperience.AdminBarRemoval
+add_filter( 'show_admin_bar', '__return_false' ); // Warning.
+add_filter( 'show_admin_bar', '__return_true' ); // Ok.
+show_admin_bar( false ); // Warning.
+show_admin_bar( true ); // Ok.
+add_filter( 'show_admin_bar', 'my_own_return_false' ); // Warning.
+echo '';
+?> '; // Error.
+echo ' '; // Error.
+echo ' '; // OK.
+?>Hello
+Hey
+
+ array( 1, 2, 3 ), // Warning.
+] );
+
+/* Rules that are being silenced and should NOT be flagged. */
+
+// WordPress.DB.SlowDBQuery.slow_db_query_meta_key
+$query = new WP_Query( ['meta_key' => 'foo' ] ); // Ok.
+$args = 'foo=bar&meta_key=foo'; // Ok.
+
+// WordPressVIPMinimum.Performance.BatcacheWhitelistedParams
+if ( isset( $_GET['migSource'] ) && wp_verify_nonce( sanitize_text_field( $_GET['migSource'] ) ) ) {
+ $test = sanitize_text_field( $_GET['migSource'] ); // Ok.
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+// WordPressVIPMinimum.Functions.RestrictedFunctions.site_option_delete_site_option
+delete_site_option( $foo ); // Ok.
+
+// WordPressVIPMinimum.Functions.RestrictedFunctions.site_option_update_site_option
+update_site_option( $bar, $foo, true ); // Ok.
+
+// WordPressVIPMinimum.Functions.RestrictedFunctions.site_option_add_site_option
+add_site_option( 'foo', $bar ); // Ok.
+
+// Generic.PHP.DisallowShortOpenTag.EchoFound
+?> = esc_html( $var ); // Ok. ?> My term link'; // Error.
+
+// WordPressVIPMinimum.Functions.DynamicCalls
+$my_notokay_func = 'extract';
+$my_notokay_func(); // Error.
+
+// WordPressVIPMinimum.Functions.RestrictedFunctions
+
+opcache_reset(); // Error.
+opcache_invalidate( 'test_script.php' ); // Error.
+opcache_compile_file( $var ); // Error.
+opcache_is_script_cached( 'test_script.php' ); // Error.
+opcache_get_status(); // Error.
+opcache_get_configuration(); // Error.
+get_super_admins(); // OK.
+wpcom_vip_irc(); // Error.
+flush_rewrite_rules(); // Error.
+$wp_rewrite->flush_rules(); // Error.
+\add_role(); // Error.
+term_exists(); // Error.
+count_user_posts(); // Error.
+get_intermediate_image_sizes(); // Error.
+wp_is_mobile(); // Error.
+session_abort(); // Error.
+session_cache_expire(); // Error.
+session_cache_limiter(); // Error.
+session_commit(); // Error.
+session_create_id(); // Error.
+session_decode(); // Error.
+session_destroy(); // Error.
+session_encode(); // Error.
+session_gc(); // Error.
+session_get_cookie_params(); // Error.
+session_id(); // Error.
+session_is_registered(); // Error.
+session_module_name(); // Error.
+session_name(); // Error.
+session_regenerate_id(); // Error.
+session_register_shutdown(); // Error.
+session_register(); // Error.
+session_reset(); // Error.
+session_save_path(); // Error.
+session_set_cookie_params(); // Error.
+session_set_save_handler(); // Error.
+session_start(); // Error.
+session_status(); // Error.
+session_unregister(); // Error.
+session_unset(); // Error.
+session_write_close(); // Error.
+delete(); // Warning.
+file_put_contents( $file, $text, FILE_APPEND ); // Warning.
+while ( $count > $loop ) {
+ if ( flock( $fp, LOCK_EX ) ) { // Warning.
+ fwrite( $fp, $text ); // Warning.
+ }
+}
+fputcsv(); // Warning.
+fputs(); // Warning.
+ftruncate(); // Warning.
+is_writable(); // Warning.
+is_writeable(); // Warning.
+link(); // Warning.
+rename(); // Warning.
+symlink(); // Warning.
+tempnam(); // Warning.
+touch(); // Warning.
+unlink(); // Warning.
+mkdir(); // Error.
+rmdir(); // Error.
+chgrp(); // Error.
+chown(); // Error.
+chmod(); // Error.
+lchgrp(); // Error.
+lchown(); // Error.
+the_sub_field( 'field' ); // Warning.
+the_field( 'field' ); // Warning.
+wp_remote_get( $url ); // Warning.
+get_posts(); // Warning.
+function test_function( $a, $b ) { // OK. Unused variables warning silenced.
+ return create_function( '$a, $b', 'return ( $b / $a ); '); // Warning.
+}
+wpcom_vip_get_term_link(); // Warning.
+wpcom_vip_get_term_by(); // Warning.
+wpcom_vip_get_category_by_slug(); // Warning.
+
+// WordPressVIPMinimum.Functions.StripTagsSniff
+strip_tags( 'Test', $text ); // Warning.
+
+// WordPressVIPMinimum.Hooks.AlwaysReturnInFilter
+function bad_example_function_thing() { // Error.
+ if ( 1 === 0 ) {
+ if ( 1 === 1 ) {
+ return 'ahoj';
+ } else {
+ return 'hello';
+ }
+ }
+}
+add_filter( 'bad_example_function_filter', 'bad_example_function_thing' );
+add_filter( 'another_bad_example_closure', function() { // Error.
+ return;
+} );
+
+// WordPressVIPMinimum.Hooks.PreGetPosts
+add_action( 'pre_get_posts', function( $wp_query ) {
+ if ( ! $wp_query->is_search() ) {
+ $wp_query->set( 'cat', '-5' ); // Warning.
+ }
+} );
+
+// WordPressVIPMinimum.Hooks.RestrictedHooks
+add_action( 'http_request_timeout', 'bad_example_function' ); // Warning.
+add_filter('http_request_args', 'bad_example_function' ); // Warning.
+add_action( 'do_robotstxt', 'my_do_robotstxt'); // Warning.
+add_filter( 'robots_txt', function() { // Warning.
+ return 'test';
+} );
+
+// WordPressVIPMinimum.Performance.CacheValueOverride
+$bad_wp_users = wp_cache_get( md5( self::CACHE_KEY . '_wp_users'), self::CACHE_GROUP );
+$bad_wp_users = false; // Error.
+
+// WordPressVIPMinimum.Performance.NoPaging
+$args = array(
+ 'nopaging' => true, // Error.
+);
+_query_posts( 'nopaging=true' ); // Error.
+
+// WordPressVIPMinimum.Performance.OrderByRand
+$args = array(
+ "orderby" => "RAND", // Error.
+);
+$query_args['orderby'] = 'rand'; // Error.
+
+// WordPressVIPMinimum.Performance.RegexpCompare
+$query_args = array(
+ 'posts_per_page' => 1,
+ 'post_status' => 'draft',
+ 'meta_compare' => 'REGEXP', // Error.
+);
+$query_args = [
+ 'post_status' => 'publish',
+ 'meta_query' => [ // phpcs:ignore WordPress.DB.SlowDBQuery.slow_db_query_meta_query
+ [
+ 'compare' => 'REGEXP', // Error.
+ ]
+ ]
+];
+
+// WordPressVIPMinimum.Performance.RemoteRequestTimeout
+wp_remote_post( $obj->endpoint, array(
+ 'method' => 'POST',
+ 'timeout' => 45, // Error.
+ 'httpversion' => '1.1',
+ 'blocking' => false,
+ 'body' => wp_json_encode( $obj->logs, JSON_UNESCAPED_SLASHES ),
+ )
+);
+
+// WordPressVIPMinimum.Performance.TaxonomyMetaInOptions
+get_option( "taxonomy_rating_$obj->term_id" ); // Warning.
+update_option( 'taxonomy_rating_' . $category_id ); // Warning.
+
+// WordPressVIPMinimum.Performance.WPQueryParams
+$query_args = array(
+ 'suppress_filters' => true, // Error.
+);
+
+// WordPressVIPMinimum.Security.EscapingVoidReturnFunctions.Found
+esc_js( _deprecated_argument() ); // Error.
+esc_js( _deprecated_constructor() ); // Error.
+esc_js( _deprecated_file( 'filename' ) ); // Error.
+esc_js( _deprecated_function() ); // Error.
+esc_js( _deprecated_hook() ); // Error.
+esc_js( _doing_it_wrong() ); // Error.
+esc_html( printf( 'foo', [] ) ); // Error.
+esc_attr( user_error( 'foo', '' ) ); // Error.
+esc_attr( vprintf( 'foo', [] ) ); // Error.
+esc_attr( wp_die( 'foo' ) ); // Error.
+esc_attr( wp_dropdown_pages() ); // Error.
+
+// WordPressVIPMinimum.Security.ExitAfterRedirect
+function redirect_test() {
+ wp_safe_redirect( 'https.//vip.wordpress.com' ); // Error.
+}
+wp_redirect( 'https://vip.wordpress.com' ); // Error.
+
+// WordPressVIPMinimum.Security.Mustache
+echo '{{{data}}} '; // Warning.
+?>
+
+
+ _.templateSettings = {
+ interpolate: /\{\{(.+?)\}\}/g" . // Warning.
+"};
+ ";
+
+// WordPressVIPMinimum.Security.Vuejs
+?>
+
+
+<<<<<<< HEAD // Error.
+
+>>>>>>> // Error.
diff --git a/vendor/automattic/vipwpcs/WordPress-VIP-Go/ruleset-test.php b/vendor/automattic/vipwpcs/WordPress-VIP-Go/ruleset-test.php
new file mode 100644
index 00000000..af455144
--- /dev/null
+++ b/vendor/automattic/vipwpcs/WordPress-VIP-Go/ruleset-test.php
@@ -0,0 +1,345 @@
+ [
+ 50 => 1,
+ 53 => 1,
+ 56 => 1,
+ 72 => 1,
+ 83 => 1,
+ 165 => 1,
+ 180 => 1,
+ 181 => 1,
+ 187 => 1,
+ 188 => 1,
+ 252 => 1,
+ 255 => 1,
+ 256 => 1,
+ 258 => 1,
+ 259 => 1,
+ 318 => 1,
+ 329 => 1,
+ 334 => 1,
+ 337 => 1,
+ 341 => 1,
+ 342 => 1,
+ 346 => 1,
+ 350 => 1,
+ 351 => 1,
+ 352 => 1,
+ 353 => 1,
+ 354 => 1,
+ 355 => 1,
+ 357 => 1,
+ 358 => 1,
+ 359 => 1,
+ 360 => 1,
+ 361 => 1,
+ 362 => 1,
+ 363 => 1,
+ 364 => 1,
+ 365 => 1,
+ 366 => 1,
+ 367 => 1,
+ 368 => 1,
+ 369 => 1,
+ 370 => 1,
+ 371 => 1,
+ 372 => 1,
+ 373 => 1,
+ 374 => 1,
+ 375 => 1,
+ 376 => 1,
+ 377 => 1,
+ 378 => 1,
+ 379 => 1,
+ 380 => 1,
+ 381 => 1,
+ 382 => 1,
+ 383 => 1,
+ 384 => 1,
+ 385 => 1,
+ 386 => 1,
+ 387 => 1,
+ 388 => 1,
+ 389 => 1,
+ 390 => 1,
+ 409 => 1,
+ 410 => 1,
+ 411 => 1,
+ 412 => 1,
+ 413 => 1,
+ 414 => 1,
+ 415 => 1,
+ 431 => 1,
+ 441 => 1,
+ 462 => 1,
+ 466 => 1,
+ 468 => 1,
+ 472 => 1,
+ 474 => 1,
+ 480 => 1,
+ 486 => 1,
+ 494 => 1,
+ 507 => 1,
+ 511 => 1,
+ 512 => 1,
+ 513 => 1,
+ 514 => 1,
+ 515 => 1,
+ 516 => 1,
+ 517 => 1,
+ 518 => 1,
+ 519 => 1,
+ 520 => 1,
+ 521 => 1,
+ 525 => 1,
+ 527 => 1,
+ 545 => 1,
+ 560 => 1,
+ 564 => 1,
+ 565 => 1,
+ 566 => 1,
+ 567 => 1,
+ 572 => 1,
+ 574 => 1,
+ ],
+ 'warnings' => [
+ 4 => 1,
+ 7 => 1,
+ 10 => 1,
+ 14 => 1,
+ 17 => 1,
+ 20 => 1,
+ 23 => 1,
+ 26 => 1,
+ 29 => 1,
+ 32 => 1,
+ 35 => 1,
+ 38 => 1,
+ 41 => 1,
+ 44 => 1,
+ 47 => 1,
+ 63 => 1,
+ 66 => 1,
+ 85 => 1,
+ 90 => 1,
+ 94 => 1,
+ 95 => 1,
+ 99 => 1,
+ 102 => 1,
+ 103 => 1,
+ 104 => 1,
+ 106 => 1,
+ 108 => 1,
+ 109 => 1,
+ 112 => 1,
+ 118 => 1,
+ 119 => 1,
+ 123 => 1,
+ 127 => 1,
+ 128 => 1,
+ 129 => 1,
+ 130 => 1,
+ 131 => 1,
+ 135 => 1,
+ 139 => 1,
+ 142 => 1,
+ 146 => 1,
+ 150 => 1,
+ 154 => 1,
+ 157 => 1,
+ 161 => 1,
+ 169 => 1,
+ 174 => 1,
+ 175 => 1,
+ 176 => 1,
+ 177 => 1,
+ 191 => 1,
+ 192 => 1,
+ 195 => 1,
+ 196 => 1,
+ 199 => 1,
+ 200 => 1,
+ 201 => 1,
+ 204 => 1,
+ 205 => 1,
+ 206 => 1,
+ 207 => 1,
+ 208 => 1,
+ 212 => 1,
+ 221 => 1,
+ 223 => 1,
+ 225 => 1,
+ 228 => 1,
+ 229 => 1,
+ 230 => 1,
+ 235 => 1,
+ 236 => 1,
+ 237 => 1,
+ 245 => 1,
+ 246 => 1,
+ 247 => 1,
+ 265 => 1,
+ 269 => 1,
+ 273 => 1,
+ 322 => 1,
+ 326 => 1,
+ 332 => 1,
+ 391 => 1,
+ 392 => 1,
+ 394 => 1,
+ 395 => 1,
+ 398 => 1,
+ 399 => 1,
+ 400 => 1,
+ 401 => 1,
+ 402 => 1,
+ 403 => 1,
+ 404 => 1,
+ 405 => 1,
+ 406 => 1,
+ 407 => 1,
+ 408 => 1,
+ 416 => 1,
+ 417 => 1,
+ 418 => 1,
+ 419 => 1,
+ 421 => 1,
+ 423 => 1,
+ 424 => 1,
+ 425 => 1,
+ 428 => 1,
+ 448 => 1,
+ 453 => 1,
+ 454 => 1,
+ 455 => 1,
+ 456 => 1,
+ 502 => 1,
+ 503 => 1,
+ 530 => 1,
+ 533 => 1,
+ 540 => 1,
+ 550 => 1,
+ 556 => 1,
+ ],
+ 'messages' => [
+ 4 => [
+ 'File system operations only work on the `/tmp/` and `wp-content/uploads/` directories. To avoid unexpected results, please use helper functions like `get_temp_dir()` or `wp_get_upload_dir()` to get the proper directory path when using functions such as delete(). For more details, please see: https://docs.wpvip.com/technical-references/vip-go-files-system/local-file-operations/',
+ ],
+ 7 => [
+ 'File system operations only work on the `/tmp/` and `wp-content/uploads/` directories. To avoid unexpected results, please use helper functions like `get_temp_dir()` or `wp_get_upload_dir()` to get the proper directory path when using functions such as file_put_contents(). For more details, please see: https://docs.wpvip.com/technical-references/vip-go-files-system/local-file-operations/',
+ ],
+ 10 => [
+ 'File system operations only work on the `/tmp/` and `wp-content/uploads/` directories. To avoid unexpected results, please use helper functions like `get_temp_dir()` or `wp_get_upload_dir()` to get the proper directory path when using functions such as flock(). For more details, please see: https://docs.wpvip.com/technical-references/vip-go-files-system/local-file-operations/',
+ ],
+ 14 => [
+ 'File system operations only work on the `/tmp/` and `wp-content/uploads/` directories. To avoid unexpected results, please use helper functions like `get_temp_dir()` or `wp_get_upload_dir()` to get the proper directory path when using functions such as fputcsv(). For more details, please see: https://docs.wpvip.com/technical-references/vip-go-files-system/local-file-operations/',
+ ],
+ 17 => [
+ 'File system operations only work on the `/tmp/` and `wp-content/uploads/` directories. To avoid unexpected results, please use helper functions like `get_temp_dir()` or `wp_get_upload_dir()` to get the proper directory path when using functions such as fputs(). For more details, please see: https://docs.wpvip.com/technical-references/vip-go-files-system/local-file-operations/',
+ ],
+ 20 => [
+ 'File system operations only work on the `/tmp/` and `wp-content/uploads/` directories. To avoid unexpected results, please use helper functions like `get_temp_dir()` or `wp_get_upload_dir()` to get the proper directory path when using functions such as fwrite(). For more details, please see: https://docs.wpvip.com/technical-references/vip-go-files-system/local-file-operations/',
+ ],
+ 23 => [
+ 'File system operations only work on the `/tmp/` and `wp-content/uploads/` directories. To avoid unexpected results, please use helper functions like `get_temp_dir()` or `wp_get_upload_dir()` to get the proper directory path when using functions such as ftruncate(). For more details, please see: https://docs.wpvip.com/technical-references/vip-go-files-system/local-file-operations/',
+ ],
+ 26 => [
+ 'File system operations only work on the `/tmp/` and `wp-content/uploads/` directories. To avoid unexpected results, please use helper functions like `get_temp_dir()` or `wp_get_upload_dir()` to get the proper directory path when using functions such as is_writable(). For more details, please see: https://docs.wpvip.com/technical-references/vip-go-files-system/local-file-operations/',
+ ],
+ 29 => [
+ 'File system operations only work on the `/tmp/` and `wp-content/uploads/` directories. To avoid unexpected results, please use helper functions like `get_temp_dir()` or `wp_get_upload_dir()` to get the proper directory path when using functions such as is_writeable(). For more details, please see: https://docs.wpvip.com/technical-references/vip-go-files-system/local-file-operations/',
+ ],
+ 32 => [
+ 'File system operations only work on the `/tmp/` and `wp-content/uploads/` directories. To avoid unexpected results, please use helper functions like `get_temp_dir()` or `wp_get_upload_dir()` to get the proper directory path when using functions such as link(). For more details, please see: https://docs.wpvip.com/technical-references/vip-go-files-system/local-file-operations/',
+ ],
+ 35 => [
+ 'File system operations only work on the `/tmp/` and `wp-content/uploads/` directories. To avoid unexpected results, please use helper functions like `get_temp_dir()` or `wp_get_upload_dir()` to get the proper directory path when using functions such as rename(). For more details, please see: https://docs.wpvip.com/technical-references/vip-go-files-system/local-file-operations/',
+ ],
+ 38 => [
+ 'File system operations only work on the `/tmp/` and `wp-content/uploads/` directories. To avoid unexpected results, please use helper functions like `get_temp_dir()` or `wp_get_upload_dir()` to get the proper directory path when using functions such as symlink(). For more details, please see: https://docs.wpvip.com/technical-references/vip-go-files-system/local-file-operations/',
+ ],
+ 41 => [
+ 'File system operations only work on the `/tmp/` and `wp-content/uploads/` directories. To avoid unexpected results, please use helper functions like `get_temp_dir()` or `wp_get_upload_dir()` to get the proper directory path when using functions such as tempnam(). For more details, please see: https://docs.wpvip.com/technical-references/vip-go-files-system/local-file-operations/',
+ ],
+ 44 => [
+ 'File system operations only work on the `/tmp/` and `wp-content/uploads/` directories. To avoid unexpected results, please use helper functions like `get_temp_dir()` or `wp_get_upload_dir()` to get the proper directory path when using functions such as touch(). For more details, please see: https://docs.wpvip.com/technical-references/vip-go-files-system/local-file-operations/',
+ ],
+ 47 => [
+ 'File system operations only work on the `/tmp/` and `wp-content/uploads/` directories. To avoid unexpected results, please use helper functions like `get_temp_dir()` or `wp_get_upload_dir()` to get the proper directory path when using functions such as unlink(). For more details, please see: https://docs.wpvip.com/technical-references/vip-go-files-system/local-file-operations/',
+ ],
+ 50 => [
+ 'Due to server-side caching, server-side based client related logic might not work. We recommend implementing client side logic in JavaScript instead.',
+ ],
+ 53 => [
+ 'Due to server-side caching, server-side based client related logic might not work. We recommend implementing client side logic in JavaScript instead.',
+ ],
+ 56 => [
+ 'Due to server-side caching, server-side based client related logic might not work. We recommend implementing client side logic in JavaScript instead.',
+ ],
+ 63 => [
+ 'File system operations only work on the `/tmp/` and `wp-content/uploads/` directories. To avoid unexpected results, please use helper functions like `get_temp_dir()` or `wp_get_upload_dir()` to get the proper directory path when using functions such as fopen(). For more details, please see: https://docs.wpvip.com/technical-references/vip-go-files-system/local-file-operations/',
+ ],
+ 66 => [
+ 'file_get_contents() is uncached. If the function is being used to fetch a remote file (e.g. a URL starting with https://), please use wpcom_vip_file_get_contents() to ensure the results are cached. For more details, please see: https://docs.wpvip.com/technical-references/code-quality-and-best-practices/retrieving-remote-data/',
+ ],
+ 90 => [
+ 'Having more than 100 posts returned per page may lead to severe performance problems.',
+ ],
+ 94 => [
+ 'Having more than 100 posts returned per page may lead to severe performance problems.',
+ ],
+ 95 => [
+ 'Having more than 100 posts returned per page may lead to severe performance problems.',
+ ],
+ 123 => [
+ 'attachment_url_to_postid() is uncached, please use wpcom_vip_attachment_url_to_postid() instead.',
+ ],
+ 135 => [
+ 'get_page_by_title() is uncached, please use wpcom_vip_get_page_by_title() instead.',
+ ],
+ 139 => [
+ 'get_children() is uncached and performs a no limit query. Please use get_posts or WP_Query instead. Please see: https://docs.wpvip.com/technical-references/caching/uncached-functions/',
+ ],
+ 150 => [
+ 'url_to_postid() is uncached, please use wpcom_vip_url_to_postid() instead.',
+ ],
+ 191 => [
+ 'Scripts should be registered/enqueued via `wp_enqueue_script`. This can improve the site\'s performance due to script concatenation.',
+ ],
+ 192 => [
+ 'Scripts should be registered/enqueued via `wp_enqueue_script`. This can improve the site\'s performance due to script concatenation.',
+ ],
+ 195 => [
+ 'Stylesheets should be registered/enqueued via `wp_enqueue_style`. This can improve the site\'s performance due to styles concatenation.',
+ ],
+ 196 => [
+ 'Stylesheets should be registered/enqueued via `wp_enqueue_style`. This can improve the site\'s performance due to styles concatenation.',
+ ],
+ ],
+];
+
+require __DIR__ . '/../tests/RulesetTest.php';
+
+// Run the tests!
+$test = new RulesetTest( 'WordPress-VIP-Go', $expected );
+if ( $test->passes() ) {
+ printf( 'All WordPress-VIP-Go tests passed!' . PHP_EOL );
+ exit( 0 );
+}
+
+exit( 1 );
diff --git a/vendor/automattic/vipwpcs/WordPress-VIP-Go/ruleset.xml b/vendor/automattic/vipwpcs/WordPress-VIP-Go/ruleset.xml
new file mode 100644
index 00000000..58386a58
--- /dev/null
+++ b/vendor/automattic/vipwpcs/WordPress-VIP-Go/ruleset.xml
@@ -0,0 +1,273 @@
+
+
+ WordPress VIP Go Coding Standards
+
+
+
+
+
+
+
+ warning
+ 6
+ File system operations only work on the `/tmp/` and `wp-content/uploads/` directories. To avoid unexpected results, please use helper functions like `get_temp_dir()` or `wp_get_upload_dir()` to get the proper directory path when using functions such as %s(). For more details, please see: https://docs.wpvip.com/technical-references/vip-go-files-system/local-file-operations/
+
+
+ warning
+ 6
+ File system operations only work on the `/tmp/` and `wp-content/uploads/` directories. To avoid unexpected results, please use helper functions like `get_temp_dir()` or `wp_get_upload_dir()` to get the proper directory path when using functions such as %s(). For more details, please see: https://docs.wpvip.com/technical-references/vip-go-files-system/local-file-operations/
+
+
+ warning
+ 6
+ File system operations only work on the `/tmp/` and `wp-content/uploads/` directories. To avoid unexpected results, please use helper functions like `get_temp_dir()` or `wp_get_upload_dir()` to get the proper directory path when using functions such as %s(). For more details, please see: https://docs.wpvip.com/technical-references/vip-go-files-system/local-file-operations/
+
+
+ warning
+ 6
+ File system operations only work on the `/tmp/` and `wp-content/uploads/` directories. To avoid unexpected results, please use helper functions like `get_temp_dir()` or `wp_get_upload_dir()` to get the proper directory path when using functions such as %s(). For more details, please see: https://docs.wpvip.com/technical-references/vip-go-files-system/local-file-operations/
+
+
+ warning
+ 6
+ File system operations only work on the `/tmp/` and `wp-content/uploads/` directories. To avoid unexpected results, please use helper functions like `get_temp_dir()` or `wp_get_upload_dir()` to get the proper directory path when using functions such as %s(). For more details, please see: https://docs.wpvip.com/technical-references/vip-go-files-system/local-file-operations/
+
+
+ warning
+ 6
+ File system operations only work on the `/tmp/` and `wp-content/uploads/` directories. To avoid unexpected results, please use helper functions like `get_temp_dir()` or `wp_get_upload_dir()` to get the proper directory path when using functions such as %s(). For more details, please see: https://docs.wpvip.com/technical-references/vip-go-files-system/local-file-operations/
+
+
+ warning
+ 6
+ File system operations only work on the `/tmp/` and `wp-content/uploads/` directories. To avoid unexpected results, please use helper functions like `get_temp_dir()` or `wp_get_upload_dir()` to get the proper directory path when using functions such as %s(). For more details, please see: https://docs.wpvip.com/technical-references/vip-go-files-system/local-file-operations/
+
+
+ warning
+ 6
+ File system operations only work on the `/tmp/` and `wp-content/uploads/` directories. To avoid unexpected results, please use helper functions like `get_temp_dir()` or `wp_get_upload_dir()` to get the proper directory path when using functions such as %s(). For more details, please see: https://docs.wpvip.com/technical-references/vip-go-files-system/local-file-operations/
+
+
+ warning
+ 6
+ File system operations only work on the `/tmp/` and `wp-content/uploads/` directories. To avoid unexpected results, please use helper functions like `get_temp_dir()` or `wp_get_upload_dir()` to get the proper directory path when using functions such as %s(). For more details, please see: https://docs.wpvip.com/technical-references/vip-go-files-system/local-file-operations/
+
+
+ warning
+ 6
+ File system operations only work on the `/tmp/` and `wp-content/uploads/` directories. To avoid unexpected results, please use helper functions like `get_temp_dir()` or `wp_get_upload_dir()` to get the proper directory path when using functions such as %s(). For more details, please see: https://docs.wpvip.com/technical-references/vip-go-files-system/local-file-operations/
+
+
+ warning
+ 6
+ File system operations only work on the `/tmp/` and `wp-content/uploads/` directories. To avoid unexpected results, please use helper functions like `get_temp_dir()` or `wp_get_upload_dir()` to get the proper directory path when using functions such as %s(). For more details, please see: https://docs.wpvip.com/technical-references/vip-go-files-system/local-file-operations/
+
+
+ warning
+ 6
+ File system operations only work on the `/tmp/` and `wp-content/uploads/` directories. To avoid unexpected results, please use helper functions like `get_temp_dir()` or `wp_get_upload_dir()` to get the proper directory path when using functions such as %s(). For more details, please see: https://docs.wpvip.com/technical-references/vip-go-files-system/local-file-operations/
+
+
+ warning
+ 6
+ File system operations only work on the `/tmp/` and `wp-content/uploads/` directories. To avoid unexpected results, please use helper functions like `get_temp_dir()` or `wp_get_upload_dir()` to get the proper directory path when using functions such as %s(). For more details, please see: https://docs.wpvip.com/technical-references/vip-go-files-system/local-file-operations/
+
+
+ warning
+ 6
+ File system operations only work on the `/tmp/` and `wp-content/uploads/` directories. To avoid unexpected results, please use helper functions like `get_temp_dir()` or `wp_get_upload_dir()` to get the proper directory path when using functions such as %s(). For more details, please see: https://docs.wpvip.com/technical-references/vip-go-files-system/local-file-operations/
+
+
+ warning
+ 6
+ File system operations only work on the `/tmp/` and `wp-content/uploads/` directories. To avoid unexpected results, please use helper functions like `get_temp_dir()` or `wp_get_upload_dir()` to get the proper directory path when using functions such as %s(). For more details, please see: https://docs.wpvip.com/technical-references/vip-go-files-system/local-file-operations/
+
+
+ warning
+ 6
+ Removal of admin bar is highly discouraged for user roles of "administrator" and "vip_support" -- if these roles are already excluded, this warning can be ignored.
+
+
+ warning
+ 6
+ Hiding of admin bar is highly discouraged for user roles of "administrator" and "vip_support" -- if these roles are already excluded, this warning can be ignored.
+
+
+ 6
+
+
+ error
+ 6
+
+
+ error
+ 6
+
+
+
+
+
+
+ File system operations only work on the `/tmp/` and `wp-content/uploads/` directories. To avoid unexpected results, please use helper functions like `get_temp_dir()` or `wp_get_upload_dir()` to get the proper directory path when using functions such as %s(). For more details, please see: https://docs.wpvip.com/technical-references/vip-go-files-system/local-file-operations/
+
+
+ %s() is uncached. If the function is being used to fetch a remote file (e.g. a URL starting with https://), please use wpcom_vip_file_get_contents() to ensure the results are cached. For more details, please see: https://docs.wpvip.com/technical-references/code-quality-and-best-practices/retrieving-remote-data/
+
+
+
+
+
+
+ warning
+ 10
+
+
+ Having more than 100 posts returned per page may lead to severe performance problems.
+
+
+ 10
+
+
+ 10
+
+
+ 7
+
+
+
+
+
+ warning
+ %s() is uncached, please use wpcom_vip_attachment_url_to_postid() instead.
+
+
+ warning
+
+
+ warning
+
+
+ warning
+
+
+ warning
+
+
+ warning
+
+
+ warning
+ %s() is uncached, please use wpcom_vip_get_page_by_title() instead.
+
+
+ warning
+ 3
+ %s() is uncached and performs a no limit query. Please use get_posts or WP_Query instead. Please see: https://docs.wpvip.com/technical-references/caching/uncached-functions/
+
+
+ 3
+
+
+ 3
+
+
+ warning
+ %s() is uncached, please use wpcom_vip_url_to_postid() instead.
+
+
+ warning
+
+
+
+
+ 1
+
+
+ 1
+
+
+ 3
+
+
+ 3
+
+
+ 3
+
+
+ 3
+
+
+
+ 1
+
+
+ warning
+ 3
+ Scripts should be registered/enqueued via `wp_enqueue_script`. This can improve the site's performance due to script concatenation.
+
+
+ warning
+ 3
+ Stylesheets should be registered/enqueued via `wp_enqueue_style`. This can improve the site's performance due to styles concatenation.
+
+
+ 3
+
+
+ warning
+ 3
+
+
+ 3
+
+
+ 3
+
+
+ 1
+
+
+ 1
+
+
+ 3
+
+
+ 3
+
+
+
+
+ 0
+
+
+
+
+
+
+
+
+
+
+
+
+ 0
+
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
+
diff --git a/vendor/automattic/vipwpcs/WordPressVIPMinimum/Sniffs/AbstractVariableRestrictionsSniff.php b/vendor/automattic/vipwpcs/WordPressVIPMinimum/Sniffs/AbstractVariableRestrictionsSniff.php
new file mode 100644
index 00000000..e46373a3
--- /dev/null
+++ b/vendor/automattic/vipwpcs/WordPressVIPMinimum/Sniffs/AbstractVariableRestrictionsSniff.php
@@ -0,0 +1,231 @@
+setup_groups() === false ) {
+ return [];
+ }
+
+ return [
+ \T_VARIABLE,
+ \T_OBJECT_OPERATOR,
+ \T_DOUBLE_COLON,
+ \T_OPEN_SQUARE_BRACKET,
+ \T_DOUBLE_QUOTED_STRING,
+ \T_HEREDOC,
+ ];
+ }
+
+ /**
+ * Groups of variables to restrict.
+ *
+ * This method should be overridden in extending classes.
+ *
+ * Example: groups => array(
+ * 'wpdb' => array(
+ * 'type' => 'error' | 'warning',
+ * 'message' => 'Dont use this one please!',
+ * 'variables' => array( '$val', '$var' ),
+ * 'object_vars' => array( '$foo->bar', .. ),
+ * 'array_members' => array( '$foo['bar']', .. ),
+ * )
+ * )
+ *
+ * @return array
+ */
+ abstract public function getGroups();
+
+ /**
+ * Cache the groups.
+ *
+ * @return bool True if the groups were setup. False if not.
+ */
+ protected function setup_groups() {
+ $this->groups_cache = $this->getGroups();
+
+ if ( empty( $this->groups_cache ) && empty( self::$groups ) ) {
+ return false;
+ }
+
+ // Allow for adding extra unit tests.
+ if ( ! empty( self::$groups ) ) {
+ $this->groups_cache = array_merge( $this->groups_cache, self::$groups );
+ }
+
+ return true;
+ }
+
+ /**
+ * Processes this test, when one of its tokens is encountered.
+ *
+ * @param int $stackPtr The position of the current token in the stack.
+ * @return int|void Integer stack pointer to skip forward or void to continue
+ * normal file processing.
+ *
+ * @throws \PHP_CodeSniffer\Exceptions\RuntimeException Exception.
+ */
+ public function process_token( $stackPtr ) {
+
+ $token = $this->tokens[ $stackPtr ];
+
+ $this->excluded_groups = static::merge_custom_array( $this->exclude );
+ if ( array_diff_key( $this->groups_cache, $this->excluded_groups ) === [] ) {
+ // All groups have been excluded.
+ // Don't remove the listener as the exclude property can be changed inline.
+ return;
+ }
+
+ // Check if it is a function not a variable.
+ if ( \in_array( $token['code'], [ \T_OBJECT_OPERATOR, \T_DOUBLE_COLON ], true ) ) { // This only works for object vars and array members.
+ $method = $this->phpcsFile->findNext( \T_WHITESPACE, $stackPtr + 1, null, true );
+ $possible_parenthesis = $this->phpcsFile->findNext( \T_WHITESPACE, $method + 1, null, true );
+ if ( $this->tokens[ $possible_parenthesis ]['code'] === \T_OPEN_PARENTHESIS ) {
+ return; // So .. it is a function after all !
+ }
+ }
+
+ if ( $this->is_in_isset_or_empty( $stackPtr ) === true ) {
+ // Checking whether a variable exists is not the same as using it.
+ return;
+ }
+
+ foreach ( $this->groups_cache as $groupName => $group ) {
+
+ if ( isset( $this->excluded_groups[ $groupName ] ) ) {
+ continue;
+ }
+
+ $patterns = [];
+
+ // Simple variable.
+ if ( \in_array( $token['code'], [ \T_VARIABLE, \T_DOUBLE_QUOTED_STRING, \T_HEREDOC ], true ) && ! empty( $group['variables'] ) ) {
+ $patterns = array_merge( $patterns, $group['variables'] );
+ $var = $token['content'];
+
+ }
+
+ if ( \in_array( $token['code'], [ \T_OBJECT_OPERATOR, \T_DOUBLE_COLON, \T_DOUBLE_QUOTED_STRING, \T_HEREDOC ], true ) && ! empty( $group['object_vars'] ) ) {
+ // Object var, ex: $foo->bar / $foo::bar / Foo::bar / Foo::$bar .
+ $patterns = array_merge( $patterns, $group['object_vars'] );
+
+ $owner = $this->phpcsFile->findPrevious( [ \T_VARIABLE, \T_STRING ], $stackPtr );
+ $child = $this->phpcsFile->findNext( [ \T_STRING, \T_VARIABLE ], $stackPtr );
+ $var = implode( '', [ $this->tokens[ $owner ]['content'], $token['content'], $this->tokens[ $child ]['content'] ] );
+
+ }
+
+ if ( \in_array( $token['code'], [ \T_OPEN_SQUARE_BRACKET, \T_DOUBLE_QUOTED_STRING, \T_HEREDOC ], true ) && ! empty( $group['array_members'] ) ) {
+ // Array members.
+ $patterns = array_merge( $patterns, $group['array_members'] );
+
+ if ( isset( $token['bracket_closer'] ) ) {
+ $owner = $this->phpcsFile->findPrevious( \T_VARIABLE, $stackPtr );
+ $inside = $this->phpcsFile->getTokensAsString( $stackPtr, $token['bracket_closer'] - $stackPtr + 1 );
+ $var = implode( '', [ $this->tokens[ $owner ]['content'], $inside ] );
+ }
+ }
+
+ if ( empty( $patterns ) ) {
+ continue;
+ }
+
+ $patterns = array_map( [ $this, 'test_patterns' ], $patterns );
+ $pattern = implode( '|', $patterns );
+ $delim = ( $token['code'] !== \T_OPEN_SQUARE_BRACKET && $token['code'] !== \T_HEREDOC ) ? '\b' : '';
+
+ if ( $token['code'] === \T_DOUBLE_QUOTED_STRING || $token['code'] === \T_HEREDOC ) {
+ $var = $token['content'];
+ }
+
+ if ( empty( $var ) || preg_match( '#(' . $pattern . ')' . $delim . '#', $var, $match ) !== 1 ) {
+ continue;
+ }
+
+ $this->addMessage(
+ $group['message'],
+ $stackPtr,
+ $group['type'] === 'error',
+ $this->string_to_errorcode( $groupName . '_' . $match[1] ),
+ [ $var ]
+ );
+
+ return; // Show one error only.
+ }
+ }
+
+ /**
+ * Transform a wildcard pattern to a usable regex pattern.
+ *
+ * @param string $pattern Pattern.
+ * @return string
+ */
+ private function test_patterns( $pattern ) {
+ $pattern = preg_quote( $pattern, '#' );
+ $pattern = preg_replace(
+ [ '#\\\\\*#', '[\'"]' ],
+ [ '.*', '\'' ],
+ $pattern
+ );
+ return $pattern;
+ }
+
+}
diff --git a/vendor/automattic/vipwpcs/WordPressVIPMinimum/Sniffs/Classes/DeclarationCompatibilitySniff.php b/vendor/automattic/vipwpcs/WordPressVIPMinimum/Sniffs/Classes/DeclarationCompatibilitySniff.php
new file mode 100644
index 00000000..6b294807
--- /dev/null
+++ b/vendor/automattic/vipwpcs/WordPressVIPMinimum/Sniffs/Classes/DeclarationCompatibilitySniff.php
@@ -0,0 +1,390 @@
+ [
+ 'widget' => [ 'args', 'instance' ],
+ 'update' => [ 'new_instance', 'old_instance' ],
+ 'form' => [ 'instance' ],
+ 'WP_Widget' => [
+ 'id_base',
+ 'name',
+ 'widget_options' => [
+ 'default' => 'array()',
+ ],
+ 'constol_options' => [
+ 'default' => 'array()',
+ ],
+ ],
+ 'get_field_name' => [ 'field_name' ],
+ 'get_field_id' => [ 'field_name' ],
+ '_register' => [],
+ '_set' => [ 'number' ],
+ '_get_display_callback' => [],
+ '_get_update_callback' => [],
+ '_get_form_callback' => [],
+ 'is_preview' => [],
+ 'display_callback' => [
+ 'args',
+ 'widget_args' => [
+ 'default' => '1',
+ ],
+ ],
+ 'update_callback' => [
+ 'deprecated' => [
+ 'default' => '1',
+ ],
+ ],
+ 'form_callback' => [
+ 'widget_args' => [
+ 'default' => '1',
+ ],
+ ],
+ 'register_one' => [
+ 'number' => [
+ 'default' => '-1',
+ ],
+ ],
+ 'save_settings' => [ 'settings' ],
+ 'get_settings' => [],
+ ],
+ 'Walker' => [
+ 'start_lvl' => [
+ 'output' => [
+ 'pass_by_reference' => true,
+ ],
+ 'depth' => [
+ 'default' => '0',
+ ],
+ 'args' => [
+ 'default' => 'array()',
+ ],
+ ],
+ 'end_lvl' => [
+ 'output' => [
+ 'pass_by_reference' => true,
+ ],
+ 'depth' => [
+ 'default' => '0',
+ ],
+ 'args' => [
+ 'default' => 'array()',
+ ],
+ ],
+ 'start_el' => [
+ 'output' => [
+ 'pass_by_reference' => true,
+ ],
+ 'object',
+ 'depth' => [
+ 'default' => '0',
+ ],
+ 'args' => [
+ 'default' => 'array()',
+ ],
+ 'current_object_id' => [
+ 'default' => '0',
+ ],
+ ],
+ 'end_el' => [
+ 'output' => [
+ 'pass_by_reference' => true,
+ ],
+ 'object',
+ 'depth' => [
+ 'default' => '0',
+ ],
+ 'args' => [
+ 'default' => 'array()',
+ ],
+ ],
+ 'display_element' => [
+ 'element',
+ 'children_elements' => [
+ 'pass_by_reference' => true,
+ ],
+ 'max_depth',
+ 'depth',
+ 'args',
+ 'output' => [
+ 'pass_by_reference' => true,
+ ],
+ ],
+ 'walk' => [
+ 'elements',
+ 'max_depth',
+ 'args' => [
+ 'variable_length' => true,
+ ],
+ ],
+ 'paged_walk' => [
+ 'elements',
+ 'max_depth',
+ 'page_num',
+ 'per_page',
+ 'args' => [
+ 'variable_length' => true,
+ ],
+ ],
+ 'get_number_of_root_elements' => [
+ 'elements',
+ ],
+ 'unset_children' => [
+ 'el',
+ 'children_elements' => [
+ 'pass_by_reference' => true,
+ ],
+ ],
+ ],
+ ];
+
+ /**
+ * List of grouped classes with same methods (as they extend the same parent class)
+ *
+ * @var string[]
+ */
+ public $checkClassesGroups = [
+ 'Walker' => [
+ 'Walker_Category_Checklist',
+ 'Walker_Category',
+ 'Walker_CategoryDropdown',
+ 'Walker_PageDropdown',
+ 'Walker_Nav_Menu',
+ 'Walker_Page',
+ 'Walker_Comment',
+ ],
+ ];
+
+ /**
+ * Constructs the test with the tokens it wishes to listen for.
+ */
+ public function __construct() {
+ parent::__construct( [ T_CLASS ], [ T_FUNCTION ], true );
+ }
+
+ /**
+ * Processes this test when one of its tokens is encountered.
+ *
+ * @param File $phpcsFile The PHP_CodeSniffer file where the token was found.
+ * @param int $stackPtr The position of the current token in the stack passed in $tokens.
+ * @param int $currScope A pointer to the start of the scope.
+ *
+ * @return void
+ */
+ protected function processTokenWithinScope( File $phpcsFile, $stackPtr, $currScope ) {
+
+ $className = $phpcsFile->getDeclarationName( $currScope );
+
+ if ( $className !== $this->currentClass ) {
+ $this->loadFunctionNamesInScope( $phpcsFile, $currScope );
+ $this->currentClass = $className;
+ }
+
+ $methodName = $phpcsFile->getDeclarationName( $stackPtr );
+
+ $parentClassName = $phpcsFile->findExtendedClassName( $currScope );
+ if ( $parentClassName === false ) {
+ // This class does not extend any other class.
+ return;
+ }
+
+ // Meed to define the originalParentClassName since we might override the parentClassName due to signature notations grouping.
+ $originalParentClassName = $parentClassName;
+
+ if ( array_key_exists( $parentClassName, $this->checkClasses ) === false ) {
+ // This class does not extend a class we are interested in.
+ foreach ( $this->checkClassesGroups as $parent => $children ) {
+ // But it might be one of the grouped classes.
+ foreach ( $children as $child ) {
+ if ( $child === $parentClassName ) {
+ $parentClassName = $parent;
+ break 2;
+ }
+ }
+ }
+ if ( array_key_exists( $parentClassName, $this->checkClasses ) === false ) {
+ // This class really does not extend a class we are interested in.
+ return;
+ }
+ }
+
+ if ( array_key_exists( $methodName, $this->checkClasses[ $parentClassName ] ) === false &&
+ in_array( $methodName, $this->checkClasses[ $parentClassName ], true ) === false
+ ) {
+ // This method is not a one we are interested in.
+ return;
+ }
+
+ $signatureParams = $phpcsFile->getMethodParameters( $stackPtr );
+
+ $parentSignature = $this->checkClasses[ $parentClassName ][ $methodName ];
+
+ if ( count( $signatureParams ) > count( $parentSignature ) ) {
+ $extra_params = array_slice( $signatureParams, count( $parentSignature ) - count( $signatureParams ) );
+ $all_extra_params_have_default = true;
+ foreach ( $extra_params as $extra_param ) {
+ if ( array_key_exists( 'default', $extra_param ) === false || $extra_param['default'] !== 'true' ) {
+ $all_extra_params_have_default = false;
+ }
+ }
+ if ( $all_extra_params_have_default === true ) {
+ return; // We're good.
+ }
+ }
+
+ if ( count( $signatureParams ) !== count( $parentSignature ) ) {
+ $this->addError( $originalParentClassName, $methodName, $signatureParams, $parentSignature, $phpcsFile, $stackPtr );
+ return;
+ }
+
+ $i = 0;
+ foreach ( $parentSignature as $key => $param ) {
+ if ( is_array( $param ) === true ) {
+ if (
+ (
+ array_key_exists( 'default', $param ) === true &&
+ array_key_exists( 'default', $signatureParams[ $i ] ) === false
+ ) || (
+ array_key_exists( 'pass_by_reference', $param ) === true &&
+ $param['pass_by_reference'] !== $signatureParams[ $i ]['pass_by_reference']
+ ) || (
+ array_key_exists( 'variable_length', $param ) === true &&
+ $param['variable_length'] !== $signatureParams[ $i ]['variable_length']
+ )
+ ) {
+ $this->addError( $originalParentClassName, $methodName, $signatureParams, $parentSignature, $phpcsFile, $stackPtr );
+ return;
+ }
+ }
+ $i++;
+ }
+ }
+
+ /**
+ * Generates an error with nice current and parent class method notations
+ *
+ * @param string $parentClassName The name of the extended (parent) class.
+ * @param string $methodName The name of the method currently being examined.
+ * @param array $currentMethodSignature The list of params and their options of the method which is being examined.
+ * @param array $parentMethodSignature The list of params and their options of the parent class method.
+ * @param File $phpcsFile The PHP_CodeSniffer file where the token was found.
+ * @param int $stackPtr The position of the current token in the stack.
+ *
+ * @return void
+ */
+ private function addError( $parentClassName, $methodName, $currentMethodSignature, $parentMethodSignature, $phpcsFile, $stackPtr ) {
+
+ $currentSignature = sprintf( '%s::%s(%s)', $this->currentClass, $methodName, implode( ', ', $this->generateParamList( $currentMethodSignature ) ) );
+
+ $parentSignature = sprintf( '%s::%s(%s)', $parentClassName, $methodName, implode( ', ', $this->generateParamList( $parentMethodSignature ) ) );
+
+ $message = 'Declaration of `%s` should be compatible with `%s`.';
+ $data = [ $currentSignature, $parentSignature ];
+ $phpcsFile->addError( $message, $stackPtr, 'DeclarationCompatibility', $data );
+ }
+
+ /**
+ * Generates an array of params as they appear in the signature.
+ *
+ * @param array $methodSignature Signature of a method.
+ *
+ * @return array
+ */
+ private function generateParamList( $methodSignature ) {
+ $paramList = [];
+ foreach ( $methodSignature as $param => $options ) {
+ $paramName = '$';
+ if ( is_array( $options ) === false ) {
+ $paramList[] = '$' . $options;
+ continue;
+ }
+
+ if ( array_key_exists( 'name', $options ) === true ) {
+ $paramName = $options['name'];
+ } else {
+ $paramName .= $param;
+ }
+
+ if ( array_key_exists( 'variable_length', $options ) === true && $options['variable_length'] === true ) {
+ $paramName = '...' . $paramName;
+ }
+
+ if ( array_key_exists( 'pass_by_reference', $options ) === true && $options['pass_by_reference'] === true ) {
+ $paramName = '&' . $paramName;
+ }
+
+ if ( array_key_exists( 'default', $options ) === true && empty( $options['default'] ) === false ) {
+ $paramName .= ' = ' . trim( $options['default'] );
+ }
+
+ $paramList[] = $paramName;
+ }
+
+ return $paramList;
+ }
+
+ /**
+ * Extracts all the function names found in the given scope.
+ *
+ * @param File $phpcsFile The current file being scanned.
+ * @param int $currScope A pointer to the start of the scope.
+ *
+ * @return void
+ */
+ protected function loadFunctionNamesInScope( File $phpcsFile, $currScope ) {
+ $this->functionList = [];
+ $tokens = $phpcsFile->getTokens();
+
+ for ( $i = ( $tokens[ $currScope ]['scope_opener'] + 1 ); $i < $tokens[ $currScope ]['scope_closer']; $i++ ) {
+ if ( $tokens[ $i ]['code'] !== T_FUNCTION ) {
+ continue;
+ }
+
+ $next = $phpcsFile->findNext( T_STRING, $i );
+ $this->functionList[] = trim( $tokens[ $next ]['content'] );
+ }
+ }
+
+ /**
+ * Do nothing outside the scope. Has to be implemented accordingly to parent abstract class.
+ *
+ * @param File $phpcsFile PHPCS File.
+ * @param int $stackPtr Stack position.
+ */
+ public function processTokenOutsideScope( File $phpcsFile, $stackPtr ) {}
+}
diff --git a/vendor/automattic/vipwpcs/WordPressVIPMinimum/Sniffs/Classes/RestrictedExtendClassesSniff.php b/vendor/automattic/vipwpcs/WordPressVIPMinimum/Sniffs/Classes/RestrictedExtendClassesSniff.php
new file mode 100644
index 00000000..b92ffbd8
--- /dev/null
+++ b/vendor/automattic/vipwpcs/WordPressVIPMinimum/Sniffs/Classes/RestrictedExtendClassesSniff.php
@@ -0,0 +1,59 @@
+ [
+ 'type' => 'warning',
+ 'message' => 'We recommend extending `WPCOM_VIP_CLI_Command` instead of `WP_CLI_Command` and using the helper functions available in it (such as `stop_the_insanity()`), see https://vip.wordpress.com/documentation/writing-bin-scripts/ for more information.',
+ 'classes' => [
+ 'WP_CLI_Command',
+ ],
+ ],
+ ];
+ }
+
+ /**
+ * Process a matched token.
+ *
+ * @param int $stackPtr The position of the current token in the stack.
+ * @param array $group_name The name of the group which was matched.
+ * @param string $matched_content The token content (class name) which was matched.
+ *
+ * @return void
+ */
+ public function process_matched_token( $stackPtr, $group_name, $matched_content ) {
+ $tokens = $this->phpcsFile->getTokens();
+
+ if ( $tokens[ $stackPtr ]['code'] !== T_EXTENDS ) {
+ // If not extending, bail.
+ return;
+ }
+
+ foreach ( $this->getGroups() as $group => $group_args ) {
+ $this->phpcsFile->{ 'add' . $group_args['type'] }( $group_args['message'], $stackPtr, $group );
+ }
+ }
+}
diff --git a/vendor/automattic/vipwpcs/WordPressVIPMinimum/Sniffs/Compatibility/ZoninatorSniff.php b/vendor/automattic/vipwpcs/WordPressVIPMinimum/Sniffs/Compatibility/ZoninatorSniff.php
new file mode 100644
index 00000000..1dae2b96
--- /dev/null
+++ b/vendor/automattic/vipwpcs/WordPressVIPMinimum/Sniffs/Compatibility/ZoninatorSniff.php
@@ -0,0 +1,90 @@
+tokens[ $stackPtr ]['content'] !== 'wpcom_vip_load_plugin' ) {
+ return;
+ }
+
+ $openBracket = $this->phpcsFile->findNext( Tokens::$emptyTokens, $stackPtr + 1, null, true );
+
+ if ( $this->tokens[ $openBracket ]['code'] !== T_OPEN_PARENTHESIS ) {
+ // Not a function call.
+ return;
+ }
+
+ $plugin_name = $this->phpcsFile->findNext( Tokens::$emptyTokens, $openBracket + 1, null, true );
+
+ if ( $this->remove_wrapping_quotation_marks( $this->tokens[ $plugin_name ]['content'] ) !== 'zoninator' ) {
+ return;
+ }
+
+ $comma = $this->phpcsFile->findNext( Tokens::$emptyTokens, $plugin_name + 1, null, true );
+
+ if ( ! $comma || $this->tokens[ $comma ]['code'] !== 'PHPCS_T_COMMA' ) {
+ // We are loading the default version.
+ return;
+ }
+
+ $folder = $this->phpcsFile->findNext( Tokens::$emptyTokens, $comma + 1, null, true );
+
+ $comma = $this->phpcsFile->findNext( Tokens::$emptyTokens, $folder + 1, null, true );
+
+ if ( ! $comma || $this->tokens[ $comma ]['code'] !== 'PHPCS_T_COMMA' ) {
+ // We are loading the default version.
+ return;
+ }
+
+ $version = $this->phpcsFile->findNext( Tokens::$emptyTokens, $comma + 1, null, true );
+ $version = $this->remove_wrapping_quotation_marks( $this->tokens[ $version ]['content'] );
+
+ if ( version_compare( $version, '0.8', '>=' ) === true ) {
+ $message = 'Zoninator of version >= v0.8 requires WordPress core REST API. Please, make sure the `wpcom_vip_load_wp_rest_api()` is being called on all sites loading this file.';
+ $this->phpcsFile->addWarning( $message, $stackPtr, 'RequiresRESTAPI' );
+ }
+ }
+
+ /**
+ * Removes the quotation marks around T_CONSTANT_ENCAPSED_STRING.
+ *
+ * @param string $string T_CONSTANT_ENCAPSED_STRING containing wrapping quotation marks.
+ *
+ * @return string String w/o wrapping quotation marks.
+ */
+ public function remove_wrapping_quotation_marks( $string ) {
+ return trim( str_replace( '"', "'", $string ), "'" );
+ }
+}
diff --git a/vendor/automattic/vipwpcs/WordPressVIPMinimum/Sniffs/Constants/ConstantStringSniff.php b/vendor/automattic/vipwpcs/WordPressVIPMinimum/Sniffs/Constants/ConstantStringSniff.php
new file mode 100644
index 00000000..d6506c8f
--- /dev/null
+++ b/vendor/automattic/vipwpcs/WordPressVIPMinimum/Sniffs/Constants/ConstantStringSniff.php
@@ -0,0 +1,80 @@
+tokens[ $stackPtr ]['content'], [ 'define', 'defined' ], true ) === false ) {
+ return;
+ }
+
+ // Find the next non-empty token.
+ $nextToken = $this->phpcsFile->findNext( Tokens::$emptyTokens, $stackPtr + 1, null, true, null, true );
+
+ if ( $this->tokens[ $nextToken ]['code'] !== T_OPEN_PARENTHESIS ) {
+ // Not a function call.
+ return;
+ }
+
+ if ( isset( $this->tokens[ $nextToken ]['parenthesis_closer'] ) === false ) {
+ // Not a function call.
+ return;
+ }
+
+ $param = $this->get_function_call_parameter( $stackPtr, 1 );
+ if ( $param === false ) {
+ // Target parameter not found.
+ return;
+ }
+
+ $search = Tokens::$emptyTokens;
+ $search[ T_STRING ] = T_STRING;
+
+ $has_only_tstring = $this->phpcsFile->findNext( $search, $param['start'], $param['end'] + 1, true );
+ if ( $has_only_tstring !== false ) {
+ // Came across something other than a T_STRING token. Ignore.
+ return;
+ }
+
+ $tstring_token = $this->phpcsFile->findNext( T_STRING, $param['start'], $param['end'] + 1 );
+
+ $message = 'Constant name, as a string, should be used along with `%s()`.';
+ $data = [ $this->tokens[ $stackPtr ]['content'] ];
+ $this->phpcsFile->addError( $message, $tstring_token, 'NotCheckingConstantName', $data );
+ }
+
+}
diff --git a/vendor/automattic/vipwpcs/WordPressVIPMinimum/Sniffs/Constants/RestrictedConstantsSniff.php b/vendor/automattic/vipwpcs/WordPressVIPMinimum/Sniffs/Constants/RestrictedConstantsSniff.php
new file mode 100644
index 00000000..92d1f7dc
--- /dev/null
+++ b/vendor/automattic/vipwpcs/WordPressVIPMinimum/Sniffs/Constants/RestrictedConstantsSniff.php
@@ -0,0 +1,112 @@
+tokens[ $stackPtr ]['code'] === T_STRING ) {
+ $constantName = $this->tokens[ $stackPtr ]['content'];
+ } else {
+ $constantName = trim( $this->tokens[ $stackPtr ]['content'], "\"'" );
+ }
+
+ if ( in_array( $constantName, $this->restrictedConstantNames, true ) === false && in_array( $constantName, $this->restrictedConstantDeclaration, true ) === false ) {
+ // Not the constant we are looking for.
+ return;
+ }
+
+ if ( $this->tokens[ $stackPtr ]['code'] === T_STRING && in_array( $constantName, $this->restrictedConstantNames, true ) === true ) {
+ $message = 'Code is touching the `%s` constant. Make sure it\'s used appropriately.';
+ $data = [ $constantName ];
+ $this->phpcsFile->addWarning( $message, $stackPtr, 'UsingRestrictedConstant', $data );
+ return;
+ }
+
+ // Find the previous non-empty token.
+ $openBracket = $this->phpcsFile->findPrevious( Tokens::$emptyTokens, $stackPtr - 1, null, true, null, true );
+
+ if ( $this->tokens[ $openBracket ]['code'] !== T_OPEN_PARENTHESIS ) {
+ // Not a function call.
+ return;
+ }
+
+ if ( isset( $this->tokens[ $openBracket ]['parenthesis_closer'] ) === false ) {
+ // Not a function call.
+ return;
+ }
+
+ // Find the previous non-empty token.
+ $search = Tokens::$emptyTokens;
+ $search[] = T_BITWISE_AND;
+ $previous = $this->phpcsFile->findPrevious( $search, $openBracket - 1, null, true );
+ if ( $this->tokens[ $previous ]['code'] === T_FUNCTION ) {
+ // It's a function definition, not a function call.
+ return;
+ }
+
+ if ( in_array( $this->tokens[ $previous ]['code'], Tokens::$functionNameTokens, true ) === true ) {
+ $data = [ $constantName ];
+ if ( $this->tokens[ $previous ]['content'] === 'define' ) {
+ $message = 'The definition of `%s` constant is prohibited. Please use a different name.';
+ $this->phpcsFile->addError( $message, $previous, 'DefiningRestrictedConstant', $data );
+ } elseif ( in_array( $constantName, $this->restrictedConstantNames, true ) === true ) {
+ $message = 'Code is touching the `%s` constant. Make sure it\'s used appropriately.';
+ $this->phpcsFile->addWarning( $message, $previous, 'UsingRestrictedConstant', $data );
+ }
+ }
+ }
+}
diff --git a/vendor/automattic/vipwpcs/WordPressVIPMinimum/Sniffs/Files/IncludingFileSniff.php b/vendor/automattic/vipwpcs/WordPressVIPMinimum/Sniffs/Files/IncludingFileSniff.php
new file mode 100644
index 00000000..4cbbfb12
--- /dev/null
+++ b/vendor/automattic/vipwpcs/WordPressVIPMinimum/Sniffs/Files/IncludingFileSniff.php
@@ -0,0 +1,207 @@
+ 'get_template_directory',
+ 'STYLESHEETPATH' => 'get_stylesheet_directory',
+ ];
+
+ /**
+ * List of allowed constants.
+ *
+ * @var array
+ */
+ public $allowedConstants = [
+ 'ABSPATH',
+ 'WP_CONTENT_DIR',
+ 'WP_PLUGIN_DIR',
+ ];
+
+ /**
+ * List of keywords allowed for use in custom constants.
+ * Note: Customizing this property will overwrite current default values.
+ *
+ * @var array
+ */
+ public $allowedKeywords = [
+ 'PATH',
+ 'DIR',
+ ];
+
+ /**
+ * Functions used for modify slashes.
+ *
+ * @var array
+ */
+ public $slashingFunctions = [
+ 'trailingslashit',
+ 'user_trailingslashit',
+ 'untrailingslashit',
+ ];
+
+ /**
+ * Groups of functions to restrict.
+ *
+ * @return array
+ */
+ public function getGroups() {
+ return [];
+ }
+
+ /**
+ * Returns an array of tokens this test wants to listen for.
+ *
+ * @return array
+ */
+ public function register() {
+ return Tokens::$includeTokens;
+ }
+
+ /**
+ * Processes this test, when one of its tokens is encountered.
+ *
+ * @param int $stackPtr The position of the current token in the stack.
+ *
+ * @return void
+ */
+ public function process_token( $stackPtr ) {
+ $nextToken = $this->phpcsFile->findNext( Tokens::$emptyTokens, $stackPtr + 1, null, true, null, true );
+
+ if ( $this->tokens[ $nextToken ]['code'] === T_OPEN_PARENTHESIS ) {
+ // The construct is using parenthesis, grab the next non empty token.
+ $nextToken = $this->phpcsFile->findNext( Tokens::$emptyTokens, $nextToken + 1, null, true, null, true );
+ }
+
+ if ( $this->tokens[ $nextToken ]['code'] === T_DIR || $this->tokens[ $nextToken ]['content'] === '__DIR__' ) {
+ // The construct is using __DIR__ which is fine.
+ return;
+ }
+
+ if ( $this->tokens[ $nextToken ]['code'] === T_VARIABLE ) {
+ $message = 'File inclusion using variable (`%s`). Probably needs manual inspection.';
+ $data = [ $this->tokens[ $nextToken ]['content'] ];
+ $this->phpcsFile->addWarning( $message, $nextToken, 'UsingVariable', $data );
+ return;
+ }
+
+ if ( $this->tokens[ $nextToken ]['code'] === T_STRING ) {
+ if ( in_array( $this->tokens[ $nextToken ]['content'], $this->getPathFunctions, true ) === true ) {
+ // The construct is using one of the function for getting correct path which is fine.
+ return;
+ }
+
+ if ( in_array( $this->tokens[ $nextToken ]['content'], $this->allowedConstants, true ) === true ) {
+ // The construct is using one of the allowed constants which is fine.
+ return;
+ }
+
+ if ( $this->has_custom_path( $this->tokens[ $nextToken ]['content'] ) === true ) {
+ // The construct is using a constant with an allowed keyword.
+ return;
+ }
+
+ if ( array_key_exists( $this->tokens[ $nextToken ]['content'], $this->restrictedConstants ) === true ) {
+ // The construct is using one of the restricted constants.
+ $message = '`%s` constant might not be defined or available. Use `%s()` instead.';
+ $data = [ $this->tokens[ $nextToken ]['content'], $this->restrictedConstants[ $this->tokens[ $nextToken ]['content'] ] ];
+ $this->phpcsFile->addError( $message, $nextToken, 'RestrictedConstant', $data );
+ return;
+ }
+
+ $nextNextToken = $this->phpcsFile->findNext( array_merge( Tokens::$emptyTokens, [ T_COMMENT ] ), $nextToken + 1, null, true, null, true );
+ if ( preg_match( '/^[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*$/', $this->tokens[ $nextToken ]['content'] ) === 1 && $this->tokens[ $nextNextToken ]['code'] !== T_OPEN_PARENTHESIS ) {
+ // The construct is using custom constant, which needs manual inspection.
+ $message = 'File inclusion using custom constant (`%s`). Probably needs manual inspection.';
+ $data = [ $this->tokens[ $nextToken ]['content'] ];
+ $this->phpcsFile->addWarning( $message, $nextToken, 'UsingCustomConstant', $data );
+ return;
+ }
+
+ if ( strpos( $this->tokens[ $nextToken ]['content'], '$' ) === 0 ) {
+ $message = 'File inclusion using variable (`%s`). Probably needs manual inspection.';
+ $data = [ $this->tokens[ $nextToken ]['content'] ];
+ $this->phpcsFile->addWarning( $message, $nextToken, 'UsingVariable', $data );
+ return;
+ }
+
+ if ( in_array( $this->tokens[ $nextToken ]['content'], $this->slashingFunctions, true ) === true ) {
+ // The construct is using one of the slashing functions, it's probably correct.
+ return;
+ }
+
+ if ( $this->is_targetted_token( $nextToken ) ) {
+ $message = 'File inclusion using custom function ( `%s()` ). Must return local file source, as external URLs are prohibited on WordPress VIP. Probably needs manual inspection.';
+ $data = [ $this->tokens[ $nextToken ]['content'] ];
+ $this->phpcsFile->addWarning( $message, $nextToken, 'UsingCustomFunction', $data );
+ return;
+ }
+
+ $message = 'Absolute include path must be used. Use `get_template_directory()`, `get_stylesheet_directory()` or `plugin_dir_path()`.';
+ $this->phpcsFile->addError( $message, $nextToken, 'NotAbsolutePath' );
+ return;
+ }
+
+ if ( $this->tokens[ $nextToken ]['code'] === T_CONSTANT_ENCAPSED_STRING && filter_var( str_replace( [ '"', "'" ], '', $this->tokens[ $nextToken ]['content'] ), FILTER_VALIDATE_URL ) ) {
+ $message = 'Include path must be local file source, external URLs are prohibited on WordPress VIP.';
+ $this->phpcsFile->addError( $message, $nextToken, 'ExternalURL' );
+ return;
+ }
+
+ $message = 'Absolute include path must be used. Use `get_template_directory()`, `get_stylesheet_directory()` or `plugin_dir_path()`.';
+ $this->phpcsFile->addError( $message, $nextToken, 'NotAbsolutePath' );
+ }
+
+ /**
+ * Check if a content string contains a keyword in custom paths.
+ *
+ * @param string $content Content string.
+ *
+ * @return bool True if the string partially matches a keyword in $allowedCustomKeywords, false otherwise.
+ */
+ private function has_custom_path( $content ) {
+ foreach ( $this->allowedKeywords as $keyword ) {
+ if ( strpos( $content, $keyword ) !== false ) {
+ return true;
+ }
+ }
+
+ return false;
+ }
+}
diff --git a/vendor/automattic/vipwpcs/WordPressVIPMinimum/Sniffs/Files/IncludingNonPHPFileSniff.php b/vendor/automattic/vipwpcs/WordPressVIPMinimum/Sniffs/Files/IncludingNonPHPFileSniff.php
new file mode 100644
index 00000000..de30c6e5
--- /dev/null
+++ b/vendor/automattic/vipwpcs/WordPressVIPMinimum/Sniffs/Files/IncludingNonPHPFileSniff.php
@@ -0,0 +1,105 @@
+ true,
+ 'inc' => true,
+ 'phar' => true,
+ ];
+
+ /**
+ * File extensions used for SVG and CSS files.
+ *
+ * @var array Key is the extension, value is irrelevant.
+ */
+ private $svg_css_extensions = [
+ 'css' => true,
+ 'svg' => true,
+ ];
+
+ /**
+ * Returns an array of tokens this test wants to listen for.
+ *
+ * @return array
+ */
+ public function register() {
+ return Tokens::$includeTokens;
+ }
+
+ /**
+ * Processes this test, when one of its tokens is encountered.
+ *
+ * @param int $stackPtr The position of the current token in the stack passed in $tokens.
+ *
+ * @return void
+ */
+ public function process_token( $stackPtr ) {
+ $end_of_statement = $this->phpcsFile->findEndOfStatement( $stackPtr );
+ $curStackPtr = ( $end_of_statement + 1 );
+
+ do {
+ $curStackPtr = $this->phpcsFile->findPrevious( Tokens::$stringTokens, $curStackPtr - 1, $stackPtr );
+ if ( $curStackPtr === false ) {
+ return;
+ }
+
+ $stringWithoutEnclosingQuotationMarks = trim( $this->tokens[ $curStackPtr ]['content'], "\"'" );
+
+ $isFileName = preg_match( '`\.([a-z]{2,})$`i', $stringWithoutEnclosingQuotationMarks, $regexMatches );
+
+ if ( $isFileName !== 1 ) {
+ continue;
+ }
+
+ $extension = strtolower( $regexMatches[1] );
+ if ( isset( $this->php_extensions[ $extension ] ) === true ) {
+ return;
+ }
+
+ $message = 'Local non-PHP file should be loaded via `file_get_contents` rather than via `%s`. Found: %s';
+ $data = [
+ strtolower( $this->tokens[ $stackPtr ]['content'] ),
+ $this->tokens[ $curStackPtr ]['content'],
+ ];
+ $code = 'IncludingNonPHPFile';
+
+ if ( isset( $this->svg_css_extensions[ $extension ] ) === true ) {
+ // Be more specific for SVG and CSS files.
+ $message = 'Local SVG and CSS files should be loaded via `file_get_contents` rather than via `%s`. Found: %s';
+ $code = 'IncludingSVGCSSFile';
+ }
+
+ $this->phpcsFile->addError( $message, $curStackPtr, $code, $data );
+
+ // Don't throw more than one error for any one statement.
+ return;
+
+ } while ( $curStackPtr > $stackPtr );
+ }
+
+}
diff --git a/vendor/automattic/vipwpcs/WordPressVIPMinimum/Sniffs/Functions/CheckReturnValueSniff.php b/vendor/automattic/vipwpcs/WordPressVIPMinimum/Sniffs/Functions/CheckReturnValueSniff.php
new file mode 100644
index 00000000..86a7348e
--- /dev/null
+++ b/vendor/automattic/vipwpcs/WordPressVIPMinimum/Sniffs/Functions/CheckReturnValueSniff.php
@@ -0,0 +1,315 @@
+
+ * echo esc_url( wpcom_vip_get_term_link( $term ) );
+ *
+ */
+class CheckReturnValueSniff extends Sniff {
+
+ /**
+ * Pairs we are about to check.
+ *
+ * @var array
+ */
+ public $catch = [
+ 'esc_url' => [
+ 'get_term_link',
+ ],
+ 'wp_list_pluck' => [
+ 'get_the_tags',
+ 'get_the_terms',
+ ],
+ 'foreach' => [
+ 'get_post_meta',
+ 'get_term_meta',
+ 'get_the_terms',
+ 'get_the_tags',
+ ],
+ 'array_key_exists' => [
+ 'get_option',
+ ],
+ ];
+
+ /**
+ * Tokens we are about to examine, which are not functions.
+ *
+ * @var array
+ */
+ public $notFunctions = [
+ 'foreach' => T_FOREACH,
+ ];
+
+ /**
+ * Returns the token types that this sniff is interested in.
+ *
+ * @return array(int)
+ */
+ public function register() {
+ return [ T_STRING ];
+ }
+
+ /**
+ * Processes the tokens that this sniff is interested in.
+ *
+ * @param int $stackPtr The position in the stack where
+ * the token was found.
+ *
+ * @return void
+ */
+ public function process_token( $stackPtr ) {
+
+ $this->findDirectFunctionCalls( $stackPtr );
+ $this->findNonCheckedVariables( $stackPtr );
+ }
+
+ /**
+ * Check whether the currently examined code is a function call.
+ *
+ * @param int $stackPtr The position of the current token in the stack passed in $tokens.
+ *
+ * @return bool
+ */
+ private function isFunctionCall( $stackPtr ) {
+
+ if ( $this->tokens[ $stackPtr ]['code'] !== T_STRING ) {
+ return false;
+ }
+
+ // Find the next non-empty token.
+ $openBracket = $this->phpcsFile->findNext( Tokens::$emptyTokens, $stackPtr + 1, null, true );
+
+ if ( $this->tokens[ $openBracket ]['code'] !== T_OPEN_PARENTHESIS ) {
+ // Not a function call.
+ return false;
+ }
+
+ // Find the previous non-empty token.
+ $search = Tokens::$emptyTokens;
+ $search[] = T_BITWISE_AND;
+ $previous = $this->phpcsFile->findPrevious( $search, $stackPtr - 1, null, true );
+
+ // It's a function definition, not a function call, so return false.
+ return ! ( $this->tokens[ $previous ]['code'] === T_FUNCTION );
+ }
+
+ /**
+ * Check whether the examined code is a variable assignment.
+ *
+ * @param int $stackPtr The position of the current token in the stack passed in $tokens.
+ *
+ * @return bool
+ */
+ private function isVariableAssignment( $stackPtr ) {
+
+ // Find the previous non-empty token.
+ $search = Tokens::$emptyTokens;
+ $search[] = T_BITWISE_AND;
+ $previous = $this->phpcsFile->findPrevious( $search, $stackPtr - 1, null, true );
+
+ if ( $this->tokens[ $previous ]['code'] !== T_EQUAL ) {
+ // It's not a variable assignment.
+ return false;
+ }
+
+ $previous = $this->phpcsFile->findPrevious( $search, $previous - 1, null, true );
+
+ if ( $this->tokens[ $previous ]['code'] !== T_VARIABLE ) {
+ // It's not a variable assignment.
+ return false;
+ }
+
+ return $previous;
+ }
+
+ /**
+ * Find instances in which a function call is directly passed to another one w/o checking the return type
+ *
+ * @param int $stackPtr The position of the current token in the stack passed in $tokens.
+ */
+ public function findDirectFunctionCalls( $stackPtr ) {
+
+ $functionName = $this->tokens[ $stackPtr ]['content'];
+
+ if ( array_key_exists( $functionName, $this->catch ) === false ) {
+ // Not a function we are looking for.
+ return;
+ }
+
+ if ( $this->isFunctionCall( $stackPtr ) === false ) {
+ // Not a function call.
+ return;
+ }
+
+ // Find the next non-empty token.
+ $openBracket = $this->phpcsFile->findNext( Tokens::$emptyTokens, $stackPtr + 1, null, true );
+
+ // Find the closing bracket.
+ $closeBracket = $this->tokens[ $openBracket ]['parenthesis_closer'];
+
+ $startNext = $openBracket + 1;
+ $next = $this->phpcsFile->findNext( T_STRING, $startNext, $closeBracket, false, null, true );
+ while ( $next ) {
+ if ( in_array( $this->tokens[ $next ]['content'], $this->catch[ $functionName ], true ) === true ) {
+ $message = "`%s`'s return type must be checked before calling `%s` using that value.";
+ $data = [ $this->tokens[ $next ]['content'], $functionName ];
+ $this->phpcsFile->addError( $message, $next, 'DirectFunctionCall', $data );
+ }
+ $next = $this->phpcsFile->findNext( T_STRING, $next + 1, $closeBracket, false, null, true );
+ }
+ }
+
+ /**
+ * Deals with situations in which the variable is being used later in the code along with a function which is known for causing issues.
+ *
+ * This only catches situations in which the variable is not being used with some other function before it's interacting with function we look for.
+ * That's currently necessary in order to prevent false positives.
+ *
+ * @param int $stackPtr The position of the current token in the stack passed in $tokens.
+ *
+ * @return void
+ */
+ public function findNonCheckedVariables( $stackPtr ) {
+
+ $functionName = $this->tokens[ $stackPtr ]['content'];
+
+ $isFunctionWeLookFor = false;
+
+ $callees = [];
+
+ foreach ( $this->catch as $callee => $checkReturnArray ) {
+ if ( in_array( $functionName, $checkReturnArray, true ) === true ) {
+ $isFunctionWeLookFor = true;
+ $callees[] = $callee;
+ }
+ }
+
+ if ( $isFunctionWeLookFor === false ) {
+ // Not a function we are looking for.
+ return;
+ }
+
+ if ( $this->isFunctionCall( $stackPtr ) === false ) {
+ // Not a function call.
+ return;
+ }
+
+ $variablePos = $this->isVariableAssignment( $stackPtr );
+
+ if ( $variablePos === false ) {
+ // Not a variable assignment.
+ return;
+ }
+
+ $variableToken = $this->tokens[ $variablePos ];
+ $variableName = $variableToken['content'];
+
+ // Find the next non-empty token.
+ $openBracket = $this->phpcsFile->findNext( Tokens::$emptyTokens, $stackPtr + 1, null, true );
+
+ // Find the closing bracket.
+ $closeBracket = $this->tokens[ $openBracket ]['parenthesis_closer'];
+
+ if ( in_array( $functionName, [ 'get_post_meta', 'get_term_meta' ], true ) === true ) {
+ // Since the get_post_meta and get_term_meta always returns an array if $single is set to `true` we need to check for the value of it's third param before proceeding.
+ $params = [];
+ $paramNo = 1;
+ $prevCommaPos = $openBracket + 1;
+
+ for ( $i = $openBracket + 1; $i <= $closeBracket; $i++ ) {
+
+ if ( $this->tokens[ $i ]['code'] === T_OPEN_PARENTHESIS ) {
+ $i = $this->tokens[ $i ]['parenthesis_closer'];
+ }
+
+ if ( $this->tokens[ $i ]['code'] === T_COMMA ) {
+ $params[ $paramNo++ ] = trim( array_reduce( array_slice( $this->tokens, $prevCommaPos, $i - $prevCommaPos ), [ $this, 'reduce_array' ] ) );
+ $prevCommaPos = $i + 1;
+ }
+
+ if ( $i === $closeBracket ) {
+ $params[ $paramNo ] = trim( array_reduce( array_slice( $this->tokens, $prevCommaPos, $i - $prevCommaPos ), [ $this, 'reduce_array' ] ) );
+ break;
+ }
+ }
+
+ if ( array_key_exists( 3, $params ) === false || $params[3] === 'false' ) {
+ // Third param of get_post_meta is not set (default to false) or is set to false.
+ // Means the function returns an array. We are good then.
+ return;
+ }
+ }
+
+ $nextVariableOccurrence = $this->phpcsFile->findNext( T_VARIABLE, $closeBracket + 1, null, false, $variableName );
+
+ // Find previous non-empty token, which is not an open parenthesis, comma nor variable.
+ $search = Tokens::$emptyTokens;
+ $search[] = T_OPEN_PARENTHESIS;
+ // This allows us to check for variables which are passed as second parameter of a function e.g.: array_key_exists.
+ $search[] = T_COMMA;
+ $search[] = T_VARIABLE;
+ $search[] = T_CONSTANT_ENCAPSED_STRING;
+
+ $nextFunctionCallWithVariable = $this->phpcsFile->findPrevious( $search, $nextVariableOccurrence - 1, null, true );
+
+ foreach ( $callees as $callee ) {
+ $notFunctionsCallee = array_key_exists( $callee, $this->notFunctions ) ? (array) $this->notFunctions[ $callee ] : [];
+ // Check whether the found token is one of the function calls (or foreach call) we are interested in.
+ if ( in_array( $this->tokens[ $nextFunctionCallWithVariable ]['code'], array_merge( [ T_STRING ], $notFunctionsCallee ), true ) === true
+ && $this->tokens[ $nextFunctionCallWithVariable ]['content'] === $callee
+ ) {
+ $this->addNonCheckedVariableError( $nextFunctionCallWithVariable, $variableName, $callee );
+ return;
+ }
+
+ $search = array_merge( Tokens::$emptyTokens, [ T_EQUAL ] );
+ $next = $this->phpcsFile->findNext( $search, $nextVariableOccurrence + 1, null, true );
+ if ( $this->tokens[ $next ]['code'] === T_STRING
+ && $this->tokens[ $next ]['content'] === $callee
+ ) {
+ $this->addNonCheckedVariableError( $next, $variableName, $callee );
+ return;
+ }
+ }
+ }
+
+ /**
+ * Function used as as callback for the array_reduce call.
+ *
+ * @param string $carry The final string.
+ * @param array $item Processed item.
+ *
+ * @return string
+ */
+ public function reduce_array( $carry, $item ) {
+ return $carry . $item['content'];
+ }
+
+ /**
+ * Consolidated violation.
+ *
+ * @param int $stackPtr The position in the stack where the token was found.
+ * @param string $variableName Variable name.
+ * @param string $callee Function name.
+ */
+ private function addNonCheckedVariableError( $stackPtr, $variableName, $callee ) {
+ $message = 'Type of `%s` must be checked before calling `%s()` using that variable.';
+ $data = [ $variableName, $callee ];
+ $this->phpcsFile->addError( $message, $stackPtr, 'NonCheckedVariable', $data );
+ }
+
+}
diff --git a/vendor/automattic/vipwpcs/WordPressVIPMinimum/Sniffs/Functions/DynamicCallsSniff.php b/vendor/automattic/vipwpcs/WordPressVIPMinimum/Sniffs/Functions/DynamicCallsSniff.php
new file mode 100644
index 00000000..c069696f
--- /dev/null
+++ b/vendor/automattic/vipwpcs/WordPressVIPMinimum/Sniffs/Functions/DynamicCallsSniff.php
@@ -0,0 +1,188 @@
+ true,
+ 'compact' => true,
+ 'extract' => true,
+ 'func_get_args' => true,
+ 'func_get_arg' => true,
+ 'func_num_args' => true,
+ 'get_defined_vars' => true,
+ 'mb_parse_str' => true,
+ 'parse_str' => true,
+ ];
+
+ /**
+ * Array of variable assignments encountered, along with their values.
+ *
+ * Populated at run-time.
+ *
+ * @var array The key is the name of the variable, the value, its assigned value.
+ */
+ private $variables_arr = [];
+
+ /**
+ * The position in the stack where the token was found.
+ *
+ * @var int
+ */
+ private $stackPtr;
+
+ /**
+ * Returns the token types that this sniff is interested in.
+ *
+ * @return array(int)
+ */
+ public function register() {
+ return [ T_VARIABLE => T_VARIABLE ];
+ }
+
+ /**
+ * Processes the tokens that this sniff is interested in.
+ *
+ * @param int $stackPtr The position in the stack where the token was found.
+ *
+ * @return void
+ */
+ public function process_token( $stackPtr ) {
+ $this->stackPtr = $stackPtr;
+
+ // First collect all variables encountered and their values.
+ $this->collect_variables();
+
+ // Then find all dynamic calls, and report them.
+ $this->find_dynamic_calls();
+ }
+
+ /**
+ * Finds any variable-definitions in the file being processed and stores them
+ * internally in a private array.
+ *
+ * @return void
+ */
+ private function collect_variables() {
+
+ $current_var_name = $this->tokens[ $this->stackPtr ]['content'];
+
+ /*
+ * Find assignments ( $foo = "bar"; ) by finding all non-whitespaces,
+ * and checking if the first one is T_EQUAL.
+ */
+ $t_item_key = $this->phpcsFile->findNext(
+ Tokens::$emptyTokens,
+ $this->stackPtr + 1,
+ null,
+ true,
+ null,
+ true
+ );
+
+ if ( $t_item_key === false || $this->tokens[ $t_item_key ]['code'] !== T_EQUAL ) {
+ return;
+ }
+
+ /*
+ * Find assignments which only assign a plain text string.
+ */
+ $end_of_statement = $this->phpcsFile->findNext( [ T_SEMICOLON, T_CLOSE_TAG ], ( $t_item_key + 1 ) );
+ $value_ptr = null;
+
+ for ( $i = $t_item_key + 1; $i < $end_of_statement; $i++ ) {
+ if ( isset( Tokens::$emptyTokens[ $this->tokens[ $i ]['code'] ] ) === true ) {
+ continue;
+ }
+
+ if ( $this->tokens[ $i ]['code'] !== T_CONSTANT_ENCAPSED_STRING ) {
+ // Not a plain text string value. Value cannot be determined reliably.
+ return;
+ }
+
+ $value_ptr = $i;
+ }
+
+ if ( isset( $value_ptr ) === false ) {
+ // Parse error. Bow out.
+ return;
+ }
+
+ /*
+ * If we reached the end of the loop and the $value_ptr was set, we know for sure
+ * this was a plain text string variable assignment.
+ */
+ $current_var_value = $this->strip_quotes( $this->tokens[ $value_ptr ]['content'] );
+
+ if ( isset( $this->disallowed_functions[ $current_var_value ] ) === false ) {
+ // Text string is not one of the ones we're looking for.
+ return;
+ }
+
+ /*
+ * Register the variable name and value in the internal array for later usage.
+ */
+ $this->variables_arr[ $current_var_name ] = $current_var_value;
+ }
+
+ /**
+ * Find any dynamic calls being made using variables.
+ *
+ * Report on this when found, using the name of the function in the message.
+ *
+ * @return void
+ */
+ private function find_dynamic_calls() {
+ // No variables detected; no basis for doing anything.
+ if ( empty( $this->variables_arr ) ) {
+ return;
+ }
+
+ /*
+ * If variable is not found in our registry of variables, do nothing, as we cannot be
+ * sure that the function being called is one of the disallowed ones.
+ */
+ if ( ! isset( $this->variables_arr[ $this->tokens[ $this->stackPtr ]['content'] ] ) ) {
+ return;
+ }
+
+ /*
+ * Check if we have an '(' next.
+ */
+ $next = $this->phpcsFile->findNext( Tokens::$emptyTokens, ( $this->stackPtr + 1 ), null, true );
+ if ( $next === false || $this->tokens[ $next ]['code'] !== T_OPEN_PARENTHESIS ) {
+ return;
+ }
+
+ $message = 'Dynamic calling is not recommended in the case of %s().';
+ $data = [ $this->variables_arr[ $this->tokens[ $this->stackPtr ]['content'] ] ];
+ $this->phpcsFile->addError( $message, $this->stackPtr, 'DynamicCalls', $data );
+ }
+}
diff --git a/vendor/automattic/vipwpcs/WordPressVIPMinimum/Sniffs/Functions/RestrictedFunctionsSniff.php b/vendor/automattic/vipwpcs/WordPressVIPMinimum/Sniffs/Functions/RestrictedFunctionsSniff.php
new file mode 100644
index 00000000..8f3bba86
--- /dev/null
+++ b/vendor/automattic/vipwpcs/WordPressVIPMinimum/Sniffs/Functions/RestrictedFunctionsSniff.php
@@ -0,0 +1,371 @@
+ [
+ 'type' => 'error',
+ 'message' => '`%s` is prohibited on the WordPress VIP platform due to memory corruption.',
+ 'functions' => [
+ 'opcache_reset',
+ 'opcache_invalidate',
+ 'opcache_compile_file',
+ ],
+ ],
+ 'config_settings' => [
+ 'type' => 'error',
+ 'message' => '`%s` is not recommended for use on the WordPress VIP platform due to potential setting changes.',
+ 'functions' => [
+ 'opcache_is_script_cached',
+ 'opcache_get_status',
+ 'opcache_get_configuration',
+ ],
+ ],
+ 'internal' => [
+ 'type' => 'error',
+ 'message' => '`%1$s()` is for internal use only.',
+ 'functions' => [
+ 'wpcom_vip_irc',
+ ],
+ ],
+ 'flush_rewrite_rules' => [
+ 'type' => 'error',
+ 'message' => '`%s` should not be used in any normal circumstances in the theme code.',
+ 'functions' => [
+ 'flush_rewrite_rules',
+ ],
+ ],
+ 'flush_rules' => [
+ 'type' => 'error',
+ 'message' => '`%s` should not be used in any normal circumstances in the theme code.',
+ 'functions' => [
+ 'flush_rules',
+ ],
+ 'object_var' => [
+ '$wp_rewrite' => true,
+ ],
+ ],
+ 'attachment_url_to_postid' => [
+ 'type' => 'error',
+ 'message' => '`%s()` is prohibited, please use `wpcom_vip_attachment_url_to_postid()` instead.',
+ 'functions' => [
+ 'attachment_url_to_postid',
+ ],
+ ],
+ // @link https://docs.wpvip.com/technical-references/code-review/vip-notices/#h-switch_to_blog
+ 'switch_to_blog' => [
+ 'type' => 'warning',
+ 'message' => '%s() may not work as expected since it only changes the database context for the blog and does not load the plugins or theme of that site. Filters or hooks on the blog you are switching to will not run.',
+ 'functions' => [
+ 'switch_to_blog',
+ ],
+ ],
+ 'get_page_by_title' => [
+ 'type' => 'error',
+ 'message' => '%s() is prohibited, please use wpcom_vip_get_page_by_title() instead.',
+ 'functions' => [
+ 'get_page_by_title',
+ ],
+ ],
+ 'url_to_postid' => [
+ 'type' => 'error',
+ 'message' => '%s() is prohibited, please use wpcom_vip_url_to_postid() instead.',
+ 'functions' => [
+ 'url_to_postid',
+ ],
+ ],
+ // @link https://docs.wpvip.com/how-tos/customize-user-roles/
+ 'custom_role' => [
+ 'type' => 'error',
+ 'message' => 'Use wpcom_vip_add_role() instead of %s().',
+ 'functions' => [
+ 'add_role',
+ ],
+ ],
+ 'term_exists' => [
+ 'type' => 'error',
+ 'message' => '%s() is highly discouraged due to not being cached; please use wpcom_vip_term_exists() instead.',
+ 'functions' => [
+ 'term_exists',
+ ],
+ ],
+ 'count_user_posts' => [
+ 'type' => 'error',
+ 'message' => '%s() is highly discouraged due to not being cached; please use wpcom_vip_count_user_posts() instead.',
+ 'functions' => [
+ 'count_user_posts',
+ ],
+ ],
+ 'wp_old_slug_redirect' => [
+ 'type' => 'error',
+ 'message' => '%s() is highly discouraged due to not being cached; please use wpcom_vip_old_slug_redirect() instead.',
+ 'functions' => [
+ 'wp_old_slug_redirect',
+ ],
+ ],
+ 'get_adjacent_post' => [
+ 'type' => 'error',
+ 'message' => '%s() is highly discouraged due to not being cached; please use wpcom_vip_get_adjacent_post() instead.',
+ 'functions' => [
+ 'get_adjacent_post',
+ 'get_previous_post',
+ 'get_previous_post_link',
+ 'get_next_post',
+ 'get_next_post_link',
+ ],
+ ],
+ 'get_intermediate_image_sizes' => [
+ 'type' => 'error',
+ 'message' => 'Intermediate images do not exist on the VIP platform, and thus get_intermediate_image_sizes() returns an empty array() on the platform. This behavior is intentional to prevent WordPress from generating multiple thumbnails when images are uploaded.',
+ 'functions' => [
+ 'get_intermediate_image_sizes',
+ ],
+ ],
+ // @link https://docs.wpvip.com/technical-references/code-review/vip-warnings/#h-mobile-detection
+ 'wp_is_mobile' => [
+ 'type' => 'error',
+ 'message' => '%s() found. When targeting mobile visitors, jetpack_is_mobile() should be used instead of wp_is_mobile. It is more robust and works better with full page caching.',
+ 'functions' => [
+ 'wp_is_mobile',
+ ],
+ ],
+ 'session' => [
+ 'type' => 'error',
+ 'message' => 'The use of PHP session function %s() is prohibited.',
+ 'functions' => [
+ 'session_abort',
+ 'session_cache_expire',
+ 'session_cache_limiter',
+ 'session_commit',
+ 'session_create_id',
+ 'session_decode',
+ 'session_destroy',
+ 'session_encode',
+ 'session_gc',
+ 'session_get_cookie_params',
+ 'session_id',
+ 'session_is_registered',
+ 'session_module_name',
+ 'session_name',
+ 'session_regenerate_id',
+ 'session_register_shutdown',
+ 'session_register',
+ 'session_reset',
+ 'session_save_path',
+ 'session_set_cookie_params',
+ 'session_set_save_handler',
+ 'session_start',
+ 'session_status',
+ 'session_unregister',
+ 'session_unset',
+ 'session_write_close',
+ ],
+ ],
+ 'file_ops' => [
+ 'type' => 'error',
+ 'message' => 'Filesystem writes are forbidden, please do not use %s().',
+ 'functions' => [
+ 'delete',
+ 'file_put_contents',
+ 'flock',
+ 'fputcsv',
+ 'fputs',
+ 'fwrite',
+ 'ftruncate',
+ 'is_writable',
+ 'is_writeable',
+ 'link',
+ 'rename',
+ 'symlink',
+ 'tempnam',
+ 'touch',
+ 'unlink',
+ ],
+ ],
+ 'directory' => [
+ 'type' => 'error',
+ 'message' => 'Filesystem writes are forbidden, please do not use %s().',
+ 'functions' => [
+ 'mkdir',
+ 'rmdir',
+ ],
+ ],
+ 'chmod' => [
+ 'type' => 'error',
+ 'message' => 'Filesystem writes are forbidden, please do not use %s().',
+ 'functions' => [
+ 'chgrp',
+ 'chown',
+ 'chmod',
+ 'lchgrp',
+ 'lchown',
+ ],
+ ],
+ 'stats_get_csv' => [
+ 'type' => 'error',
+ 'message' => 'Using `%s` outside of Jetpack context pollutes the stats_cache entry in the wp_options table. We recommend building a custom function instead.',
+ 'functions' => [
+ 'stats_get_csv',
+ ],
+ ],
+ 'wp_mail' => [
+ 'type' => 'warning',
+ 'message' => '`%s` should be used sparingly. For any bulk emailing should be handled by a 3rd party service, in order to prevent domain or IP addresses being flagged as spam.',
+ 'functions' => [
+ 'wp_mail',
+ 'mail',
+ ],
+ ],
+ 'is_multi_author' => [
+ 'type' => 'warning',
+ 'message' => '`%s` can be very slow on large sites and likely not needed on many VIP sites since they tend to have more than one author.',
+ 'functions' => [
+ 'is_multi_author',
+ ],
+ ],
+ 'advanced_custom_fields' => [
+ 'type' => 'warning',
+ 'message' => '`%1$s` does not escape output by default, please echo and escape with the `get_*()` variant function instead (i.e. `get_field()`).',
+ 'functions' => [
+ 'the_sub_field',
+ 'the_field',
+ ],
+ ],
+ // @link https://docs.wpvip.com/technical-references/code-review/vip-warnings/#h-remote-calls
+ 'wp_remote_get' => [
+ 'type' => 'warning',
+ 'message' => '%s() is highly discouraged. Please use vip_safe_wp_remote_get() instead which is designed to more gracefully handle failure than wp_remote_get() does.',
+ 'functions' => [
+ 'wp_remote_get',
+ ],
+ ],
+ // @link https://docs.wpvip.com/technical-references/code-review/vip-errors/#h-cache-constraints
+ 'cookies' => [
+ 'type' => 'error',
+ 'message' => 'Due to server-side caching, server-side based client related logic might not work. We recommend implementing client side logic in JavaScript instead.',
+ 'functions' => [
+ 'setcookie',
+ ],
+ ],
+ // @todo Introduce a sniff specific to get_posts() that checks for suppress_filters=>false being supplied.
+ 'get_posts' => [
+ 'type' => 'warning',
+ 'message' => '%s() is uncached unless the "suppress_filters" parameter is set to false. If the suppress_filter parameter is set to false this can be safely ignored. More Info: https://docs.wpvip.com/technical-references/caching/uncached-functions/.',
+ 'functions' => [
+ 'get_posts',
+ 'wp_get_recent_posts',
+ 'get_children',
+ ],
+ ],
+ 'create_function' => [
+ 'type' => 'warning',
+ 'message' => '%s() is highly discouraged, as it can execute arbritary code (additionally, it\'s deprecated as of PHP 7.2): https://docs.wpvip.com/technical-references/code-review/vip-warnings/#h-eval-and-create_function. )',
+ 'functions' => [
+ 'create_function',
+ ],
+ ],
+ 'get_page_by_path' => [
+ 'type' => 'warning',
+ 'message' => '%s() is highly discouraged due to not being cached; please use wpcom_vip_get_page_by_path() instead.',
+ 'functions' => [
+ 'get_page_by_path',
+ ],
+ ],
+ ];
+
+ $deprecated_vip_helpers = [
+ 'get_term_link' => 'wpcom_vip_get_term_link',
+ 'get_term_by' => 'wpcom_vip_get_term_by',
+ 'get_category_by_slug' => 'wpcom_vip_get_category_by_slug',
+ ];
+ foreach ( $deprecated_vip_helpers as $restricted => $helper ) {
+ $groups[ $helper ] = [
+ 'type' => 'warning',
+ 'message' => "`%s()` is deprecated, please use `{$restricted}()` instead.",
+ 'functions' => [
+ $helper,
+ ],
+ ];
+ }
+
+ return $groups;
+ }
+
+ /**
+ * Verify the current token is a function call or a method call on a specific object variable.
+ *
+ * This differs to the parent class method that it overrides, by also checking to see if the
+ * function call is actually a method call on a specific object variable. This works best with global objects,
+ * such as the `flush_rules()` method on the `$wp_rewrite` object.
+ *
+ * @param int $stackPtr The position of the current token in the stack.
+ *
+ * @return bool
+ */
+ public function is_targetted_token( $stackPtr ) {
+ // Exclude function definitions, class methods, and namespaced calls.
+ if ( $this->tokens[ $stackPtr ]['code'] === \T_STRING && isset( $this->tokens[ $stackPtr - 1 ] ) ) {
+ // Check if this is really a function.
+ $next = $this->phpcsFile->findNext( Tokens::$emptyTokens, $stackPtr + 1, null, true );
+ if ( $next !== false && $this->tokens[ $next ]['code'] !== T_OPEN_PARENTHESIS ) {
+ return false;
+ }
+
+ $prev = $this->phpcsFile->findPrevious( Tokens::$emptyTokens, $stackPtr - 1, null, true );
+ if ( $prev !== false ) {
+
+ // Start difference to parent class method.
+ // Check to see if function is a method on a specific object variable.
+ if ( ! empty( $this->groups[ $this->tokens[ $stackPtr ]['content'] ]['object_var'] ) ) {
+ $prevPrev = $this->phpcsFile->findPrevious( Tokens::$emptyTokens, $stackPtr - 2, null, true );
+
+ return $this->tokens[ $prev ]['code'] === \T_OBJECT_OPERATOR && isset( $this->groups[ $this->tokens[ $stackPtr ]['content'] ]['object_var'][ $this->tokens[ $prevPrev ]['content'] ] );
+ } // End difference to parent class method.
+
+ // Skip sniffing if calling a same-named method, or on function definitions.
+ $skipped = [
+ \T_FUNCTION => \T_FUNCTION,
+ \T_CLASS => \T_CLASS,
+ \T_AS => \T_AS, // Use declaration alias.
+ \T_DOUBLE_COLON => \T_DOUBLE_COLON,
+ \T_OBJECT_OPERATOR => \T_OBJECT_OPERATOR,
+ \T_NEW => \T_NEW,
+ ];
+ if ( isset( $skipped[ $this->tokens[ $prev ]['code'] ] ) ) {
+ return false;
+ }
+ // Skip namespaced functions, ie: `\foo\bar()` not `\bar()`.
+ if ( $this->tokens[ $prev ]['code'] === \T_NS_SEPARATOR ) {
+ $pprev = $this->phpcsFile->findPrevious( Tokens::$emptyTokens, $prev - 1, null, true );
+ if ( $pprev !== false && $this->tokens[ $pprev ]['code'] === \T_STRING ) {
+ return false;
+ }
+ }
+ }
+ return true;
+ }
+ return false;
+ }
+}
diff --git a/vendor/automattic/vipwpcs/WordPressVIPMinimum/Sniffs/Functions/StripTagsSniff.php b/vendor/automattic/vipwpcs/WordPressVIPMinimum/Sniffs/Functions/StripTagsSniff.php
new file mode 100644
index 00000000..5434427d
--- /dev/null
+++ b/vendor/automattic/vipwpcs/WordPressVIPMinimum/Sniffs/Functions/StripTagsSniff.php
@@ -0,0 +1,59 @@
+ true,
+ ];
+
+ /**
+ * Process the parameters of a matched function.
+ *
+ * @param int $stackPtr The position of the current token in the stack.
+ * @param array $group_name The name of the group which was matched.
+ * @param string $matched_content The token content (function name) which was matched.
+ * @param array $parameters Array with information about the parameters.
+ * @return int|void Integer stack pointer to skip forward or void to continue
+ * normal file processing.
+ */
+ public function process_parameters( $stackPtr, $group_name, $matched_content, $parameters ) {
+ if ( count( $parameters ) === 1 ) {
+ $message = '`strip_tags()` does not strip CSS and JS in between the script and style tags. Use `wp_strip_all_tags()` to strip all tags.';
+ $this->phpcsFile->addWarning( $message, $stackPtr, 'StripTagsOneParameter' );
+ } elseif ( isset( $parameters[2] ) ) {
+ $message = '`strip_tags()` does not strip CSS and JS in between the script and style tags. Use `wp_kses()` instead to allow only the HTML you need.';
+ $this->phpcsFile->addWarning( $message, $stackPtr, 'StripTagsTwoParameters' );
+ }
+ }
+}
diff --git a/vendor/automattic/vipwpcs/WordPressVIPMinimum/Sniffs/Hooks/AlwaysReturnInFilterSniff.php b/vendor/automattic/vipwpcs/WordPressVIPMinimum/Sniffs/Hooks/AlwaysReturnInFilterSniff.php
new file mode 100644
index 00000000..8029e732
--- /dev/null
+++ b/vendor/automattic/vipwpcs/WordPressVIPMinimum/Sniffs/Hooks/AlwaysReturnInFilterSniff.php
@@ -0,0 +1,299 @@
+tokens[ $stackPtr ]['content'];
+
+ if ( $functionName !== 'add_filter' ) {
+ return;
+ }
+
+ $this->filterNamePtr = $this->phpcsFile->findNext(
+ array_merge( Tokens::$emptyTokens, [ T_OPEN_PARENTHESIS ] ),
+ $stackPtr + 1,
+ null,
+ true,
+ null,
+ true
+ );
+
+ if ( ! $this->filterNamePtr ) {
+ // Something is wrong.
+ return;
+ }
+
+ $callbackPtr = $this->phpcsFile->findNext(
+ array_merge( Tokens::$emptyTokens, [ T_COMMA ] ),
+ $this->filterNamePtr + 1,
+ null,
+ true,
+ null,
+ true
+ );
+
+ if ( ! $callbackPtr ) {
+ // Something is wrong.
+ return;
+ }
+
+ if ( $this->tokens[ $callbackPtr ]['code'] === 'PHPCS_T_CLOSURE' ) {
+ $this->processFunctionBody( $callbackPtr );
+ } elseif ( $this->tokens[ $callbackPtr ]['code'] === T_ARRAY
+ || $this->tokens[ $callbackPtr ]['code'] === T_OPEN_SHORT_ARRAY
+ ) {
+ $this->processArray( $callbackPtr );
+ } elseif ( in_array( $this->tokens[ $callbackPtr ]['code'], Tokens::$stringTokens, true ) === true ) {
+ $this->processString( $callbackPtr );
+ }
+ }
+
+ /**
+ * Process array.
+ *
+ * @param int $stackPtr The position in the stack where the token was found.
+ */
+ private function processArray( $stackPtr ) {
+
+ $open_close = $this->find_array_open_close( $stackPtr );
+ if ( $open_close === false ) {
+ return;
+ }
+
+ $previous = $this->phpcsFile->findPrevious(
+ Tokens::$emptyTokens,
+ $open_close['closer'] - 1,
+ null,
+ true
+ );
+
+ if ( in_array( T_CLASS, $this->tokens[ $stackPtr ]['conditions'], true ) === true ) {
+ $classPtr = array_search( T_CLASS, $this->tokens[ $stackPtr ]['conditions'], true );
+ if ( $classPtr ) {
+ $classToken = $this->tokens[ $classPtr ];
+ $this->processString( $previous, $classToken['scope_opener'], $classToken['scope_closer'] );
+ return;
+ }
+ }
+
+ $this->processString( $previous );
+ }
+
+ /**
+ * Process string.
+ *
+ * @param int $stackPtr The position in the stack where the token was found.
+ * @param int $start The start of the token.
+ * @param int $end The end of the token.
+ */
+ private function processString( $stackPtr, $start = 0, $end = null ) {
+
+ $callbackFunctionName = substr( $this->tokens[ $stackPtr ]['content'], 1, -1 );
+
+ $callbackFunctionPtr = $this->phpcsFile->findNext(
+ T_STRING,
+ $start,
+ $end,
+ false,
+ $callbackFunctionName
+ );
+
+ if ( ! $callbackFunctionPtr ) {
+ // We were not able to find the function callback in the file.
+ return;
+ }
+
+ $this->processFunction( $callbackFunctionPtr, $start, $end );
+ }
+
+ /**
+ * Process function.
+ *
+ * @param int $stackPtr The position in the stack where the token was found.
+ * @param int $start The start of the token.
+ * @param int $end The end of the token.
+ */
+ private function processFunction( $stackPtr, $start = 0, $end = null ) {
+
+ $functionName = $this->tokens[ $stackPtr ]['content'];
+
+ $offset = $start;
+ while ( $this->phpcsFile->findNext( [ T_FUNCTION ], $offset, $end ) !== false ) {
+ $functionStackPtr = $this->phpcsFile->findNext( [ T_FUNCTION ], $offset, $end );
+ $functionNamePtr = $this->phpcsFile->findNext( Tokens::$emptyTokens, $functionStackPtr + 1, null, true, null, true );
+ if ( $this->tokens[ $functionNamePtr ]['code'] === T_STRING && $this->tokens[ $functionNamePtr ]['content'] === $functionName ) {
+ $this->processFunctionBody( $functionStackPtr );
+ return;
+ }
+ $offset = $functionStackPtr + 1;
+ }
+ }
+
+ /**
+ * Process function's body
+ *
+ * @param int $stackPtr The position in the stack where the token was found.
+ */
+ private function processFunctionBody( $stackPtr ) {
+
+ $filterName = $this->tokens[ $this->filterNamePtr ]['content'];
+
+ $methodProps = $this->phpcsFile->getMethodProperties( $stackPtr );
+ if ( $methodProps['is_abstract'] === true ) {
+ $message = 'The callback for the `%s` filter hook-in points to an abstract method. Please ensure that child class implementations of this method always return a value.';
+ $data = [ $filterName ];
+ $this->phpcsFile->addWarning( $message, $stackPtr, 'AbstractMethod', $data );
+ return;
+ }
+
+ if ( isset( $this->tokens[ $stackPtr ]['scope_opener'], $this->tokens[ $stackPtr ]['scope_closer'] ) === false ) {
+ // Live coding, parse or tokenizer error.
+ return;
+ }
+
+ $argPtr = $this->phpcsFile->findNext(
+ array_merge( Tokens::$emptyTokens, [ T_STRING, T_OPEN_PARENTHESIS ] ),
+ $stackPtr + 1,
+ null,
+ true,
+ null,
+ true
+ );
+
+ // If arg is being passed by reference, we can skip.
+ if ( $this->tokens[ $argPtr ]['code'] === T_BITWISE_AND ) {
+ return;
+ }
+
+ $functionBodyScopeStart = $this->tokens[ $stackPtr ]['scope_opener'];
+ $functionBodyScopeEnd = $this->tokens[ $stackPtr ]['scope_closer'];
+
+ $returnTokenPtr = $this->phpcsFile->findNext(
+ [ T_RETURN ],
+ $functionBodyScopeStart + 1,
+ $functionBodyScopeEnd
+ );
+
+ $insideIfConditionalReturn = 0;
+ $outsideConditionalReturn = 0;
+
+ while ( $returnTokenPtr ) {
+ if ( $this->isInsideIfConditonal( $returnTokenPtr ) ) {
+ $insideIfConditionalReturn++;
+ } else {
+ $outsideConditionalReturn++;
+ }
+ if ( $this->isReturningVoid( $returnTokenPtr ) ) {
+ $message = 'Please, make sure that a callback to `%s` filter is returning void intentionally.';
+ $data = [ $filterName ];
+ $this->phpcsFile->addError( $message, $functionBodyScopeStart, 'VoidReturn', $data );
+ }
+ $returnTokenPtr = $this->phpcsFile->findNext(
+ [ T_RETURN ],
+ $returnTokenPtr + 1,
+ $functionBodyScopeEnd
+ );
+ }
+
+ if ( $insideIfConditionalReturn >= 0 && $outsideConditionalReturn === 0 ) {
+ $message = 'Please, make sure that a callback to `%s` filter is always returning some value.';
+ $data = [ $filterName ];
+ $this->phpcsFile->addError( $message, $functionBodyScopeStart, 'MissingReturnStatement', $data );
+
+ }
+ }
+
+ /**
+ * Is the current token inside a conditional?
+ *
+ * @param int $stackPtr The position in the stack where the token was found.
+ *
+ * @return bool
+ */
+ private function isInsideIfConditonal( $stackPtr ) {
+
+ // This check helps us in situations a class or a function is wrapped
+ // inside a conditional as a whole. Eg.: inside `class_exists`.
+ if ( end( $this->tokens[ $stackPtr ]['conditions'] ) === T_FUNCTION ) {
+ return false;
+ }
+
+ // Similar case may be a conditional closure.
+ if ( end( $this->tokens[ $stackPtr ]['conditions'] ) === 'PHPCS_T_CLOSURE' ) {
+ return false;
+ }
+
+ // Loop over the array of conditions and look for an IF.
+ reset( $this->tokens[ $stackPtr ]['conditions'] );
+
+ if ( array_key_exists( 'conditions', $this->tokens[ $stackPtr ] ) === true
+ && is_array( $this->tokens[ $stackPtr ]['conditions'] ) === true
+ && empty( $this->tokens[ $stackPtr ]['conditions'] ) === false
+ ) {
+ foreach ( $this->tokens[ $stackPtr ]['conditions'] as $tokenPtr => $tokenCode ) {
+ if ( $this->tokens[ $stackPtr ]['conditions'][ $tokenPtr ] === T_IF ) {
+ return true;
+ }
+ }
+ }
+ return false;
+ }
+
+ /**
+ * Is the token returning void
+ *
+ * @param int $stackPtr The position in the stack where the token was found.
+ *
+ * @return bool
+ **/
+ private function isReturningVoid( $stackPtr ) {
+
+ $nextToReturnTokenPtr = $this->phpcsFile->findNext(
+ [ Tokens::$emptyTokens ],
+ $stackPtr + 1,
+ null,
+ true
+ );
+
+ return $this->tokens[ $nextToReturnTokenPtr ]['code'] === T_SEMICOLON;
+ }
+}
diff --git a/vendor/automattic/vipwpcs/WordPressVIPMinimum/Sniffs/Hooks/PreGetPostsSniff.php b/vendor/automattic/vipwpcs/WordPressVIPMinimum/Sniffs/Hooks/PreGetPostsSniff.php
new file mode 100644
index 00000000..75b54729
--- /dev/null
+++ b/vendor/automattic/vipwpcs/WordPressVIPMinimum/Sniffs/Hooks/PreGetPostsSniff.php
@@ -0,0 +1,450 @@
+tokens[ $stackPtr ]['content'];
+
+ if ( $functionName !== 'add_action' ) {
+ // We are interested in add_action calls only.
+ return;
+ }
+
+ $actionNamePtr = $this->phpcsFile->findNext(
+ array_merge( Tokens::$emptyTokens, [ T_OPEN_PARENTHESIS ] ),
+ $stackPtr + 1,
+ null,
+ true,
+ null,
+ true
+ );
+
+ if ( ! $actionNamePtr ) {
+ // Something is wrong.
+ return;
+ }
+
+ if ( substr( $this->tokens[ $actionNamePtr ]['content'], 1, -1 ) !== 'pre_get_posts' ) {
+ // This is not setting a callback for pre_get_posts action.
+ return;
+ }
+
+ $callbackPtr = $this->phpcsFile->findNext(
+ array_merge( Tokens::$emptyTokens, [ T_COMMA ] ),
+ $actionNamePtr + 1,
+ null,
+ true,
+ null,
+ true
+ );
+
+ if ( ! $callbackPtr ) {
+ // Something is wrong.
+ return;
+ }
+
+ if ( $this->tokens[ $callbackPtr ]['code'] === 'PHPCS_T_CLOSURE' ) {
+ $this->processClosure( $callbackPtr );
+ } elseif ( $this->tokens[ $callbackPtr ]['code'] === T_ARRAY
+ || $this->tokens[ $callbackPtr ]['code'] === T_OPEN_SHORT_ARRAY
+ ) {
+ $this->processArray( $callbackPtr );
+ } elseif ( in_array( $this->tokens[ $callbackPtr ]['code'], Tokens::$stringTokens, true ) === true ) {
+ $this->processString( $callbackPtr );
+ }
+ }
+
+ /**
+ * Process array.
+ *
+ * @param int $stackPtr The position in the stack where the token was found.
+ */
+ private function processArray( $stackPtr ) {
+
+ $open_close = $this->find_array_open_close( $stackPtr );
+ if ( $open_close === false ) {
+ return;
+ }
+
+ $previous = $this->phpcsFile->findPrevious(
+ Tokens::$emptyTokens,
+ $open_close['closer'] - 1,
+ null,
+ true
+ );
+
+ $this->processString( $previous );
+ }
+
+ /**
+ * Process string.
+ *
+ * @param int $stackPtr The position in the stack where the token was found.
+ */
+ private function processString( $stackPtr ) {
+
+ $callbackFunctionName = substr( $this->tokens[ $stackPtr ]['content'], 1, -1 );
+
+ $callbackFunctionPtr = $this->phpcsFile->findNext(
+ T_STRING,
+ 0,
+ null,
+ false,
+ $callbackFunctionName
+ );
+
+ if ( ! $callbackFunctionPtr ) {
+ // We were not able to find the function callback in the file.
+ return;
+ }
+
+ $this->processFunction( $callbackFunctionPtr );
+ }
+
+ /**
+ * Process function.
+ *
+ * @param int $stackPtr The position in the stack where the token was found.
+ */
+ private function processFunction( $stackPtr ) {
+
+ $wpQueryObjectNamePtr = $this->phpcsFile->findNext(
+ [ T_VARIABLE ],
+ $stackPtr + 1,
+ null,
+ false,
+ null,
+ true
+ );
+
+ if ( ! $wpQueryObjectNamePtr ) {
+ // Something is wrong.
+ return;
+ }
+
+ $wpQueryObjectVariableName = $this->tokens[ $wpQueryObjectNamePtr ]['content'];
+
+ $functionDefinitionPtr = $this->phpcsFile->findPrevious( [ T_FUNCTION ], $wpQueryObjectNamePtr - 1 );
+
+ if ( ! $functionDefinitionPtr ) {
+ // Something is wrong.
+ return;
+ }
+
+ $this->processFunctionBody( $functionDefinitionPtr, $wpQueryObjectVariableName );
+ }
+
+ /**
+ * Process closure.
+ *
+ * @param int $stackPtr The position in the stack where the token was found.
+ */
+ private function processClosure( $stackPtr ) {
+
+ $wpQueryObjectNamePtr = $this->phpcsFile->findNext(
+ [ T_VARIABLE ],
+ $stackPtr + 1,
+ null,
+ false,
+ null,
+ true
+ );
+
+ if ( ! $wpQueryObjectNamePtr ) {
+ // Something is wrong.
+ return;
+ }
+
+ $this->processFunctionBody( $stackPtr, $this->tokens[ $wpQueryObjectNamePtr ]['content'] );
+ }
+
+ /**
+ * Process function's body
+ *
+ * @param int $stackPtr The position in the stack where the token was found.
+ * @param string $variableName Variable name.
+ */
+ private function processFunctionBody( $stackPtr, $variableName ) {
+
+ $functionBodyScopeStart = $this->tokens[ $stackPtr ]['scope_opener'];
+ $functionBodyScopeEnd = $this->tokens[ $stackPtr ]['scope_closer'];
+
+ $wpQueryVarUsed = $this->phpcsFile->findNext(
+ [ T_VARIABLE ],
+ $functionBodyScopeStart + 1,
+ $functionBodyScopeEnd,
+ false,
+ $variableName
+ );
+ while ( $wpQueryVarUsed ) {
+ if ( $this->isPartOfIfConditional( $wpQueryVarUsed ) ) {
+ if ( $this->isEarlyMainQueryCheck( $wpQueryVarUsed ) ) {
+ return;
+ }
+ } elseif ( $this->isInsideIfConditonal( $wpQueryVarUsed ) ) {
+ if ( ! $this->isParentConditionalCheckingMainQuery( $wpQueryVarUsed ) ) {
+ $this->addPreGetPostsWarning( $wpQueryVarUsed );
+ }
+ } elseif ( $this->isWPQueryMethodCall( $wpQueryVarUsed, 'set' ) ) {
+ $this->addPreGetPostsWarning( $wpQueryVarUsed );
+ }
+ $wpQueryVarUsed = $this->phpcsFile->findNext(
+ [ T_VARIABLE ],
+ $wpQueryVarUsed + 1,
+ $functionBodyScopeEnd,
+ false,
+ $variableName
+ );
+ }
+ }
+
+ /**
+ * Consolidated violation.
+ *
+ * @param int $stackPtr The position in the stack where the token was found.
+ */
+ private function addPreGetPostsWarning( $stackPtr ) {
+ $message = 'Main WP_Query is being modified without `$query->is_main_query()` check. Needs manual inspection.';
+ $this->phpcsFile->addWarning( $message, $stackPtr, 'PreGetPosts' );
+ }
+
+ /**
+ * Is parent conditional checking is_main_query?
+ *
+ * @param int $stackPtr The position in the stack where the token was found.
+ *
+ * @return bool
+ */
+ private function isParentConditionalCheckingMainQuery( $stackPtr ) {
+
+ if ( array_key_exists( 'conditions', $this->tokens[ $stackPtr ] ) === false
+ || is_array( $this->tokens[ $stackPtr ]['conditions'] ) === false
+ || empty( $this->tokens[ $stackPtr ]['conditions'] ) === true
+ ) {
+ return false;
+ }
+
+ $conditionStackPtrs = array_keys( $this->tokens[ $stackPtr ]['conditions'] );
+ $lastConditionStackPtr = array_pop( $conditionStackPtrs );
+
+ while ( $this->tokens[ $stackPtr ]['conditions'][ $lastConditionStackPtr ] === T_IF ) {
+
+ $next = $this->phpcsFile->findNext(
+ [ T_VARIABLE ],
+ $lastConditionStackPtr + 1,
+ null,
+ false,
+ $this->tokens[ $stackPtr ]['content'],
+ true
+ );
+ while ( $next ) {
+ if ( $this->isWPQueryMethodCall( $next, 'is_main_query' ) === true ) {
+ return true;
+ }
+ $next = $this->phpcsFile->findNext(
+ [ T_VARIABLE ],
+ $next + 1,
+ null,
+ false,
+ $this->tokens[ $stackPtr ]['content'],
+ true
+ );
+ }
+
+ $lastConditionStackPtr = array_pop( $conditionStackPtrs );
+ }
+
+ return false;
+ }
+
+
+ /**
+ * Is the current code an early main query check?
+ *
+ * @param int $stackPtr The position in the stack where the token was found.
+ *
+ * @return bool
+ */
+ private function isEarlyMainQueryCheck( $stackPtr ) {
+
+ if ( ! $this->isWPQueryMethodCall( $stackPtr, 'is_main_query' ) ) {
+ return false;
+ }
+
+ if ( array_key_exists( 'nested_parenthesis', $this->tokens[ $stackPtr ] ) === false
+ || empty( $this->tokens[ $stackPtr ]['nested_parenthesis'] ) === true
+ ) {
+ return false;
+ }
+
+ $parentheses = $this->tokens[ $stackPtr ]['nested_parenthesis'];
+ do {
+ $nestedParenthesisEnd = array_shift( $parentheses );
+ if ( $nestedParenthesisEnd === null ) {
+ // Nothing left in the array. No parenthesis found with a non-closure owner.
+ return false;
+ }
+
+ if ( isset( $this->tokens[ $nestedParenthesisEnd ]['parenthesis_owner'] )
+ && $this->tokens[ $this->tokens[ $nestedParenthesisEnd ]['parenthesis_owner'] ]['code'] !== T_CLOSURE
+ ) {
+ break;
+ }
+ } while ( true );
+
+ $owner = $this->tokens[ $nestedParenthesisEnd ]['parenthesis_owner'];
+ if ( isset( $this->tokens[ $owner ]['scope_opener'], $this->tokens[ $owner ]['scope_closer'] ) === false ) {
+ // This may be an inline control structure (no braces).
+ $next = $this->phpcsFile->findNext(
+ Tokens::$emptyTokens,
+ ( $nestedParenthesisEnd + 1 ),
+ null,
+ true
+ );
+
+ if ( $next !== false && $this->tokens[ $next ]['code'] === T_RETURN ) {
+ return true;
+ }
+
+ return false;
+ }
+
+ $next = $this->phpcsFile->findNext(
+ [ T_RETURN ],
+ $this->tokens[ $this->tokens[ $nestedParenthesisEnd ]['parenthesis_owner'] ]['scope_opener'],
+ $this->tokens[ $this->tokens[ $nestedParenthesisEnd ]['parenthesis_owner'] ]['scope_closer'],
+ false,
+ 'return',
+ true
+ );
+
+ if ( $next ) {
+ return true;
+ }
+
+ return false;
+ }
+
+ /**
+ * Is the current code a WP_Query call?
+ *
+ * @param int $stackPtr The position in the stack where the token was found.
+ * @param null $method Method.
+ *
+ * @return bool
+ */
+ private function isWPQueryMethodCall( $stackPtr, $method = null ) {
+ $next = $this->phpcsFile->findNext(
+ Tokens::$emptyTokens,
+ $stackPtr + 1,
+ null,
+ true,
+ null,
+ true
+ );
+
+ if ( ! $next || $this->tokens[ $next ]['type'] !== 'T_OBJECT_OPERATOR' ) {
+ return false;
+ }
+
+ if ( $method === null ) {
+ return true;
+ }
+
+ $next = $this->phpcsFile->findNext(
+ Tokens::$emptyTokens,
+ $next + 1,
+ null,
+ true,
+ null,
+ true
+ );
+
+ return $next && $this->tokens[ $next ]['code'] === T_STRING && $method === $this->tokens[ $next ]['content'];
+ }
+
+ /**
+ * Is the current token a part of a conditional?
+ *
+ * @param int $stackPtr The position in the stack where the token was found.
+ *
+ * @return bool
+ */
+ private function isPartOfIfConditional( $stackPtr ) {
+
+ if ( array_key_exists( 'nested_parenthesis', $this->tokens[ $stackPtr ] ) === true
+ && is_array( $this->tokens[ $stackPtr ]['nested_parenthesis'] ) === true
+ && empty( $this->tokens[ $stackPtr ]['nested_parenthesis'] ) === false
+ ) {
+ $previousLocalIf = $this->phpcsFile->findPrevious(
+ [ T_IF ],
+ $stackPtr - 1,
+ null,
+ false,
+ null,
+ true
+ );
+ if ( $previousLocalIf !== false
+ && $this->tokens[ $previousLocalIf ]['parenthesis_opener'] < $stackPtr
+ && $this->tokens[ $previousLocalIf ]['parenthesis_closer'] > $stackPtr
+ ) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ /**
+ * Is the current token inside a conditional?
+ *
+ * @param int $stackPtr The position in the stack where the token was found.
+ *
+ * @return bool
+ */
+ private function isInsideIfConditonal( $stackPtr ) {
+
+ if ( array_key_exists( 'conditions', $this->tokens[ $stackPtr ] ) === true
+ && is_array( $this->tokens[ $stackPtr ]['conditions'] ) === true
+ && empty( $this->tokens[ $stackPtr ]['conditions'] ) === false
+ ) {
+ $conditionStackPtrs = array_keys( $this->tokens[ $stackPtr ]['conditions'] );
+ $lastConditionStackPtr = array_pop( $conditionStackPtrs );
+ return $this->tokens[ $stackPtr ]['conditions'][ $lastConditionStackPtr ] === T_IF;
+ }
+ return false;
+ }
+}
diff --git a/vendor/automattic/vipwpcs/WordPressVIPMinimum/Sniffs/Hooks/RestrictedHooksSniff.php b/vendor/automattic/vipwpcs/WordPressVIPMinimum/Sniffs/Hooks/RestrictedHooksSniff.php
new file mode 100644
index 00000000..43054c2b
--- /dev/null
+++ b/vendor/automattic/vipwpcs/WordPressVIPMinimum/Sniffs/Hooks/RestrictedHooksSniff.php
@@ -0,0 +1,127 @@
+ true,
+ 'add_action' => true,
+ ];
+
+ /**
+ * List of restricted filters by groups.
+ *
+ * @var array
+ */
+ private $restricted_hook_groups = [
+ 'upload_mimes' => [
+ // TODO: This error message needs a link to the VIP Documentation, see https://github.com/Automattic/VIP-Coding-Standards/issues/235.
+ 'type' => 'Warning',
+ 'msg' => 'Please ensure that the mimes being filtered do not include insecure types (i.e. SVG, SWF, etc.). Manual inspection required.',
+ 'hooks' => [
+ 'upload_mimes',
+ ],
+ ],
+ 'http_request' => [
+ // https://docs.wpvip.com/technical-references/code-quality-and-best-practices/retrieving-remote-data/.
+ 'type' => 'Warning',
+ 'msg' => 'Please ensure that the timeout being filtered is not greater than 3s since remote requests require the user to wait for completion before the rest of the page will load. Manual inspection required.',
+ 'hooks' => [
+ 'http_request_timeout',
+ 'http_request_args',
+ ],
+ ],
+ 'robotstxt' => [
+ // https://docs.wpvip.com/how-tos/modify-the-robots-txt-file/.
+ 'type' => 'Warning',
+ 'msg' => 'Don\'t forget to flush the robots.txt cache by going to Settings > Reading and toggling the privacy settings.',
+ 'hooks' => [
+ 'do_robotstxt',
+ 'robots_txt',
+ ],
+ ],
+ ];
+
+ /**
+ * Process the parameters of a matched function.
+ *
+ * @param int $stackPtr The position of the current token in the stack.
+ * @param array $group_name The name of the group which was matched.
+ * @param string $matched_content The token content (function name) which was matched.
+ * @param array $parameters Array with information about the parameters.
+ * @return int|void Integer stack pointer to skip forward or void to continue
+ * normal file processing.
+ */
+ public function process_parameters( $stackPtr, $group_name, $matched_content, $parameters ) {
+ foreach ( $this->restricted_hook_groups as $group => $group_args ) {
+ foreach ( $group_args['hooks'] as $hook ) {
+ if ( $this->normalize_hook_name_from_parameter( $parameters[1] ) === $hook ) {
+ $addMethod = 'add' . $group_args['type'];
+ $this->phpcsFile->{$addMethod}( $group_args['msg'], $stackPtr, $hook );
+ }
+ }
+ }
+ }
+
+ /**
+ * Normalize hook name parameter.
+ *
+ * @param array $parameter Array with information about a parameter.
+ * @return string Normalized hook name.
+ */
+ private function normalize_hook_name_from_parameter( $parameter ) {
+ // If concatenation is found, build hook name.
+ $concat_ptr = $this->phpcsFile->findNext(
+ T_STRING_CONCAT,
+ $parameter['start'],
+ $parameter['end'],
+ false,
+ null,
+ true
+ );
+
+ if ( $concat_ptr ) {
+ $hook_name = '';
+ for ( $i = $parameter['start'] + 1; $i < $parameter['end']; $i++ ) {
+ if ( $this->tokens[ $i ]['code'] === T_CONSTANT_ENCAPSED_STRING ) {
+ $hook_name .= str_replace( [ "'", '"' ], '', $this->tokens[ $i ]['content'] );
+ }
+ }
+ } else {
+ $hook_name = $parameter['raw'];
+ }
+
+ // Remove quotes (double and single), and use lowercase.
+ return strtolower( str_replace( [ "'", '"' ], '', $hook_name ) );
+ }
+}
diff --git a/vendor/automattic/vipwpcs/WordPressVIPMinimum/Sniffs/JS/DangerouslySetInnerHTMLSniff.php b/vendor/automattic/vipwpcs/WordPressVIPMinimum/Sniffs/JS/DangerouslySetInnerHTMLSniff.php
new file mode 100644
index 00000000..9355756e
--- /dev/null
+++ b/vendor/automattic/vipwpcs/WordPressVIPMinimum/Sniffs/JS/DangerouslySetInnerHTMLSniff.php
@@ -0,0 +1,73 @@
+tokens[ $stackPtr ]['content'] !== 'dangerouslySetInnerHTML' ) {
+ // Looking for dangerouslySetInnerHTML only.
+ return;
+ }
+
+ $nextToken = $this->phpcsFile->findNext( Tokens::$emptyTokens, $stackPtr + 1, null, true, null, true );
+
+ if ( $this->tokens[ $nextToken ]['code'] !== T_EQUAL ) {
+ // Not an assignment.
+ return;
+ }
+
+ $nextNextToken = $this->phpcsFile->findNext( Tokens::$emptyTokens, $nextToken + 1, null, true, null, true );
+
+ if ( $this->tokens[ $nextNextToken ]['code'] !== T_OBJECT ) {
+ // Not react syntax.
+ return;
+ }
+
+ $message = "Any HTML passed to `%s` gets executed. Please make sure it's properly escaped.";
+ $data = [ $this->tokens[ $stackPtr ]['content'] ];
+ $this->phpcsFile->addError( $message, $stackPtr, 'Found', $data );
+ }
+
+}
diff --git a/vendor/automattic/vipwpcs/WordPressVIPMinimum/Sniffs/JS/HTMLExecutingFunctionsSniff.php b/vendor/automattic/vipwpcs/WordPressVIPMinimum/Sniffs/JS/HTMLExecutingFunctionsSniff.php
new file mode 100644
index 00000000..66126d28
--- /dev/null
+++ b/vendor/automattic/vipwpcs/WordPressVIPMinimum/Sniffs/JS/HTMLExecutingFunctionsSniff.php
@@ -0,0 +1,134 @@
+ content or target.
+ * Value indicates whether the function's arg is the content to be inserted, or the target where the inserted
+ * content is to be inserted before/after/replaced. For the latter, the content is in the preceding method's arg.
+ *
+ * @var array
+ */
+ public $HTMLExecutingFunctions = [
+ 'after' => 'content', // jQuery.
+ 'append' => 'content', // jQuery.
+ 'appendTo' => 'target', // jQuery.
+ 'before' => 'content', // jQuery.
+ 'html' => 'content', // jQuery.
+ 'insertAfter' => 'target', // jQuery.
+ 'insertBefore' => 'target', // jQuery.
+ 'prepend' => 'content', // jQuery.
+ 'prependTo' => 'target', // jQuery.
+ 'replaceAll' => 'target', // jQuery.
+ 'replaceWith' => 'content', // jQuery.
+ 'write' => 'content',
+ 'writeln' => 'content',
+ ];
+
+ /**
+ * A list of tokenizers this sniff supports.
+ *
+ * @var string[]
+ */
+ public $supportedTokenizers = [ 'JS' ];
+
+ /**
+ * Returns an array of tokens this test wants to listen for.
+ *
+ * @return array
+ */
+ public function register() {
+ return [
+ T_STRING,
+ ];
+ }
+
+ /**
+ * Processes this test, when one of its tokens is encountered.
+ *
+ * @param int $stackPtr The position of the current token in the stack passed in $tokens.
+ *
+ * @return void
+ */
+ public function process_token( $stackPtr ) {
+
+ if ( ! isset( $this->HTMLExecutingFunctions[ $this->tokens[ $stackPtr ]['content'] ] ) ) {
+ // Looking for specific functions only.
+ return;
+ }
+
+ if ( $this->HTMLExecutingFunctions[ $this->tokens[ $stackPtr ]['content'] ] === 'content' ) {
+ $nextToken = $this->phpcsFile->findNext( Tokens::$emptyTokens, $stackPtr + 1, null, true, null, true );
+
+ if ( $this->tokens[ $nextToken ]['code'] !== T_OPEN_PARENTHESIS ) {
+ // Not a function.
+ return;
+ }
+
+ $parenthesis_closer = $this->tokens[ $nextToken ]['parenthesis_closer'];
+
+ while ( $nextToken < $parenthesis_closer ) {
+ $nextToken = $this->phpcsFile->findNext( Tokens::$emptyTokens, $nextToken + 1, null, true, null, true );
+ if ( $this->tokens[ $nextToken ]['code'] === T_STRING ) { // Contains a variable, function call or something else dynamic.
+ $message = 'Any HTML passed to `%s` gets executed. Make sure it\'s properly escaped.';
+ $data = [ $this->tokens[ $stackPtr ]['content'] ];
+ $this->phpcsFile->addWarning( $message, $stackPtr, $this->tokens[ $stackPtr ]['content'], $data );
+
+ return;
+ }
+ }
+ } elseif ( $this->HTMLExecutingFunctions[ $this->tokens[ $stackPtr ]['content'] ] === 'target' ) {
+ $prevToken = $this->phpcsFile->findPrevious( Tokens::$emptyTokens, $stackPtr - 1, null, true, null, true );
+
+ if ( $this->tokens[ $prevToken ]['code'] !== T_OBJECT_OPERATOR ) {
+ return;
+ }
+
+ $prevPrevToken = $this->phpcsFile->findPrevious( Tokens::$emptyTokens, $prevToken - 1, null, true, null, true );
+
+ if ( $this->tokens[ $prevPrevToken ]['code'] !== T_CLOSE_PARENTHESIS ) {
+ // Not a function call, but may be a variable containing an element reference, so just
+ // flag all remaining instances of these target HTML executing functions.
+ $message = 'Any HTML used with `%s` gets executed. Make sure it\'s properly escaped.';
+ $data = [ $this->tokens[ $stackPtr ]['content'] ];
+ $this->phpcsFile->addWarning( $message, $stackPtr, $this->tokens[ $stackPtr ]['content'], $data );
+
+ return;
+ }
+
+ // Check if it's a function call (typically $() ) that contains a dynamic part.
+ $parenthesis_opener = $this->tokens[ $prevPrevToken ]['parenthesis_opener'];
+
+ while ( $prevPrevToken > $parenthesis_opener ) {
+ $prevPrevToken = $this->phpcsFile->findPrevious( Tokens::$emptyTokens, $prevPrevToken - 1, null, true, null, true );
+ if ( $this->tokens[ $prevPrevToken ]['code'] === T_STRING ) { // Contains a variable, function call or something else dynamic.
+ $message = 'Any HTML used with `%s` gets executed. Make sure it\'s properly escaped.';
+ $data = [ $this->tokens[ $stackPtr ]['content'] ];
+ $this->phpcsFile->addWarning( $message, $stackPtr, $this->tokens[ $stackPtr ]['content'], $data );
+
+ return;
+ }
+ }
+ }
+ }
+
+}
diff --git a/vendor/automattic/vipwpcs/WordPressVIPMinimum/Sniffs/JS/InnerHTMLSniff.php b/vendor/automattic/vipwpcs/WordPressVIPMinimum/Sniffs/JS/InnerHTMLSniff.php
new file mode 100644
index 00000000..aac49116
--- /dev/null
+++ b/vendor/automattic/vipwpcs/WordPressVIPMinimum/Sniffs/JS/InnerHTMLSniff.php
@@ -0,0 +1,87 @@
+tokens[ $stackPtr ]['content'] !== 'innerHTML' ) {
+ // Looking for .innerHTML only.
+ return;
+ }
+
+ $prevToken = $this->phpcsFile->findPrevious( Tokens::$emptyTokens, $stackPtr - 1, null, true, null, true );
+
+ if ( $this->tokens[ $prevToken ]['code'] !== T_OBJECT_OPERATOR ) {
+ return;
+ }
+
+ $nextToken = $this->phpcsFile->findNext( Tokens::$emptyTokens, $stackPtr + 1, null, true, null, true );
+
+ if ( $this->tokens[ $nextToken ]['code'] !== T_EQUAL ) {
+ // Not an assignment.
+ return;
+ }
+
+ $nextToken = $this->phpcsFile->findNext( Tokens::$emptyTokens, $nextToken + 1, null, true, null, true );
+ $foundVariable = false;
+
+ while ( $nextToken !== false && $this->tokens[ $nextToken ]['code'] !== T_SEMICOLON ) {
+
+ if ( $this->tokens[ $nextToken ]['code'] === T_STRING ) {
+ $foundVariable = true;
+ break;
+ }
+
+ $nextToken = $this->phpcsFile->findNext( Tokens::$emptyTokens, $nextToken + 1, null, true, null, true );
+ }
+
+ if ( $foundVariable === true ) {
+ $message = 'Any HTML passed to `%s` gets executed. Consider using `.textContent` or make sure that used variables are properly escaped.';
+ $data = [ $this->tokens[ $stackPtr ]['content'] ];
+ $this->phpcsFile->addWarning( $message, $stackPtr, 'Found', $data );
+ }
+ }
+
+}
diff --git a/vendor/automattic/vipwpcs/WordPressVIPMinimum/Sniffs/JS/StringConcatSniff.php b/vendor/automattic/vipwpcs/WordPressVIPMinimum/Sniffs/JS/StringConcatSniff.php
new file mode 100644
index 00000000..74fab5fc
--- /dev/null
+++ b/vendor/automattic/vipwpcs/WordPressVIPMinimum/Sniffs/JS/StringConcatSniff.php
@@ -0,0 +1,76 @@
+phpcsFile->findNext( Tokens::$emptyTokens, $stackPtr + 1, null, true, null, true );
+
+ if ( $this->tokens[ $nextToken ]['code'] === T_CONSTANT_ENCAPSED_STRING && strpos( $this->tokens[ $nextToken ]['content'], '<' ) !== false && preg_match( '/\<\/[a-zA-Z]+/', $this->tokens[ $nextToken ]['content'] ) === 1 ) {
+ $data = [ '+' . $this->tokens[ $nextToken ]['content'] ];
+ $this->addFoundError( $stackPtr, $data );
+ }
+
+ $prevToken = $this->phpcsFile->findPrevious( Tokens::$emptyTokens, $stackPtr - 1, null, true, null, true );
+
+ if ( $this->tokens[ $prevToken ]['code'] === T_CONSTANT_ENCAPSED_STRING && strpos( $this->tokens[ $prevToken ]['content'], '<' ) !== false && preg_match( '/\<[a-zA-Z]+/', $this->tokens[ $prevToken ]['content'] ) === 1 ) {
+ $data = [ $this->tokens[ $nextToken ]['content'] . '+' ];
+ $this->addFoundError( $stackPtr, $data );
+ }
+ }
+
+ /**
+ * Consolidated violation.
+ *
+ * @param int $stackPtr The position of the current token in the stack passed in $tokens.
+ * @param array $data Replacements for the error message.
+ */
+ private function addFoundError( $stackPtr, array $data ) {
+ $message = 'HTML string concatenation detected, this is a security risk, use DOM node construction or a templating language instead: %s.';
+ $this->phpcsFile->addError( $message, $stackPtr, 'Found', $data );
+ }
+
+}
diff --git a/vendor/automattic/vipwpcs/WordPressVIPMinimum/Sniffs/JS/StrippingTagsSniff.php b/vendor/automattic/vipwpcs/WordPressVIPMinimum/Sniffs/JS/StrippingTagsSniff.php
new file mode 100644
index 00000000..8017fe58
--- /dev/null
+++ b/vendor/automattic/vipwpcs/WordPressVIPMinimum/Sniffs/JS/StrippingTagsSniff.php
@@ -0,0 +1,76 @@
+tokens[ $stackPtr ]['content'] !== 'html' ) {
+ // Looking for html() only.
+ return;
+ }
+
+ $nextToken = $this->phpcsFile->findNext( Tokens::$emptyTokens, $stackPtr + 1, null, true, null, true );
+
+ if ( $this->tokens[ $nextToken ]['code'] !== T_OPEN_PARENTHESIS ) {
+ // Not a function.
+ return;
+ }
+
+ $afterFunctionCall = $this->phpcsFile->findNext( Tokens::$emptyTokens, $this->tokens[ $nextToken ]['parenthesis_closer'] + 1, null, true, null, true );
+
+ if ( $this->tokens[ $afterFunctionCall ]['code'] !== T_OBJECT_OPERATOR ) {
+ return;
+ }
+
+ $nextToken = $this->phpcsFile->findNext( Tokens::$emptyTokens, $afterFunctionCall + 1, null, true, null, true );
+
+ if ( $this->tokens[ $nextToken ]['code'] === T_STRING && $this->tokens[ $nextToken ]['content'] === 'text' ) {
+ $message = 'Vulnerable tag stripping approach detected.';
+ $this->phpcsFile->addError( $message, $stackPtr, 'VulnerableTagStripping' );
+ }
+ }
+
+}
diff --git a/vendor/automattic/vipwpcs/WordPressVIPMinimum/Sniffs/JS/WindowSniff.php b/vendor/automattic/vipwpcs/WordPressVIPMinimum/Sniffs/JS/WindowSniff.php
new file mode 100644
index 00000000..e233e479
--- /dev/null
+++ b/vendor/automattic/vipwpcs/WordPressVIPMinimum/Sniffs/JS/WindowSniff.php
@@ -0,0 +1,131 @@
+ [
+ 'href' => true,
+ 'protocol' => true,
+ 'host' => true,
+ 'hostname' => true,
+ 'pathname' => true,
+ 'search' => true,
+ 'hash' => true,
+ 'username' => true,
+ 'port' => true,
+ 'password' => true,
+ ],
+ 'name' => true,
+ 'status' => true,
+ ];
+
+ /**
+ * Processes this test, when one of its tokens is encountered.
+ *
+ * @param int $stackPtr The position of the current token in the stack passed in $tokens.
+ *
+ * @return void
+ */
+ public function process_token( $stackPtr ) {
+
+ if ( $this->tokens[ $stackPtr ]['content'] !== 'window' ) {
+ // Doesn't begin with 'window', bail.
+ return;
+ }
+
+ $nextTokenPtr = $this->phpcsFile->findNext( Tokens::$emptyTokens, $stackPtr + 1, null, true, null, true );
+ $nextToken = $this->tokens[ $nextTokenPtr ]['code'];
+ if ( $nextToken !== T_OBJECT_OPERATOR && $nextToken !== T_OPEN_SQUARE_BRACKET ) {
+ // No . or [' next, bail.
+ return;
+ }
+
+ $nextNextTokenPtr = $this->phpcsFile->findNext( Tokens::$emptyTokens, $nextTokenPtr + 1, null, true, null, true );
+ if ( $nextNextTokenPtr === false ) {
+ // Something went wrong, bail.
+ return;
+ }
+
+ $nextNextToken = str_replace( [ '"', "'" ], '', $this->tokens[ $nextNextTokenPtr ]['content'] );
+ if ( ! isset( $this->windowProperties[ $nextNextToken ] ) ) {
+ // Not in $windowProperties, bail.
+ return;
+ }
+
+ $nextNextNextTokenPtr = $this->phpcsFile->findNext( array_merge( [ T_CLOSE_SQUARE_BRACKET ], Tokens::$emptyTokens ), $nextNextTokenPtr + 1, null, true, null, true );
+ $nextNextNextToken = $this->tokens[ $nextNextNextTokenPtr ]['code'];
+
+ $nextNextNextNextToken = false;
+ if ( $nextNextNextToken === T_OBJECT_OPERATOR || $nextNextNextToken === T_OPEN_SQUARE_BRACKET ) {
+ $nextNextNextNextTokenPtr = $this->phpcsFile->findNext( Tokens::$emptyTokens, $nextNextNextTokenPtr + 1, null, true, null, true );
+ if ( $nextNextNextNextTokenPtr === false ) {
+ // Something went wrong, bail.
+ return;
+ }
+
+ $nextNextNextNextToken = str_replace( [ '"', "'" ], '', $this->tokens[ $nextNextNextNextTokenPtr ]['content'] );
+ if ( ! isset( $this->windowProperties[ $nextNextToken ][ $nextNextNextNextToken ] ) ) {
+ // Not in $windowProperties, bail.
+ return;
+ }
+ }
+
+ $windowProperty = 'window.';
+ $windowProperty .= $nextNextNextNextToken ? $nextNextToken . '.' . $nextNextNextNextToken : $nextNextToken;
+ $data = [ $windowProperty ];
+
+ $prevTokenPtr = $this->phpcsFile->findPrevious( Tokens::$emptyTokens, $stackPtr - 1, null, true, null, true );
+
+ if ( $this->tokens[ $prevTokenPtr ]['code'] === T_EQUAL ) {
+ // Variable assignment.
+ $message = 'Data from JS global "%s" may contain user-supplied values and should be checked.';
+ $this->phpcsFile->addWarning( $message, $stackPtr, 'VarAssignment', $data );
+
+ return;
+ }
+
+ $message = 'Data from JS global "%s" may contain user-supplied values and should be sanitized before output to prevent XSS.';
+ $this->phpcsFile->addError( $message, $stackPtr, $nextNextToken, $data );
+ }
+
+}
diff --git a/vendor/automattic/vipwpcs/WordPressVIPMinimum/Sniffs/Performance/BatcacheWhitelistedParamsSniff.php b/vendor/automattic/vipwpcs/WordPressVIPMinimum/Sniffs/Performance/BatcacheWhitelistedParamsSniff.php
new file mode 100644
index 00000000..1b42498b
--- /dev/null
+++ b/vendor/automattic/vipwpcs/WordPressVIPMinimum/Sniffs/Performance/BatcacheWhitelistedParamsSniff.php
@@ -0,0 +1,113 @@
+tokens[ $stackPtr ]['content'] !== '$_GET' ) {
+ return;
+ }
+
+ $key = $this->phpcsFile->findNext( array_merge( Tokens::$emptyTokens, [ T_OPEN_SQUARE_BRACKET ] ), $stackPtr + 1, null, true );
+
+ if ( $this->tokens[ $key ]['code'] !== T_CONSTANT_ENCAPSED_STRING ) {
+ return;
+ }
+
+ $variable_name = $this->tokens[ $key ]['content'];
+
+ $variable_name = substr( $variable_name, 1, -1 );
+
+ if ( in_array( $variable_name, $this->whitelistes_batcache_params, true ) === true ) {
+ $message = 'Batcache whitelisted GET param, `%s`, found. Batcache whitelisted parameters get stripped and are not available in PHP.';
+ $data = [ $variable_name ];
+ $this->phpcsFile->addWarning( $message, $stackPtr, 'StrippedGetParam', $data );
+
+ return;
+ }
+ }
+}
diff --git a/vendor/automattic/vipwpcs/WordPressVIPMinimum/Sniffs/Performance/CacheValueOverrideSniff.php b/vendor/automattic/vipwpcs/WordPressVIPMinimum/Sniffs/Performance/CacheValueOverrideSniff.php
new file mode 100644
index 00000000..806bebef
--- /dev/null
+++ b/vendor/automattic/vipwpcs/WordPressVIPMinimum/Sniffs/Performance/CacheValueOverrideSniff.php
@@ -0,0 +1,146 @@
+
+ * echo esc_url( wpcom_vip_get_term_link( $term ) );
+ *
+ *
+ * @package VIPCS\WordPressVIPMinimum
+ */
+class CacheValueOverrideSniff extends Sniff {
+
+ /**
+ * Returns the token types that this sniff is interested in.
+ *
+ * @return array(int)
+ */
+ public function register() {
+ return [ T_STRING ];
+ }
+
+
+ /**
+ * Processes the tokens that this sniff is interested in.
+ *
+ * @param int $stackPtr The position in the stack where the token was found.
+ *
+ * @return void
+ */
+ public function process_token( $stackPtr ) {
+
+ $functionName = $this->tokens[ $stackPtr ]['content'];
+
+ if ( $functionName !== 'wp_cache_get' ) {
+ // Not a function we are looking for.
+ return;
+ }
+
+ if ( $this->isFunctionCall( $stackPtr ) === false ) {
+ // Not a function call.
+ return;
+ }
+
+ $variablePos = $this->isVariableAssignment( $stackPtr );
+
+ if ( $variablePos === false ) {
+ // Not a variable assignment.
+ return;
+ }
+
+ $variableToken = $this->tokens[ $variablePos ];
+ $variableName = $variableToken['content'];
+
+ // Find the next non-empty token.
+ $openBracket = $this->phpcsFile->findNext( Tokens::$emptyTokens, $stackPtr + 1, null, true );
+
+ // Find the closing bracket.
+ $closeBracket = $this->tokens[ $openBracket ]['parenthesis_closer'];
+
+ $nextVariableOccurrence = $this->phpcsFile->findNext( T_VARIABLE, $closeBracket + 1, null, false, $variableName );
+
+ $rightAfterNextVariableOccurence = $this->phpcsFile->findNext( Tokens::$emptyTokens, $nextVariableOccurrence + 1, null, true, null, true );
+
+ if ( $this->tokens[ $rightAfterNextVariableOccurence ]['code'] !== T_EQUAL ) {
+ // Not a value override.
+ return;
+ }
+
+ $valueAfterEqualSign = $this->phpcsFile->findNext( Tokens::$emptyTokens, $rightAfterNextVariableOccurence + 1, null, true, null, true );
+
+ if ( $this->tokens[ $valueAfterEqualSign ]['code'] === T_FALSE ) {
+ $message = 'Obtained cached value in `%s` is being overridden. Disabling caching?';
+ $data = [ $variableName ];
+ $this->phpcsFile->addError( $message, $nextVariableOccurrence, 'CacheValueOverride', $data );
+ }
+ }
+
+ /**
+ * Check whether the examined code is a function call.
+ *
+ * @param int $stackPtr The position of the current token in the stack.
+ *
+ * @return bool
+ */
+ private function isFunctionCall( $stackPtr ) {
+
+ // Find the next non-empty token.
+ $openBracket = $this->phpcsFile->findNext( Tokens::$emptyTokens, $stackPtr + 1, null, true );
+
+ if ( $this->tokens[ $openBracket ]['code'] !== T_OPEN_PARENTHESIS ) {
+ // Not a function call.
+ return false;
+ }
+
+ // Find the previous non-empty token.
+ $search = Tokens::$emptyTokens;
+ $search[] = T_BITWISE_AND;
+ $previous = $this->phpcsFile->findPrevious( $search, $stackPtr - 1, null, true );
+
+ // It's a function definition, not a function call, so return false.
+ return ! ( $this->tokens[ $previous ]['code'] === T_FUNCTION );
+ }
+
+ /**
+ * Check whether the examined code is a variable assignment.
+ *
+ * @param int $stackPtr The position of the current token in the stack.
+ *
+ * @return bool
+ */
+ private function isVariableAssignment( $stackPtr ) {
+
+ // Find the previous non-empty token.
+ $search = Tokens::$emptyTokens;
+ $search[] = T_BITWISE_AND;
+ $previous = $this->phpcsFile->findPrevious( $search, $stackPtr - 1, null, true );
+
+ if ( $this->tokens[ $previous ]['code'] !== T_EQUAL ) {
+ // It's not a variable assignment.
+ return false;
+ }
+
+ $previous = $this->phpcsFile->findPrevious( $search, $previous - 1, null, true );
+
+ if ( $this->tokens[ $previous ]['code'] !== T_VARIABLE ) {
+ // It's not a variable assignment.
+ return false;
+ }
+
+ return $previous;
+ }
+
+}
diff --git a/vendor/automattic/vipwpcs/WordPressVIPMinimum/Sniffs/Performance/FetchingRemoteDataSniff.php b/vendor/automattic/vipwpcs/WordPressVIPMinimum/Sniffs/Performance/FetchingRemoteDataSniff.php
new file mode 100644
index 00000000..e3fc4330
--- /dev/null
+++ b/vendor/automattic/vipwpcs/WordPressVIPMinimum/Sniffs/Performance/FetchingRemoteDataSniff.php
@@ -0,0 +1,61 @@
+tokens[ $stackPtr ]['content'];
+ if ( $functionName !== 'file_get_contents' ) {
+ return;
+ }
+
+ $data = [ $this->tokens[ $stackPtr ]['content'] ];
+
+ $fileNameStackPtr = $this->phpcsFile->findNext( Tokens::$stringTokens, $stackPtr + 1, null, false, null, true );
+ if ( $fileNameStackPtr === false ) {
+ $message = '`%s()` is highly discouraged for remote requests, please use `wpcom_vip_file_get_contents()` or `vip_safe_wp_remote_get()` instead. If it\'s for a local file please use WP_Filesystem instead.';
+ $this->phpcsFile->addWarning( $message, $stackPtr, 'FileGetContentsUnknown', $data );
+ }
+
+ $fileName = $this->tokens[ $fileNameStackPtr ]['content'];
+
+ $isRemoteFile = ( strpos( $fileName, '://' ) !== false );
+ if ( $isRemoteFile === true ) {
+ $message = '`%s()` is highly discouraged for remote requests, please use `wpcom_vip_file_get_contents()` or `vip_safe_wp_remote_get()` instead.';
+ $this->phpcsFile->addWarning( $message, $stackPtr, 'FileGetContentsRemoteFile', $data );
+ }
+ }
+
+}
diff --git a/vendor/automattic/vipwpcs/WordPressVIPMinimum/Sniffs/Performance/LowExpiryCacheTimeSniff.php b/vendor/automattic/vipwpcs/WordPressVIPMinimum/Sniffs/Performance/LowExpiryCacheTimeSniff.php
new file mode 100644
index 00000000..23639560
--- /dev/null
+++ b/vendor/automattic/vipwpcs/WordPressVIPMinimum/Sniffs/Performance/LowExpiryCacheTimeSniff.php
@@ -0,0 +1,206 @@
+ true,
+ 'wp_cache_add' => true,
+ 'wp_cache_replace' => true,
+ ];
+
+ /**
+ * List of WP time constants, see https://codex.wordpress.org/Easier_Expression_of_Time_Constants.
+ *
+ * @var array
+ */
+ protected $wp_time_constants = [
+ 'MINUTE_IN_SECONDS' => 60,
+ 'HOUR_IN_SECONDS' => 3600,
+ 'DAY_IN_SECONDS' => 86400,
+ 'WEEK_IN_SECONDS' => 604800,
+ 'MONTH_IN_SECONDS' => 2592000,
+ 'YEAR_IN_SECONDS' => 31536000,
+ ];
+
+ /**
+ * Process the parameters of a matched function.
+ *
+ * @param int $stackPtr The position of the current token in the stack.
+ * @param array $group_name The name of the group which was matched.
+ * @param string $matched_content The token content (function name) which was matched.
+ * @param array $parameters Array with information about the parameters.
+ * @return int|void Integer stack pointer to skip forward or void to continue
+ * normal file processing.
+ */
+ public function process_parameters( $stackPtr, $group_name, $matched_content, $parameters ) {
+ if ( isset( $parameters[4] ) === false ) {
+ // If no cache expiry time, bail (i.e. we don't want to flag for something like feeds where it is cached indefinitely until a hook runs).
+ return;
+ }
+
+ $param = $parameters[4];
+ $tokensAsString = '';
+ $reportPtr = null;
+ $openParens = 0;
+
+ $message = 'Cache expiry time could not be determined. Please inspect that the fourth parameter passed to %s() evaluates to 300 seconds or more. Found: "%s"';
+ $error_code = 'CacheTimeUndetermined';
+ $data = [ $matched_content, $parameters[4]['raw'] ];
+
+ for ( $i = $param['start']; $i <= $param['end']; $i++ ) {
+ if ( isset( Tokens::$emptyTokens[ $this->tokens[ $i ]['code'] ] ) === true ) {
+ $tokensAsString .= ' ';
+ continue;
+ }
+
+ if ( $this->tokens[ $i ]['code'] === T_NS_SEPARATOR ) {
+ /*
+ * Ignore namespace separators. If it's part of a global WP time constant, it will be
+ * handled correctly. If it's used in any other context, another token *will* trigger the
+ * "undetermined" warning anyway.
+ */
+ continue;
+ }
+
+ if ( isset( $reportPtr ) === false ) {
+ // Set the report pointer to the first non-empty token we encounter.
+ $reportPtr = $i;
+ }
+
+ if ( $this->tokens[ $i ]['code'] === T_LNUMBER
+ || $this->tokens[ $i ]['code'] === T_DNUMBER
+ ) {
+ // Integer or float.
+ $tokensAsString .= $this->tokens[ $i ]['content'];
+ continue;
+ }
+
+ if ( $this->tokens[ $i ]['code'] === T_FALSE
+ || $this->tokens[ $i ]['code'] === T_NULL
+ ) {
+ $tokensAsString .= 0;
+ continue;
+ }
+
+ if ( $this->tokens[ $i ]['code'] === T_TRUE ) {
+ $tokensAsString .= 1;
+ continue;
+ }
+
+ if ( isset( Tokens::$arithmeticTokens[ $this->tokens[ $i ]['code'] ] ) === true ) {
+ $tokensAsString .= $this->tokens[ $i ]['content'];
+ continue;
+ }
+
+ // If using time constants, we need to convert to a number.
+ if ( $this->tokens[ $i ]['code'] === T_STRING
+ && isset( $this->wp_time_constants[ $this->tokens[ $i ]['content'] ] ) === true
+ ) {
+ $tokensAsString .= $this->wp_time_constants[ $this->tokens[ $i ]['content'] ];
+ continue;
+ }
+
+ if ( $this->tokens[ $i ]['code'] === T_OPEN_PARENTHESIS ) {
+ $tokensAsString .= $this->tokens[ $i ]['content'];
+ ++$openParens;
+ continue;
+ }
+
+ if ( $this->tokens[ $i ]['code'] === T_CLOSE_PARENTHESIS ) {
+ $tokensAsString .= $this->tokens[ $i ]['content'];
+ --$openParens;
+ continue;
+ }
+
+ if ( $this->tokens[ $i ]['code'] === T_CONSTANT_ENCAPSED_STRING ) {
+ $content = $this->strip_quotes( $this->tokens[ $i ]['content'] );
+ if ( is_numeric( $content ) === true ) {
+ $tokensAsString .= $content;
+ continue;
+ }
+ }
+
+ // Encountered an unexpected token. Manual inspection needed.
+ $this->phpcsFile->addWarning( $message, $reportPtr, $error_code, $data );
+
+ return;
+ }
+
+ if ( $tokensAsString === '' ) {
+ // Nothing found to evaluate.
+ return;
+ }
+
+ $tokensAsString = trim( $tokensAsString );
+
+ if ( $openParens !== 0 ) {
+ /*
+ * Shouldn't be possible as that would indicate a parse error in the original code,
+ * but let's prevent getting parse errors in the `eval`-ed code.
+ */
+ if ( $openParens > 0 ) {
+ $tokensAsString .= str_repeat( ')', $openParens );
+ } else {
+ $tokensAsString = str_repeat( '(', abs( $openParens ) ) . $tokensAsString;
+ }
+ }
+
+ $time = @eval( "return $tokensAsString;" ); // phpcs:ignore Squiz.PHP.Eval,WordPress.PHP.NoSilencedErrors -- No harm here.
+
+ if ( $time === false ) {
+ /*
+ * The eval resulted in a parse error. This will only happen for backfilled
+ * arithmetic operator tokens, like T_POW, on PHP versions in which the token
+ * did not exist. In that case, flag for manual inspection.
+ */
+ $this->phpcsFile->addWarning( $message, $reportPtr, $error_code, $data );
+ return;
+ }
+
+ if ( $time < 300 && (int) $time !== 0 ) {
+ $message = 'Low cache expiry time of %s seconds detected. It is recommended to have 300 seconds or more.';
+ $data = [ $time ];
+
+ if ( (string) $time !== $tokensAsString ) {
+ $message .= ' Found: "%s"';
+ $data[] = $tokensAsString;
+ }
+
+ $this->phpcsFile->addWarning( $message, $reportPtr, 'LowCacheTime', $data );
+ }
+ }
+}
diff --git a/vendor/automattic/vipwpcs/WordPressVIPMinimum/Sniffs/Performance/NoPagingSniff.php b/vendor/automattic/vipwpcs/WordPressVIPMinimum/Sniffs/Performance/NoPagingSniff.php
new file mode 100644
index 00000000..9e23fc4f
--- /dev/null
+++ b/vendor/automattic/vipwpcs/WordPressVIPMinimum/Sniffs/Performance/NoPagingSniff.php
@@ -0,0 +1,61 @@
+ [
+ 'type' => 'error',
+ 'keys' => [
+ 'nopaging',
+ ],
+ ],
+ ];
+ }
+
+ /**
+ * Callback to process each confirmed key, to check value.
+ *
+ * @param string $key Array index / key.
+ * @param mixed $val Assigned value.
+ * @param int $line Token line.
+ * @param array $group Group definition.
+ * @return mixed FALSE if no match, TRUE if matches, STRING if matches
+ * with custom error message passed to ->process().
+ */
+ public function callback( $key, $val, $line, $group ) {
+ $key = strtolower( $key );
+
+ if ( $key === 'nopaging' && ( $val === 'true' || $val === 1 ) ) {
+ return 'Disabling pagination is prohibited in VIP context, do not set `%s` to `%s` ever.';
+ }
+
+ return false;
+ }
+
+}
diff --git a/vendor/automattic/vipwpcs/WordPressVIPMinimum/Sniffs/Performance/OrderByRandSniff.php b/vendor/automattic/vipwpcs/WordPressVIPMinimum/Sniffs/Performance/OrderByRandSniff.php
new file mode 100644
index 00000000..e6e64c6f
--- /dev/null
+++ b/vendor/automattic/vipwpcs/WordPressVIPMinimum/Sniffs/Performance/OrderByRandSniff.php
@@ -0,0 +1,59 @@
+ rand.
+ *
+ * @link https://docs.wpvip.com/technical-references/code-review/#order-by-rand
+ *
+ * @package VIPCS\WordPressVIPMinimum
+ *
+ * @since 0.5.0
+ */
+class OrderByRandSniff extends AbstractArrayAssignmentRestrictionsSniff {
+
+ /**
+ * Groups of variables to restrict.
+ *
+ * @return array
+ */
+ public function getGroups() {
+ return [
+ 'orderby' => [
+ 'type' => 'error',
+ 'keys' => [
+ 'orderby',
+ ],
+ ],
+ ];
+ }
+
+ /**
+ * Callback to process each confirmed key, to check value
+ * This must be extended to add the logic to check assignment value
+ *
+ * @param string $key Array index / key.
+ * @param mixed $val Assigned value.
+ * @param int $line Token line.
+ * @param array $group Group definition.
+ * @return mixed FALSE if no match, TRUE if matches, STRING if matches with custom error message passed to ->process().
+ */
+ public function callback( $key, $val, $line, $group ) {
+ if ( strtolower( $val ) === 'rand' ) {
+ return 'Detected forbidden query_var "%s" of "%s". Use vip_get_random_posts() instead.';
+ }
+
+ return false;
+ }
+
+}
diff --git a/vendor/automattic/vipwpcs/WordPressVIPMinimum/Sniffs/Performance/RegexpCompareSniff.php b/vendor/automattic/vipwpcs/WordPressVIPMinimum/Sniffs/Performance/RegexpCompareSniff.php
new file mode 100644
index 00000000..dea5fd5f
--- /dev/null
+++ b/vendor/automattic/vipwpcs/WordPressVIPMinimum/Sniffs/Performance/RegexpCompareSniff.php
@@ -0,0 +1,65 @@
+ array(
+ * 'groupname' => array(
+ * 'type' => 'error' | 'warning',
+ * 'message' => 'Dont use this one please!',
+ * 'keys' => array( 'key1', 'another_key' ),
+ * 'callback' => array( 'class', 'method' ), // Optional.
+ * )
+ * )
+ *
+ * @return array
+ */
+ public function getGroups() {
+ return [
+ 'compare' => [
+ 'type' => 'error',
+ 'keys' => [
+ 'compare',
+ 'meta_compare',
+ ],
+ ],
+ ];
+ }
+
+ /**
+ * Callback to process each confirmed key, to check value.
+ * This must be extended to add the logic to check assignment value.
+ *
+ * @param string $key Array index / key.
+ * @param mixed $val Assigned value.
+ * @param int $line Token line.
+ * @param array $group Group definition.
+ * @return mixed FALSE if no match, TRUE if matches, STRING if matches
+ * with custom error message passed to ->process().
+ */
+ public function callback( $key, $val, $line, $group ) {
+ if ( strpos( $val, 'NOT REGEXP' ) === 0
+ || strpos( $val, 'REGEXP' ) === 0
+ || in_array( $val, [ 'REGEXP', 'NOT REGEXP' ], true ) === true
+ ) {
+ return 'Detected regular expression comparison. `%s` is set to `%s`.';
+ }
+ }
+
+}
diff --git a/vendor/automattic/vipwpcs/WordPressVIPMinimum/Sniffs/Performance/RemoteRequestTimeoutSniff.php b/vendor/automattic/vipwpcs/WordPressVIPMinimum/Sniffs/Performance/RemoteRequestTimeoutSniff.php
new file mode 100644
index 00000000..974532f4
--- /dev/null
+++ b/vendor/automattic/vipwpcs/WordPressVIPMinimum/Sniffs/Performance/RemoteRequestTimeoutSniff.php
@@ -0,0 +1,61 @@
+ array(
+ * 'groupname' => array(
+ * 'type' => 'error' | 'warning',
+ * 'message' => 'Dont use this one please!',
+ * 'keys' => array( 'key1', 'another_key' ),
+ * 'callback' => array( 'class', 'method' ), // Optional.
+ * )
+ * )
+ *
+ * @return array
+ */
+ public function getGroups() {
+ return [
+ 'timeout' => [
+ 'type' => 'error',
+ 'keys' => [
+ 'timeout',
+ ],
+ ],
+ ];
+ }
+
+ /**
+ * Callback to process each confirmed key, to check value.
+ * This must be extended to add the logic to check assignment value.
+ *
+ * @param string $key Array index / key.
+ * @param mixed $val Assigned value.
+ * @param int $line Token line.
+ * @param array $group Group definition.
+ * @return mixed FALSE if no match, TRUE if matches, STRING if matches
+ * with custom error message passed to ->process().
+ */
+ public function callback( $key, $val, $line, $group ) {
+ if ( (int) $val > 3 ) {
+ return 'Detected high remote request timeout. `%s` is set to `%d`.';
+ }
+ }
+
+}
diff --git a/vendor/automattic/vipwpcs/WordPressVIPMinimum/Sniffs/Performance/TaxonomyMetaInOptionsSniff.php b/vendor/automattic/vipwpcs/WordPressVIPMinimum/Sniffs/Performance/TaxonomyMetaInOptionsSniff.php
new file mode 100644
index 00000000..c9c815be
--- /dev/null
+++ b/vendor/automattic/vipwpcs/WordPressVIPMinimum/Sniffs/Performance/TaxonomyMetaInOptionsSniff.php
@@ -0,0 +1,134 @@
+tokens[ $stackPtr ]['content'], $this->option_functions, true ) === false ) {
+ return;
+ }
+
+ $openBracket = $this->phpcsFile->findNext( Tokens::$emptyTokens, $stackPtr + 1, null, true );
+
+ if ( $this->tokens[ $openBracket ]['code'] !== T_OPEN_PARENTHESIS ) {
+ return;
+ }
+
+ $param_ptr = $this->phpcsFile->findNext( Tokens::$emptyTokens, $openBracket + 1, null, true );
+
+ if ( $this->tokens[ $param_ptr ]['code'] === T_DOUBLE_QUOTED_STRING ) {
+ foreach ( $this->taxonomy_term_patterns as $taxonomy_term_pattern ) {
+ if ( strpos( $this->tokens[ $param_ptr ]['content'], $taxonomy_term_pattern ) !== false ) {
+ $this->addPossibleTermMetaInOptionsWarning( $stackPtr );
+ return;
+ }
+ }
+ } elseif ( $this->tokens[ $param_ptr ]['code'] === T_CONSTANT_ENCAPSED_STRING ) {
+
+ $string_concat = $this->phpcsFile->findNext( Tokens::$emptyTokens, $param_ptr + 1, null, true );
+ if ( $this->tokens[ $string_concat ]['code'] !== T_STRING_CONCAT ) {
+ return;
+ }
+
+ $variable_name = $this->phpcsFile->findNext( Tokens::$emptyTokens, $string_concat + 1, null, true );
+ if ( $this->tokens[ $variable_name ]['code'] !== T_VARIABLE ) {
+ return;
+ }
+
+ foreach ( $this->taxonomy_term_patterns as $taxonomy_term_pattern ) {
+ if ( strpos( $this->tokens[ $variable_name ]['content'], $taxonomy_term_pattern ) !== false ) {
+ $this->addPossibleTermMetaInOptionsWarning( $stackPtr );
+ return;
+ }
+ }
+
+ $object_operator = $this->phpcsFile->findNext( Tokens::$emptyTokens, $variable_name + 1, null, true );
+ if ( $this->tokens[ $object_operator ]['code'] !== T_OBJECT_OPERATOR ) {
+ return;
+ }
+
+ $object_property = $this->phpcsFile->findNext( Tokens::$emptyTokens, $object_operator + 1, null, true );
+ if ( $this->tokens[ $object_property ]['code'] !== T_STRING ) {
+ return;
+ }
+
+ foreach ( $this->taxonomy_term_patterns as $taxonomy_term_pattern ) {
+ if ( strpos( $this->tokens[ $object_property ]['content'], $taxonomy_term_pattern ) !== false ) {
+ $this->addPossibleTermMetaInOptionsWarning( $stackPtr );
+ return;
+ }
+ }
+ }
+ }
+
+ /**
+ * Helper method for composing the Warning for all possible cases.
+ *
+ * @param int $stackPtr The position of the current token in the stack passed in $tokens.
+ *
+ * @return void
+ */
+ public function addPossibleTermMetaInOptionsWarning( $stackPtr ) {
+ $message = 'Possible detection of storing taxonomy term meta in options table. Needs manual inspection. All such data should be stored in term_meta.';
+ $this->phpcsFile->addWarning( $message, $stackPtr, 'PossibleTermMetaInOptions' );
+ }
+}
diff --git a/vendor/automattic/vipwpcs/WordPressVIPMinimum/Sniffs/Performance/WPQueryParamsSniff.php b/vendor/automattic/vipwpcs/WordPressVIPMinimum/Sniffs/Performance/WPQueryParamsSniff.php
new file mode 100644
index 00000000..9b15ef63
--- /dev/null
+++ b/vendor/automattic/vipwpcs/WordPressVIPMinimum/Sniffs/Performance/WPQueryParamsSniff.php
@@ -0,0 +1,104 @@
+ array(
+ * 'groupname' => array(
+ * 'type' => 'error' | 'warning',
+ * 'message' => 'Dont use this one please!',
+ * 'keys' => array( 'key1', 'another_key' ),
+ * 'callback' => array( 'class', 'method' ), // Optional.
+ * )
+ * )
+ *
+ * @return array
+ */
+ public function getGroups() {
+ return [
+ 'PostNotIn' => [
+ 'type' => 'warning',
+ 'message' => 'Using `exclude`, which is subsequently used by `post__not_in`, should be done with caution, see https://docs.wpvip.com/how-tos/improve-performance-by-removing-usage-of-post__not_in/ for more information.',
+ 'keys' => [
+ 'exclude',
+ ],
+ ],
+ ];
+ }
+
+ /**
+ * Process this test when one of its tokens is encountered
+ *
+ * @param int $stackPtr The position of the current token in the stack passed in $tokens.
+ *
+ * @return void
+ */
+ public function process_token( $stackPtr ) {
+
+ if ( trim( $this->tokens[ $stackPtr ]['content'], '\'' ) === 'suppress_filters' ) {
+
+ $next_token = $this->phpcsFile->findNext( array_merge( Tokens::$emptyTokens, [ T_EQUAL, T_CLOSE_SQUARE_BRACKET, T_DOUBLE_ARROW ] ), $stackPtr + 1, null, true );
+
+ if ( $this->tokens[ $next_token ]['code'] === T_TRUE ) {
+ // https://docs.wpvip.com/technical-references/caching/uncached-functions/.
+ $message = 'Setting `suppress_filters` to `true` is prohibited.';
+ $this->phpcsFile->addError( $message, $stackPtr, 'SuppressFiltersTrue' );
+ }
+ }
+
+ if ( trim( $this->tokens[ $stackPtr ]['content'], '\'' ) === 'post__not_in' ) {
+ $message = 'Using `post__not_in` should be done with caution, see https://docs.wpvip.com/how-tos/improve-performance-by-removing-usage-of-post__not_in/ for more information.';
+ $this->phpcsFile->addWarning( $message, $stackPtr, 'PostNotIn' );
+ }
+
+ parent::process_token( $stackPtr );
+ }
+
+ /**
+ * Callback to process a confirmed key which doesn't need custom logic, but should always error.
+ *
+ * @param string $key Array index / key.
+ * @param mixed $val Assigned value.
+ * @param int $line Token line.
+ * @param array $group Group definition.
+ * @return mixed FALSE if no match, TRUE if matches, STRING if matches
+ * with custom error message passed to ->process().
+ */
+ public function callback( $key, $val, $line, $group ) {
+ return true;
+ }
+
+}
diff --git a/vendor/automattic/vipwpcs/WordPressVIPMinimum/Sniffs/Security/EscapingVoidReturnFunctionsSniff.php b/vendor/automattic/vipwpcs/WordPressVIPMinimum/Sniffs/Security/EscapingVoidReturnFunctionsSniff.php
new file mode 100644
index 00000000..5c7f4e72
--- /dev/null
+++ b/vendor/automattic/vipwpcs/WordPressVIPMinimum/Sniffs/Security/EscapingVoidReturnFunctionsSniff.php
@@ -0,0 +1,70 @@
+tokens[ $stackPtr ]['content'], 'esc_' ) !== 0 && strpos( $this->tokens[ $stackPtr ]['content'], 'wp_kses' ) !== 0 ) {
+ // Not what we are looking for.
+ return;
+ }
+
+ $next_token = $this->phpcsFile->findNext( Tokens::$emptyTokens, $stackPtr + 1, null, true );
+
+ if ( $this->tokens[ $next_token ]['code'] !== T_OPEN_PARENTHESIS ) {
+ // Not a function call.
+ return;
+ }
+
+ $next_token = $this->phpcsFile->findNext( Tokens::$emptyTokens, $next_token + 1, null, true );
+
+ if ( $this->tokens[ $next_token ]['code'] !== T_STRING ) {
+ // Not what we are looking for.
+ return;
+ }
+
+ if ( isset( $this->printingFunctions[ $this->tokens[ $next_token ]['content'] ] ) ) {
+ $message = 'Attempting to escape `%s()` which is printing its output.';
+ $data = [ $this->tokens[ $next_token ]['content'] ];
+ $this->phpcsFile->addError( $message, $stackPtr, 'Found', $data );
+ return;
+ }
+ }
+
+}
diff --git a/vendor/automattic/vipwpcs/WordPressVIPMinimum/Sniffs/Security/ExitAfterRedirectSniff.php b/vendor/automattic/vipwpcs/WordPressVIPMinimum/Sniffs/Security/ExitAfterRedirectSniff.php
new file mode 100644
index 00000000..dfacc425
--- /dev/null
+++ b/vendor/automattic/vipwpcs/WordPressVIPMinimum/Sniffs/Security/ExitAfterRedirectSniff.php
@@ -0,0 +1,68 @@
+tokens[ $stackPtr ]['content'] !== 'wp_redirect' && $this->tokens[ $stackPtr ]['content'] !== 'wp_safe_redirect' ) {
+ return;
+ }
+
+ $openBracket = $this->phpcsFile->findNext( Tokens::$emptyTokens, $stackPtr + 1, null, true );
+
+ if ( $this->tokens[ $openBracket ]['code'] !== T_OPEN_PARENTHESIS ) {
+ return;
+ }
+
+ $next_token = $this->phpcsFile->findNext( array_merge( Tokens::$emptyTokens, [ T_SEMICOLON, T_CLOSE_PARENTHESIS ] ), $this->tokens[ $openBracket ]['parenthesis_closer'] + 1, null, true );
+
+ $message = '`%s()` should almost always be followed by a call to `exit;`.';
+ $data = [ $this->tokens[ $stackPtr ]['content'] ];
+
+ if ( $this->tokens[ $next_token ]['code'] === T_OPEN_CURLY_BRACKET ) {
+ $is_exit_in_scope = false;
+ for ( $i = $this->tokens[ $next_token ]['scope_opener']; $i <= $this->tokens[ $next_token ]['scope_closer']; $i++ ) {
+ if ( $this->tokens[ $i ]['code'] === T_EXIT ) {
+ $is_exit_in_scope = true;
+ }
+ }
+ if ( $is_exit_in_scope === false ) {
+ $this->phpcsFile->addError( $message, $stackPtr, 'NoExitInConditional', $data );
+ }
+ } elseif ( $this->tokens[ $next_token ]['code'] !== T_EXIT ) {
+ $this->phpcsFile->addError( $message, $stackPtr, 'NoExit', $data );
+ }
+ }
+}
diff --git a/vendor/automattic/vipwpcs/WordPressVIPMinimum/Sniffs/Security/MustacheSniff.php b/vendor/automattic/vipwpcs/WordPressVIPMinimum/Sniffs/Security/MustacheSniff.php
new file mode 100644
index 00000000..c6465c2d
--- /dev/null
+++ b/vendor/automattic/vipwpcs/WordPressVIPMinimum/Sniffs/Security/MustacheSniff.php
@@ -0,0 +1,77 @@
+tokens[ $stackPtr ]['content'], '{{{' ) !== false || strpos( $this->tokens[ $stackPtr ]['content'], '}}}' ) !== false ) {
+ // Mustache unescaped output notation.
+ $message = 'Found Mustache unescaped output notation: "{{{}}}".';
+ $this->phpcsFile->addWarning( $message, $stackPtr, 'OutputNotation' );
+ }
+
+ if ( strpos( $this->tokens[ $stackPtr ]['content'], '{{&' ) !== false ) {
+ // Mustache unescaped variable notation.
+ $message = 'Found Mustache unescape variable notation: "{{&".';
+ $this->phpcsFile->addWarning( $message, $stackPtr, 'VariableNotation' );
+ }
+
+ if ( strpos( $this->tokens[ $stackPtr ]['content'], '{{=' ) !== false ) {
+ // Mustache delimiter change.
+ $new_delimiter = trim( str_replace( [ '{{=', '=}}' ], '', substr( $this->tokens[ $stackPtr ]['content'], 0, strpos( $this->tokens[ $stackPtr ]['content'], '=}}' ) + 3 ) ) );
+ $message = 'Found Mustache delimiter change notation. New delimiter is: %s.';
+ $data = [ $new_delimiter ];
+ $this->phpcsFile->addWarning( $message, $stackPtr, 'DelimiterChange', $data );
+ }
+
+ if ( strpos( $this->tokens[ $stackPtr ]['content'], 'SafeString' ) !== false ) {
+ // Handlebars.js Handlebars.SafeString does not get escaped.
+ $message = 'Found Handlebars.SafeString call which does not get escaped.';
+ $this->phpcsFile->addWarning( $message, $stackPtr, 'SafeString' );
+ }
+ }
+
+}
diff --git a/vendor/automattic/vipwpcs/WordPressVIPMinimum/Sniffs/Security/PHPFilterFunctionsSniff.php b/vendor/automattic/vipwpcs/WordPressVIPMinimum/Sniffs/Security/PHPFilterFunctionsSniff.php
new file mode 100644
index 00000000..84278541
--- /dev/null
+++ b/vendor/automattic/vipwpcs/WordPressVIPMinimum/Sniffs/Security/PHPFilterFunctionsSniff.php
@@ -0,0 +1,90 @@
+ true,
+ 'filter_input' => true,
+ 'filter_var_array' => true,
+ 'filter_input_array' => true,
+ ];
+
+ /**
+ * List of restricted filter names.
+ *
+ * @var array
+ */
+ private $restricted_filters = [
+ 'FILTER_DEFAULT' => true,
+ 'FILTER_UNSAFE_RAW' => true,
+ ];
+
+ /**
+ * Process the parameters of a matched function.
+ *
+ * @param int $stackPtr The position of the current token in the stack.
+ * @param array $group_name The name of the group which was matched.
+ * @param string $matched_content The token content (function name) which was matched.
+ * @param array $parameters Array with information about the parameters.
+ * @return int|void Integer stack pointer to skip forward or void to continue
+ * normal file processing.
+ */
+ public function process_parameters( $stackPtr, $group_name, $matched_content, $parameters ) {
+ if ( $matched_content === 'filter_input' ) {
+ if ( count( $parameters ) === 2 ) {
+ $message = 'Missing third parameter for "%s".';
+ $data = [ $matched_content ];
+ $this->phpcsFile->addWarning( $message, $stackPtr, 'MissingThirdParameter', $data );
+ }
+
+ if ( isset( $parameters[3], $this->restricted_filters[ $parameters[3]['raw'] ] ) ) {
+ $message = 'Please use an appropriate filter to sanitize, as "%s" does no filtering, see: http://php.net/manual/en/filter.filters.sanitize.php.';
+ $data = [ strtoupper( $parameters[3]['raw'] ) ];
+ $this->phpcsFile->addWarning( $message, $stackPtr, 'RestrictedFilter', $data );
+ }
+ } else {
+ if ( count( $parameters ) === 1 ) {
+ $message = 'Missing second parameter for "%s".';
+ $data = [ $matched_content ];
+ $this->phpcsFile->addWarning( $message, $stackPtr, 'MissingSecondParameter', $data );
+ }
+
+ if ( isset( $parameters[2], $this->restricted_filters[ $parameters[2]['raw'] ] ) ) {
+ $message = 'Please use an appropriate filter to sanitize, as "%s" does no filtering, see http://php.net/manual/en/filter.filters.sanitize.php.';
+ $data = [ strtoupper( $parameters[2]['raw'] ) ];
+ $this->phpcsFile->addWarning( $message, $stackPtr, 'RestrictedFilter', $data );
+ }
+ }
+ }
+}
diff --git a/vendor/automattic/vipwpcs/WordPressVIPMinimum/Sniffs/Security/ProperEscapingFunctionSniff.php b/vendor/automattic/vipwpcs/WordPressVIPMinimum/Sniffs/Security/ProperEscapingFunctionSniff.php
new file mode 100644
index 00000000..9b9513f0
--- /dev/null
+++ b/vendor/automattic/vipwpcs/WordPressVIPMinimum/Sniffs/Security/ProperEscapingFunctionSniff.php
@@ -0,0 +1,277 @@
+href|src|url|(^|\s+)action)?(?<=[a-z0-9_-])=(?:\\\\)?["\']*$`i';
+
+ /**
+ * List of escaping functions which are being tested.
+ *
+ * @var array
+ */
+ protected $escaping_functions = [
+ 'esc_url' => 'url',
+ 'esc_attr' => 'attr',
+ 'esc_attr__' => 'attr',
+ 'esc_attr_x' => 'attr',
+ 'esc_attr_e' => 'attr',
+ 'esc_html' => 'html',
+ 'esc_html__' => 'html',
+ 'esc_html_x' => 'html',
+ 'esc_html_e' => 'html',
+ ];
+
+ /**
+ * List of tokens we can skip.
+ *
+ * @var array
+ */
+ private $echo_or_concat_tokens =
+ [
+ T_ECHO => T_ECHO,
+ T_OPEN_TAG => T_OPEN_TAG,
+ T_OPEN_TAG_WITH_ECHO => T_OPEN_TAG_WITH_ECHO,
+ T_STRING_CONCAT => T_STRING_CONCAT,
+ T_NS_SEPARATOR => T_NS_SEPARATOR,
+ ];
+
+ /**
+ * List of attributes associated with url outputs.
+ *
+ * @deprecated 2.3.1 Currently unused by the sniff, but needed for
+ * for public methods which extending sniffs may be
+ * relying on.
+ *
+ * @var array
+ */
+ private $url_attrs = [
+ 'href',
+ 'src',
+ 'url',
+ 'action',
+ ];
+
+ /**
+ * List of syntaxes for inside attribute detection.
+ *
+ * @deprecated 2.3.1 Currently unused by the sniff, but needed for
+ * for public methods which extending sniffs may be
+ * relying on.
+ *
+ * @var array
+ */
+ private $attr_endings = [
+ '=',
+ '="',
+ "='",
+ "=\\'",
+ '=\\"',
+ ];
+
+ /**
+ * Keep track of whether or not we're currently in the first statement of a short open echo tag.
+ *
+ * @var int|false Integer stack pointer to the end of the first statement in the current
+ * short open echo tag or false when not in a short open echo tag.
+ */
+ private $in_short_echo = false;
+
+ /**
+ * Returns an array of tokens this test wants to listen for.
+ *
+ * @return array
+ */
+ public function register() {
+ $this->echo_or_concat_tokens += Tokens::$emptyTokens;
+
+ return [
+ T_STRING,
+ T_OPEN_TAG_WITH_ECHO,
+ ];
+ }
+
+ /**
+ * Process this test when one of its tokens is encountered
+ *
+ * @param int $stackPtr The position of the current token in the stack passed in $tokens.
+ *
+ * @return void
+ */
+ public function process_token( $stackPtr ) {
+ /*
+ * Short open echo tags will act as an echo for the first expression and
+ * allow for passing multiple comma-separated parameters.
+ * However, short open echo tags also allow for additional statements after, but
+ * those have to be full PHP statements, not expressions.
+ *
+ * This snippet of code will keep track of whether or not we're in the first
+ * expression in a short open echo tag.
+ * $phpcsFile->findStartOfStatement() unfortunately is useless, as it will return
+ * the first token in the statement, which can be anything - variable, text string -
+ * without any indication of whether this is the start of a normal statement or
+ * a short open echo expression.
+ * So, if we used that, we'd need to walk back from every start of statement to
+ * the previous non-empty to see if it is the short open echo tag.
+ */
+ if ( $this->tokens[ $stackPtr ]['code'] === T_OPEN_TAG_WITH_ECHO ) {
+ $end_of_echo = $this->phpcsFile->findNext( [ T_SEMICOLON, T_CLOSE_TAG ], ( $stackPtr + 1 ) );
+ if ( $end_of_echo === false ) {
+ $this->in_short_echo = $this->phpcsFile->numTokens;
+ } else {
+ $this->in_short_echo = $end_of_echo;
+ }
+
+ return;
+ }
+
+ if ( $this->in_short_echo !== false && $this->in_short_echo < $stackPtr ) {
+ $this->in_short_echo = false;
+ }
+
+ $function_name = strtolower( $this->tokens[ $stackPtr ]['content'] );
+
+ if ( isset( $this->escaping_functions[ $function_name ] ) === false ) {
+ return;
+ }
+
+ $next_non_empty = $this->phpcsFile->findNext( Tokens::$emptyTokens, ( $stackPtr + 1 ), null, true );
+ if ( $next_non_empty === false || $this->tokens[ $next_non_empty ]['code'] !== T_OPEN_PARENTHESIS ) {
+ // Not a function call.
+ return;
+ }
+
+ $ignore = $this->echo_or_concat_tokens;
+ if ( $this->in_short_echo !== false ) {
+ $ignore[ T_COMMA ] = T_COMMA;
+ } else {
+ $start_of_statement = $this->phpcsFile->findStartOfStatement( $stackPtr, T_COMMA );
+ if ( $this->tokens[ $start_of_statement ]['code'] === T_ECHO ) {
+ $ignore[ T_COMMA ] = T_COMMA;
+ }
+ }
+
+ $html = $this->phpcsFile->findPrevious( $ignore, $stackPtr - 1, null, true );
+
+ // Use $textStringTokens b/c heredoc and nowdoc tokens will never be encountered in this context anyways..
+ if ( $html === false || isset( Tokens::$textStringTokens[ $this->tokens[ $html ]['code'] ] ) === false ) {
+ return;
+ }
+
+ $data = [ $function_name ];
+
+ $content = $this->tokens[ $html ]['content'];
+ if ( isset( Tokens::$stringTokens[ $this->tokens[ $html ]['code'] ] ) === true ) {
+ $content = Sniff::strip_quotes( $content );
+ }
+
+ $escaping_type = $this->escaping_functions[ $function_name ];
+
+ if ( $escaping_type === 'attr' && $this->is_outside_html_attr_context( $content ) ) {
+ $message = 'Wrong escaping function, using `%s()` in a context outside of HTML attributes may not escape properly.';
+ $this->phpcsFile->addError( $message, $html, 'notAttrEscAttr', $data );
+ return;
+ }
+
+ if ( preg_match( self::ATTR_END_REGEX, $content, $matches ) !== 1 ) {
+ return;
+ }
+
+ if ( $escaping_type !== 'url' && empty( $matches['attrname'] ) === false ) {
+ $message = 'Wrong escaping function. href, src, and action attributes should be escaped by `esc_url()`, not by `%s()`.';
+ $this->phpcsFile->addError( $message, $stackPtr, 'hrefSrcEscUrl', $data );
+ return;
+ }
+
+ if ( $escaping_type === 'html' ) {
+ $message = 'Wrong escaping function. HTML attributes should be escaped by `esc_attr()`, not by `%s()`.';
+ $this->phpcsFile->addError( $message, $stackPtr, 'htmlAttrNotByEscHTML', $data );
+ return;
+ }
+ }
+
+ /**
+ * Tests whether provided string ends with open attribute which expects a URL value.
+ *
+ * @deprecated 2.3.1
+ *
+ * @param string $content Haystack in which we look for an open attribute which exects a URL value.
+ *
+ * @return bool True if string ends with open attribute which expects a URL value.
+ */
+ public function attr_expects_url( $content ) {
+ $attr_expects_url = false;
+ foreach ( $this->url_attrs as $attr ) {
+ foreach ( $this->attr_endings as $ending ) {
+ if ( $this->endswith( $content, $attr . $ending ) === true ) {
+ $attr_expects_url = true;
+ break;
+ }
+ }
+ }
+ return $attr_expects_url;
+ }
+
+ /**
+ * Tests whether provided string ends with open HMTL attribute.
+ *
+ * @deprecated 2.3.1
+ *
+ * @param string $content Haystack in which we look for open HTML attribute.
+ *
+ * @return bool True if string ends with open HTML attribute.
+ */
+ public function is_html_attr( $content ) {
+ $is_html_attr = false;
+ foreach ( $this->attr_endings as $ending ) {
+ if ( $this->endswith( $content, $ending ) === true ) {
+ $is_html_attr = true;
+ break;
+ }
+ }
+ return $is_html_attr;
+ }
+
+ /**
+ * Tests whether an attribute escaping function is being used outside of an HTML tag.
+ *
+ * @param string $content Haystack where we look for the end of a HTML tag.
+ *
+ * @return bool True if the passed string ends a HTML tag.
+ */
+ public function is_outside_html_attr_context( $content ) {
+ return $this->endswith( trim( $content ), '>' );
+ }
+
+ /**
+ * A helper function which tests whether string ends with some other.
+ *
+ * @param string $haystack String which is being tested.
+ * @param string $needle The substring, which we try to locate on the end of the $haystack.
+ *
+ * @return bool True if haystack ends with needle.
+ */
+ public function endswith( $haystack, $needle ) {
+ return substr( $haystack, -strlen( $needle ) ) === $needle;
+ }
+}
diff --git a/vendor/automattic/vipwpcs/WordPressVIPMinimum/Sniffs/Security/StaticStrreplaceSniff.php b/vendor/automattic/vipwpcs/WordPressVIPMinimum/Sniffs/Security/StaticStrreplaceSniff.php
new file mode 100644
index 00000000..3d57edcc
--- /dev/null
+++ b/vendor/automattic/vipwpcs/WordPressVIPMinimum/Sniffs/Security/StaticStrreplaceSniff.php
@@ -0,0 +1,87 @@
+tokens[ $stackPtr ]['content'] !== 'str_replace' ) {
+ return;
+ }
+
+ $openBracket = $this->phpcsFile->findNext( Tokens::$emptyTokens, $stackPtr + 1, null, true );
+
+ if ( $this->tokens[ $openBracket ]['code'] !== T_OPEN_PARENTHESIS ) {
+ return;
+ }
+
+ $next_start_ptr = $openBracket + 1;
+ for ( $i = 0; $i < 3; $i++ ) {
+ $param_ptr = $this->phpcsFile->findNext( array_merge( Tokens::$emptyTokens, [ T_COMMA ] ), $next_start_ptr, null, true );
+
+ if ( $this->tokens[ $param_ptr ]['code'] === T_ARRAY ) {
+ $openBracket = $this->phpcsFile->findNext( Tokens::$emptyTokens, $param_ptr + 1, null, true );
+ if ( $this->tokens[ $openBracket ]['code'] !== T_OPEN_PARENTHESIS ) {
+ return;
+ }
+
+ // Find the closing bracket.
+ $closeBracket = $this->tokens[ $openBracket ]['parenthesis_closer'];
+
+ $array_item_ptr = $this->phpcsFile->findNext( array_merge( Tokens::$emptyTokens, [ T_COMMA ] ), $openBracket + 1, $closeBracket, true );
+ while ( $array_item_ptr !== false ) {
+
+ if ( $this->tokens[ $array_item_ptr ]['code'] !== T_CONSTANT_ENCAPSED_STRING ) {
+ return;
+ }
+ $array_item_ptr = $this->phpcsFile->findNext( array_merge( Tokens::$emptyTokens, [ T_COMMA ] ), $array_item_ptr + 1, $closeBracket, true );
+ }
+
+ $next_start_ptr = $closeBracket + 1;
+ continue;
+
+ }
+
+ if ( $this->tokens[ $param_ptr ]['code'] !== T_CONSTANT_ENCAPSED_STRING ) {
+ return;
+ }
+
+ $next_start_ptr = $param_ptr + 1;
+
+ }
+
+ $message = 'This code pattern is often used to run a very dangerous shell programs on your server. The code in these files needs to be reviewed, and possibly cleaned.';
+ $this->phpcsFile->addError( $message, $stackPtr, 'StaticStrreplace' );
+ }
+}
diff --git a/vendor/automattic/vipwpcs/WordPressVIPMinimum/Sniffs/Security/TwigSniff.php b/vendor/automattic/vipwpcs/WordPressVIPMinimum/Sniffs/Security/TwigSniff.php
new file mode 100644
index 00000000..9c87efa7
--- /dev/null
+++ b/vendor/automattic/vipwpcs/WordPressVIPMinimum/Sniffs/Security/TwigSniff.php
@@ -0,0 +1,62 @@
+tokens[ $stackPtr ]['content'] ) === 1 ) {
+ // Twig autoescape disabled.
+ $message = 'Found Twig autoescape disabling notation.';
+ $this->phpcsFile->addWarning( $message, $stackPtr, 'AutoescapeFalse' );
+ }
+
+ if ( preg_match( '/\|\s*raw/', $this->tokens[ $stackPtr ]['content'] ) === 1 ) {
+ // Twig default unescape filter.
+ $message = 'Found Twig default unescape filter: "|raw".';
+ $this->phpcsFile->addWarning( $message, $stackPtr, 'RawFound' );
+ }
+ }
+
+}
diff --git a/vendor/automattic/vipwpcs/WordPressVIPMinimum/Sniffs/Security/UnderscorejsSniff.php b/vendor/automattic/vipwpcs/WordPressVIPMinimum/Sniffs/Security/UnderscorejsSniff.php
new file mode 100644
index 00000000..6ea36135
--- /dev/null
+++ b/vendor/automattic/vipwpcs/WordPressVIPMinimum/Sniffs/Security/UnderscorejsSniff.php
@@ -0,0 +1,162 @@
+|$)`';
+
+ /**
+ * Regex to match execute notations containing a print command
+ * and retrieve a code snippet.
+ *
+ * @var string
+ */
+ const UNESCAPED_PRINT_REGEX = '`<%\s*(?:print\s*\(.+?\)\s*;|__p\s*\+=.+?)\s*%>`';
+
+ /**
+ * Regex to match the "interpolate" keyword when used to overrule the ERB-style delimiters.
+ *
+ * @var string
+ */
+ const INTERPOLATE_KEYWORD_REGEX = '`(?:templateSettings\.interpolate|\.interpolate\s*=\s*/|interpolate\s*:\s*/)`';
+
+ /**
+ * A list of tokenizers this sniff supports.
+ *
+ * @var string[]
+ */
+ public $supportedTokenizers = [ 'JS', 'PHP' ];
+
+ /**
+ * Returns an array of tokens this test wants to listen for.
+ *
+ * @return array
+ */
+ public function register() {
+ $targets = Tokens::$textStringTokens;
+ $targets[] = T_PROPERTY;
+ $targets[] = T_STRING;
+
+ return $targets;
+ }
+
+ /**
+ * Processes this test, when one of its tokens is encountered.
+ *
+ * @param int $stackPtr The position of the current token in the stack passed in $tokens.
+ *
+ * @return void
+ */
+ public function process_token( $stackPtr ) {
+ /*
+ * Ignore Gruntfile.js files as they are configuration, not code.
+ */
+ $file_name = $this->strip_quotes( $this->phpcsFile->getFileName() );
+ $file_name = strtolower( basename( $file_name ) );
+
+ if ( $file_name === 'gruntfile.js' ) {
+ return;
+ }
+
+ /*
+ * Check for delimiter change in JS files.
+ */
+ if ( $this->tokens[ $stackPtr ]['code'] === T_STRING
+ || $this->tokens[ $stackPtr ]['code'] === T_PROPERTY
+ ) {
+ if ( $this->phpcsFile->tokenizerType !== 'JS' ) {
+ // These tokens are only relevant for JS files.
+ return;
+ }
+
+ if ( $this->tokens[ $stackPtr ]['content'] !== 'interpolate' ) {
+ return;
+ }
+
+ // Check the context to prevent false positives.
+ if ( $this->tokens[ $stackPtr ]['code'] === T_STRING ) {
+ $prev = $this->phpcsFile->findPrevious( Tokens::$emptyTokens, ( $stackPtr - 1 ), null, true );
+ if ( $prev === false || $this->tokens[ $prev ]['code'] !== T_OBJECT_OPERATOR ) {
+ return;
+ }
+
+ $prevPrev = $this->phpcsFile->findPrevious( Tokens::$emptyTokens, ( $stackPtr - 1 ), null, true );
+ $next = $this->phpcsFile->findNext( Tokens::$emptyTokens, ( $stackPtr + 1 ), null, true );
+ if ( ( $prevPrev === false
+ || $this->tokens[ $prevPrev ]['code'] !== T_STRING
+ || $this->tokens[ $prevPrev ]['content'] !== 'templateSettings' )
+ && ( $next === false
+ || $this->tokens[ $next ]['code'] !== T_EQUAL )
+ ) {
+ return;
+ }
+ }
+
+ // Underscore.js delimiter change.
+ $message = 'Found Underscore.js delimiter change notation.';
+ $this->phpcsFile->addWarning( $message, $stackPtr, 'InterpolateFound' );
+
+ return;
+ }
+
+ $content = $this->strip_quotes( $this->tokens[ $stackPtr ]['content'] );
+
+ $match_count = preg_match_all( self::UNESCAPED_INTERPOLATE_REGEX, $content, $matches );
+ if ( $match_count > 0 ) {
+ foreach ( $matches[0] as $match ) {
+ if ( strpos( $match, '_.escape(' ) !== false ) {
+ continue;
+ }
+
+ // Underscore.js unescaped output.
+ $message = 'Found Underscore.js unescaped output notation: "%s".';
+ $data = [ $match ];
+ $this->phpcsFile->addWarning( $message, $stackPtr, 'OutputNotation', $data );
+ }
+ }
+
+ $match_count = preg_match_all( self::UNESCAPED_PRINT_REGEX, $content, $matches );
+ if ( $match_count > 0 ) {
+ foreach ( $matches[0] as $match ) {
+ if ( strpos( $match, '_.escape(' ) !== false ) {
+ continue;
+ }
+
+ // Underscore.js unescaped output.
+ $message = 'Found Underscore.js unescaped print execution: "%s".';
+ $data = [ $match ];
+ $this->phpcsFile->addWarning( $message, $stackPtr, 'PrintExecution', $data );
+ }
+ }
+
+ if ( $this->phpcsFile->tokenizerType !== 'JS'
+ && preg_match( self::INTERPOLATE_KEYWORD_REGEX, $content ) > 0
+ ) {
+ // Underscore.js delimiter change.
+ $message = 'Found Underscore.js delimiter change notation.';
+ $this->phpcsFile->addWarning( $message, $stackPtr, 'InterpolateFound' );
+ }
+ }
+
+}
diff --git a/vendor/automattic/vipwpcs/WordPressVIPMinimum/Sniffs/Security/VuejsSniff.php b/vendor/automattic/vipwpcs/WordPressVIPMinimum/Sniffs/Security/VuejsSniff.php
new file mode 100644
index 00000000..df9ac30d
--- /dev/null
+++ b/vendor/automattic/vipwpcs/WordPressVIPMinimum/Sniffs/Security/VuejsSniff.php
@@ -0,0 +1,55 @@
+tokens[ $stackPtr ]['content'], 'v-html' ) !== false ) {
+ // Vue autoescape disabled.
+ $message = 'Found Vue.js non-escaped (raw) HTML directive.';
+ $this->phpcsFile->addWarning( $message, $stackPtr, 'RawHTMLDirectiveFound' );
+ }
+ }
+
+}
diff --git a/vendor/automattic/vipwpcs/WordPressVIPMinimum/Sniffs/Sniff.php b/vendor/automattic/vipwpcs/WordPressVIPMinimum/Sniffs/Sniff.php
new file mode 100644
index 00000000..dfad0381
--- /dev/null
+++ b/vendor/automattic/vipwpcs/WordPressVIPMinimum/Sniffs/Sniff.php
@@ -0,0 +1,20 @@
+ true,
+ 'add_filter' => true,
+ ];
+
+ /**
+ * CSS properties this sniff is looking for.
+ *
+ * @var array
+ */
+ protected $target_css_properties = [
+ 'visibility' => [
+ 'type' => '!=',
+ 'value' => 'hidden',
+ ],
+ 'display' => [
+ 'type' => '!=',
+ 'value' => 'none',
+ ],
+ 'opacity' => [
+ 'type' => '>',
+ 'value' => 0.3,
+ ],
+ ];
+
+ /**
+ * CSS selectors this sniff is looking for.
+ *
+ * @var array
+ */
+ protected $target_css_selectors = [
+ '.show-admin-bar',
+ '#wpadminbar',
+ ];
+
+ /**
+ * String tokens within PHP files we want to deal with.
+ *
+ * Set from the register() method.
+ *
+ * @var array
+ */
+ private $string_tokens = [];
+
+ /**
+ * Regex template for use with the CSS selectors in combination with PHP text strings.
+ *
+ * @var string
+ */
+ private $target_css_selectors_regex = '`(?:%s).*?\{(.*)$`';
+
+ /**
+ * Property to keep track of whether a ' ) !== false ) {
+ // Make sure we check any content on this line before the closing style tag.
+ $this->in_style[ $file_name ] = false;
+ $content = trim( substr( $content, 0, strpos( $content, '' ) ) );
+ }
+ } elseif ( $this->has_html_open_tag( 'style', $stackPtr, $content ) === true ) {
+ // Ok, found a ' ) === false ) {
+ // Make sure we check any content on this line after the opening style tag.
+ $this->in_style[ $file_name ] = true;
+ $content = trim( substr( $content, strpos( $content, '';
+echo ''; // Error.
+?> users"; // Error.
+$x = foo( sanitize_text_field( $_SERVER['HTTP_USER_AGENT'] ) ); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotValidated -- Warning.
+foo( $_SESSION['bar'] ); // Error.
+
+// WordPressVIPMinimum.Variables.ServerVariables
+// phpcs:disable WordPress.Security.ValidatedSanitizedInput.InputNotValidated,WordPress.Security.ValidatedSanitizedInput.InputNotSanitized
+$test = $_SERVER['PHP_AUTH_PW']; // Error.
+bar( $_SERVER['HTTP_X_IP_TRAIL'] ); // Error.
+$_SERVER['HTTP_X_FORWARDED_FOR']; // Error.
+$_SERVER["REMOTE_ADDR"]; // Error.
+// phpcs:enable WordPress.Security.ValidatedSanitizedInput.InputNotValidated,WordPress.Security.ValidatedSanitizedInput.InputNotSanitized
+
+class MyClass {
+ function my_function() {
+ return function() {
+ $this->my_callback(); // OK - new VariableAnalysis doesn't flag $this as undefined in closure.
+ };
+ }
+
+ function my_callback() {}
+}
+
+// Generic.VersionControl.GitMergeConflict
+?>
+<<<<<<< HEAD // Error.
+
+>>>>>>> // Error.
+
+
+
+
+
diff --git a/vendor/automattic/vipwpcs/WordPressVIPMinimum/ruleset-test.php b/vendor/automattic/vipwpcs/WordPressVIPMinimum/ruleset-test.php
new file mode 100644
index 00000000..19d74bf1
--- /dev/null
+++ b/vendor/automattic/vipwpcs/WordPressVIPMinimum/ruleset-test.php
@@ -0,0 +1,325 @@
+ [
+ 4 => 1,
+ 7 => 1,
+ 11 => 1,
+ 16 => 1,
+ 17 => 1,
+ 21 => 1,
+ 27 => 2,
+ 35 => 1,
+ 45 => 1,
+ 54 => 1,
+ 73 => 1,
+ 88 => 1,
+ 104 => 1,
+ 110 => 1,
+ 117 => 1,
+ 118 => 1,
+ 124 => 1,
+ 130 => 1,
+ 147 => 1,
+ 150 => 1,
+ 153 => 1,
+ 156 => 1,
+ 159 => 1,
+ 162 => 1,
+ 165 => 1,
+ 168 => 1,
+ 171 => 1,
+ 174 => 1,
+ 177 => 1,
+ 190 => 1,
+ 193 => 1,
+ 204 => 1,
+ 205 => 1,
+ 206 => 1,
+ 207 => 1,
+ 208 => 1,
+ 209 => 1,
+ 210 => 1,
+ 211 => 1,
+ 212 => 1,
+ 213 => 1,
+ 214 => 1,
+ 215 => 1,
+ 216 => 1,
+ 226 => 1,
+ 227 => 1,
+ 228 => 1,
+ 229 => 1,
+ 230 => 1,
+ 231 => 1,
+ 232 => 1,
+ 233 => 1,
+ 234 => 1,
+ 235 => 1,
+ 236 => 1,
+ 237 => 1,
+ 238 => 1,
+ 259 => 1,
+ 274 => 1,
+ 285 => 1,
+ 290 => 1,
+ 295 => 1,
+ 296 => 1,
+ 299 => 1,
+ 303 => 1,
+ 304 => 1,
+ 308 => 1,
+ 312 => 1,
+ 313 => 1,
+ 314 => 1,
+ 315 => 1,
+ 316 => 1,
+ 317 => 1,
+ 319 => 1,
+ 320 => 1,
+ 321 => 1,
+ 322 => 1,
+ 325 => 1,
+ 326 => 1,
+ 327 => 1,
+ 332 => 1,
+ 333 => 1,
+ 334 => 1,
+ 335 => 1,
+ 336 => 1,
+ 337 => 1,
+ 338 => 1,
+ 339 => 1,
+ 340 => 1,
+ 341 => 1,
+ 342 => 1,
+ 343 => 1,
+ 344 => 1,
+ 345 => 1,
+ 346 => 1,
+ 347 => 1,
+ 348 => 1,
+ 349 => 1,
+ 350 => 1,
+ 351 => 1,
+ 352 => 1,
+ 353 => 1,
+ 354 => 1,
+ 355 => 1,
+ 356 => 1,
+ 357 => 1,
+ 358 => 1,
+ 359 => 1,
+ 360 => 1,
+ 361 => 1,
+ 362 => 1,
+ 363 => 1,
+ 364 => 1,
+ 365 => 1,
+ 366 => 1,
+ 367 => 1,
+ 368 => 1,
+ 369 => 1,
+ 371 => 1,
+ 372 => 1,
+ 375 => 1,
+ 376 => 1,
+ 377 => 1,
+ 378 => 1,
+ 379 => 1,
+ 380 => 1,
+ 381 => 1,
+ 382 => 1,
+ 383 => 1,
+ 384 => 1,
+ 385 => 1,
+ 386 => 1,
+ 387 => 1,
+ 388 => 1,
+ 389 => 1,
+ 390 => 1,
+ 391 => 1,
+ 392 => 1,
+ 402 => 1,
+ 415 => 1,
+ 425 => 1,
+ 451 => 1,
+ 463 => 1,
+ 465 => 1,
+ 469 => 1,
+ 471 => 1,
+ 477 => 1,
+ 483 => 1,
+ 491 => 1,
+ 505 => 1,
+ 509 => 1,
+ 510 => 1,
+ 511 => 1,
+ 512 => 1,
+ 513 => 1,
+ 514 => 1,
+ 515 => 1,
+ 516 => 1,
+ 517 => 1,
+ 518 => 1,
+ 519 => 1,
+ 523 => 1,
+ 525 => 1,
+ 550 => 1,
+ 551 => 1,
+ 554 => 1,
+ 569 => 1,
+ 570 => 1,
+ 573 => 1,
+ 574 => 1,
+ 575 => 1,
+ 578 => 1,
+ 581 => 1,
+ 582 => 1,
+ 583 => 1,
+ 588 => 1,
+ 590 => 1,
+ 594 => 1,
+ 595 => 1,
+ 596 => 1,
+ 597 => 1,
+ 612 => 1,
+ 614 => 1,
+ 618 => 1,
+ ],
+ 'warnings' => [
+ 32 => 1,
+ 39 => 1,
+ 41 => 1,
+ 42 => 1,
+ 60 => 2,
+ 64 => 1,
+ 67 => 1,
+ 68 => 1,
+ 69 => 1,
+ 76 => 1,
+ 80 => 1,
+ 84 => 1,
+ 98 => 1,
+ 126 => 1,
+ 138 => 1,
+ 139 => 1,
+ 140 => 1,
+ 141 => 1,
+ 142 => 1,
+ 143 => 1,
+ 144 => 1,
+ 180 => 1,
+ 181 => 1,
+ 182 => 1,
+ 183 => 1,
+ 184 => 1,
+ 185 => 1,
+ 186 => 1,
+ 187 => 1,
+ 217 => 1,
+ 239 => 1,
+ 242 => 1,
+ 243 => 1,
+ 244 => 1,
+ 245 => 1,
+ 246 => 1,
+ 247 => 1,
+ 248 => 1,
+ 249 => 1,
+ 250 => 1,
+ 251 => 1,
+ 252 => 1,
+ 253 => 1,
+ 254 => 1,
+ 255 => 1,
+ 256 => 1,
+ 264 => 2,
+ 279 => 1,
+ 282 => 1,
+ 288 => 1,
+ 293 => 1,
+ 294 => 1,
+ 324 => 1,
+ 396 => 1,
+ 397 => 1,
+ 398 => 1,
+ 399 => 1,
+ 400 => 1,
+ 401 => 1,
+ 403 => 1,
+ 404 => 1,
+ 405 => 1,
+ 406 => 1,
+ 407 => 1,
+ 408 => 1,
+ 411 => 1,
+ 412 => 1,
+ 432 => 1,
+ 437 => 1,
+ 438 => 1,
+ 439 => 1,
+ 440 => 1,
+ 441 => 1,
+ 447 => 1,
+ 454 => 1,
+ 457 => 1,
+ 458 => 1,
+ 459 => 1,
+ 499 => 1,
+ 500 => 1,
+ 504 => 1,
+ 528 => 1,
+ 529 => 1,
+ 530 => 1,
+ 531 => 1,
+ 532 => 1,
+ 535 => 1,
+ 538 => 1,
+ 545 => 1,
+ 559 => 1,
+ 565 => 1,
+ 589 => 1,
+ ],
+ 'messages' => [
+ 130 => [
+ '`eval()` is a security risk, please refrain from using it.',
+ ],
+ 242 => [
+ 'Using cURL functions is highly discouraged within VIP context. Please see: https://docs.wpvip.com/technical-references/code-quality-and-best-practices/retrieving-remote-data/.',
+ ],
+ 243 => [
+ 'Using cURL functions is highly discouraged within VIP context. Please see: https://docs.wpvip.com/technical-references/code-quality-and-best-practices/retrieving-remote-data/.',
+ ],
+ 244 => [
+ 'Using cURL functions is highly discouraged within VIP context. Please see: https://docs.wpvip.com/technical-references/code-quality-and-best-practices/retrieving-remote-data/.',
+ ],
+ 259 => [
+ '`get_children()` performs a no-LIMIT query by default, make sure to set a reasonable `posts_per_page`. `get_children()` will do a -1 query by default, a maximum of 100 should be used.',
+ ],
+ ],
+];
+
+require __DIR__ . '/../tests/RulesetTest.php';
+
+// Run the tests!
+$test = new RulesetTest( 'WordPressVIPMinimum', $expected );
+if ( $test->passes() ) {
+ printf( 'All WordPressVIPMinimum tests passed!' . PHP_EOL );
+ exit( 0 );
+}
+
+exit( 1 );
diff --git a/vendor/automattic/vipwpcs/WordPressVIPMinimum/ruleset.xml b/vendor/automattic/vipwpcs/WordPressVIPMinimum/ruleset.xml
new file mode 100644
index 00000000..2ce2511c
--- /dev/null
+++ b/vendor/automattic/vipwpcs/WordPressVIPMinimum/ruleset.xml
@@ -0,0 +1,177 @@
+
+
+ WordPress VIP Minimum Coding Standards
+
+
+
+
+
+
+
+
+ *.twig
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ *.php
+ *.inc
+ *.js
+ *.css
+
+
+
+
+
+ error
+ `eval()` is a security risk, please refrain from using it.
+
+
+
+
+
+
+
+
+
+
+
+
+ error
+
+
+ error
+
+
+ error
+
+
+ error
+
+
+ error
+
+
+ error
+
+
+ error
+
+
+ error
+
+
+ error
+
+
+ error
+
+
+ error
+
+
+
+
+
+
+
+
+
+ error
+
+
+ error
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Using cURL functions is highly discouraged within VIP context. Please see: https://docs.wpvip.com/technical-references/code-quality-and-best-practices/retrieving-remote-data/.
+
+
+ Using cURL functions is highly discouraged within VIP context. Please see: https://docs.wpvip.com/technical-references/code-quality-and-best-practices/retrieving-remote-data/.
+
+
+ Using cURL functions is highly discouraged within VIP context. Please see: https://docs.wpvip.com/technical-references/code-quality-and-best-practices/retrieving-remote-data/.
+
+
+
+ error
+ `%1$s()` performs a no-LIMIT query by default, make sure to set a reasonable `posts_per_page`. `%1$s()` will do a -1 query by default, a maximum of 100 should be used.
+
+
+
+
+
+
+
+ 0
+
+
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
+
diff --git a/vendor/automattic/vipwpcs/composer.json b/vendor/automattic/vipwpcs/composer.json
new file mode 100644
index 00000000..5a7ee54b
--- /dev/null
+++ b/vendor/automattic/vipwpcs/composer.json
@@ -0,0 +1,57 @@
+{
+ "name": "automattic/vipwpcs",
+ "type": "phpcodesniffer-standard",
+ "description": "PHP_CodeSniffer rules (sniffs) to enforce WordPress VIP minimum coding conventions",
+ "keywords": [
+ "phpcs",
+ "standards",
+ "WordPress"
+ ],
+ "license": "MIT",
+ "authors": [
+ {
+ "name": "Contributors",
+ "homepage": "https://github.com/Automattic/VIP-Coding-Standards/graphs/contributors"
+ }
+ ],
+ "require": {
+ "php": ">=5.4",
+ "dealerdirect/phpcodesniffer-composer-installer": "^0.4.1 || ^0.5 || ^0.6.2 || ^0.7",
+ "sirbrillig/phpcs-variable-analysis": "^2.11.1",
+ "squizlabs/php_codesniffer": "^3.5.5",
+ "wp-coding-standards/wpcs": "^2.3"
+ },
+ "require-dev": {
+ "php-parallel-lint/php-parallel-lint": "^1.0",
+ "php-parallel-lint/php-console-highlighter": "^0.5",
+ "phpcompatibility/php-compatibility": "^9",
+ "phpcsstandards/phpcsdevtools": "^1.0",
+ "phpunit/phpunit": "^4 || ^5 || ^6 || ^7"
+ },
+ "scripts": {
+ "install-codestandards": "Dealerdirect\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\Plugin::run",
+ "ruleset": "bin/ruleset-tests",
+ "lint": [
+ "bin/php-lint",
+ "bin/xml-lint"
+ ],
+ "phpcs": "bin/phpcs",
+ "phpunit": "bin/unit-tests",
+ "coverage": "bin/unit-tests-coverage",
+ "check-complete": [
+ "@php ./vendor/phpcsstandards/phpcsdevtools/bin/phpcs-check-feature-completeness -q ./WordPressVIPMinimum"
+ ],
+ "test": [
+ "@lint",
+ "@ruleset",
+ "@phpunit",
+ "@phpcs",
+ "@check-complete"
+ ]
+ },
+ "support": {
+ "issues": "https://github.com/Automattic/VIP-Coding-Standards/issues",
+ "wiki": "https://github.com/Automattic/VIP-Coding-Standards/wiki",
+ "source": "https://github.com/Automattic/VIP-Coding-Standards"
+ }
+}
diff --git a/vendor/bin/.composer-downloads/phpstan-c8e8da3840ca188cc0c7896c1cd21b1f.json b/vendor/bin/.composer-downloads/phpstan-c8e8da3840ca188cc0c7896c1cd21b1f.json
new file mode 100644
index 00000000..ff06c010
--- /dev/null
+++ b/vendor/bin/.composer-downloads/phpstan-c8e8da3840ca188cc0c7896c1cd21b1f.json
@@ -0,0 +1,5 @@
+{
+ "name": "rtcamp/login-with-google:phpstan",
+ "url": "https://github.com/phpstan/phpstan/releases/latest/download/phpstan.phar",
+ "checksum": "29b3aafd3e3bff7f68a8e6f9b462eb8945952e3f5408e913007eddc69a4dae4b"
+}
\ No newline at end of file
diff --git a/vendor/bin/php-parse b/vendor/bin/php-parse
new file mode 100755
index 00000000..80f0e486
--- /dev/null
+++ b/vendor/bin/php-parse
@@ -0,0 +1,117 @@
+#!/usr/bin/env php
+realpath = realpath($opened_path) ?: $opened_path;
+ $opened_path = $this->realpath;
+ $this->handle = fopen($this->realpath, $mode);
+ $this->position = 0;
+
+ return (bool) $this->handle;
+ }
+
+ public function stream_read($count)
+ {
+ $data = fread($this->handle, $count);
+
+ if ($this->position === 0) {
+ $data = preg_replace('{^#!.*\r?\n}', '', $data);
+ }
+
+ $this->position += strlen($data);
+
+ return $data;
+ }
+
+ public function stream_cast($castAs)
+ {
+ return $this->handle;
+ }
+
+ public function stream_close()
+ {
+ fclose($this->handle);
+ }
+
+ public function stream_lock($operation)
+ {
+ return $operation ? flock($this->handle, $operation) : true;
+ }
+
+ public function stream_seek($offset, $whence)
+ {
+ if (0 === fseek($this->handle, $offset, $whence)) {
+ $this->position = ftell($this->handle);
+ return true;
+ }
+
+ return false;
+ }
+
+ public function stream_tell()
+ {
+ return $this->position;
+ }
+
+ public function stream_eof()
+ {
+ return feof($this->handle);
+ }
+
+ public function stream_stat()
+ {
+ return array();
+ }
+
+ public function stream_set_option($option, $arg1, $arg2)
+ {
+ return true;
+ }
+
+ public function url_stat($path, $flags)
+ {
+ $path = substr($path, 17);
+ if (file_exists($path)) {
+ return stat($path);
+ }
+
+ return false;
+ }
+ }
+ }
+
+ if (function_exists('stream_wrapper_register') && stream_wrapper_register('phpvfscomposer', 'Composer\BinProxyWrapper')) {
+ include("phpvfscomposer://" . __DIR__ . '/..'.'/nikic/php-parser/bin/php-parse');
+ exit(0);
+ }
+}
+
+include __DIR__ . '/..'.'/nikic/php-parser/bin/php-parse';
diff --git a/vendor/bin/phpcbf b/vendor/bin/phpcbf
new file mode 100755
index 00000000..dd5f763d
--- /dev/null
+++ b/vendor/bin/phpcbf
@@ -0,0 +1,117 @@
+#!/usr/bin/env php
+realpath = realpath($opened_path) ?: $opened_path;
+ $opened_path = $this->realpath;
+ $this->handle = fopen($this->realpath, $mode);
+ $this->position = 0;
+
+ return (bool) $this->handle;
+ }
+
+ public function stream_read($count)
+ {
+ $data = fread($this->handle, $count);
+
+ if ($this->position === 0) {
+ $data = preg_replace('{^#!.*\r?\n}', '', $data);
+ }
+
+ $this->position += strlen($data);
+
+ return $data;
+ }
+
+ public function stream_cast($castAs)
+ {
+ return $this->handle;
+ }
+
+ public function stream_close()
+ {
+ fclose($this->handle);
+ }
+
+ public function stream_lock($operation)
+ {
+ return $operation ? flock($this->handle, $operation) : true;
+ }
+
+ public function stream_seek($offset, $whence)
+ {
+ if (0 === fseek($this->handle, $offset, $whence)) {
+ $this->position = ftell($this->handle);
+ return true;
+ }
+
+ return false;
+ }
+
+ public function stream_tell()
+ {
+ return $this->position;
+ }
+
+ public function stream_eof()
+ {
+ return feof($this->handle);
+ }
+
+ public function stream_stat()
+ {
+ return array();
+ }
+
+ public function stream_set_option($option, $arg1, $arg2)
+ {
+ return true;
+ }
+
+ public function url_stat($path, $flags)
+ {
+ $path = substr($path, 17);
+ if (file_exists($path)) {
+ return stat($path);
+ }
+
+ return false;
+ }
+ }
+ }
+
+ if (function_exists('stream_wrapper_register') && stream_wrapper_register('phpvfscomposer', 'Composer\BinProxyWrapper')) {
+ include("phpvfscomposer://" . __DIR__ . '/..'.'/squizlabs/php_codesniffer/bin/phpcbf');
+ exit(0);
+ }
+}
+
+include __DIR__ . '/..'.'/squizlabs/php_codesniffer/bin/phpcbf';
diff --git a/vendor/bin/phpcs b/vendor/bin/phpcs
new file mode 100755
index 00000000..5123b7d6
--- /dev/null
+++ b/vendor/bin/phpcs
@@ -0,0 +1,117 @@
+#!/usr/bin/env php
+realpath = realpath($opened_path) ?: $opened_path;
+ $opened_path = $this->realpath;
+ $this->handle = fopen($this->realpath, $mode);
+ $this->position = 0;
+
+ return (bool) $this->handle;
+ }
+
+ public function stream_read($count)
+ {
+ $data = fread($this->handle, $count);
+
+ if ($this->position === 0) {
+ $data = preg_replace('{^#!.*\r?\n}', '', $data);
+ }
+
+ $this->position += strlen($data);
+
+ return $data;
+ }
+
+ public function stream_cast($castAs)
+ {
+ return $this->handle;
+ }
+
+ public function stream_close()
+ {
+ fclose($this->handle);
+ }
+
+ public function stream_lock($operation)
+ {
+ return $operation ? flock($this->handle, $operation) : true;
+ }
+
+ public function stream_seek($offset, $whence)
+ {
+ if (0 === fseek($this->handle, $offset, $whence)) {
+ $this->position = ftell($this->handle);
+ return true;
+ }
+
+ return false;
+ }
+
+ public function stream_tell()
+ {
+ return $this->position;
+ }
+
+ public function stream_eof()
+ {
+ return feof($this->handle);
+ }
+
+ public function stream_stat()
+ {
+ return array();
+ }
+
+ public function stream_set_option($option, $arg1, $arg2)
+ {
+ return true;
+ }
+
+ public function url_stat($path, $flags)
+ {
+ $path = substr($path, 17);
+ if (file_exists($path)) {
+ return stat($path);
+ }
+
+ return false;
+ }
+ }
+ }
+
+ if (function_exists('stream_wrapper_register') && stream_wrapper_register('phpvfscomposer', 'Composer\BinProxyWrapper')) {
+ include("phpvfscomposer://" . __DIR__ . '/..'.'/squizlabs/php_codesniffer/bin/phpcs');
+ exit(0);
+ }
+}
+
+include __DIR__ . '/..'.'/squizlabs/php_codesniffer/bin/phpcs';
diff --git a/vendor/bin/phpstan b/vendor/bin/phpstan
new file mode 100755
index 00000000..7546edab
Binary files /dev/null and b/vendor/bin/phpstan differ
diff --git a/vendor/bin/phpunit b/vendor/bin/phpunit
new file mode 100755
index 00000000..c52ed8c3
--- /dev/null
+++ b/vendor/bin/phpunit
@@ -0,0 +1,120 @@
+#!/usr/bin/env php
+realpath = realpath($opened_path) ?: $opened_path;
+ $opened_path = 'phpvfscomposer://'.$this->realpath;
+ $this->handle = fopen($this->realpath, $mode);
+ $this->position = 0;
+
+ return (bool) $this->handle;
+ }
+
+ public function stream_read($count)
+ {
+ $data = fread($this->handle, $count);
+
+ if ($this->position === 0) {
+ $data = preg_replace('{^#!.*\r?\n}', '', $data);
+ }
+ $data = str_replace('__DIR__', var_export(dirname($this->realpath), true), $data);
+ $data = str_replace('__FILE__', var_export($this->realpath, true), $data);
+
+ $this->position += strlen($data);
+
+ return $data;
+ }
+
+ public function stream_cast($castAs)
+ {
+ return $this->handle;
+ }
+
+ public function stream_close()
+ {
+ fclose($this->handle);
+ }
+
+ public function stream_lock($operation)
+ {
+ return $operation ? flock($this->handle, $operation) : true;
+ }
+
+ public function stream_seek($offset, $whence)
+ {
+ if (0 === fseek($this->handle, $offset, $whence)) {
+ $this->position = ftell($this->handle);
+ return true;
+ }
+
+ return false;
+ }
+
+ public function stream_tell()
+ {
+ return $this->position;
+ }
+
+ public function stream_eof()
+ {
+ return feof($this->handle);
+ }
+
+ public function stream_stat()
+ {
+ return array();
+ }
+
+ public function stream_set_option($option, $arg1, $arg2)
+ {
+ return true;
+ }
+
+ public function url_stat($path, $flags)
+ {
+ $path = substr($path, 17);
+ if (file_exists($path)) {
+ return stat($path);
+ }
+
+ return false;
+ }
+ }
+ }
+
+ if (function_exists('stream_wrapper_register') && stream_wrapper_register('phpvfscomposer', 'Composer\BinProxyWrapper')) {
+ include("phpvfscomposer://" . __DIR__ . '/..'.'/phpunit/phpunit/phpunit');
+ exit(0);
+ }
+}
+
+include __DIR__ . '/..'.'/phpunit/phpunit/phpunit';
diff --git a/vendor/civicrm/composer-downloads-plugin/.github/workflows/main.yml b/vendor/civicrm/composer-downloads-plugin/.github/workflows/main.yml
new file mode 100644
index 00000000..026f0d72
--- /dev/null
+++ b/vendor/civicrm/composer-downloads-plugin/.github/workflows/main.yml
@@ -0,0 +1,36 @@
+name: PHP Composer
+
+on:
+ push:
+ pull_request:
+ branches: [ master ]
+
+jobs:
+ phpunit:
+ runs-on: ${{ matrix.os }}
+ strategy:
+ matrix:
+ php: [7.4, 7.3]
+ os: [ubuntu-latest]
+ composer: [v1, v2]
+ name: ${{ matrix.php }} - PHPUnit - Composer ${{ matrix.composer }}
+ steps:
+ - uses: actions/checkout@v2
+ - uses: actions/cache@v2
+ with:
+ path: |
+ ~/.composer/cache/files
+ ~/.composer/cache/repo
+ key: dependencies-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }}
+ - uses: shivammathur/setup-php@v2
+ with:
+ php-version: ${{ matrix.php }}
+ extensions: dom, curl, libxml, mbstring, zip, pdo, mysql, pdo_mysql, bcmath, soap, intl, gd, exif, iconv
+ coverage: none
+ tools: composer:${{ matrix.composer }}
+ - name: Validate composer.json
+ run: composer validate
+ - name: Install dependencies
+ run: composer install --prefer-dist --no-progress --no-suggest
+ - name: Run tests
+ run: ./vendor/bin/phpunit
diff --git a/vendor/civicrm/composer-downloads-plugin/.gitignore b/vendor/civicrm/composer-downloads-plugin/.gitignore
new file mode 100644
index 00000000..4a45ef5f
--- /dev/null
+++ b/vendor/civicrm/composer-downloads-plugin/.gitignore
@@ -0,0 +1,3 @@
+vendor
+composer.lock
+.php_cs.cache
diff --git a/vendor/civicrm/composer-downloads-plugin/.php_cs.dist b/vendor/civicrm/composer-downloads-plugin/.php_cs.dist
new file mode 100644
index 00000000..b2de1a8c
--- /dev/null
+++ b/vendor/civicrm/composer-downloads-plugin/.php_cs.dist
@@ -0,0 +1,22 @@
+
+
+This source file is subject to the MIT license that is bundled
+with this source code in the file LICENSE.
+EOF;
+
+return PhpCsFixer\Config::create()
+ ->setRiskyAllowed(true)
+ ->setRules([
+ '@Symfony' => true,
+ '@Symfony:risky' => true,
+ 'header_comment' => ['header' => $header],
+ ])
+ ->setFinder(
+ PhpCsFixer\Finder::create()
+ ->in([__DIR__.'/src', __DIR__.'/tests'])
+ );
diff --git a/vendor/civicrm/composer-downloads-plugin/LICENSE b/vendor/civicrm/composer-downloads-plugin/LICENSE
new file mode 100644
index 00000000..eda17bec
--- /dev/null
+++ b/vendor/civicrm/composer-downloads-plugin/LICENSE
@@ -0,0 +1,20 @@
+(c) 2017 Last Call Media, Rob Bayliss
+(c) 2019 CiviCRM LLC, Tim Otten
+
+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/civicrm/composer-downloads-plugin/README.md b/vendor/civicrm/composer-downloads-plugin/README.md
new file mode 100644
index 00000000..7ca12bfa
--- /dev/null
+++ b/vendor/civicrm/composer-downloads-plugin/README.md
@@ -0,0 +1,160 @@
+Composer Downloads Plugin
+===========================
+
+The "Downloads" plugin allows you to download extra files (`*.zip` or `*.tar.gz`) and extract them within your package.
+
+This is an updated version of [lastcall/composer-extra-files](https://github.com/LastCallMedia/ComposerExtraFiles/).
+It adds integration tests, fixes some bugs, and makes a few other improvements. Some of the
+configuration options have changed, so it has been renamed to prevent it from conflicting in real-world usage.
+
+## Example
+
+Suppose you publish a PHP package `foo/bar` which relies on an external artifact `examplelib-0.1.zip`. Place this configuration in the `composer.json` for `foo/bar`:
+
+```json
+{
+ "name": "foo/bar",
+ "require": {
+ "civicrm/composer-downloads-plugin": "~2.1"
+ },
+ "extra": {
+ "downloads": {
+ "examplelib": {
+ "url": "https://example.com/examplelib-0.1.zip",
+ "path": "extern/examplelib",
+ "ignore": ["test", "doc", ".*"]
+ }
+ }
+ }
+}
+```
+
+When a downstream user of `foo/bar` runs `composer install`, it will fetch and extract the zip file, creating `vendor/foo/bar/extern/examplelib`.
+
+## Evaluation
+
+The primary strengths of `composer-downloads-plugin` are:
+
+* __Simple__: It downloads a URL (ZIP/TAR file) and extracts it. It only needs to know two things: *what to download* (`url`) and *where to put it* (`path`). It runs as pure-PHP without any external dependencies.
+* __Fast__: The logic does not require scanning, indexing, or mapping any large registries. The download system uses `composer`'s built-in cache.
+* __Isolated__: As the author of a package `foo/bar`, you define the content under the `vendor/foo/bar` folder. When others use `foo/bar`, there is no need for special instructions, no root-level configuration, no interaction with other packages.
+
+The "Downloads" plugin is only a download mechanism. Use it to *assimilate* an external resource as part of a `composer` package.
+
+The "Downloads" plugin is __not__ a *dependency management system*. There is no logic to scan registries, resolve transitive dependencies, identify version-conflicts, etc among diverse external resources. If you need that functionality, then you may want a *bridge* to integrate `composer` with an external dependency management tool. A few good bridges to consider:
+
+* [Asset Packagist](https://asset-packagist.org/)
+* [Composer Asset Plugin](https://github.com/fxpio/composer-asset-plugin)
+* [Composer Bower Plugin](https://github.com/php-kit/composer-bower-plugin)
+* [Foxy](https://github.com/fxpio/foxy)
+
+## Configuration: Properties
+
+The `extra.downloads` section contains a list of files to download. Each extra-file has a symbolic ID (e.g. `examplelib` above) and some mix of properties:
+
+* `url`: The URL to fetch the content from.
+
+* `path`: The releative path where content will be extracted.
+
+* `type`: (*Optional*) Determines how the download is handled
+ * `archive`: The `url` references a zip or tarball which should be extracted at the given `path`. (Default for URLs involving `*.zip`, `*.tar.gz`, or `*.tgz`.)
+ * `file`: The `url` should be downloaded to the given `path`. (Default for all other URLs.)
+ * `phar`: The `url` references a PHP executable which should be installed at the given `path`.
+
+* `ignore`: (*Optional*) A list of a files that should be omited from the extracted folder. (This supports a subset of `.gitignore` notation.)
+
+* `version`: (*Optional*) A version number for the downloaded artifact. This has no functional impact on the lifecycle of the artifact, but
+ it can affect the console output, and it can be optionally used as a variable when setting `url` or `path`.
+
+Values in `url` and `path` support the following variables:
+
+* `{$id}`: The symbolic identifier of the download. (In the introductory example, it would be `examplelib`.)
+* `{$version}`: The displayed/simulated/pretty version number of the package.
+
+## Configuration: Defaults
+
+You may set default properties for all downloads. Place them under `*`, as in:
+
+```json
+{
+ "extra": {
+ "downloads": {
+ "*": {
+ "path": "bower_components/{$id}",
+ "ignore": ["test", "tests", "doc", "docs"]
+ },
+ "jquery": {
+ "url": "https://github.com/jquery/jquery-dist/archive/1.12.4.zip"
+ },
+ "jquery-ui": {
+ "url": "https://github.com/components/jqueryui/archive/1.12.1.zip"
+ }
+ }
+ }
+}
+```
+
+This example will:
+
+* Create `bower_components/jquery` (based on jQuery 1.12.4), minus any test/doc folders.
+* Create `bower_components/jquery-ui` (based on jQueryUI 1.12.1), minus any test/doc folders.
+
+## Tips
+
+* In each downloaded folder, this plugin will create a small metadata folder (`.composer-downloads`) to track the origin of the current code. If you modify the `composer.json` to use a different URL, then it will re-download the file.
+
+* Download each extra file to a distinct `path`. Don't try to download into overlapping paths. (*This has not been tested, but I expect downloads are not well-ordered, and you may find that updates require re-downloading.*)
+
+* What should you do if you *normally* download the extra-file as `*.tar.gz` but sometimes (for local dev) need to grab bleeding edge content from somewhere else? Simply delete the autodownloaded folder and replace it with your own. `composer-downloads-plugin` will detect that conflict (by virtue of the absent `.composer-downloads`) and leave your code in place (until you choose to get rid of it). To switch back, you can simply delete the code and run `composer install` again.
+
+## Known Limitations
+
+If you use `downloads` in a root-project (or in symlinked dev repo), it will create+update downloads, but it will not remove orphaned items automatically. This could be addressed by doing a file-scan for `.composer-downloads` (and deleting any orphan folders). Since the edge-case is not particularly common right now, and since a file-scan could be time-consuming, it might make sense as a separate subcommand.
+
+I believe the limitation does *not* affect downstream consumers of a dependency. In that case, the regular `composer` install/update/removal mechanics should take care of any nested downloads.
+
+## Automated Tests
+
+The `tests/` folder includes unit-tests and integration-tests written with
+PHPUnit. Each integration-test generates a new folder/project with a
+plausible, representative `composer.json` file and executes `composer
+install`. It checks the output has the expected files.
+
+To run the tests, you will need `composer` and `phpunit` in the `PATH`.
+
+```
+[~/src/composer-downloads-plugin] which composer
+/Users/myuser/bin/composer
+
+[~/src/composer-downloads-plugin] which phpunit
+/Users/myuser/bin/phpunit
+
+[~/src/composer-downloads-plugin] phpunit
+PHPUnit 5.7.27 by Sebastian Bergmann and contributors.
+
+..... 5 / 5 (100%)
+
+Time: 40.35 seconds, Memory: 10.00MB
+
+OK (5 tests, 7 assertions)
+```
+
+The integration tests can be a bit large/slow. To monitor the tests more
+closesly, set the `DEBUG` variable, as in:
+
+```
+[~/src/composer-downloads-plugin] env DEBUG=2 phpunit
+```
+
+## Local Dev Harness
+
+What if you want to produce an environment which uses the current plugin
+code - one where you can quickly re-run `composer` commands while
+iterating on code?
+
+You may use any of the integration-tests to initialize a baseline
+environment:
+
+```
+env USE_TEST_PROJECT=$HOME/src/myprj DEBUG=2 phpunit tests/SniffTest.php
+```
diff --git a/vendor/civicrm/composer-downloads-plugin/circle.yml b/vendor/civicrm/composer-downloads-plugin/circle.yml
new file mode 100644
index 00000000..54042d67
--- /dev/null
+++ b/vendor/civicrm/composer-downloads-plugin/circle.yml
@@ -0,0 +1,24 @@
+version: 2
+jobs:
+ build:
+ working_directory: /srv
+ docker:
+ - image: lastcallmedia/php:7.0-dev
+ steps:
+ - checkout
+ - restore_cache:
+ key: composer-v1-{{ checksum "composer.json" }}
+ - run: composer install
+ - save_cache:
+ key: composer-v1-{{ checksum "composer.json" }}
+ paths: [vendor, composer.lock]
+ - run: |
+ COMMIT_RANGE=`echo $CIRCLE_COMPARE_URL | cut -d/ -f7`
+ IFS=$'\n'; COMMIT_SCA_FILES=($(git diff --name-only --diff-filter=ACMRTUXB "${COMMIT_RANGE}")); unset IFS
+ vendor/bin/php-cs-fixer fix --config=.php_cs.dist -v --dry-run --stop-on-violation --using-cache=no --path-mode=intersection -- "${COMMIT_SCA_FILES[@]}"
+ - run: |
+ composer validate
+ - run: mkdir -p /phpunit
+ - run: vendor/bin/phpunit --log-junit=/phpunit/junit.xml
+ - store_test_results:
+ path: /phpunit
\ No newline at end of file
diff --git a/vendor/civicrm/composer-downloads-plugin/composer.json b/vendor/civicrm/composer-downloads-plugin/composer.json
new file mode 100644
index 00000000..6e51f4d5
--- /dev/null
+++ b/vendor/civicrm/composer-downloads-plugin/composer.json
@@ -0,0 +1,40 @@
+{
+ "name": "civicrm/composer-downloads-plugin",
+ "description": "Composer plugin for downloading additional files within any composer package.",
+ "type": "composer-plugin",
+ "license": "MIT",
+ "authors": [
+ {
+ "name": "Rob Bayliss",
+ "email": "rob@lastcallmedia.com"
+ },
+ {
+ "name": "Tim Otten",
+ "email": "totten@civicrm.org"
+ }
+ ],
+ "require": {
+ "composer-plugin-api": "^1.1 || ^2.0",
+ "php": ">=5.6",
+ "togos/gitignore": "~1.1.1"
+ },
+ "require-dev": {
+ "composer/composer": "~1.0 || ~2.0",
+ "phpunit/phpunit": "^5.7",
+ "friendsofphp/php-cs-fixer": "^2.3",
+ "totten/process-helper": "^1.0.1"
+ },
+ "autoload": {
+ "psr-4": {
+ "LastCall\\DownloadsPlugin\\": "src/"
+ }
+ },
+ "autoload-dev": {
+ "psr-4": {
+ "LastCall\\DownloadsPlugin\\Tests\\": "tests/"
+ }
+ },
+ "extra": {
+ "class": "LastCall\\DownloadsPlugin\\Plugin"
+ }
+}
diff --git a/vendor/civicrm/composer-downloads-plugin/phpunit.xml b/vendor/civicrm/composer-downloads-plugin/phpunit.xml
new file mode 100644
index 00000000..c9f9021f
--- /dev/null
+++ b/vendor/civicrm/composer-downloads-plugin/phpunit.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ tests
+
+
+
+
+
+ ./src/*/
+
+
+
+
\ No newline at end of file
diff --git a/vendor/civicrm/composer-downloads-plugin/src/DownloadsParser.php b/vendor/civicrm/composer-downloads-plugin/src/DownloadsParser.php
new file mode 100644
index 00000000..614882e9
--- /dev/null
+++ b/vendor/civicrm/composer-downloads-plugin/src/DownloadsParser.php
@@ -0,0 +1,78 @@
+
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace LastCall\DownloadsPlugin;
+
+use Composer\Package\PackageInterface;
+use LastCall\DownloadsPlugin\Handler\ArchiveHandler;
+use LastCall\DownloadsPlugin\Handler\BaseHandler;
+use LastCall\DownloadsPlugin\Handler\FileHandler;
+use LastCall\DownloadsPlugin\Handler\PharHandler;
+
+class DownloadsParser
+{
+
+ /**
+ * @param \Composer\Package\PackageInterface $package
+ *
+ * @return BaseHandler[]
+ * Each item is a specification of an extra file, with defaults and variables evaluated.
+ */
+ public function parse(PackageInterface $package, $basePath)
+ {
+ $extraFiles = [];
+ $extra = $package->getExtra();
+
+ $defaults = isset($extra['downloads']['*']) ? $extra['downloads']['*'] : [];
+
+ if (!empty($extra['downloads'])) {
+ foreach ((array) $extra['downloads'] as $id => $extraFile) {
+ if ($id === '*') continue;
+
+ $extraFile = array_merge($defaults, $extraFile);
+ $extraFile['id'] = $id;
+ foreach (['url', 'path'] as $prop) {
+ if (isset($extraFile[$prop])) {
+ $extraFile[$prop] = strtr($extraFile[$prop], [
+ '{$id}' => $extraFile['id'],
+ '{$version}' => isset($extraFile['version']) ? $extraFile['version'] : '',
+ ]);
+ }
+ }
+
+ $class = $this->pickClass($extraFile);
+ $extraFiles[] = new $class($package, $basePath, $extraFile);
+ }
+ }
+
+ return $extraFiles;
+ }
+
+ public function pickClass($extraFile)
+ {
+ $types = [
+ 'archive' => ArchiveHandler::CLASS,
+ 'file' => FileHandler::CLASS,
+ 'phar' => PharHandler::CLASS,
+ ];
+ if (isset($extraFile['type'], $types[$extraFile['type']])) {
+ return $types[$extraFile['type']];
+ }
+
+ $parts = parse_url($extraFile['url']);
+ $filename = pathinfo($parts['path'], PATHINFO_BASENAME);
+ if (preg_match('/\.(zip|tar\.gz|tgz)$/', $filename)) {
+ return $types['archive'];
+ }
+
+ return $types['file'];
+ }
+}
diff --git a/vendor/civicrm/composer-downloads-plugin/src/GlobCleaner.php b/vendor/civicrm/composer-downloads-plugin/src/GlobCleaner.php
new file mode 100644
index 00000000..0e7aaad6
--- /dev/null
+++ b/vendor/civicrm/composer-downloads-plugin/src/GlobCleaner.php
@@ -0,0 +1,57 @@
+ \TOGoS_GitIgnore_Ruleset::loadFromStrings($ignores),
+ 'invertRulesetResult' => false,
+ 'defaultResult' => false,
+ 'includeDirectories' => false,
+ 'callback' => function($file, $match) use ($baseDir, &$dirs) {
+ if ($match) {
+ unlink("$baseDir/$file");
+ $dir = dirname($file);
+ if ($dir !== '.') {
+ $dirs[dirname($file)] = 1;
+ }
+ }
+ }
+ ));
+ $finder->findFiles($baseDir);
+
+ // Cleanup any empy directories
+ $dirNames = array_keys($dirs);
+ $byLength = function ($a, $b) {
+ return strlen($b) - strlen($a);
+ };
+ usort($dirNames, $byLength);
+
+ while ($dirName = array_shift($dirNames)) {
+ if (!glob("$baseDir/$dirName/*")) {
+ @rmdir("$baseDir/$dirName");
+ $dirNames[] = dirname($dirName);
+ usort($dirNames, $byLength);
+ }
+ }
+ }
+
+
+}
\ No newline at end of file
diff --git a/vendor/civicrm/composer-downloads-plugin/src/Handler/ArchiveHandler.php b/vendor/civicrm/composer-downloads-plugin/src/Handler/ArchiveHandler.php
new file mode 100644
index 00000000..f9a8f52a
--- /dev/null
+++ b/vendor/civicrm/composer-downloads-plugin/src/Handler/ArchiveHandler.php
@@ -0,0 +1,89 @@
+setDistType($this->parseDistType($this->extraFile['url']));
+ return $pkg;
+ }
+
+ protected function parseDistType($url)
+ {
+ $parts = parse_url($url);
+ $filename = pathinfo($parts['path'], PATHINFO_BASENAME);
+ if (preg_match('/\.zip$/', $filename)) {
+ return 'zip';
+ } elseif (preg_match('/\.(tar\.gz|tgz)$/', $filename)) {
+ return 'tar';
+ } else {
+ throw new \RuntimeException("Failed to determine archive type for $filename");
+ }
+ }
+
+ public function getTrackingFile()
+ {
+ $file = basename($this->extraFile['id']) . '-' . md5($this->extraFile['id']) . '.json';
+ return
+ $this->getTargetPath() .
+ DIRECTORY_SEPARATOR . self::DOT_DIR .
+ DIRECTORY_SEPARATOR . $file;
+ }
+
+ public function createTrackingData()
+ {
+ $meta = parent::createTrackingData();
+ $meta['ignore'] = $this->findIgnores();
+ return $meta;
+ }
+
+
+ public function getChecksum() {
+ $ignore = empty($this->extraFile['ignore']) ? [] : array_values($this->extraFile['ignore']);
+ sort($ignore);
+ return hash('sha256', parent::getChecksum() . serialize($ignore));
+ }
+
+ /**
+ * @return string[]|NULL
+ * List of files to exclude. Use '**' to match subdirectories.
+ * Ex: ['.gitignore', '*.md']
+ */
+ public function findIgnores()
+ {
+ return isset($this->extraFile['ignore'])
+ ? $this->extraFile['ignore']
+ : NULL;
+ }
+
+ /**
+ * @param Composer $composer
+ * @param IOInterface $io
+ */
+ public function download(Composer $composer, IOInterface $io)
+ {
+ $targetPath = $this->getTargetPath();
+ $downloadManager = $composer->getDownloadManager();
+
+ // In composer:v2, download and extract were separated.
+ $version = method_exists(Composer::class, 'getVersion') ? Composer::getVersion() : Composer::VERSION;
+ if (version_compare($version, '2.0.0') >= 0) {
+ $promise = $downloadManager->download($this->getSubpackage(), $targetPath);
+ $composer->getLoop()->wait([$promise]);
+ $promise = $downloadManager->install($this->getSubpackage(), $targetPath);
+ $composer->getLoop()->wait([$promise]);
+ } else {
+ $downloadManager->download($this->getSubpackage(), $targetPath);
+ }
+ GlobCleaner::clean($io, $targetPath, $this->findIgnores());
+ }
+
+}
diff --git a/vendor/civicrm/composer-downloads-plugin/src/Handler/BaseHandler.php b/vendor/civicrm/composer-downloads-plugin/src/Handler/BaseHandler.php
new file mode 100644
index 00000000..032cc99e
--- /dev/null
+++ b/vendor/civicrm/composer-downloads-plugin/src/Handler/BaseHandler.php
@@ -0,0 +1,145 @@
+parent = $parent;
+ $this->parentPath = $parentPath;
+ $this->extraFile = $extraFile;
+ }
+
+ public function getSubpackage() {
+ if ($this->subpackage === NULL) {
+ $this->subpackage = $this->createSubpackage();
+ }
+ return $this->subpackage;
+ }
+
+ /**
+ * @return Subpackage
+ */
+ public function createSubpackage()
+ {
+ $versionParser = new VersionParser();
+ $extraFile = $this->extraFile;
+ $parent = $this->parent;
+
+ if (isset($extraFile['version'])) {
+ // $version = $versionParser->normalize($extraFile['version']);
+ $version = $versionParser->normalize(self::FAKE_VERSION);
+ $prettyVersion = $extraFile['version'];
+ }
+ elseif ($parent instanceof RootPackageInterface) {
+ $version = $versionParser->normalize(self::FAKE_VERSION);
+ $prettyVersion = self::FAKE_VERSION;
+ }
+ else {
+ $version = $parent->getVersion();
+ $prettyVersion = $parent->getPrettyVersion();
+ }
+
+ $package = new Subpackage(
+ $parent,
+ $extraFile['id'],
+ $extraFile['url'],
+ NULL,
+ $extraFile['path'],
+ $version,
+ $prettyVersion
+ );
+
+ return $package;
+ }
+
+ public function createTrackingData() {
+ return [
+ 'name' => $this->getSubpackage()->getName(),
+ 'url' => $this->getSubpackage()->getDistUrl(),
+ 'checksum' => $this->getChecksum(),
+ ];
+ }
+
+ /**
+ * @return string
+ * A unique identifier for this configuration of this asset.
+ * If the identifier changes, that implies that the asset should be
+ * replaced/redownloaded.
+ */
+ public function getChecksum() {
+ $extraFile = $this->extraFile;
+ return hash('sha256', serialize([
+ get_class($this),
+ $extraFile['id'],
+ $extraFile['url'],
+ $extraFile['path'],
+ ]));
+ }
+
+ /**
+ * @return string
+ */
+ public function getTargetPath()
+ {
+ return $this->parentPath . '/' . $this->extraFile['path'];
+ }
+
+ /**
+ * @param Composer $composer
+ * @param IOInterface $io
+ */
+ abstract public function download(Composer $composer, IOInterface $io);
+
+ /**
+ * @return string
+ */
+ abstract public function getTrackingFile();
+
+}
\ No newline at end of file
diff --git a/vendor/civicrm/composer-downloads-plugin/src/Handler/FileHandler.php b/vendor/civicrm/composer-downloads-plugin/src/Handler/FileHandler.php
new file mode 100644
index 00000000..299a0178
--- /dev/null
+++ b/vendor/civicrm/composer-downloads-plugin/src/Handler/FileHandler.php
@@ -0,0 +1,77 @@
+setDistType('file');
+ return $pkg;
+ }
+
+ public function getTrackingFile()
+ {
+ $file = basename($this->extraFile['id']) . '-' . md5($this->extraFile['id']) . '.json';
+ return
+ dirname($this->getTargetPath()) .
+ DIRECTORY_SEPARATOR . self::DOT_DIR .
+ DIRECTORY_SEPARATOR . $file;
+ }
+
+ /**
+ * @param Composer $composer
+ * @param IOInterface $io
+ */
+ public function download(Composer $composer, IOInterface $io) {
+ // We want to take advantage of the cache in composer's downloader, but it
+ // doesn't put the file the spot we want, so we shuffle a bit.
+
+ $cfs = new Filesystem();
+ $target = $this->getTargetPath();
+ $tmpDir = dirname($target) . DIRECTORY_SEPARATOR . self::TMP_PREFIX . basename($target);
+
+ if (file_exists($tmpDir)) {
+ $cfs->remove($tmpDir);
+ }
+ if (file_exists($target)) {
+ $cfs->remove($target);
+ }
+
+ $pkg = clone $this->getSubpackage();
+ $pkg->setTargetDir($tmpDir);
+ $downloadManager = $composer->getDownloadManager();
+ // composer:v2
+ $version = method_exists(Composer::class, 'getVersion') ? Composer::getVersion() : Composer::VERSION;
+ if (version_compare($version, '2.0.0') >= 0) {
+ $file = '';
+ $promise = $downloadManager->download($pkg, $tmpDir);
+ $promise->then(static function($res) use (&$file) {
+ $file = $res;
+ });
+ $composer->getLoop()->wait([$promise]);
+ $cfs->rename($file, $target);
+ $cfs->remove($tmpDir);
+ }
+ // composer:v1
+ else {
+ $downloadManager->download($pkg, $tmpDir);
+ foreach ((array)glob("$tmpDir/*") as $file) {
+ if (is_file($file)) {
+ $cfs->rename($file, $target);
+ $cfs->remove($tmpDir);
+ break;
+ }
+ }
+ }
+ }
+
+}
diff --git a/vendor/civicrm/composer-downloads-plugin/src/Handler/PharHandler.php b/vendor/civicrm/composer-downloads-plugin/src/Handler/PharHandler.php
new file mode 100644
index 00000000..450fbe32
--- /dev/null
+++ b/vendor/civicrm/composer-downloads-plugin/src/Handler/PharHandler.php
@@ -0,0 +1,28 @@
+getTargetPath(), 0777 ^ umask());
+ }
+ }
+
+
+}
diff --git a/vendor/civicrm/composer-downloads-plugin/src/Plugin.php b/vendor/civicrm/composer-downloads-plugin/src/Plugin.php
new file mode 100644
index 00000000..23def5b0
--- /dev/null
+++ b/vendor/civicrm/composer-downloads-plugin/src/Plugin.php
@@ -0,0 +1,141 @@
+
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace LastCall\DownloadsPlugin;
+
+use Composer\Composer;
+use Composer\EventDispatcher\EventSubscriberInterface;
+use Composer\Installer\PackageEvent;
+use Composer\Installer\PackageEvents;
+use Composer\IO\IOInterface;
+use Composer\Package\Package;
+use Composer\Package\PackageInterface;
+use Composer\Plugin\PluginInterface;
+use Composer\Script\Event;
+use Composer\Script\ScriptEvents;
+use LastCall\DownloadsPlugin\Handler\BaseHandler;
+
+class Plugin implements PluginInterface, EventSubscriberInterface
+{
+
+ /** @var Composer */
+ private $composer;
+ /** @var IOInterface */
+ private $io;
+
+ private $parser;
+
+ public function __construct()
+ {
+ $this->parser = new DownloadsParser();
+ }
+
+ public static function getSubscribedEvents()
+ {
+ return [
+ PackageEvents::POST_PACKAGE_INSTALL => ['installDownloads', 10],
+ PackageEvents::POST_PACKAGE_UPDATE => ['updateDownloads', 10],
+ ScriptEvents::POST_INSTALL_CMD => ['installDownloadsRoot', 10],
+ ScriptEvents::POST_UPDATE_CMD => ['installDownloadsRoot', 10],
+ ];
+ }
+
+ public function installDownloadsRoot(Event $event) {
+ $rootPackage = $this->composer->getPackage();
+ $this->installUpdateDownloads(getcwd(), $rootPackage);
+
+ // Ensure that any other packages are properly reconciled.
+ $localRepo = $this->composer->getRepositoryManager()->getLocalRepository();
+ $installationManager = $this->composer->getInstallationManager();
+ foreach ($localRepo->getCanonicalPackages() as $package) {
+ /** @var \Composer\Package\PackageInterface $package */
+ if (!empty($package->getExtra()['downloads'])) {
+ $this->installUpdateDownloads($installationManager->getInstallPath($package), $package);
+ }
+ }
+ }
+ public function installDownloads(PackageEvent $event)
+ {
+ /** @var \Composer\Package\PackageInterface $package */
+ $package = $event->getOperation()->getPackage();
+ $installationManager = $event->getComposer()->getInstallationManager();
+ $this->installUpdateDownloads($installationManager->getInstallPath($package), $package);
+ }
+
+ public function updateDownloads(PackageEvent $event)
+ {
+ /** @var \Composer\Package\PackageInterface $package */
+ $package = $event->getOperation()->getTargetPackage();
+ $installationManager = $event->getComposer()->getInstallationManager();
+ $this->installUpdateDownloads($installationManager->getInstallPath($package), $package);
+ }
+
+ public function activate(Composer $composer, IOInterface $io)
+ {
+ $this->composer = $composer;
+ $this->io = $io;
+ }
+
+ public function deactivate(Composer $composer, IOInterface $io)
+ {
+ // @todo determine if any operation required.
+ }
+
+ public function uninstall(Composer $composer, IOInterface $io)
+ {
+ // @todo determine if any operation required.
+ }
+
+ /**
+ * @param string $basePath
+ * @param PackageInterface $package
+ */
+ protected function installUpdateDownloads($basePath, $package)
+ {
+ $first = TRUE;
+ foreach ($this->parser->parse($package, $basePath) as $extraFileHandler) {
+ /** @var BaseHandler $extraFileHandler */
+ $extraFilePkg = $extraFileHandler->getSubpackage();
+ $targetPath = $extraFileHandler->getTargetPath();
+ $trackingFile = $extraFileHandler->getTrackingFile();
+
+ if (file_exists($targetPath) && !file_exists($trackingFile)) {
+ $this->io->write(sprintf("Extra file %s has been locally overriden in %s . To reset it, delete and reinstall. ", $extraFilePkg->getName(), $extraFilePkg->getTargetDir()), TRUE);
+ continue;
+ }
+
+ if (file_exists($targetPath) && file_exists($trackingFile)) {
+ $meta = @json_decode(file_get_contents($trackingFile), 1);
+ if (isset($meta['checksum']) && $meta['checksum'] === $extraFileHandler->getChecksum()) {
+ $this->io->write(sprintf("Skip extra file %s ", $extraFilePkg->getName()), TRUE, IOInterface::VERY_VERBOSE);
+ continue;
+ }
+ }
+
+ if ($first) {
+ $this->io->write(sprintf("Download extra files for %s ", $package->getName()));
+ $first = FALSE;
+ }
+
+ $this->io->write(sprintf("Download extra file %s ", $extraFilePkg->getName()), TRUE, IOInterface::VERBOSE);
+ $extraFileHandler->download($this->composer, $this->io);
+
+ if (!file_exists(dirname($trackingFile))) {
+ mkdir(dirname($trackingFile), 0777, TRUE);
+ }
+ file_put_contents($trackingFile, json_encode(
+ $extraFileHandler->createTrackingData(),
+ JSON_PRETTY_PRINT|JSON_UNESCAPED_SLASHES
+ ));
+ }
+ }
+
+}
diff --git a/vendor/civicrm/composer-downloads-plugin/src/Subpackage.php b/vendor/civicrm/composer-downloads-plugin/src/Subpackage.php
new file mode 100644
index 00000000..62d4b754
--- /dev/null
+++ b/vendor/civicrm/composer-downloads-plugin/src/Subpackage.php
@@ -0,0 +1,48 @@
+
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace LastCall\DownloadsPlugin;
+
+use Composer\IO\IOInterface;
+use Composer\Package\Package;
+use Composer\Package\PackageInterface;
+use Composer\Package\RootPackageInterface;
+
+/**
+ * Class Subpackage
+ * @package LastCall\DownloadsPlugin
+ *
+ * A subpackage is simulated package which lives beneath some parent package.
+ */
+class Subpackage extends Package
+{
+
+ /**
+ * @var PackageInterface
+ */
+ private $parent;
+
+ public function __construct(PackageInterface $parent, $id, $url, $type, $path, $version = NULL, $prettyVersion = NULL)
+ {
+ parent::__construct(
+ sprintf('%s:%s', $parent->getName(), $id),
+ $version ? $version : $parent->getVersion(),
+ $prettyVersion ? $prettyVersion : $parent->getPrettyVersion()
+ );
+ $this->parent = $parent;
+ $this->id = $id;
+ $this->setDistUrl($url);
+ $this->setDistType($type);
+ $this->setTargetDir($path);
+ $this->setInstallationSource('dist');
+ }
+
+}
diff --git a/vendor/civicrm/composer-downloads-plugin/tests/DownloadsParserTest.php b/vendor/civicrm/composer-downloads-plugin/tests/DownloadsParserTest.php
new file mode 100644
index 00000000..039d38ee
--- /dev/null
+++ b/vendor/civicrm/composer-downloads-plugin/tests/DownloadsParserTest.php
@@ -0,0 +1,72 @@
+
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace LastCall\DownloadsPlugin\Tests;
+
+use Composer\Package\Package;
+use LastCall\DownloadsPlugin\Subpackage;
+use LastCall\DownloadsPlugin\DownloadsParser;
+use PHPUnit\Framework\TestCase;
+
+class DownloadsParserTest extends TestCase
+{
+ private function getPackage(array $extra = [])
+ {
+ $package = new Package('foo', '1.0.0', '1.0.0');
+ $package->setExtra([
+ 'downloads' => $extra,
+ ]);
+
+ return $package;
+ }
+
+ public function testIgnoresPackagesWithoutDownloads()
+ {
+ $package = new Package('foo', '1.0.0', '1.0.0');
+ $parser = new DownloadsParser();
+ $this->assertEquals([], $parser->parse($package, "/EXAMPLE"));
+ }
+
+ public function testAddsFiles()
+ {
+ $package = $this->getPackage([
+ 'bar' => ['url' => 'foo', 'path' => 'bar'],
+ ]);
+ $expectSubpackage = new Subpackage($package, 'bar', 'foo', 'file', 'bar');
+ $actualSubpackage = (new DownloadsParser())->parse($package, "/EXAMPLE")[0]->getSubpackage();
+ $this->assertEquals([$expectSubpackage], [$actualSubpackage]);
+ }
+
+ public function getDownloadTypeTests()
+ {
+ return [
+ ['zip', 'foo.zip'],
+ ['zip', 'foo.zip?foo'],
+ ['zip', 'http://example.com/foo.zip?abc#def'],
+ ['tar', 'foo.tar.gz'],
+ ['tar', 'http://example.com/foo.tar.gz?abc#def'],
+ ['tar', 'foo.tgz'],
+ ['file', 'foo'],
+ ];
+ }
+
+ /**
+ * @dataProvider getDownloadTypeTests
+ */
+ public function testSetsDownloadType($expectedType, $url)
+ {
+ $package = $this->getPackage([
+ 'bar' => ['url' => $url, 'path' => 'bar'],
+ ]);
+ $parsed = (new DownloadsParser())->parse($package, "/EXAMPLE");
+ $this->assertEquals($expectedType, $parsed[0]->getSubpackage()->getDistType());
+ }
+}
diff --git a/vendor/civicrm/composer-downloads-plugin/tests/IntegrationTestCase.php b/vendor/civicrm/composer-downloads-plugin/tests/IntegrationTestCase.php
new file mode 100644
index 00000000..8a56103d
--- /dev/null
+++ b/vendor/civicrm/composer-downloads-plugin/tests/IntegrationTestCase.php
@@ -0,0 +1,140 @@
+ [
+ [
+ 'name' => 'Tester McFakus',
+ 'email' => 'tester@example.org',
+ ],
+ ],
+
+ 'repositories' => [
+ 'composer-downloads-plugin' => [
+ 'type' => 'path',
+ 'url' => self::getPluginSourceDir(),
+ ],
+ ],
+ ];
+ }
+
+ /**
+ * @return string
+ * The root folder of the composer-downloads-plugin.
+ */
+ public static function getPluginSourceDir()
+ {
+ return dirname(__DIR__);
+ }
+
+ /**
+ * @return string
+ * The path of the autogenerated composer project.
+ */
+ public static function getTestDir()
+ {
+ return self::$testDir;
+ }
+
+ private static $origDir;
+ private static $testDir;
+
+ /**
+ * Create a temp folder with a "composer.json" file and chdir() into it.
+ *
+ * @param array $composerJson
+ * @return string
+ */
+ public static function initTestProject($composerJson)
+ {
+ self::$origDir = getcwd();
+ if (getenv('USE_TEST_PROJECT')) {
+ self::$testDir = getenv('USE_TEST_PROJECT');
+ @unlink(self::$testDir . DIRECTORY_SEPARATOR . 'composer.lock');
+ } else {
+ self::$testDir = sys_get_temp_dir() . DIRECTORY_SEPARATOR . 'assetplg-' . md5(__DIR__ . time() . rand(0, 10000));
+ self::cleanDir(self::$testDir);
+ }
+
+ if (!is_dir(self::$testDir)) {
+ mkdir(self::$testDir);
+ }
+ file_put_contents(self::$testDir . DIRECTORY_SEPARATOR . 'composer.json', json_encode($composerJson, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES));
+ chdir(self::$testDir);
+ return self::$testDir;
+ }
+
+ public static function tearDownAfterClass()
+ {
+ parent::tearDownAfterClass();
+
+ if (self::$testDir) {
+ chdir(self::$origDir);
+ self::$origDir = NULL;
+
+ if (getenv('USE_TEST_PROJECT')) {
+ fwrite(STDERR, sprintf("\n\nTest project location (%s): %s\n", __CLASS__, self::$testDir));
+ } else {
+ self::cleanDir(self::$testDir);
+ }
+ self::$testDir = NULL;
+ }
+ }
+
+ /**
+ * If a directory exists, remove it.
+ *
+ * @param string $dir
+ */
+ protected static function cleanDir($dir)
+ {
+ PH::runOk(['if [ -d @DIR ]; then rm -rf @DIR ; fi', 'DIR' => $dir]);
+ }
+
+ public function assertSameFileContent($expected, $actual)
+ {
+ $this->assertEquals(file_get_contents($expected), file_get_contents($actual));
+ }
+
+ public function assertFileIsSymlink($path)
+ {
+ $this->assertTrue(file_exists($path), "Path ($path) should exist (symlink file)");
+ $this->assertTrue(is_link($path), "Path ($path) should be a symlink");
+
+ $linkTgt = readlink($path);
+ $this->assertTrue(is_string($linkTgt));
+ $this->assertTrue(is_file(dirname($path) . '/' . $linkTgt), "Path ($path) should be symlinking pointing to a file. Found tgt ($linkTgt)");
+ }
+
+ public function assertFileIsNormal($path)
+ {
+ $this->assertTrue(file_exists($path), "Path ($path) should exist (normal file)");
+ $this->assertTrue(is_file($path), "Path ($path) should be a normal file");
+ $this->assertTrue(!is_link($path), "Path ($path) should not be a symlink");
+ }
+
+ public function assertDirIsSymlink($path)
+ {
+ $this->assertTrue(file_exists($path), "Path ($path) should exist (symlink dir)");
+ $this->assertTrue(is_link($path), "Path ($path) should be a symlink");
+
+ $linkTgt = readlink($path);
+ $this->assertTrue(is_string($linkTgt));
+ $this->assertTrue(is_dir(dirname($path) . '/' . $linkTgt), "Path ($path) should be symlinking pointing to a dir. Found tgt ($linkTgt");
+ }
+
+ public function assertDirIsNormal($path)
+ {
+ $this->assertTrue(file_exists($path), "Path ($path) should exist (normal dir)");
+ $this->assertTrue(!is_link($path), "Path ($path) should not be a symlink");
+ $this->assertTrue(is_dir($path), "Path ($path) should be a dir");
+ }
+
+}
diff --git a/vendor/civicrm/composer-downloads-plugin/tests/SniffTest.php b/vendor/civicrm/composer-downloads-plugin/tests/SniffTest.php
new file mode 100644
index 00000000..49eaf17c
--- /dev/null
+++ b/vendor/civicrm/composer-downloads-plugin/tests/SniffTest.php
@@ -0,0 +1,112 @@
+ 'test/sniff-test',
+ 'require' => [
+ 'civicrm/composer-downloads-plugin' => '@dev',
+ ],
+ 'minimum-stability' => 'dev',
+ 'extra' => [
+ 'downloads' => [
+ '*' => [
+ 'path' => 'extern/{$id}',
+ ],
+ 'README' => [
+ 'url' => 'https://github.com/composer/composer/raw/1.9.0/README.md',
+ 'path' => 'docs/README.md'
+ ],
+ 'jquery-full' => [
+ 'url' => 'https://github.com/civicrm/jquery/archive/1.12.4-civicrm-1.2.zip',
+ ],
+ 'jquery-lesser' => [
+ 'version' => '1.12.4-civicrm-1.2',
+ 'url' => 'https://github.com/civicrm/jquery/archive/{$version}.zip',
+ 'path' => 'extern/jquery-lesser',
+ 'ignore' => ['Gruntfile.js']
+ ],
+ 'cv' => [
+ 'type' => 'phar',
+ 'url' => 'https://download.civicrm.org/cv/cv.phar-2019-08-20-14fe9da8',
+ 'path' => 'bin/cv',
+ ],
+ ],
+ ],
+ ];
+ }
+
+ public static function setUpBeforeClass() {
+ parent::setUpBeforeClass();
+ self::initTestProject(static::getComposerJson());
+ $composer_path = self::getComposerPath();
+ PH::runOk("$composer_path install -v");
+ }
+
+ public function getExampleChecksums() {
+ return [
+ ['docs/README.md', 'docs/README.md', '1d0577cc52d55f0680b431184e898f0cbcb927e52e843a319d7122db9be72813'],
+ ['extern/jquery-full', 'extern/jquery-full/dist/jquery.js', '5f2caf09052782caf67e1772c0abce31747ffbc7a1c50690e331b99c7d9ea8dc'],
+ ['extern/jquery-full', 'extern/jquery-full/Gruntfile.js', '3508ff74f8ef106a80f25f28f44a20c47a2b67d84396bb141928ff978ba4012e'],
+ ['extern/jquery-lesser', 'extern/jquery-lesser/dist/jquery.js', '5f2caf09052782caf67e1772c0abce31747ffbc7a1c50690e331b99c7d9ea8dc'],
+ ['extern/jquery-lesser', 'extern/jquery-lesser/Gruntfile.js', NULL],
+ ['bin/cv', 'bin/cv', 'bf162d5d7dd0bef087d7dd07f474039b2e25c4bcca328a2b2097958ac6294476']
+ ];
+ }
+
+ /**
+ * Ensure that the file checksums match expectations with both (a) original download and (b) re-download.
+ *
+ * @param string $file
+ * @param string|NULL $sha256
+ * The expected content of the file, or NULL if the file should not exist.
+ * @dataProvider getExampleChecksums
+ */
+ public function testDownloadAndRedownload($path, $file, $sha256) {
+ // Initial download
+ $this->assertFileChecksum($file, $sha256, 'Initial');
+
+ // Force re-download
+ if (is_dir($path)) {
+ self::cleanDir($path);
+ }
+ else {
+ unlink($path);
+ }
+ $this->assertFileNotExists($file);
+ $composer_path = self::getComposerPath();
+ PH::runOk("$composer_path install -v");
+
+ // And make sure it all worked out...
+ $this->assertFileChecksum($file, $sha256, 'Redownload');
+ }
+
+ public function assertFileChecksum($file, $sha256, $message = NULL) {
+ if ($sha256 === NULL) {
+ $this->assertFileNotExists($file, "($message) File should not exist");
+ }
+ else {
+ $this->assertFileExists($file, "($message) File should exist");
+ $this->assertEquals($sha256, hash('sha256', file_get_contents($file)), "($message) File should given checksum");
+ }
+ }
+
+ private static function getComposerPath() {
+ return realpath(__DIR__ . '/../vendor/bin/composer');
+ }
+
+}
diff --git a/vendor/composer/ClassLoader.php b/vendor/composer/ClassLoader.php
index fce8549f..afef3fa2 100644
--- a/vendor/composer/ClassLoader.php
+++ b/vendor/composer/ClassLoader.php
@@ -37,57 +37,130 @@
*
* @author Fabien Potencier
* @author Jordi Boggiano
- * @see http://www.php-fig.org/psr/psr-0/
- * @see http://www.php-fig.org/psr/psr-4/
+ * @see https://www.php-fig.org/psr/psr-0/
+ * @see https://www.php-fig.org/psr/psr-4/
*/
class ClassLoader
{
+ /** @var ?string */
+ private $vendorDir;
+
// PSR-4
+ /**
+ * @var array[]
+ * @psalm-var array>
+ */
private $prefixLengthsPsr4 = array();
+ /**
+ * @var array[]
+ * @psalm-var array>
+ */
private $prefixDirsPsr4 = array();
+ /**
+ * @var array[]
+ * @psalm-var array
+ */
private $fallbackDirsPsr4 = array();
// PSR-0
+ /**
+ * @var array[]
+ * @psalm-var array>
+ */
private $prefixesPsr0 = array();
+ /**
+ * @var array[]
+ * @psalm-var array
+ */
private $fallbackDirsPsr0 = array();
+ /** @var bool */
private $useIncludePath = false;
+
+ /**
+ * @var string[]
+ * @psalm-var array
+ */
private $classMap = array();
+
+ /** @var bool */
private $classMapAuthoritative = false;
+
+ /**
+ * @var bool[]
+ * @psalm-var array
+ */
private $missingClasses = array();
+
+ /** @var ?string */
private $apcuPrefix;
+ /**
+ * @var self[]
+ */
+ private static $registeredLoaders = array();
+
+ /**
+ * @param ?string $vendorDir
+ */
+ public function __construct($vendorDir = null)
+ {
+ $this->vendorDir = $vendorDir;
+ }
+
+ /**
+ * @return string[]
+ */
public function getPrefixes()
{
if (!empty($this->prefixesPsr0)) {
- return call_user_func_array('array_merge', $this->prefixesPsr0);
+ return call_user_func_array('array_merge', array_values($this->prefixesPsr0));
}
return array();
}
+ /**
+ * @return array[]
+ * @psalm-return array>
+ */
public function getPrefixesPsr4()
{
return $this->prefixDirsPsr4;
}
+ /**
+ * @return array[]
+ * @psalm-return array
+ */
public function getFallbackDirs()
{
return $this->fallbackDirsPsr0;
}
+ /**
+ * @return array[]
+ * @psalm-return array
+ */
public function getFallbackDirsPsr4()
{
return $this->fallbackDirsPsr4;
}
+ /**
+ * @return string[] Array of classname => path
+ * @psalm-return array
+ */
public function getClassMap()
{
return $this->classMap;
}
/**
- * @param array $classMap Class to filename map
+ * @param string[] $classMap Class to filename map
+ * @psalm-param array $classMap
+ *
+ * @return void
*/
public function addClassMap(array $classMap)
{
@@ -102,9 +175,11 @@ public function addClassMap(array $classMap)
* Registers a set of PSR-0 directories for a given prefix, either
* appending or prepending to the ones previously set for this prefix.
*
- * @param string $prefix The prefix
- * @param array|string $paths The PSR-0 root directories
- * @param bool $prepend Whether to prepend the directories
+ * @param string $prefix The prefix
+ * @param string[]|string $paths The PSR-0 root directories
+ * @param bool $prepend Whether to prepend the directories
+ *
+ * @return void
*/
public function add($prefix, $paths, $prepend = false)
{
@@ -147,11 +222,13 @@ public function add($prefix, $paths, $prepend = false)
* Registers a set of PSR-4 directories for a given namespace, either
* appending or prepending to the ones previously set for this namespace.
*
- * @param string $prefix The prefix/namespace, with trailing '\\'
- * @param array|string $paths The PSR-4 base directories
- * @param bool $prepend Whether to prepend the directories
+ * @param string $prefix The prefix/namespace, with trailing '\\'
+ * @param string[]|string $paths The PSR-4 base directories
+ * @param bool $prepend Whether to prepend the directories
*
* @throws \InvalidArgumentException
+ *
+ * @return void
*/
public function addPsr4($prefix, $paths, $prepend = false)
{
@@ -195,8 +272,10 @@ public function addPsr4($prefix, $paths, $prepend = false)
* Registers a set of PSR-0 directories for a given prefix,
* replacing any others previously set for this prefix.
*
- * @param string $prefix The prefix
- * @param array|string $paths The PSR-0 base directories
+ * @param string $prefix The prefix
+ * @param string[]|string $paths The PSR-0 base directories
+ *
+ * @return void
*/
public function set($prefix, $paths)
{
@@ -211,10 +290,12 @@ public function set($prefix, $paths)
* Registers a set of PSR-4 directories for a given namespace,
* replacing any others previously set for this namespace.
*
- * @param string $prefix The prefix/namespace, with trailing '\\'
- * @param array|string $paths The PSR-4 base directories
+ * @param string $prefix The prefix/namespace, with trailing '\\'
+ * @param string[]|string $paths The PSR-4 base directories
*
* @throws \InvalidArgumentException
+ *
+ * @return void
*/
public function setPsr4($prefix, $paths)
{
@@ -234,6 +315,8 @@ public function setPsr4($prefix, $paths)
* Turns on searching the include path for class files.
*
* @param bool $useIncludePath
+ *
+ * @return void
*/
public function setUseIncludePath($useIncludePath)
{
@@ -256,6 +339,8 @@ public function getUseIncludePath()
* that have not been registered with the class map.
*
* @param bool $classMapAuthoritative
+ *
+ * @return void
*/
public function setClassMapAuthoritative($classMapAuthoritative)
{
@@ -276,6 +361,8 @@ public function isClassMapAuthoritative()
* APCu prefix to use to cache found/not-found classes, if the extension is enabled.
*
* @param string|null $apcuPrefix
+ *
+ * @return void
*/
public function setApcuPrefix($apcuPrefix)
{
@@ -296,25 +383,44 @@ public function getApcuPrefix()
* Registers this instance as an autoloader.
*
* @param bool $prepend Whether to prepend the autoloader or not
+ *
+ * @return void
*/
public function register($prepend = false)
{
spl_autoload_register(array($this, 'loadClass'), true, $prepend);
+
+ if (null === $this->vendorDir) {
+ return;
+ }
+
+ if ($prepend) {
+ self::$registeredLoaders = array($this->vendorDir => $this) + self::$registeredLoaders;
+ } else {
+ unset(self::$registeredLoaders[$this->vendorDir]);
+ self::$registeredLoaders[$this->vendorDir] = $this;
+ }
}
/**
* Unregisters this instance as an autoloader.
+ *
+ * @return void
*/
public function unregister()
{
spl_autoload_unregister(array($this, 'loadClass'));
+
+ if (null !== $this->vendorDir) {
+ unset(self::$registeredLoaders[$this->vendorDir]);
+ }
}
/**
* Loads the given class or interface.
*
* @param string $class The name of the class
- * @return bool|null True if loaded, null otherwise
+ * @return true|null True if loaded, null otherwise
*/
public function loadClass($class)
{
@@ -323,6 +429,8 @@ public function loadClass($class)
return true;
}
+
+ return null;
}
/**
@@ -367,6 +475,21 @@ public function findFile($class)
return $file;
}
+ /**
+ * Returns the currently registered loaders indexed by their corresponding vendor directories.
+ *
+ * @return self[]
+ */
+ public static function getRegisteredLoaders()
+ {
+ return self::$registeredLoaders;
+ }
+
+ /**
+ * @param string $class
+ * @param string $ext
+ * @return string|false
+ */
private function findFileWithExtension($class, $ext)
{
// PSR-4 lookup
@@ -438,6 +561,10 @@ private function findFileWithExtension($class, $ext)
* Scope isolated include.
*
* Prevents access to $this/self from included files.
+ *
+ * @param string $file
+ * @return void
+ * @private
*/
function includeFile($file)
{
diff --git a/vendor/composer/InstalledVersions.php b/vendor/composer/InstalledVersions.php
new file mode 100644
index 00000000..d50e0c9f
--- /dev/null
+++ b/vendor/composer/InstalledVersions.php
@@ -0,0 +1,350 @@
+
+ * Jordi Boggiano
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Composer;
+
+use Composer\Autoload\ClassLoader;
+use Composer\Semver\VersionParser;
+
+/**
+ * This class is copied in every Composer installed project and available to all
+ *
+ * See also https://getcomposer.org/doc/07-runtime.md#installed-versions
+ *
+ * To require its presence, you can require `composer-runtime-api ^2.0`
+ */
+class InstalledVersions
+{
+ /**
+ * @var mixed[]|null
+ * @psalm-var array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array}|array{}|null
+ */
+ private static $installed;
+
+ /**
+ * @var bool|null
+ */
+ private static $canGetVendors;
+
+ /**
+ * @var array[]
+ * @psalm-var array}>
+ */
+ private static $installedByVendor = array();
+
+ /**
+ * Returns a list of all package names which are present, either by being installed, replaced or provided
+ *
+ * @return string[]
+ * @psalm-return list
+ */
+ public static function getInstalledPackages()
+ {
+ $packages = array();
+ foreach (self::getInstalled() as $installed) {
+ $packages[] = array_keys($installed['versions']);
+ }
+
+ if (1 === \count($packages)) {
+ return $packages[0];
+ }
+
+ return array_keys(array_flip(\call_user_func_array('array_merge', $packages)));
+ }
+
+ /**
+ * Returns a list of all package names with a specific type e.g. 'library'
+ *
+ * @param string $type
+ * @return string[]
+ * @psalm-return list
+ */
+ public static function getInstalledPackagesByType($type)
+ {
+ $packagesByType = array();
+
+ foreach (self::getInstalled() as $installed) {
+ foreach ($installed['versions'] as $name => $package) {
+ if (isset($package['type']) && $package['type'] === $type) {
+ $packagesByType[] = $name;
+ }
+ }
+ }
+
+ return $packagesByType;
+ }
+
+ /**
+ * Checks whether the given package is installed
+ *
+ * This also returns true if the package name is provided or replaced by another package
+ *
+ * @param string $packageName
+ * @param bool $includeDevRequirements
+ * @return bool
+ */
+ public static function isInstalled($packageName, $includeDevRequirements = true)
+ {
+ foreach (self::getInstalled() as $installed) {
+ if (isset($installed['versions'][$packageName])) {
+ return $includeDevRequirements || empty($installed['versions'][$packageName]['dev_requirement']);
+ }
+ }
+
+ return false;
+ }
+
+ /**
+ * Checks whether the given package satisfies a version constraint
+ *
+ * e.g. If you want to know whether version 2.3+ of package foo/bar is installed, you would call:
+ *
+ * Composer\InstalledVersions::satisfies(new VersionParser, 'foo/bar', '^2.3')
+ *
+ * @param VersionParser $parser Install composer/semver to have access to this class and functionality
+ * @param string $packageName
+ * @param string|null $constraint A version constraint to check for, if you pass one you have to make sure composer/semver is required by your package
+ * @return bool
+ */
+ public static function satisfies(VersionParser $parser, $packageName, $constraint)
+ {
+ $constraint = $parser->parseConstraints($constraint);
+ $provided = $parser->parseConstraints(self::getVersionRanges($packageName));
+
+ return $provided->matches($constraint);
+ }
+
+ /**
+ * Returns a version constraint representing all the range(s) which are installed for a given package
+ *
+ * It is easier to use this via isInstalled() with the $constraint argument if you need to check
+ * whether a given version of a package is installed, and not just whether it exists
+ *
+ * @param string $packageName
+ * @return string Version constraint usable with composer/semver
+ */
+ public static function getVersionRanges($packageName)
+ {
+ foreach (self::getInstalled() as $installed) {
+ if (!isset($installed['versions'][$packageName])) {
+ continue;
+ }
+
+ $ranges = array();
+ if (isset($installed['versions'][$packageName]['pretty_version'])) {
+ $ranges[] = $installed['versions'][$packageName]['pretty_version'];
+ }
+ if (array_key_exists('aliases', $installed['versions'][$packageName])) {
+ $ranges = array_merge($ranges, $installed['versions'][$packageName]['aliases']);
+ }
+ if (array_key_exists('replaced', $installed['versions'][$packageName])) {
+ $ranges = array_merge($ranges, $installed['versions'][$packageName]['replaced']);
+ }
+ if (array_key_exists('provided', $installed['versions'][$packageName])) {
+ $ranges = array_merge($ranges, $installed['versions'][$packageName]['provided']);
+ }
+
+ return implode(' || ', $ranges);
+ }
+
+ throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
+ }
+
+ /**
+ * @param string $packageName
+ * @return string|null If the package is being replaced or provided but is not really installed, null will be returned as version, use satisfies or getVersionRanges if you need to know if a given version is present
+ */
+ public static function getVersion($packageName)
+ {
+ foreach (self::getInstalled() as $installed) {
+ if (!isset($installed['versions'][$packageName])) {
+ continue;
+ }
+
+ if (!isset($installed['versions'][$packageName]['version'])) {
+ return null;
+ }
+
+ return $installed['versions'][$packageName]['version'];
+ }
+
+ throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
+ }
+
+ /**
+ * @param string $packageName
+ * @return string|null If the package is being replaced or provided but is not really installed, null will be returned as version, use satisfies or getVersionRanges if you need to know if a given version is present
+ */
+ public static function getPrettyVersion($packageName)
+ {
+ foreach (self::getInstalled() as $installed) {
+ if (!isset($installed['versions'][$packageName])) {
+ continue;
+ }
+
+ if (!isset($installed['versions'][$packageName]['pretty_version'])) {
+ return null;
+ }
+
+ return $installed['versions'][$packageName]['pretty_version'];
+ }
+
+ throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
+ }
+
+ /**
+ * @param string $packageName
+ * @return string|null If the package is being replaced or provided but is not really installed, null will be returned as reference
+ */
+ public static function getReference($packageName)
+ {
+ foreach (self::getInstalled() as $installed) {
+ if (!isset($installed['versions'][$packageName])) {
+ continue;
+ }
+
+ if (!isset($installed['versions'][$packageName]['reference'])) {
+ return null;
+ }
+
+ return $installed['versions'][$packageName]['reference'];
+ }
+
+ throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
+ }
+
+ /**
+ * @param string $packageName
+ * @return string|null If the package is being replaced or provided but is not really installed, null will be returned as install path. Packages of type metapackages also have a null install path.
+ */
+ public static function getInstallPath($packageName)
+ {
+ foreach (self::getInstalled() as $installed) {
+ if (!isset($installed['versions'][$packageName])) {
+ continue;
+ }
+
+ return isset($installed['versions'][$packageName]['install_path']) ? $installed['versions'][$packageName]['install_path'] : null;
+ }
+
+ throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
+ }
+
+ /**
+ * @return array
+ * @psalm-return array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}
+ */
+ public static function getRootPackage()
+ {
+ $installed = self::getInstalled();
+
+ return $installed[0]['root'];
+ }
+
+ /**
+ * Returns the raw installed.php data for custom implementations
+ *
+ * @deprecated Use getAllRawData() instead which returns all datasets for all autoloaders present in the process. getRawData only returns the first dataset loaded, which may not be what you expect.
+ * @return array[]
+ * @psalm-return array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array}
+ */
+ public static function getRawData()
+ {
+ @trigger_error('getRawData only returns the first dataset loaded, which may not be what you expect. Use getAllRawData() instead which returns all datasets for all autoloaders present in the process.', E_USER_DEPRECATED);
+
+ if (null === self::$installed) {
+ // only require the installed.php file if this file is loaded from its dumped location,
+ // and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937
+ if (substr(__DIR__, -8, 1) !== 'C') {
+ self::$installed = include __DIR__ . '/installed.php';
+ } else {
+ self::$installed = array();
+ }
+ }
+
+ return self::$installed;
+ }
+
+ /**
+ * Returns the raw data of all installed.php which are currently loaded for custom implementations
+ *
+ * @return array[]
+ * @psalm-return list}>
+ */
+ public static function getAllRawData()
+ {
+ return self::getInstalled();
+ }
+
+ /**
+ * Lets you reload the static array from another file
+ *
+ * This is only useful for complex integrations in which a project needs to use
+ * this class but then also needs to execute another project's autoloader in process,
+ * and wants to ensure both projects have access to their version of installed.php.
+ *
+ * A typical case would be PHPUnit, where it would need to make sure it reads all
+ * the data it needs from this class, then call reload() with
+ * `require $CWD/vendor/composer/installed.php` (or similar) as input to make sure
+ * the project in which it runs can then also use this class safely, without
+ * interference between PHPUnit's dependencies and the project's dependencies.
+ *
+ * @param array[] $data A vendor/composer/installed.php data set
+ * @return void
+ *
+ * @psalm-param array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array} $data
+ */
+ public static function reload($data)
+ {
+ self::$installed = $data;
+ self::$installedByVendor = array();
+ }
+
+ /**
+ * @return array[]
+ * @psalm-return list}>
+ */
+ private static function getInstalled()
+ {
+ if (null === self::$canGetVendors) {
+ self::$canGetVendors = method_exists('Composer\Autoload\ClassLoader', 'getRegisteredLoaders');
+ }
+
+ $installed = array();
+
+ if (self::$canGetVendors) {
+ foreach (ClassLoader::getRegisteredLoaders() as $vendorDir => $loader) {
+ if (isset(self::$installedByVendor[$vendorDir])) {
+ $installed[] = self::$installedByVendor[$vendorDir];
+ } elseif (is_file($vendorDir.'/composer/installed.php')) {
+ $installed[] = self::$installedByVendor[$vendorDir] = require $vendorDir.'/composer/installed.php';
+ if (null === self::$installed && strtr($vendorDir.'/composer', '\\', '/') === strtr(__DIR__, '\\', '/')) {
+ self::$installed = $installed[count($installed) - 1];
+ }
+ }
+ }
+ }
+
+ if (null === self::$installed) {
+ // only require the installed.php file if this file is loaded from its dumped location,
+ // and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937
+ if (substr(__DIR__, -8, 1) !== 'C') {
+ self::$installed = require __DIR__ . '/installed.php';
+ } else {
+ self::$installed = array();
+ }
+ }
+ $installed[] = self::$installed;
+
+ return $installed;
+ }
+}
diff --git a/vendor/composer/autoload_classmap.php b/vendor/composer/autoload_classmap.php
index 7a91153b..8e840613 100644
--- a/vendor/composer/autoload_classmap.php
+++ b/vendor/composer/autoload_classmap.php
@@ -6,4 +6,701 @@
$baseDir = dirname($vendorDir);
return array(
+ 'Composer\\InstalledVersions' => $vendorDir . '/composer/InstalledVersions.php',
+ 'Hamcrest\\Arrays\\IsArray' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/IsArray.php',
+ 'Hamcrest\\Arrays\\IsArrayContaining' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/IsArrayContaining.php',
+ 'Hamcrest\\Arrays\\IsArrayContainingInAnyOrder' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/IsArrayContainingInAnyOrder.php',
+ 'Hamcrest\\Arrays\\IsArrayContainingInOrder' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/IsArrayContainingInOrder.php',
+ 'Hamcrest\\Arrays\\IsArrayContainingKey' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/IsArrayContainingKey.php',
+ 'Hamcrest\\Arrays\\IsArrayContainingKeyValuePair' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/IsArrayContainingKeyValuePair.php',
+ 'Hamcrest\\Arrays\\IsArrayWithSize' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/IsArrayWithSize.php',
+ 'Hamcrest\\Arrays\\MatchingOnce' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/MatchingOnce.php',
+ 'Hamcrest\\Arrays\\SeriesMatchingOnce' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/SeriesMatchingOnce.php',
+ 'Hamcrest\\AssertionError' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/AssertionError.php',
+ 'Hamcrest\\BaseDescription' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/BaseDescription.php',
+ 'Hamcrest\\BaseMatcher' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/BaseMatcher.php',
+ 'Hamcrest\\Collection\\IsEmptyTraversable' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Collection/IsEmptyTraversable.php',
+ 'Hamcrest\\Collection\\IsTraversableWithSize' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Collection/IsTraversableWithSize.php',
+ 'Hamcrest\\Core\\AllOf' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/AllOf.php',
+ 'Hamcrest\\Core\\AnyOf' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/AnyOf.php',
+ 'Hamcrest\\Core\\CombinableMatcher' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/CombinableMatcher.php',
+ 'Hamcrest\\Core\\DescribedAs' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/DescribedAs.php',
+ 'Hamcrest\\Core\\Every' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/Every.php',
+ 'Hamcrest\\Core\\HasToString' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/HasToString.php',
+ 'Hamcrest\\Core\\Is' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/Is.php',
+ 'Hamcrest\\Core\\IsAnything' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsAnything.php',
+ 'Hamcrest\\Core\\IsCollectionContaining' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsCollectionContaining.php',
+ 'Hamcrest\\Core\\IsEqual' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsEqual.php',
+ 'Hamcrest\\Core\\IsIdentical' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsIdentical.php',
+ 'Hamcrest\\Core\\IsInstanceOf' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsInstanceOf.php',
+ 'Hamcrest\\Core\\IsNot' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsNot.php',
+ 'Hamcrest\\Core\\IsNull' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsNull.php',
+ 'Hamcrest\\Core\\IsSame' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsSame.php',
+ 'Hamcrest\\Core\\IsTypeOf' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsTypeOf.php',
+ 'Hamcrest\\Core\\Set' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/Set.php',
+ 'Hamcrest\\Core\\ShortcutCombination' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/ShortcutCombination.php',
+ 'Hamcrest\\Description' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Description.php',
+ 'Hamcrest\\DiagnosingMatcher' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/DiagnosingMatcher.php',
+ 'Hamcrest\\FeatureMatcher' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/FeatureMatcher.php',
+ 'Hamcrest\\Internal\\SelfDescribingValue' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Internal/SelfDescribingValue.php',
+ 'Hamcrest\\Matcher' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Matcher.php',
+ 'Hamcrest\\MatcherAssert' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/MatcherAssert.php',
+ 'Hamcrest\\Matchers' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Matchers.php',
+ 'Hamcrest\\NullDescription' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/NullDescription.php',
+ 'Hamcrest\\Number\\IsCloseTo' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Number/IsCloseTo.php',
+ 'Hamcrest\\Number\\OrderingComparison' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Number/OrderingComparison.php',
+ 'Hamcrest\\SelfDescribing' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/SelfDescribing.php',
+ 'Hamcrest\\StringDescription' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/StringDescription.php',
+ 'Hamcrest\\Text\\IsEmptyString' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/IsEmptyString.php',
+ 'Hamcrest\\Text\\IsEqualIgnoringCase' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/IsEqualIgnoringCase.php',
+ 'Hamcrest\\Text\\IsEqualIgnoringWhiteSpace' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/IsEqualIgnoringWhiteSpace.php',
+ 'Hamcrest\\Text\\MatchesPattern' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/MatchesPattern.php',
+ 'Hamcrest\\Text\\StringContains' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/StringContains.php',
+ 'Hamcrest\\Text\\StringContainsIgnoringCase' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/StringContainsIgnoringCase.php',
+ 'Hamcrest\\Text\\StringContainsInOrder' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/StringContainsInOrder.php',
+ 'Hamcrest\\Text\\StringEndsWith' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/StringEndsWith.php',
+ 'Hamcrest\\Text\\StringStartsWith' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/StringStartsWith.php',
+ 'Hamcrest\\Text\\SubstringMatcher' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/SubstringMatcher.php',
+ 'Hamcrest\\TypeSafeDiagnosingMatcher' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/TypeSafeDiagnosingMatcher.php',
+ 'Hamcrest\\TypeSafeMatcher' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/TypeSafeMatcher.php',
+ 'Hamcrest\\Type\\IsArray' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Type/IsArray.php',
+ 'Hamcrest\\Type\\IsBoolean' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Type/IsBoolean.php',
+ 'Hamcrest\\Type\\IsCallable' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Type/IsCallable.php',
+ 'Hamcrest\\Type\\IsDouble' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Type/IsDouble.php',
+ 'Hamcrest\\Type\\IsInteger' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Type/IsInteger.php',
+ 'Hamcrest\\Type\\IsNumeric' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Type/IsNumeric.php',
+ 'Hamcrest\\Type\\IsObject' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Type/IsObject.php',
+ 'Hamcrest\\Type\\IsResource' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Type/IsResource.php',
+ 'Hamcrest\\Type\\IsScalar' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Type/IsScalar.php',
+ 'Hamcrest\\Type\\IsString' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Type/IsString.php',
+ 'Hamcrest\\Util' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Util.php',
+ 'Hamcrest\\Xml\\HasXPath' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Xml/HasXPath.php',
+ 'PHPUnit\\Exception' => $vendorDir . '/phpunit/phpunit/src/Exception.php',
+ 'PHPUnit\\Framework\\ActualValueIsNotAnObjectException' => $vendorDir . '/phpunit/phpunit/src/Framework/Exception/ActualValueIsNotAnObjectException.php',
+ 'PHPUnit\\Framework\\Assert' => $vendorDir . '/phpunit/phpunit/src/Framework/Assert.php',
+ 'PHPUnit\\Framework\\AssertionFailedError' => $vendorDir . '/phpunit/phpunit/src/Framework/Exception/AssertionFailedError.php',
+ 'PHPUnit\\Framework\\CodeCoverageException' => $vendorDir . '/phpunit/phpunit/src/Framework/Exception/CodeCoverageException.php',
+ 'PHPUnit\\Framework\\ComparisonMethodDoesNotAcceptParameterTypeException' => $vendorDir . '/phpunit/phpunit/src/Framework/Exception/ComparisonMethodDoesNotAcceptParameterTypeException.php',
+ 'PHPUnit\\Framework\\ComparisonMethodDoesNotDeclareBoolReturnTypeException' => $vendorDir . '/phpunit/phpunit/src/Framework/Exception/ComparisonMethodDoesNotDeclareBoolReturnTypeException.php',
+ 'PHPUnit\\Framework\\ComparisonMethodDoesNotDeclareExactlyOneParameterException' => $vendorDir . '/phpunit/phpunit/src/Framework/Exception/ComparisonMethodDoesNotDeclareExactlyOneParameterException.php',
+ 'PHPUnit\\Framework\\ComparisonMethodDoesNotDeclareParameterTypeException' => $vendorDir . '/phpunit/phpunit/src/Framework/Exception/ComparisonMethodDoesNotDeclareParameterTypeException.php',
+ 'PHPUnit\\Framework\\ComparisonMethodDoesNotExistException' => $vendorDir . '/phpunit/phpunit/src/Framework/Exception/ComparisonMethodDoesNotExistException.php',
+ 'PHPUnit\\Framework\\Constraint\\ArrayHasKey' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Traversable/ArrayHasKey.php',
+ 'PHPUnit\\Framework\\Constraint\\BinaryOperator' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Operator/BinaryOperator.php',
+ 'PHPUnit\\Framework\\Constraint\\Callback' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Callback.php',
+ 'PHPUnit\\Framework\\Constraint\\ClassHasAttribute' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Object/ClassHasAttribute.php',
+ 'PHPUnit\\Framework\\Constraint\\ClassHasStaticAttribute' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Object/ClassHasStaticAttribute.php',
+ 'PHPUnit\\Framework\\Constraint\\Constraint' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Constraint.php',
+ 'PHPUnit\\Framework\\Constraint\\Count' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Cardinality/Count.php',
+ 'PHPUnit\\Framework\\Constraint\\DirectoryExists' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Filesystem/DirectoryExists.php',
+ 'PHPUnit\\Framework\\Constraint\\Exception' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Exception/Exception.php',
+ 'PHPUnit\\Framework\\Constraint\\ExceptionCode' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Exception/ExceptionCode.php',
+ 'PHPUnit\\Framework\\Constraint\\ExceptionMessage' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Exception/ExceptionMessage.php',
+ 'PHPUnit\\Framework\\Constraint\\ExceptionMessageRegularExpression' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Exception/ExceptionMessageRegularExpression.php',
+ 'PHPUnit\\Framework\\Constraint\\FileExists' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Filesystem/FileExists.php',
+ 'PHPUnit\\Framework\\Constraint\\GreaterThan' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Cardinality/GreaterThan.php',
+ 'PHPUnit\\Framework\\Constraint\\IsAnything' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/IsAnything.php',
+ 'PHPUnit\\Framework\\Constraint\\IsEmpty' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Cardinality/IsEmpty.php',
+ 'PHPUnit\\Framework\\Constraint\\IsEqual' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Equality/IsEqual.php',
+ 'PHPUnit\\Framework\\Constraint\\IsEqualCanonicalizing' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Equality/IsEqualCanonicalizing.php',
+ 'PHPUnit\\Framework\\Constraint\\IsEqualIgnoringCase' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Equality/IsEqualIgnoringCase.php',
+ 'PHPUnit\\Framework\\Constraint\\IsEqualWithDelta' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Equality/IsEqualWithDelta.php',
+ 'PHPUnit\\Framework\\Constraint\\IsFalse' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Boolean/IsFalse.php',
+ 'PHPUnit\\Framework\\Constraint\\IsFinite' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Math/IsFinite.php',
+ 'PHPUnit\\Framework\\Constraint\\IsIdentical' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/IsIdentical.php',
+ 'PHPUnit\\Framework\\Constraint\\IsInfinite' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Math/IsInfinite.php',
+ 'PHPUnit\\Framework\\Constraint\\IsInstanceOf' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Type/IsInstanceOf.php',
+ 'PHPUnit\\Framework\\Constraint\\IsJson' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/String/IsJson.php',
+ 'PHPUnit\\Framework\\Constraint\\IsNan' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Math/IsNan.php',
+ 'PHPUnit\\Framework\\Constraint\\IsNull' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Type/IsNull.php',
+ 'PHPUnit\\Framework\\Constraint\\IsReadable' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Filesystem/IsReadable.php',
+ 'PHPUnit\\Framework\\Constraint\\IsTrue' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Boolean/IsTrue.php',
+ 'PHPUnit\\Framework\\Constraint\\IsType' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Type/IsType.php',
+ 'PHPUnit\\Framework\\Constraint\\IsWritable' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Filesystem/IsWritable.php',
+ 'PHPUnit\\Framework\\Constraint\\JsonMatches' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/JsonMatches.php',
+ 'PHPUnit\\Framework\\Constraint\\JsonMatchesErrorMessageProvider' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/JsonMatchesErrorMessageProvider.php',
+ 'PHPUnit\\Framework\\Constraint\\LessThan' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Cardinality/LessThan.php',
+ 'PHPUnit\\Framework\\Constraint\\LogicalAnd' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Operator/LogicalAnd.php',
+ 'PHPUnit\\Framework\\Constraint\\LogicalNot' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Operator/LogicalNot.php',
+ 'PHPUnit\\Framework\\Constraint\\LogicalOr' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Operator/LogicalOr.php',
+ '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\\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',
+ 'PHPUnit\\Framework\\Constraint\\StringContains' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/String/StringContains.php',
+ 'PHPUnit\\Framework\\Constraint\\StringEndsWith' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/String/StringEndsWith.php',
+ 'PHPUnit\\Framework\\Constraint\\StringMatchesFormatDescription' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/String/StringMatchesFormatDescription.php',
+ 'PHPUnit\\Framework\\Constraint\\StringStartsWith' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/String/StringStartsWith.php',
+ 'PHPUnit\\Framework\\Constraint\\TraversableContains' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Traversable/TraversableContains.php',
+ 'PHPUnit\\Framework\\Constraint\\TraversableContainsEqual' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Traversable/TraversableContainsEqual.php',
+ 'PHPUnit\\Framework\\Constraint\\TraversableContainsIdentical' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Traversable/TraversableContainsIdentical.php',
+ 'PHPUnit\\Framework\\Constraint\\TraversableContainsOnly' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Traversable/TraversableContainsOnly.php',
+ 'PHPUnit\\Framework\\Constraint\\UnaryOperator' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Operator/UnaryOperator.php',
+ 'PHPUnit\\Framework\\CoveredCodeNotExecutedException' => $vendorDir . '/phpunit/phpunit/src/Framework/Exception/CoveredCodeNotExecutedException.php',
+ 'PHPUnit\\Framework\\DataProviderTestSuite' => $vendorDir . '/phpunit/phpunit/src/Framework/DataProviderTestSuite.php',
+ 'PHPUnit\\Framework\\Error' => $vendorDir . '/phpunit/phpunit/src/Framework/Exception/Error.php',
+ 'PHPUnit\\Framework\\ErrorTestCase' => $vendorDir . '/phpunit/phpunit/src/Framework/ErrorTestCase.php',
+ 'PHPUnit\\Framework\\Error\\Deprecated' => $vendorDir . '/phpunit/phpunit/src/Framework/Error/Deprecated.php',
+ 'PHPUnit\\Framework\\Error\\Error' => $vendorDir . '/phpunit/phpunit/src/Framework/Error/Error.php',
+ 'PHPUnit\\Framework\\Error\\Notice' => $vendorDir . '/phpunit/phpunit/src/Framework/Error/Notice.php',
+ 'PHPUnit\\Framework\\Error\\Warning' => $vendorDir . '/phpunit/phpunit/src/Framework/Error/Warning.php',
+ 'PHPUnit\\Framework\\Exception' => $vendorDir . '/phpunit/phpunit/src/Framework/Exception/Exception.php',
+ 'PHPUnit\\Framework\\ExceptionWrapper' => $vendorDir . '/phpunit/phpunit/src/Framework/ExceptionWrapper.php',
+ 'PHPUnit\\Framework\\ExecutionOrderDependency' => $vendorDir . '/phpunit/phpunit/src/Framework/ExecutionOrderDependency.php',
+ 'PHPUnit\\Framework\\ExpectationFailedException' => $vendorDir . '/phpunit/phpunit/src/Framework/Exception/ExpectationFailedException.php',
+ 'PHPUnit\\Framework\\IncompleteTest' => $vendorDir . '/phpunit/phpunit/src/Framework/IncompleteTest.php',
+ 'PHPUnit\\Framework\\IncompleteTestCase' => $vendorDir . '/phpunit/phpunit/src/Framework/IncompleteTestCase.php',
+ 'PHPUnit\\Framework\\IncompleteTestError' => $vendorDir . '/phpunit/phpunit/src/Framework/Exception/IncompleteTestError.php',
+ 'PHPUnit\\Framework\\InvalidArgumentException' => $vendorDir . '/phpunit/phpunit/src/Framework/Exception/InvalidArgumentException.php',
+ 'PHPUnit\\Framework\\InvalidCoversTargetException' => $vendorDir . '/phpunit/phpunit/src/Framework/Exception/InvalidCoversTargetException.php',
+ 'PHPUnit\\Framework\\InvalidDataProviderException' => $vendorDir . '/phpunit/phpunit/src/Framework/Exception/InvalidDataProviderException.php',
+ 'PHPUnit\\Framework\\InvalidParameterGroupException' => $vendorDir . '/phpunit/phpunit/src/Framework/InvalidParameterGroupException.php',
+ 'PHPUnit\\Framework\\MissingCoversAnnotationException' => $vendorDir . '/phpunit/phpunit/src/Framework/Exception/MissingCoversAnnotationException.php',
+ 'PHPUnit\\Framework\\MockObject\\Api' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Api/Api.php',
+ 'PHPUnit\\Framework\\MockObject\\BadMethodCallException' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Exception/BadMethodCallException.php',
+ 'PHPUnit\\Framework\\MockObject\\Builder\\Identity' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Builder/Identity.php',
+ 'PHPUnit\\Framework\\MockObject\\Builder\\InvocationMocker' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Builder/InvocationMocker.php',
+ 'PHPUnit\\Framework\\MockObject\\Builder\\InvocationStubber' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Builder/InvocationStubber.php',
+ 'PHPUnit\\Framework\\MockObject\\Builder\\MethodNameMatch' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Builder/MethodNameMatch.php',
+ 'PHPUnit\\Framework\\MockObject\\Builder\\ParametersMatch' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Builder/ParametersMatch.php',
+ 'PHPUnit\\Framework\\MockObject\\Builder\\Stub' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Builder/Stub.php',
+ 'PHPUnit\\Framework\\MockObject\\CannotUseAddMethodsException' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Exception/CannotUseAddMethodsException.php',
+ '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',
+ 'PHPUnit\\Framework\\MockObject\\Exception' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Exception/Exception.php',
+ 'PHPUnit\\Framework\\MockObject\\Generator' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Generator.php',
+ 'PHPUnit\\Framework\\MockObject\\IncompatibleReturnValueException' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Exception/IncompatibleReturnValueException.php',
+ 'PHPUnit\\Framework\\MockObject\\InvalidMethodNameException' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Exception/InvalidMethodNameException.php',
+ 'PHPUnit\\Framework\\MockObject\\Invocation' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Invocation.php',
+ 'PHPUnit\\Framework\\MockObject\\InvocationHandler' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/InvocationHandler.php',
+ 'PHPUnit\\Framework\\MockObject\\MatchBuilderNotFoundException' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Exception/MatchBuilderNotFoundException.php',
+ 'PHPUnit\\Framework\\MockObject\\Matcher' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Matcher.php',
+ 'PHPUnit\\Framework\\MockObject\\MatcherAlreadyRegisteredException' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Exception/MatcherAlreadyRegisteredException.php',
+ 'PHPUnit\\Framework\\MockObject\\Method' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Api/Method.php',
+ 'PHPUnit\\Framework\\MockObject\\MethodCannotBeConfiguredException' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Exception/MethodCannotBeConfiguredException.php',
+ 'PHPUnit\\Framework\\MockObject\\MethodNameAlreadyConfiguredException' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Exception/MethodNameAlreadyConfiguredException.php',
+ 'PHPUnit\\Framework\\MockObject\\MethodNameConstraint' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/MethodNameConstraint.php',
+ 'PHPUnit\\Framework\\MockObject\\MethodNameNotConfiguredException' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Exception/MethodNameNotConfiguredException.php',
+ 'PHPUnit\\Framework\\MockObject\\MethodParametersAlreadyConfiguredException' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Exception/MethodParametersAlreadyConfiguredException.php',
+ 'PHPUnit\\Framework\\MockObject\\MockBuilder' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/MockBuilder.php',
+ 'PHPUnit\\Framework\\MockObject\\MockClass' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/MockClass.php',
+ 'PHPUnit\\Framework\\MockObject\\MockMethod' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/MockMethod.php',
+ 'PHPUnit\\Framework\\MockObject\\MockMethodSet' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/MockMethodSet.php',
+ 'PHPUnit\\Framework\\MockObject\\MockObject' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/MockObject.php',
+ 'PHPUnit\\Framework\\MockObject\\MockTrait' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/MockTrait.php',
+ 'PHPUnit\\Framework\\MockObject\\MockType' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/MockType.php',
+ 'PHPUnit\\Framework\\MockObject\\OriginalConstructorInvocationRequiredException' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Exception/OriginalConstructorInvocationRequiredException.php',
+ 'PHPUnit\\Framework\\MockObject\\ReflectionException' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Exception/ReflectionException.php',
+ 'PHPUnit\\Framework\\MockObject\\ReturnValueNotConfiguredException' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Exception/ReturnValueNotConfiguredException.php',
+ 'PHPUnit\\Framework\\MockObject\\Rule\\AnyInvokedCount' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Rule/AnyInvokedCount.php',
+ 'PHPUnit\\Framework\\MockObject\\Rule\\AnyParameters' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Rule/AnyParameters.php',
+ 'PHPUnit\\Framework\\MockObject\\Rule\\ConsecutiveParameters' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Rule/ConsecutiveParameters.php',
+ 'PHPUnit\\Framework\\MockObject\\Rule\\InvocationOrder' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Rule/InvocationOrder.php',
+ 'PHPUnit\\Framework\\MockObject\\Rule\\InvokedAtIndex' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Rule/InvokedAtIndex.php',
+ 'PHPUnit\\Framework\\MockObject\\Rule\\InvokedAtLeastCount' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Rule/InvokedAtLeastCount.php',
+ 'PHPUnit\\Framework\\MockObject\\Rule\\InvokedAtLeastOnce' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Rule/InvokedAtLeastOnce.php',
+ 'PHPUnit\\Framework\\MockObject\\Rule\\InvokedAtMostCount' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Rule/InvokedAtMostCount.php',
+ 'PHPUnit\\Framework\\MockObject\\Rule\\InvokedCount' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Rule/InvokedCount.php',
+ 'PHPUnit\\Framework\\MockObject\\Rule\\MethodName' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Rule/MethodName.php',
+ 'PHPUnit\\Framework\\MockObject\\Rule\\Parameters' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Rule/Parameters.php',
+ 'PHPUnit\\Framework\\MockObject\\Rule\\ParametersRule' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Rule/ParametersRule.php',
+ 'PHPUnit\\Framework\\MockObject\\RuntimeException' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Exception/RuntimeException.php',
+ 'PHPUnit\\Framework\\MockObject\\SoapExtensionNotAvailableException' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Exception/SoapExtensionNotAvailableException.php',
+ 'PHPUnit\\Framework\\MockObject\\Stub' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Stub.php',
+ 'PHPUnit\\Framework\\MockObject\\Stub\\ConsecutiveCalls' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Stub/ConsecutiveCalls.php',
+ 'PHPUnit\\Framework\\MockObject\\Stub\\Exception' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Stub/Exception.php',
+ 'PHPUnit\\Framework\\MockObject\\Stub\\ReturnArgument' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Stub/ReturnArgument.php',
+ 'PHPUnit\\Framework\\MockObject\\Stub\\ReturnCallback' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Stub/ReturnCallback.php',
+ 'PHPUnit\\Framework\\MockObject\\Stub\\ReturnReference' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Stub/ReturnReference.php',
+ 'PHPUnit\\Framework\\MockObject\\Stub\\ReturnSelf' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Stub/ReturnSelf.php',
+ 'PHPUnit\\Framework\\MockObject\\Stub\\ReturnStub' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Stub/ReturnStub.php',
+ 'PHPUnit\\Framework\\MockObject\\Stub\\ReturnValueMap' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Stub/ReturnValueMap.php',
+ 'PHPUnit\\Framework\\MockObject\\Stub\\Stub' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Stub/Stub.php',
+ 'PHPUnit\\Framework\\MockObject\\UnknownClassException' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Exception/UnknownClassException.php',
+ 'PHPUnit\\Framework\\MockObject\\UnknownTraitException' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Exception/UnknownTraitException.php',
+ 'PHPUnit\\Framework\\MockObject\\UnknownTypeException' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Exception/UnknownTypeException.php',
+ 'PHPUnit\\Framework\\MockObject\\Verifiable' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Verifiable.php',
+ 'PHPUnit\\Framework\\NoChildTestSuiteException' => $vendorDir . '/phpunit/phpunit/src/Framework/Exception/NoChildTestSuiteException.php',
+ 'PHPUnit\\Framework\\OutputError' => $vendorDir . '/phpunit/phpunit/src/Framework/Exception/OutputError.php',
+ 'PHPUnit\\Framework\\PHPTAssertionFailedError' => $vendorDir . '/phpunit/phpunit/src/Framework/Exception/PHPTAssertionFailedError.php',
+ 'PHPUnit\\Framework\\Reorderable' => $vendorDir . '/phpunit/phpunit/src/Framework/Reorderable.php',
+ 'PHPUnit\\Framework\\RiskyTestError' => $vendorDir . '/phpunit/phpunit/src/Framework/Exception/RiskyTestError.php',
+ 'PHPUnit\\Framework\\SelfDescribing' => $vendorDir . '/phpunit/phpunit/src/Framework/SelfDescribing.php',
+ 'PHPUnit\\Framework\\SkippedTest' => $vendorDir . '/phpunit/phpunit/src/Framework/SkippedTest.php',
+ 'PHPUnit\\Framework\\SkippedTestCase' => $vendorDir . '/phpunit/phpunit/src/Framework/SkippedTestCase.php',
+ 'PHPUnit\\Framework\\SkippedTestError' => $vendorDir . '/phpunit/phpunit/src/Framework/Exception/SkippedTestError.php',
+ 'PHPUnit\\Framework\\SkippedTestSuiteError' => $vendorDir . '/phpunit/phpunit/src/Framework/Exception/SkippedTestSuiteError.php',
+ 'PHPUnit\\Framework\\SyntheticError' => $vendorDir . '/phpunit/phpunit/src/Framework/Exception/SyntheticError.php',
+ 'PHPUnit\\Framework\\SyntheticSkippedError' => $vendorDir . '/phpunit/phpunit/src/Framework/Exception/SyntheticSkippedError.php',
+ 'PHPUnit\\Framework\\Test' => $vendorDir . '/phpunit/phpunit/src/Framework/Test.php',
+ 'PHPUnit\\Framework\\TestBuilder' => $vendorDir . '/phpunit/phpunit/src/Framework/TestBuilder.php',
+ 'PHPUnit\\Framework\\TestCase' => $vendorDir . '/phpunit/phpunit/src/Framework/TestCase.php',
+ 'PHPUnit\\Framework\\TestFailure' => $vendorDir . '/phpunit/phpunit/src/Framework/TestFailure.php',
+ 'PHPUnit\\Framework\\TestListener' => $vendorDir . '/phpunit/phpunit/src/Framework/TestListener.php',
+ 'PHPUnit\\Framework\\TestListenerDefaultImplementation' => $vendorDir . '/phpunit/phpunit/src/Framework/TestListenerDefaultImplementation.php',
+ 'PHPUnit\\Framework\\TestResult' => $vendorDir . '/phpunit/phpunit/src/Framework/TestResult.php',
+ 'PHPUnit\\Framework\\TestSuite' => $vendorDir . '/phpunit/phpunit/src/Framework/TestSuite.php',
+ 'PHPUnit\\Framework\\TestSuiteIterator' => $vendorDir . '/phpunit/phpunit/src/Framework/TestSuiteIterator.php',
+ 'PHPUnit\\Framework\\UnintentionallyCoveredCodeError' => $vendorDir . '/phpunit/phpunit/src/Framework/Exception/UnintentionallyCoveredCodeError.php',
+ 'PHPUnit\\Framework\\Warning' => $vendorDir . '/phpunit/phpunit/src/Framework/Exception/Warning.php',
+ 'PHPUnit\\Framework\\WarningTestCase' => $vendorDir . '/phpunit/phpunit/src/Framework/WarningTestCase.php',
+ 'PHPUnit\\Runner\\AfterIncompleteTestHook' => $vendorDir . '/phpunit/phpunit/src/Runner/Hook/AfterIncompleteTestHook.php',
+ 'PHPUnit\\Runner\\AfterLastTestHook' => $vendorDir . '/phpunit/phpunit/src/Runner/Hook/AfterLastTestHook.php',
+ 'PHPUnit\\Runner\\AfterRiskyTestHook' => $vendorDir . '/phpunit/phpunit/src/Runner/Hook/AfterRiskyTestHook.php',
+ 'PHPUnit\\Runner\\AfterSkippedTestHook' => $vendorDir . '/phpunit/phpunit/src/Runner/Hook/AfterSkippedTestHook.php',
+ 'PHPUnit\\Runner\\AfterSuccessfulTestHook' => $vendorDir . '/phpunit/phpunit/src/Runner/Hook/AfterSuccessfulTestHook.php',
+ 'PHPUnit\\Runner\\AfterTestErrorHook' => $vendorDir . '/phpunit/phpunit/src/Runner/Hook/AfterTestErrorHook.php',
+ 'PHPUnit\\Runner\\AfterTestFailureHook' => $vendorDir . '/phpunit/phpunit/src/Runner/Hook/AfterTestFailureHook.php',
+ 'PHPUnit\\Runner\\AfterTestHook' => $vendorDir . '/phpunit/phpunit/src/Runner/Hook/AfterTestHook.php',
+ 'PHPUnit\\Runner\\AfterTestWarningHook' => $vendorDir . '/phpunit/phpunit/src/Runner/Hook/AfterTestWarningHook.php',
+ 'PHPUnit\\Runner\\BaseTestRunner' => $vendorDir . '/phpunit/phpunit/src/Runner/BaseTestRunner.php',
+ 'PHPUnit\\Runner\\BeforeFirstTestHook' => $vendorDir . '/phpunit/phpunit/src/Runner/Hook/BeforeFirstTestHook.php',
+ 'PHPUnit\\Runner\\BeforeTestHook' => $vendorDir . '/phpunit/phpunit/src/Runner/Hook/BeforeTestHook.php',
+ 'PHPUnit\\Runner\\DefaultTestResultCache' => $vendorDir . '/phpunit/phpunit/src/Runner/DefaultTestResultCache.php',
+ 'PHPUnit\\Runner\\Exception' => $vendorDir . '/phpunit/phpunit/src/Runner/Exception.php',
+ 'PHPUnit\\Runner\\Extension\\ExtensionHandler' => $vendorDir . '/phpunit/phpunit/src/Runner/Extension/ExtensionHandler.php',
+ 'PHPUnit\\Runner\\Extension\\PharLoader' => $vendorDir . '/phpunit/phpunit/src/Runner/Extension/PharLoader.php',
+ 'PHPUnit\\Runner\\Filter\\ExcludeGroupFilterIterator' => $vendorDir . '/phpunit/phpunit/src/Runner/Filter/ExcludeGroupFilterIterator.php',
+ 'PHPUnit\\Runner\\Filter\\Factory' => $vendorDir . '/phpunit/phpunit/src/Runner/Filter/Factory.php',
+ 'PHPUnit\\Runner\\Filter\\GroupFilterIterator' => $vendorDir . '/phpunit/phpunit/src/Runner/Filter/GroupFilterIterator.php',
+ 'PHPUnit\\Runner\\Filter\\IncludeGroupFilterIterator' => $vendorDir . '/phpunit/phpunit/src/Runner/Filter/IncludeGroupFilterIterator.php',
+ 'PHPUnit\\Runner\\Filter\\NameFilterIterator' => $vendorDir . '/phpunit/phpunit/src/Runner/Filter/NameFilterIterator.php',
+ 'PHPUnit\\Runner\\Hook' => $vendorDir . '/phpunit/phpunit/src/Runner/Hook/Hook.php',
+ 'PHPUnit\\Runner\\NullTestResultCache' => $vendorDir . '/phpunit/phpunit/src/Runner/NullTestResultCache.php',
+ 'PHPUnit\\Runner\\PhptTestCase' => $vendorDir . '/phpunit/phpunit/src/Runner/PhptTestCase.php',
+ 'PHPUnit\\Runner\\ResultCacheExtension' => $vendorDir . '/phpunit/phpunit/src/Runner/ResultCacheExtension.php',
+ 'PHPUnit\\Runner\\StandardTestSuiteLoader' => $vendorDir . '/phpunit/phpunit/src/Runner/StandardTestSuiteLoader.php',
+ 'PHPUnit\\Runner\\TestHook' => $vendorDir . '/phpunit/phpunit/src/Runner/Hook/TestHook.php',
+ 'PHPUnit\\Runner\\TestListenerAdapter' => $vendorDir . '/phpunit/phpunit/src/Runner/Hook/TestListenerAdapter.php',
+ 'PHPUnit\\Runner\\TestResultCache' => $vendorDir . '/phpunit/phpunit/src/Runner/TestResultCache.php',
+ 'PHPUnit\\Runner\\TestSuiteLoader' => $vendorDir . '/phpunit/phpunit/src/Runner/TestSuiteLoader.php',
+ 'PHPUnit\\Runner\\TestSuiteSorter' => $vendorDir . '/phpunit/phpunit/src/Runner/TestSuiteSorter.php',
+ 'PHPUnit\\Runner\\Version' => $vendorDir . '/phpunit/phpunit/src/Runner/Version.php',
+ 'PHPUnit\\TextUI\\CliArguments\\Builder' => $vendorDir . '/phpunit/phpunit/src/TextUI/CliArguments/Builder.php',
+ 'PHPUnit\\TextUI\\CliArguments\\Configuration' => $vendorDir . '/phpunit/phpunit/src/TextUI/CliArguments/Configuration.php',
+ 'PHPUnit\\TextUI\\CliArguments\\Exception' => $vendorDir . '/phpunit/phpunit/src/TextUI/CliArguments/Exception.php',
+ 'PHPUnit\\TextUI\\CliArguments\\Mapper' => $vendorDir . '/phpunit/phpunit/src/TextUI/CliArguments/Mapper.php',
+ 'PHPUnit\\TextUI\\Command' => $vendorDir . '/phpunit/phpunit/src/TextUI/Command.php',
+ 'PHPUnit\\TextUI\\DefaultResultPrinter' => $vendorDir . '/phpunit/phpunit/src/TextUI/DefaultResultPrinter.php',
+ 'PHPUnit\\TextUI\\Exception' => $vendorDir . '/phpunit/phpunit/src/TextUI/Exception/Exception.php',
+ 'PHPUnit\\TextUI\\Help' => $vendorDir . '/phpunit/phpunit/src/TextUI/Help.php',
+ 'PHPUnit\\TextUI\\ReflectionException' => $vendorDir . '/phpunit/phpunit/src/TextUI/Exception/ReflectionException.php',
+ 'PHPUnit\\TextUI\\ResultPrinter' => $vendorDir . '/phpunit/phpunit/src/TextUI/ResultPrinter.php',
+ 'PHPUnit\\TextUI\\RuntimeException' => $vendorDir . '/phpunit/phpunit/src/TextUI/Exception/RuntimeException.php',
+ 'PHPUnit\\TextUI\\TestDirectoryNotFoundException' => $vendorDir . '/phpunit/phpunit/src/TextUI/Exception/TestDirectoryNotFoundException.php',
+ 'PHPUnit\\TextUI\\TestFileNotFoundException' => $vendorDir . '/phpunit/phpunit/src/TextUI/Exception/TestFileNotFoundException.php',
+ 'PHPUnit\\TextUI\\TestRunner' => $vendorDir . '/phpunit/phpunit/src/TextUI/TestRunner.php',
+ 'PHPUnit\\TextUI\\TestSuiteMapper' => $vendorDir . '/phpunit/phpunit/src/TextUI/TestSuiteMapper.php',
+ 'PHPUnit\\TextUI\\XmlConfiguration\\CodeCoverage\\CodeCoverage' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/CodeCoverage/CodeCoverage.php',
+ 'PHPUnit\\TextUI\\XmlConfiguration\\CodeCoverage\\FilterMapper' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/CodeCoverage/FilterMapper.php',
+ 'PHPUnit\\TextUI\\XmlConfiguration\\CodeCoverage\\Filter\\Directory' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/CodeCoverage/Filter/Directory.php',
+ 'PHPUnit\\TextUI\\XmlConfiguration\\CodeCoverage\\Filter\\DirectoryCollection' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/CodeCoverage/Filter/DirectoryCollection.php',
+ 'PHPUnit\\TextUI\\XmlConfiguration\\CodeCoverage\\Filter\\DirectoryCollectionIterator' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/CodeCoverage/Filter/DirectoryCollectionIterator.php',
+ 'PHPUnit\\TextUI\\XmlConfiguration\\CodeCoverage\\Report\\Clover' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/CodeCoverage/Report/Clover.php',
+ 'PHPUnit\\TextUI\\XmlConfiguration\\CodeCoverage\\Report\\Cobertura' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/CodeCoverage/Report/Cobertura.php',
+ 'PHPUnit\\TextUI\\XmlConfiguration\\CodeCoverage\\Report\\Crap4j' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/CodeCoverage/Report/Crap4j.php',
+ 'PHPUnit\\TextUI\\XmlConfiguration\\CodeCoverage\\Report\\Html' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/CodeCoverage/Report/Html.php',
+ 'PHPUnit\\TextUI\\XmlConfiguration\\CodeCoverage\\Report\\Php' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/CodeCoverage/Report/Php.php',
+ 'PHPUnit\\TextUI\\XmlConfiguration\\CodeCoverage\\Report\\Text' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/CodeCoverage/Report/Text.php',
+ 'PHPUnit\\TextUI\\XmlConfiguration\\CodeCoverage\\Report\\Xml' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/CodeCoverage/Report/Xml.php',
+ 'PHPUnit\\TextUI\\XmlConfiguration\\Configuration' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Configuration.php',
+ 'PHPUnit\\TextUI\\XmlConfiguration\\Constant' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/PHP/Constant.php',
+ 'PHPUnit\\TextUI\\XmlConfiguration\\ConstantCollection' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/PHP/ConstantCollection.php',
+ 'PHPUnit\\TextUI\\XmlConfiguration\\ConstantCollectionIterator' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/PHP/ConstantCollectionIterator.php',
+ 'PHPUnit\\TextUI\\XmlConfiguration\\ConvertLogTypes' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Migration/Migrations/ConvertLogTypes.php',
+ 'PHPUnit\\TextUI\\XmlConfiguration\\CoverageCloverToReport' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Migration/Migrations/CoverageCloverToReport.php',
+ 'PHPUnit\\TextUI\\XmlConfiguration\\CoverageCrap4jToReport' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Migration/Migrations/CoverageCrap4jToReport.php',
+ 'PHPUnit\\TextUI\\XmlConfiguration\\CoverageHtmlToReport' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Migration/Migrations/CoverageHtmlToReport.php',
+ 'PHPUnit\\TextUI\\XmlConfiguration\\CoveragePhpToReport' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Migration/Migrations/CoveragePhpToReport.php',
+ 'PHPUnit\\TextUI\\XmlConfiguration\\CoverageTextToReport' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Migration/Migrations/CoverageTextToReport.php',
+ 'PHPUnit\\TextUI\\XmlConfiguration\\CoverageXmlToReport' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Migration/Migrations/CoverageXmlToReport.php',
+ 'PHPUnit\\TextUI\\XmlConfiguration\\Directory' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Filesystem/Directory.php',
+ 'PHPUnit\\TextUI\\XmlConfiguration\\DirectoryCollection' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Filesystem/DirectoryCollection.php',
+ 'PHPUnit\\TextUI\\XmlConfiguration\\DirectoryCollectionIterator' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Filesystem/DirectoryCollectionIterator.php',
+ 'PHPUnit\\TextUI\\XmlConfiguration\\Exception' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Exception.php',
+ 'PHPUnit\\TextUI\\XmlConfiguration\\Extension' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/PHPUnit/Extension.php',
+ 'PHPUnit\\TextUI\\XmlConfiguration\\ExtensionCollection' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/PHPUnit/ExtensionCollection.php',
+ 'PHPUnit\\TextUI\\XmlConfiguration\\ExtensionCollectionIterator' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/PHPUnit/ExtensionCollectionIterator.php',
+ 'PHPUnit\\TextUI\\XmlConfiguration\\File' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Filesystem/File.php',
+ 'PHPUnit\\TextUI\\XmlConfiguration\\FileCollection' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Filesystem/FileCollection.php',
+ 'PHPUnit\\TextUI\\XmlConfiguration\\FileCollectionIterator' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Filesystem/FileCollectionIterator.php',
+ 'PHPUnit\\TextUI\\XmlConfiguration\\Generator' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Generator.php',
+ 'PHPUnit\\TextUI\\XmlConfiguration\\Group' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Group/Group.php',
+ 'PHPUnit\\TextUI\\XmlConfiguration\\GroupCollection' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Group/GroupCollection.php',
+ 'PHPUnit\\TextUI\\XmlConfiguration\\GroupCollectionIterator' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Group/GroupCollectionIterator.php',
+ 'PHPUnit\\TextUI\\XmlConfiguration\\Groups' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Group/Groups.php',
+ 'PHPUnit\\TextUI\\XmlConfiguration\\IniSetting' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/PHP/IniSetting.php',
+ 'PHPUnit\\TextUI\\XmlConfiguration\\IniSettingCollection' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/PHP/IniSettingCollection.php',
+ 'PHPUnit\\TextUI\\XmlConfiguration\\IniSettingCollectionIterator' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/PHP/IniSettingCollectionIterator.php',
+ 'PHPUnit\\TextUI\\XmlConfiguration\\IntroduceCoverageElement' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Migration/Migrations/IntroduceCoverageElement.php',
+ 'PHPUnit\\TextUI\\XmlConfiguration\\Loader' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Loader.php',
+ 'PHPUnit\\TextUI\\XmlConfiguration\\LogToReportMigration' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Migration/Migrations/LogToReportMigration.php',
+ 'PHPUnit\\TextUI\\XmlConfiguration\\Logging\\Junit' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Logging/Junit.php',
+ 'PHPUnit\\TextUI\\XmlConfiguration\\Logging\\Logging' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Logging/Logging.php',
+ 'PHPUnit\\TextUI\\XmlConfiguration\\Logging\\TeamCity' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Logging/TeamCity.php',
+ 'PHPUnit\\TextUI\\XmlConfiguration\\Logging\\TestDox\\Html' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Logging/TestDox/Html.php',
+ 'PHPUnit\\TextUI\\XmlConfiguration\\Logging\\TestDox\\Text' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Logging/TestDox/Text.php',
+ 'PHPUnit\\TextUI\\XmlConfiguration\\Logging\\TestDox\\Xml' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Logging/TestDox/Xml.php',
+ 'PHPUnit\\TextUI\\XmlConfiguration\\Logging\\Text' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Logging/Text.php',
+ 'PHPUnit\\TextUI\\XmlConfiguration\\Migration' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Migration/Migrations/Migration.php',
+ 'PHPUnit\\TextUI\\XmlConfiguration\\MigrationBuilder' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Migration/MigrationBuilder.php',
+ 'PHPUnit\\TextUI\\XmlConfiguration\\MigrationBuilderException' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Migration/MigrationBuilderException.php',
+ 'PHPUnit\\TextUI\\XmlConfiguration\\MigrationException' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Migration/MigrationException.php',
+ '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\\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',
+ 'PHPUnit\\TextUI\\XmlConfiguration\\RemoveCacheTokensAttribute' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Migration/Migrations/RemoveCacheTokensAttribute.php',
+ 'PHPUnit\\TextUI\\XmlConfiguration\\RemoveEmptyFilter' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Migration/Migrations/RemoveEmptyFilter.php',
+ 'PHPUnit\\TextUI\\XmlConfiguration\\RemoveLogTypes' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Migration/Migrations/RemoveLogTypes.php',
+ 'PHPUnit\\TextUI\\XmlConfiguration\\TestDirectory' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/TestSuite/TestDirectory.php',
+ 'PHPUnit\\TextUI\\XmlConfiguration\\TestDirectoryCollection' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/TestSuite/TestDirectoryCollection.php',
+ 'PHPUnit\\TextUI\\XmlConfiguration\\TestDirectoryCollectionIterator' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/TestSuite/TestDirectoryCollectionIterator.php',
+ 'PHPUnit\\TextUI\\XmlConfiguration\\TestFile' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/TestSuite/TestFile.php',
+ 'PHPUnit\\TextUI\\XmlConfiguration\\TestFileCollection' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/TestSuite/TestFileCollection.php',
+ 'PHPUnit\\TextUI\\XmlConfiguration\\TestFileCollectionIterator' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/TestSuite/TestFileCollectionIterator.php',
+ 'PHPUnit\\TextUI\\XmlConfiguration\\TestSuite' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/TestSuite/TestSuite.php',
+ 'PHPUnit\\TextUI\\XmlConfiguration\\TestSuiteCollection' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/TestSuite/TestSuiteCollection.php',
+ 'PHPUnit\\TextUI\\XmlConfiguration\\TestSuiteCollectionIterator' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/TestSuite/TestSuiteCollectionIterator.php',
+ 'PHPUnit\\TextUI\\XmlConfiguration\\UpdateSchemaLocationTo93' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Migration/Migrations/UpdateSchemaLocationTo93.php',
+ 'PHPUnit\\TextUI\\XmlConfiguration\\Variable' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/PHP/Variable.php',
+ 'PHPUnit\\TextUI\\XmlConfiguration\\VariableCollection' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/PHP/VariableCollection.php',
+ 'PHPUnit\\TextUI\\XmlConfiguration\\VariableCollectionIterator' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/PHP/VariableCollectionIterator.php',
+ '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',
+ 'PHPUnit\\Util\\ExcludeList' => $vendorDir . '/phpunit/phpunit/src/Util/ExcludeList.php',
+ 'PHPUnit\\Util\\FileLoader' => $vendorDir . '/phpunit/phpunit/src/Util/FileLoader.php',
+ 'PHPUnit\\Util\\Filesystem' => $vendorDir . '/phpunit/phpunit/src/Util/Filesystem.php',
+ 'PHPUnit\\Util\\Filter' => $vendorDir . '/phpunit/phpunit/src/Util/Filter.php',
+ 'PHPUnit\\Util\\GlobalState' => $vendorDir . '/phpunit/phpunit/src/Util/GlobalState.php',
+ 'PHPUnit\\Util\\InvalidDataSetException' => $vendorDir . '/phpunit/phpunit/src/Util/InvalidDataSetException.php',
+ 'PHPUnit\\Util\\Json' => $vendorDir . '/phpunit/phpunit/src/Util/Json.php',
+ 'PHPUnit\\Util\\Log\\JUnit' => $vendorDir . '/phpunit/phpunit/src/Util/Log/JUnit.php',
+ 'PHPUnit\\Util\\Log\\TeamCity' => $vendorDir . '/phpunit/phpunit/src/Util/Log/TeamCity.php',
+ 'PHPUnit\\Util\\PHP\\AbstractPhpProcess' => $vendorDir . '/phpunit/phpunit/src/Util/PHP/AbstractPhpProcess.php',
+ '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',
+ 'PHPUnit\\Util\\TestDox\\HtmlResultPrinter' => $vendorDir . '/phpunit/phpunit/src/Util/TestDox/HtmlResultPrinter.php',
+ 'PHPUnit\\Util\\TestDox\\NamePrettifier' => $vendorDir . '/phpunit/phpunit/src/Util/TestDox/NamePrettifier.php',
+ 'PHPUnit\\Util\\TestDox\\ResultPrinter' => $vendorDir . '/phpunit/phpunit/src/Util/TestDox/ResultPrinter.php',
+ 'PHPUnit\\Util\\TestDox\\TestDoxPrinter' => $vendorDir . '/phpunit/phpunit/src/Util/TestDox/TestDoxPrinter.php',
+ 'PHPUnit\\Util\\TestDox\\TextResultPrinter' => $vendorDir . '/phpunit/phpunit/src/Util/TestDox/TextResultPrinter.php',
+ 'PHPUnit\\Util\\TestDox\\XmlResultPrinter' => $vendorDir . '/phpunit/phpunit/src/Util/TestDox/XmlResultPrinter.php',
+ 'PHPUnit\\Util\\TextTestListRenderer' => $vendorDir . '/phpunit/phpunit/src/Util/TextTestListRenderer.php',
+ 'PHPUnit\\Util\\Type' => $vendorDir . '/phpunit/phpunit/src/Util/Type.php',
+ 'PHPUnit\\Util\\VersionComparisonOperator' => $vendorDir . '/phpunit/phpunit/src/Util/VersionComparisonOperator.php',
+ 'PHPUnit\\Util\\XdebugFilterScriptGenerator' => $vendorDir . '/phpunit/phpunit/src/Util/XdebugFilterScriptGenerator.php',
+ 'PHPUnit\\Util\\Xml' => $vendorDir . '/phpunit/phpunit/src/Util/Xml.php',
+ 'PHPUnit\\Util\\XmlTestListRenderer' => $vendorDir . '/phpunit/phpunit/src/Util/XmlTestListRenderer.php',
+ 'PHPUnit\\Util\\Xml\\Exception' => $vendorDir . '/phpunit/phpunit/src/Util/Xml/Exception.php',
+ 'PHPUnit\\Util\\Xml\\FailedSchemaDetectionResult' => $vendorDir . '/phpunit/phpunit/src/Util/Xml/FailedSchemaDetectionResult.php',
+ 'PHPUnit\\Util\\Xml\\Loader' => $vendorDir . '/phpunit/phpunit/src/Util/Xml/Loader.php',
+ 'PHPUnit\\Util\\Xml\\SchemaDetectionResult' => $vendorDir . '/phpunit/phpunit/src/Util/Xml/SchemaDetectionResult.php',
+ 'PHPUnit\\Util\\Xml\\SchemaDetector' => $vendorDir . '/phpunit/phpunit/src/Util/Xml/SchemaDetector.php',
+ 'PHPUnit\\Util\\Xml\\SchemaFinder' => $vendorDir . '/phpunit/phpunit/src/Util/Xml/SchemaFinder.php',
+ 'PHPUnit\\Util\\Xml\\SnapshotNodeList' => $vendorDir . '/phpunit/phpunit/src/Util/Xml/SnapshotNodeList.php',
+ 'PHPUnit\\Util\\Xml\\SuccessfulSchemaDetectionResult' => $vendorDir . '/phpunit/phpunit/src/Util/Xml/SuccessfulSchemaDetectionResult.php',
+ 'PHPUnit\\Util\\Xml\\ValidationResult' => $vendorDir . '/phpunit/phpunit/src/Util/Xml/ValidationResult.php',
+ 'PHPUnit\\Util\\Xml\\Validator' => $vendorDir . '/phpunit/phpunit/src/Util/Xml/Validator.php',
+ 'PharIo\\Manifest\\Application' => $vendorDir . '/phar-io/manifest/src/values/Application.php',
+ 'PharIo\\Manifest\\ApplicationName' => $vendorDir . '/phar-io/manifest/src/values/ApplicationName.php',
+ 'PharIo\\Manifest\\Author' => $vendorDir . '/phar-io/manifest/src/values/Author.php',
+ 'PharIo\\Manifest\\AuthorCollection' => $vendorDir . '/phar-io/manifest/src/values/AuthorCollection.php',
+ 'PharIo\\Manifest\\AuthorCollectionIterator' => $vendorDir . '/phar-io/manifest/src/values/AuthorCollectionIterator.php',
+ 'PharIo\\Manifest\\AuthorElement' => $vendorDir . '/phar-io/manifest/src/xml/AuthorElement.php',
+ 'PharIo\\Manifest\\AuthorElementCollection' => $vendorDir . '/phar-io/manifest/src/xml/AuthorElementCollection.php',
+ 'PharIo\\Manifest\\BundledComponent' => $vendorDir . '/phar-io/manifest/src/values/BundledComponent.php',
+ 'PharIo\\Manifest\\BundledComponentCollection' => $vendorDir . '/phar-io/manifest/src/values/BundledComponentCollection.php',
+ 'PharIo\\Manifest\\BundledComponentCollectionIterator' => $vendorDir . '/phar-io/manifest/src/values/BundledComponentCollectionIterator.php',
+ 'PharIo\\Manifest\\BundlesElement' => $vendorDir . '/phar-io/manifest/src/xml/BundlesElement.php',
+ 'PharIo\\Manifest\\ComponentElement' => $vendorDir . '/phar-io/manifest/src/xml/ComponentElement.php',
+ 'PharIo\\Manifest\\ComponentElementCollection' => $vendorDir . '/phar-io/manifest/src/xml/ComponentElementCollection.php',
+ 'PharIo\\Manifest\\ContainsElement' => $vendorDir . '/phar-io/manifest/src/xml/ContainsElement.php',
+ 'PharIo\\Manifest\\CopyrightElement' => $vendorDir . '/phar-io/manifest/src/xml/CopyrightElement.php',
+ 'PharIo\\Manifest\\CopyrightInformation' => $vendorDir . '/phar-io/manifest/src/values/CopyrightInformation.php',
+ 'PharIo\\Manifest\\ElementCollection' => $vendorDir . '/phar-io/manifest/src/xml/ElementCollection.php',
+ 'PharIo\\Manifest\\ElementCollectionException' => $vendorDir . '/phar-io/manifest/src/exceptions/ElementCollectionException.php',
+ 'PharIo\\Manifest\\Email' => $vendorDir . '/phar-io/manifest/src/values/Email.php',
+ 'PharIo\\Manifest\\Exception' => $vendorDir . '/phar-io/manifest/src/exceptions/Exception.php',
+ 'PharIo\\Manifest\\ExtElement' => $vendorDir . '/phar-io/manifest/src/xml/ExtElement.php',
+ 'PharIo\\Manifest\\ExtElementCollection' => $vendorDir . '/phar-io/manifest/src/xml/ExtElementCollection.php',
+ 'PharIo\\Manifest\\Extension' => $vendorDir . '/phar-io/manifest/src/values/Extension.php',
+ 'PharIo\\Manifest\\ExtensionElement' => $vendorDir . '/phar-io/manifest/src/xml/ExtensionElement.php',
+ 'PharIo\\Manifest\\InvalidApplicationNameException' => $vendorDir . '/phar-io/manifest/src/exceptions/InvalidApplicationNameException.php',
+ 'PharIo\\Manifest\\InvalidEmailException' => $vendorDir . '/phar-io/manifest/src/exceptions/InvalidEmailException.php',
+ 'PharIo\\Manifest\\InvalidUrlException' => $vendorDir . '/phar-io/manifest/src/exceptions/InvalidUrlException.php',
+ 'PharIo\\Manifest\\Library' => $vendorDir . '/phar-io/manifest/src/values/Library.php',
+ 'PharIo\\Manifest\\License' => $vendorDir . '/phar-io/manifest/src/values/License.php',
+ 'PharIo\\Manifest\\LicenseElement' => $vendorDir . '/phar-io/manifest/src/xml/LicenseElement.php',
+ 'PharIo\\Manifest\\Manifest' => $vendorDir . '/phar-io/manifest/src/values/Manifest.php',
+ 'PharIo\\Manifest\\ManifestDocument' => $vendorDir . '/phar-io/manifest/src/xml/ManifestDocument.php',
+ 'PharIo\\Manifest\\ManifestDocumentException' => $vendorDir . '/phar-io/manifest/src/exceptions/ManifestDocumentException.php',
+ 'PharIo\\Manifest\\ManifestDocumentLoadingException' => $vendorDir . '/phar-io/manifest/src/exceptions/ManifestDocumentLoadingException.php',
+ 'PharIo\\Manifest\\ManifestDocumentMapper' => $vendorDir . '/phar-io/manifest/src/ManifestDocumentMapper.php',
+ 'PharIo\\Manifest\\ManifestDocumentMapperException' => $vendorDir . '/phar-io/manifest/src/exceptions/ManifestDocumentMapperException.php',
+ 'PharIo\\Manifest\\ManifestElement' => $vendorDir . '/phar-io/manifest/src/xml/ManifestElement.php',
+ 'PharIo\\Manifest\\ManifestElementException' => $vendorDir . '/phar-io/manifest/src/exceptions/ManifestElementException.php',
+ '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\\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',
+ 'PharIo\\Manifest\\Requirement' => $vendorDir . '/phar-io/manifest/src/values/Requirement.php',
+ 'PharIo\\Manifest\\RequirementCollection' => $vendorDir . '/phar-io/manifest/src/values/RequirementCollection.php',
+ 'PharIo\\Manifest\\RequirementCollectionIterator' => $vendorDir . '/phar-io/manifest/src/values/RequirementCollectionIterator.php',
+ 'PharIo\\Manifest\\RequiresElement' => $vendorDir . '/phar-io/manifest/src/xml/RequiresElement.php',
+ 'PharIo\\Manifest\\Type' => $vendorDir . '/phar-io/manifest/src/values/Type.php',
+ 'PharIo\\Manifest\\Url' => $vendorDir . '/phar-io/manifest/src/values/Url.php',
+ 'PharIo\\Version\\AbstractVersionConstraint' => $vendorDir . '/phar-io/version/src/constraints/AbstractVersionConstraint.php',
+ 'PharIo\\Version\\AndVersionConstraintGroup' => $vendorDir . '/phar-io/version/src/constraints/AndVersionConstraintGroup.php',
+ 'PharIo\\Version\\AnyVersionConstraint' => $vendorDir . '/phar-io/version/src/constraints/AnyVersionConstraint.php',
+ 'PharIo\\Version\\BuildMetaData' => $vendorDir . '/phar-io/version/src/BuildMetaData.php',
+ 'PharIo\\Version\\ExactVersionConstraint' => $vendorDir . '/phar-io/version/src/constraints/ExactVersionConstraint.php',
+ 'PharIo\\Version\\Exception' => $vendorDir . '/phar-io/version/src/exceptions/Exception.php',
+ 'PharIo\\Version\\GreaterThanOrEqualToVersionConstraint' => $vendorDir . '/phar-io/version/src/constraints/GreaterThanOrEqualToVersionConstraint.php',
+ 'PharIo\\Version\\InvalidPreReleaseSuffixException' => $vendorDir . '/phar-io/version/src/exceptions/InvalidPreReleaseSuffixException.php',
+ 'PharIo\\Version\\InvalidVersionException' => $vendorDir . '/phar-io/version/src/exceptions/InvalidVersionException.php',
+ 'PharIo\\Version\\NoBuildMetaDataException' => $vendorDir . '/phar-io/version/src/exceptions/NoBuildMetaDataException.php',
+ 'PharIo\\Version\\NoPreReleaseSuffixException' => $vendorDir . '/phar-io/version/src/exceptions/NoPreReleaseSuffixException.php',
+ 'PharIo\\Version\\OrVersionConstraintGroup' => $vendorDir . '/phar-io/version/src/constraints/OrVersionConstraintGroup.php',
+ 'PharIo\\Version\\PreReleaseSuffix' => $vendorDir . '/phar-io/version/src/PreReleaseSuffix.php',
+ 'PharIo\\Version\\SpecificMajorAndMinorVersionConstraint' => $vendorDir . '/phar-io/version/src/constraints/SpecificMajorAndMinorVersionConstraint.php',
+ 'PharIo\\Version\\SpecificMajorVersionConstraint' => $vendorDir . '/phar-io/version/src/constraints/SpecificMajorVersionConstraint.php',
+ 'PharIo\\Version\\UnsupportedVersionConstraintException' => $vendorDir . '/phar-io/version/src/exceptions/UnsupportedVersionConstraintException.php',
+ 'PharIo\\Version\\Version' => $vendorDir . '/phar-io/version/src/Version.php',
+ 'PharIo\\Version\\VersionConstraint' => $vendorDir . '/phar-io/version/src/constraints/VersionConstraint.php',
+ 'PharIo\\Version\\VersionConstraintParser' => $vendorDir . '/phar-io/version/src/VersionConstraintParser.php',
+ 'PharIo\\Version\\VersionConstraintValue' => $vendorDir . '/phar-io/version/src/VersionConstraintValue.php',
+ 'PharIo\\Version\\VersionNumber' => $vendorDir . '/phar-io/version/src/VersionNumber.php',
+ 'SebastianBergmann\\CliParser\\AmbiguousOptionException' => $vendorDir . '/sebastian/cli-parser/src/exceptions/AmbiguousOptionException.php',
+ 'SebastianBergmann\\CliParser\\Exception' => $vendorDir . '/sebastian/cli-parser/src/exceptions/Exception.php',
+ 'SebastianBergmann\\CliParser\\OptionDoesNotAllowArgumentException' => $vendorDir . '/sebastian/cli-parser/src/exceptions/OptionDoesNotAllowArgumentException.php',
+ 'SebastianBergmann\\CliParser\\Parser' => $vendorDir . '/sebastian/cli-parser/src/Parser.php',
+ 'SebastianBergmann\\CliParser\\RequiredOptionArgumentMissingException' => $vendorDir . '/sebastian/cli-parser/src/exceptions/RequiredOptionArgumentMissingException.php',
+ 'SebastianBergmann\\CliParser\\UnknownOptionException' => $vendorDir . '/sebastian/cli-parser/src/exceptions/UnknownOptionException.php',
+ 'SebastianBergmann\\CodeCoverage\\BranchAndPathCoverageNotSupportedException' => $vendorDir . '/phpunit/php-code-coverage/src/Exception/BranchAndPathCoverageNotSupportedException.php',
+ 'SebastianBergmann\\CodeCoverage\\CodeCoverage' => $vendorDir . '/phpunit/php-code-coverage/src/CodeCoverage.php',
+ 'SebastianBergmann\\CodeCoverage\\DeadCodeDetectionNotSupportedException' => $vendorDir . '/phpunit/php-code-coverage/src/Exception/DeadCodeDetectionNotSupportedException.php',
+ 'SebastianBergmann\\CodeCoverage\\Driver\\Driver' => $vendorDir . '/phpunit/php-code-coverage/src/Driver/Driver.php',
+ 'SebastianBergmann\\CodeCoverage\\Driver\\PathExistsButIsNotDirectoryException' => $vendorDir . '/phpunit/php-code-coverage/src/Exception/PathExistsButIsNotDirectoryException.php',
+ 'SebastianBergmann\\CodeCoverage\\Driver\\PcovDriver' => $vendorDir . '/phpunit/php-code-coverage/src/Driver/PcovDriver.php',
+ 'SebastianBergmann\\CodeCoverage\\Driver\\PcovNotAvailableException' => $vendorDir . '/phpunit/php-code-coverage/src/Exception/PcovNotAvailableException.php',
+ 'SebastianBergmann\\CodeCoverage\\Driver\\PhpdbgDriver' => $vendorDir . '/phpunit/php-code-coverage/src/Driver/PhpdbgDriver.php',
+ 'SebastianBergmann\\CodeCoverage\\Driver\\PhpdbgNotAvailableException' => $vendorDir . '/phpunit/php-code-coverage/src/Exception/PhpdbgNotAvailableException.php',
+ 'SebastianBergmann\\CodeCoverage\\Driver\\Selector' => $vendorDir . '/phpunit/php-code-coverage/src/Driver/Selector.php',
+ 'SebastianBergmann\\CodeCoverage\\Driver\\WriteOperationFailedException' => $vendorDir . '/phpunit/php-code-coverage/src/Exception/WriteOperationFailedException.php',
+ 'SebastianBergmann\\CodeCoverage\\Driver\\WrongXdebugVersionException' => $vendorDir . '/phpunit/php-code-coverage/src/Exception/WrongXdebugVersionException.php',
+ 'SebastianBergmann\\CodeCoverage\\Driver\\Xdebug2Driver' => $vendorDir . '/phpunit/php-code-coverage/src/Driver/Xdebug2Driver.php',
+ 'SebastianBergmann\\CodeCoverage\\Driver\\Xdebug2NotEnabledException' => $vendorDir . '/phpunit/php-code-coverage/src/Exception/Xdebug2NotEnabledException.php',
+ 'SebastianBergmann\\CodeCoverage\\Driver\\Xdebug3Driver' => $vendorDir . '/phpunit/php-code-coverage/src/Driver/Xdebug3Driver.php',
+ 'SebastianBergmann\\CodeCoverage\\Driver\\Xdebug3NotEnabledException' => $vendorDir . '/phpunit/php-code-coverage/src/Exception/Xdebug3NotEnabledException.php',
+ 'SebastianBergmann\\CodeCoverage\\Driver\\XdebugNotAvailableException' => $vendorDir . '/phpunit/php-code-coverage/src/Exception/XdebugNotAvailableException.php',
+ 'SebastianBergmann\\CodeCoverage\\Exception' => $vendorDir . '/phpunit/php-code-coverage/src/Exception/Exception.php',
+ 'SebastianBergmann\\CodeCoverage\\Filter' => $vendorDir . '/phpunit/php-code-coverage/src/Filter.php',
+ 'SebastianBergmann\\CodeCoverage\\InvalidArgumentException' => $vendorDir . '/phpunit/php-code-coverage/src/Exception/InvalidArgumentException.php',
+ 'SebastianBergmann\\CodeCoverage\\NoCodeCoverageDriverAvailableException' => $vendorDir . '/phpunit/php-code-coverage/src/Exception/NoCodeCoverageDriverAvailableException.php',
+ 'SebastianBergmann\\CodeCoverage\\NoCodeCoverageDriverWithPathCoverageSupportAvailableException' => $vendorDir . '/phpunit/php-code-coverage/src/Exception/NoCodeCoverageDriverWithPathCoverageSupportAvailableException.php',
+ 'SebastianBergmann\\CodeCoverage\\Node\\AbstractNode' => $vendorDir . '/phpunit/php-code-coverage/src/Node/AbstractNode.php',
+ 'SebastianBergmann\\CodeCoverage\\Node\\Builder' => $vendorDir . '/phpunit/php-code-coverage/src/Node/Builder.php',
+ 'SebastianBergmann\\CodeCoverage\\Node\\CrapIndex' => $vendorDir . '/phpunit/php-code-coverage/src/Node/CrapIndex.php',
+ 'SebastianBergmann\\CodeCoverage\\Node\\Directory' => $vendorDir . '/phpunit/php-code-coverage/src/Node/Directory.php',
+ 'SebastianBergmann\\CodeCoverage\\Node\\File' => $vendorDir . '/phpunit/php-code-coverage/src/Node/File.php',
+ 'SebastianBergmann\\CodeCoverage\\Node\\Iterator' => $vendorDir . '/phpunit/php-code-coverage/src/Node/Iterator.php',
+ 'SebastianBergmann\\CodeCoverage\\ParserException' => $vendorDir . '/phpunit/php-code-coverage/src/Exception/ParserException.php',
+ 'SebastianBergmann\\CodeCoverage\\ProcessedCodeCoverageData' => $vendorDir . '/phpunit/php-code-coverage/src/ProcessedCodeCoverageData.php',
+ 'SebastianBergmann\\CodeCoverage\\RawCodeCoverageData' => $vendorDir . '/phpunit/php-code-coverage/src/RawCodeCoverageData.php',
+ 'SebastianBergmann\\CodeCoverage\\ReflectionException' => $vendorDir . '/phpunit/php-code-coverage/src/Exception/ReflectionException.php',
+ 'SebastianBergmann\\CodeCoverage\\ReportAlreadyFinalizedException' => $vendorDir . '/phpunit/php-code-coverage/src/Exception/ReportAlreadyFinalizedException.php',
+ 'SebastianBergmann\\CodeCoverage\\Report\\Clover' => $vendorDir . '/phpunit/php-code-coverage/src/Report/Clover.php',
+ 'SebastianBergmann\\CodeCoverage\\Report\\Cobertura' => $vendorDir . '/phpunit/php-code-coverage/src/Report/Cobertura.php',
+ 'SebastianBergmann\\CodeCoverage\\Report\\Crap4j' => $vendorDir . '/phpunit/php-code-coverage/src/Report/Crap4j.php',
+ 'SebastianBergmann\\CodeCoverage\\Report\\Html\\Dashboard' => $vendorDir . '/phpunit/php-code-coverage/src/Report/Html/Renderer/Dashboard.php',
+ 'SebastianBergmann\\CodeCoverage\\Report\\Html\\Directory' => $vendorDir . '/phpunit/php-code-coverage/src/Report/Html/Renderer/Directory.php',
+ 'SebastianBergmann\\CodeCoverage\\Report\\Html\\Facade' => $vendorDir . '/phpunit/php-code-coverage/src/Report/Html/Facade.php',
+ 'SebastianBergmann\\CodeCoverage\\Report\\Html\\File' => $vendorDir . '/phpunit/php-code-coverage/src/Report/Html/Renderer/File.php',
+ 'SebastianBergmann\\CodeCoverage\\Report\\Html\\Renderer' => $vendorDir . '/phpunit/php-code-coverage/src/Report/Html/Renderer.php',
+ 'SebastianBergmann\\CodeCoverage\\Report\\PHP' => $vendorDir . '/phpunit/php-code-coverage/src/Report/PHP.php',
+ 'SebastianBergmann\\CodeCoverage\\Report\\Text' => $vendorDir . '/phpunit/php-code-coverage/src/Report/Text.php',
+ 'SebastianBergmann\\CodeCoverage\\Report\\Xml\\BuildInformation' => $vendorDir . '/phpunit/php-code-coverage/src/Report/Xml/BuildInformation.php',
+ 'SebastianBergmann\\CodeCoverage\\Report\\Xml\\Coverage' => $vendorDir . '/phpunit/php-code-coverage/src/Report/Xml/Coverage.php',
+ 'SebastianBergmann\\CodeCoverage\\Report\\Xml\\Directory' => $vendorDir . '/phpunit/php-code-coverage/src/Report/Xml/Directory.php',
+ 'SebastianBergmann\\CodeCoverage\\Report\\Xml\\Facade' => $vendorDir . '/phpunit/php-code-coverage/src/Report/Xml/Facade.php',
+ 'SebastianBergmann\\CodeCoverage\\Report\\Xml\\File' => $vendorDir . '/phpunit/php-code-coverage/src/Report/Xml/File.php',
+ 'SebastianBergmann\\CodeCoverage\\Report\\Xml\\Method' => $vendorDir . '/phpunit/php-code-coverage/src/Report/Xml/Method.php',
+ 'SebastianBergmann\\CodeCoverage\\Report\\Xml\\Node' => $vendorDir . '/phpunit/php-code-coverage/src/Report/Xml/Node.php',
+ 'SebastianBergmann\\CodeCoverage\\Report\\Xml\\Project' => $vendorDir . '/phpunit/php-code-coverage/src/Report/Xml/Project.php',
+ 'SebastianBergmann\\CodeCoverage\\Report\\Xml\\Report' => $vendorDir . '/phpunit/php-code-coverage/src/Report/Xml/Report.php',
+ 'SebastianBergmann\\CodeCoverage\\Report\\Xml\\Source' => $vendorDir . '/phpunit/php-code-coverage/src/Report/Xml/Source.php',
+ 'SebastianBergmann\\CodeCoverage\\Report\\Xml\\Tests' => $vendorDir . '/phpunit/php-code-coverage/src/Report/Xml/Tests.php',
+ 'SebastianBergmann\\CodeCoverage\\Report\\Xml\\Totals' => $vendorDir . '/phpunit/php-code-coverage/src/Report/Xml/Totals.php',
+ 'SebastianBergmann\\CodeCoverage\\Report\\Xml\\Unit' => $vendorDir . '/phpunit/php-code-coverage/src/Report/Xml/Unit.php',
+ 'SebastianBergmann\\CodeCoverage\\StaticAnalysisCacheNotConfiguredException' => $vendorDir . '/phpunit/php-code-coverage/src/Exception/StaticAnalysisCacheNotConfiguredException.php',
+ 'SebastianBergmann\\CodeCoverage\\StaticAnalysis\\CacheWarmer' => $vendorDir . '/phpunit/php-code-coverage/src/StaticAnalysis/CacheWarmer.php',
+ 'SebastianBergmann\\CodeCoverage\\StaticAnalysis\\CachingFileAnalyser' => $vendorDir . '/phpunit/php-code-coverage/src/StaticAnalysis/CachingFileAnalyser.php',
+ 'SebastianBergmann\\CodeCoverage\\StaticAnalysis\\CodeUnitFindingVisitor' => $vendorDir . '/phpunit/php-code-coverage/src/StaticAnalysis/CodeUnitFindingVisitor.php',
+ 'SebastianBergmann\\CodeCoverage\\StaticAnalysis\\ExecutableLinesFindingVisitor' => $vendorDir . '/phpunit/php-code-coverage/src/StaticAnalysis/ExecutableLinesFindingVisitor.php',
+ 'SebastianBergmann\\CodeCoverage\\StaticAnalysis\\FileAnalyser' => $vendorDir . '/phpunit/php-code-coverage/src/StaticAnalysis/FileAnalyser.php',
+ 'SebastianBergmann\\CodeCoverage\\StaticAnalysis\\IgnoredLinesFindingVisitor' => $vendorDir . '/phpunit/php-code-coverage/src/StaticAnalysis/IgnoredLinesFindingVisitor.php',
+ 'SebastianBergmann\\CodeCoverage\\StaticAnalysis\\ParsingFileAnalyser' => $vendorDir . '/phpunit/php-code-coverage/src/StaticAnalysis/ParsingFileAnalyser.php',
+ 'SebastianBergmann\\CodeCoverage\\TestIdMissingException' => $vendorDir . '/phpunit/php-code-coverage/src/Exception/TestIdMissingException.php',
+ 'SebastianBergmann\\CodeCoverage\\UnintentionallyCoveredCodeException' => $vendorDir . '/phpunit/php-code-coverage/src/Exception/UnintentionallyCoveredCodeException.php',
+ 'SebastianBergmann\\CodeCoverage\\Util\\DirectoryCouldNotBeCreatedException' => $vendorDir . '/phpunit/php-code-coverage/src/Exception/DirectoryCouldNotBeCreatedException.php',
+ 'SebastianBergmann\\CodeCoverage\\Util\\Filesystem' => $vendorDir . '/phpunit/php-code-coverage/src/Util/Filesystem.php',
+ 'SebastianBergmann\\CodeCoverage\\Util\\Percentage' => $vendorDir . '/phpunit/php-code-coverage/src/Util/Percentage.php',
+ 'SebastianBergmann\\CodeCoverage\\Version' => $vendorDir . '/phpunit/php-code-coverage/src/Version.php',
+ 'SebastianBergmann\\CodeCoverage\\XmlException' => $vendorDir . '/phpunit/php-code-coverage/src/Exception/XmlException.php',
+ 'SebastianBergmann\\CodeUnitReverseLookup\\Wizard' => $vendorDir . '/sebastian/code-unit-reverse-lookup/src/Wizard.php',
+ 'SebastianBergmann\\CodeUnit\\ClassMethodUnit' => $vendorDir . '/sebastian/code-unit/src/ClassMethodUnit.php',
+ 'SebastianBergmann\\CodeUnit\\ClassUnit' => $vendorDir . '/sebastian/code-unit/src/ClassUnit.php',
+ 'SebastianBergmann\\CodeUnit\\CodeUnit' => $vendorDir . '/sebastian/code-unit/src/CodeUnit.php',
+ 'SebastianBergmann\\CodeUnit\\CodeUnitCollection' => $vendorDir . '/sebastian/code-unit/src/CodeUnitCollection.php',
+ 'SebastianBergmann\\CodeUnit\\CodeUnitCollectionIterator' => $vendorDir . '/sebastian/code-unit/src/CodeUnitCollectionIterator.php',
+ 'SebastianBergmann\\CodeUnit\\Exception' => $vendorDir . '/sebastian/code-unit/src/exceptions/Exception.php',
+ 'SebastianBergmann\\CodeUnit\\FunctionUnit' => $vendorDir . '/sebastian/code-unit/src/FunctionUnit.php',
+ 'SebastianBergmann\\CodeUnit\\InterfaceMethodUnit' => $vendorDir . '/sebastian/code-unit/src/InterfaceMethodUnit.php',
+ 'SebastianBergmann\\CodeUnit\\InterfaceUnit' => $vendorDir . '/sebastian/code-unit/src/InterfaceUnit.php',
+ 'SebastianBergmann\\CodeUnit\\InvalidCodeUnitException' => $vendorDir . '/sebastian/code-unit/src/exceptions/InvalidCodeUnitException.php',
+ 'SebastianBergmann\\CodeUnit\\Mapper' => $vendorDir . '/sebastian/code-unit/src/Mapper.php',
+ 'SebastianBergmann\\CodeUnit\\NoTraitException' => $vendorDir . '/sebastian/code-unit/src/exceptions/NoTraitException.php',
+ 'SebastianBergmann\\CodeUnit\\ReflectionException' => $vendorDir . '/sebastian/code-unit/src/exceptions/ReflectionException.php',
+ 'SebastianBergmann\\CodeUnit\\TraitMethodUnit' => $vendorDir . '/sebastian/code-unit/src/TraitMethodUnit.php',
+ 'SebastianBergmann\\CodeUnit\\TraitUnit' => $vendorDir . '/sebastian/code-unit/src/TraitUnit.php',
+ 'SebastianBergmann\\Comparator\\ArrayComparator' => $vendorDir . '/sebastian/comparator/src/ArrayComparator.php',
+ 'SebastianBergmann\\Comparator\\Comparator' => $vendorDir . '/sebastian/comparator/src/Comparator.php',
+ 'SebastianBergmann\\Comparator\\ComparisonFailure' => $vendorDir . '/sebastian/comparator/src/ComparisonFailure.php',
+ 'SebastianBergmann\\Comparator\\DOMNodeComparator' => $vendorDir . '/sebastian/comparator/src/DOMNodeComparator.php',
+ 'SebastianBergmann\\Comparator\\DateTimeComparator' => $vendorDir . '/sebastian/comparator/src/DateTimeComparator.php',
+ 'SebastianBergmann\\Comparator\\DoubleComparator' => $vendorDir . '/sebastian/comparator/src/DoubleComparator.php',
+ 'SebastianBergmann\\Comparator\\Exception' => $vendorDir . '/sebastian/comparator/src/exceptions/Exception.php',
+ 'SebastianBergmann\\Comparator\\ExceptionComparator' => $vendorDir . '/sebastian/comparator/src/ExceptionComparator.php',
+ 'SebastianBergmann\\Comparator\\Factory' => $vendorDir . '/sebastian/comparator/src/Factory.php',
+ 'SebastianBergmann\\Comparator\\MockObjectComparator' => $vendorDir . '/sebastian/comparator/src/MockObjectComparator.php',
+ 'SebastianBergmann\\Comparator\\NumericComparator' => $vendorDir . '/sebastian/comparator/src/NumericComparator.php',
+ 'SebastianBergmann\\Comparator\\ObjectComparator' => $vendorDir . '/sebastian/comparator/src/ObjectComparator.php',
+ 'SebastianBergmann\\Comparator\\ResourceComparator' => $vendorDir . '/sebastian/comparator/src/ResourceComparator.php',
+ 'SebastianBergmann\\Comparator\\RuntimeException' => $vendorDir . '/sebastian/comparator/src/exceptions/RuntimeException.php',
+ 'SebastianBergmann\\Comparator\\ScalarComparator' => $vendorDir . '/sebastian/comparator/src/ScalarComparator.php',
+ 'SebastianBergmann\\Comparator\\SplObjectStorageComparator' => $vendorDir . '/sebastian/comparator/src/SplObjectStorageComparator.php',
+ 'SebastianBergmann\\Comparator\\TypeComparator' => $vendorDir . '/sebastian/comparator/src/TypeComparator.php',
+ 'SebastianBergmann\\Complexity\\Calculator' => $vendorDir . '/sebastian/complexity/src/Calculator.php',
+ 'SebastianBergmann\\Complexity\\Complexity' => $vendorDir . '/sebastian/complexity/src/Complexity/Complexity.php',
+ 'SebastianBergmann\\Complexity\\ComplexityCalculatingVisitor' => $vendorDir . '/sebastian/complexity/src/Visitor/ComplexityCalculatingVisitor.php',
+ 'SebastianBergmann\\Complexity\\ComplexityCollection' => $vendorDir . '/sebastian/complexity/src/Complexity/ComplexityCollection.php',
+ 'SebastianBergmann\\Complexity\\ComplexityCollectionIterator' => $vendorDir . '/sebastian/complexity/src/Complexity/ComplexityCollectionIterator.php',
+ 'SebastianBergmann\\Complexity\\CyclomaticComplexityCalculatingVisitor' => $vendorDir . '/sebastian/complexity/src/Visitor/CyclomaticComplexityCalculatingVisitor.php',
+ 'SebastianBergmann\\Complexity\\Exception' => $vendorDir . '/sebastian/complexity/src/Exception/Exception.php',
+ 'SebastianBergmann\\Complexity\\RuntimeException' => $vendorDir . '/sebastian/complexity/src/Exception/RuntimeException.php',
+ 'SebastianBergmann\\Diff\\Chunk' => $vendorDir . '/sebastian/diff/src/Chunk.php',
+ 'SebastianBergmann\\Diff\\ConfigurationException' => $vendorDir . '/sebastian/diff/src/Exception/ConfigurationException.php',
+ 'SebastianBergmann\\Diff\\Diff' => $vendorDir . '/sebastian/diff/src/Diff.php',
+ 'SebastianBergmann\\Diff\\Differ' => $vendorDir . '/sebastian/diff/src/Differ.php',
+ 'SebastianBergmann\\Diff\\Exception' => $vendorDir . '/sebastian/diff/src/Exception/Exception.php',
+ 'SebastianBergmann\\Diff\\InvalidArgumentException' => $vendorDir . '/sebastian/diff/src/Exception/InvalidArgumentException.php',
+ 'SebastianBergmann\\Diff\\Line' => $vendorDir . '/sebastian/diff/src/Line.php',
+ 'SebastianBergmann\\Diff\\LongestCommonSubsequenceCalculator' => $vendorDir . '/sebastian/diff/src/LongestCommonSubsequenceCalculator.php',
+ 'SebastianBergmann\\Diff\\MemoryEfficientLongestCommonSubsequenceCalculator' => $vendorDir . '/sebastian/diff/src/MemoryEfficientLongestCommonSubsequenceCalculator.php',
+ 'SebastianBergmann\\Diff\\Output\\AbstractChunkOutputBuilder' => $vendorDir . '/sebastian/diff/src/Output/AbstractChunkOutputBuilder.php',
+ 'SebastianBergmann\\Diff\\Output\\DiffOnlyOutputBuilder' => $vendorDir . '/sebastian/diff/src/Output/DiffOnlyOutputBuilder.php',
+ 'SebastianBergmann\\Diff\\Output\\DiffOutputBuilderInterface' => $vendorDir . '/sebastian/diff/src/Output/DiffOutputBuilderInterface.php',
+ 'SebastianBergmann\\Diff\\Output\\StrictUnifiedDiffOutputBuilder' => $vendorDir . '/sebastian/diff/src/Output/StrictUnifiedDiffOutputBuilder.php',
+ 'SebastianBergmann\\Diff\\Output\\UnifiedDiffOutputBuilder' => $vendorDir . '/sebastian/diff/src/Output/UnifiedDiffOutputBuilder.php',
+ 'SebastianBergmann\\Diff\\Parser' => $vendorDir . '/sebastian/diff/src/Parser.php',
+ 'SebastianBergmann\\Diff\\TimeEfficientLongestCommonSubsequenceCalculator' => $vendorDir . '/sebastian/diff/src/TimeEfficientLongestCommonSubsequenceCalculator.php',
+ 'SebastianBergmann\\Environment\\Console' => $vendorDir . '/sebastian/environment/src/Console.php',
+ 'SebastianBergmann\\Environment\\OperatingSystem' => $vendorDir . '/sebastian/environment/src/OperatingSystem.php',
+ 'SebastianBergmann\\Environment\\Runtime' => $vendorDir . '/sebastian/environment/src/Runtime.php',
+ 'SebastianBergmann\\Exporter\\Exporter' => $vendorDir . '/sebastian/exporter/src/Exporter.php',
+ 'SebastianBergmann\\FileIterator\\Facade' => $vendorDir . '/phpunit/php-file-iterator/src/Facade.php',
+ 'SebastianBergmann\\FileIterator\\Factory' => $vendorDir . '/phpunit/php-file-iterator/src/Factory.php',
+ 'SebastianBergmann\\FileIterator\\Iterator' => $vendorDir . '/phpunit/php-file-iterator/src/Iterator.php',
+ 'SebastianBergmann\\GlobalState\\CodeExporter' => $vendorDir . '/sebastian/global-state/src/CodeExporter.php',
+ 'SebastianBergmann\\GlobalState\\Exception' => $vendorDir . '/sebastian/global-state/src/exceptions/Exception.php',
+ 'SebastianBergmann\\GlobalState\\ExcludeList' => $vendorDir . '/sebastian/global-state/src/ExcludeList.php',
+ 'SebastianBergmann\\GlobalState\\Restorer' => $vendorDir . '/sebastian/global-state/src/Restorer.php',
+ 'SebastianBergmann\\GlobalState\\RuntimeException' => $vendorDir . '/sebastian/global-state/src/exceptions/RuntimeException.php',
+ 'SebastianBergmann\\GlobalState\\Snapshot' => $vendorDir . '/sebastian/global-state/src/Snapshot.php',
+ 'SebastianBergmann\\Invoker\\Exception' => $vendorDir . '/phpunit/php-invoker/src/exceptions/Exception.php',
+ 'SebastianBergmann\\Invoker\\Invoker' => $vendorDir . '/phpunit/php-invoker/src/Invoker.php',
+ 'SebastianBergmann\\Invoker\\ProcessControlExtensionNotLoadedException' => $vendorDir . '/phpunit/php-invoker/src/exceptions/ProcessControlExtensionNotLoadedException.php',
+ 'SebastianBergmann\\Invoker\\TimeoutException' => $vendorDir . '/phpunit/php-invoker/src/exceptions/TimeoutException.php',
+ 'SebastianBergmann\\LinesOfCode\\Counter' => $vendorDir . '/sebastian/lines-of-code/src/Counter.php',
+ 'SebastianBergmann\\LinesOfCode\\Exception' => $vendorDir . '/sebastian/lines-of-code/src/Exception/Exception.php',
+ 'SebastianBergmann\\LinesOfCode\\IllogicalValuesException' => $vendorDir . '/sebastian/lines-of-code/src/Exception/IllogicalValuesException.php',
+ 'SebastianBergmann\\LinesOfCode\\LineCountingVisitor' => $vendorDir . '/sebastian/lines-of-code/src/LineCountingVisitor.php',
+ 'SebastianBergmann\\LinesOfCode\\LinesOfCode' => $vendorDir . '/sebastian/lines-of-code/src/LinesOfCode.php',
+ 'SebastianBergmann\\LinesOfCode\\NegativeValueException' => $vendorDir . '/sebastian/lines-of-code/src/Exception/NegativeValueException.php',
+ 'SebastianBergmann\\LinesOfCode\\RuntimeException' => $vendorDir . '/sebastian/lines-of-code/src/Exception/RuntimeException.php',
+ 'SebastianBergmann\\ObjectEnumerator\\Enumerator' => $vendorDir . '/sebastian/object-enumerator/src/Enumerator.php',
+ 'SebastianBergmann\\ObjectEnumerator\\Exception' => $vendorDir . '/sebastian/object-enumerator/src/Exception.php',
+ 'SebastianBergmann\\ObjectEnumerator\\InvalidArgumentException' => $vendorDir . '/sebastian/object-enumerator/src/InvalidArgumentException.php',
+ 'SebastianBergmann\\ObjectReflector\\Exception' => $vendorDir . '/sebastian/object-reflector/src/Exception.php',
+ 'SebastianBergmann\\ObjectReflector\\InvalidArgumentException' => $vendorDir . '/sebastian/object-reflector/src/InvalidArgumentException.php',
+ 'SebastianBergmann\\ObjectReflector\\ObjectReflector' => $vendorDir . '/sebastian/object-reflector/src/ObjectReflector.php',
+ 'SebastianBergmann\\RecursionContext\\Context' => $vendorDir . '/sebastian/recursion-context/src/Context.php',
+ 'SebastianBergmann\\RecursionContext\\Exception' => $vendorDir . '/sebastian/recursion-context/src/Exception.php',
+ 'SebastianBergmann\\RecursionContext\\InvalidArgumentException' => $vendorDir . '/sebastian/recursion-context/src/InvalidArgumentException.php',
+ 'SebastianBergmann\\ResourceOperations\\ResourceOperations' => $vendorDir . '/sebastian/resource-operations/src/ResourceOperations.php',
+ 'SebastianBergmann\\Template\\Exception' => $vendorDir . '/phpunit/php-text-template/src/exceptions/Exception.php',
+ 'SebastianBergmann\\Template\\InvalidArgumentException' => $vendorDir . '/phpunit/php-text-template/src/exceptions/InvalidArgumentException.php',
+ 'SebastianBergmann\\Template\\RuntimeException' => $vendorDir . '/phpunit/php-text-template/src/exceptions/RuntimeException.php',
+ 'SebastianBergmann\\Template\\Template' => $vendorDir . '/phpunit/php-text-template/src/Template.php',
+ 'SebastianBergmann\\Timer\\Duration' => $vendorDir . '/phpunit/php-timer/src/Duration.php',
+ 'SebastianBergmann\\Timer\\Exception' => $vendorDir . '/phpunit/php-timer/src/exceptions/Exception.php',
+ 'SebastianBergmann\\Timer\\NoActiveTimerException' => $vendorDir . '/phpunit/php-timer/src/exceptions/NoActiveTimerException.php',
+ 'SebastianBergmann\\Timer\\ResourceUsageFormatter' => $vendorDir . '/phpunit/php-timer/src/ResourceUsageFormatter.php',
+ 'SebastianBergmann\\Timer\\TimeSinceStartOfRequestNotAvailableException' => $vendorDir . '/phpunit/php-timer/src/exceptions/TimeSinceStartOfRequestNotAvailableException.php',
+ 'SebastianBergmann\\Timer\\Timer' => $vendorDir . '/phpunit/php-timer/src/Timer.php',
+ 'SebastianBergmann\\Type\\CallableType' => $vendorDir . '/sebastian/type/src/type/CallableType.php',
+ 'SebastianBergmann\\Type\\Exception' => $vendorDir . '/sebastian/type/src/exception/Exception.php',
+ 'SebastianBergmann\\Type\\FalseType' => $vendorDir . '/sebastian/type/src/type/FalseType.php',
+ 'SebastianBergmann\\Type\\GenericObjectType' => $vendorDir . '/sebastian/type/src/type/GenericObjectType.php',
+ 'SebastianBergmann\\Type\\IntersectionType' => $vendorDir . '/sebastian/type/src/type/IntersectionType.php',
+ 'SebastianBergmann\\Type\\IterableType' => $vendorDir . '/sebastian/type/src/type/IterableType.php',
+ 'SebastianBergmann\\Type\\MixedType' => $vendorDir . '/sebastian/type/src/type/MixedType.php',
+ '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',
+ 'SebastianBergmann\\Type\\UnknownType' => $vendorDir . '/sebastian/type/src/type/UnknownType.php',
+ 'SebastianBergmann\\Type\\VoidType' => $vendorDir . '/sebastian/type/src/type/VoidType.php',
+ 'SebastianBergmann\\Version' => $vendorDir . '/sebastian/version/src/Version.php',
+ 'TheSeer\\Tokenizer\\Exception' => $vendorDir . '/theseer/tokenizer/src/Exception.php',
+ 'TheSeer\\Tokenizer\\NamespaceUri' => $vendorDir . '/theseer/tokenizer/src/NamespaceUri.php',
+ 'TheSeer\\Tokenizer\\NamespaceUriException' => $vendorDir . '/theseer/tokenizer/src/NamespaceUriException.php',
+ 'TheSeer\\Tokenizer\\Token' => $vendorDir . '/theseer/tokenizer/src/Token.php',
+ 'TheSeer\\Tokenizer\\TokenCollection' => $vendorDir . '/theseer/tokenizer/src/TokenCollection.php',
+ 'TheSeer\\Tokenizer\\TokenCollectionException' => $vendorDir . '/theseer/tokenizer/src/TokenCollectionException.php',
+ 'TheSeer\\Tokenizer\\Tokenizer' => $vendorDir . '/theseer/tokenizer/src/Tokenizer.php',
+ 'TheSeer\\Tokenizer\\XMLSerializer' => $vendorDir . '/theseer/tokenizer/src/XMLSerializer.php',
+ 'WP_Mock' => $vendorDir . '/10up/wp_mock/php/WP_Mock.php',
);
diff --git a/vendor/composer/autoload_files.php b/vendor/composer/autoload_files.php
new file mode 100644
index 00000000..00440ee1
--- /dev/null
+++ b/vendor/composer/autoload_files.php
@@ -0,0 +1,11 @@
+ $vendorDir . '/myclabs/deep-copy/src/DeepCopy/deep_copy.php',
+ 'ec07570ca5a812141189b1fa81503674' => $vendorDir . '/phpunit/phpunit/src/Framework/Assert/Functions.php',
+);
diff --git a/vendor/composer/autoload_namespaces.php b/vendor/composer/autoload_namespaces.php
index c3cd0229..24d49857 100644
--- a/vendor/composer/autoload_namespaces.php
+++ b/vendor/composer/autoload_namespaces.php
@@ -6,5 +6,7 @@
$baseDir = dirname($vendorDir);
return array(
+ 'TOGoS_GitIgnore_' => array($vendorDir . '/togos/gitignore/src/main/php'),
'Pimple' => array($vendorDir . '/pimple/pimple/src'),
+ 'Mockery' => array($vendorDir . '/mockery/mockery/library'),
);
diff --git a/vendor/composer/autoload_psr4.php b/vendor/composer/autoload_psr4.php
index 8cc4e05a..df0056d3 100644
--- a/vendor/composer/autoload_psr4.php
+++ b/vendor/composer/autoload_psr4.php
@@ -6,6 +6,14 @@
$baseDir = dirname($vendorDir);
return array(
+ 'WP_Mock\\' => array($vendorDir . '/10up/wp_mock/php/WP_Mock'),
+ 'VariableAnalysis\\' => array($vendorDir . '/sirbrillig/phpcs-variable-analysis/VariableAnalysis'),
+ 'RtCamp\\GoogleLogin\\Tests\\' => array($baseDir . '/tests/php'),
'RtCamp\\GoogleLogin\\' => array($baseDir . '/src'),
'Psr\\Container\\' => array($vendorDir . '/psr/container/src'),
+ 'PhpParser\\' => array($vendorDir . '/nikic/php-parser/lib/PhpParser'),
+ 'LastCall\\DownloadsPlugin\\' => array($vendorDir . '/civicrm/composer-downloads-plugin/src'),
+ 'Doctrine\\Instantiator\\' => array($vendorDir . '/doctrine/instantiator/src/Doctrine/Instantiator'),
+ 'DeepCopy\\' => array($vendorDir . '/myclabs/deep-copy/src/DeepCopy'),
+ 'Dealerdirect\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\' => array($vendorDir . '/dealerdirect/phpcodesniffer-composer-installer/src'),
);
diff --git a/vendor/composer/autoload_real.php b/vendor/composer/autoload_real.php
index d90c45be..c8dfb816 100644
--- a/vendor/composer/autoload_real.php
+++ b/vendor/composer/autoload_real.php
@@ -22,13 +22,15 @@ public static function getLoader()
return self::$loader;
}
+ require __DIR__ . '/platform_check.php';
+
spl_autoload_register(array('ComposerAutoloaderInit414112f68a04b4d078687d18b2bb675e', 'loadClassLoader'), true, true);
- self::$loader = $loader = new \Composer\Autoload\ClassLoader();
+ self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__)));
spl_autoload_unregister(array('ComposerAutoloaderInit414112f68a04b4d078687d18b2bb675e', 'loadClassLoader'));
$useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
if ($useStaticLoader) {
- require_once __DIR__ . '/autoload_static.php';
+ require __DIR__ . '/autoload_static.php';
call_user_func(\Composer\Autoload\ComposerStaticInit414112f68a04b4d078687d18b2bb675e::getInitializer($loader));
} else {
@@ -50,6 +52,29 @@ public static function getLoader()
$loader->register(true);
+ if ($useStaticLoader) {
+ $includeFiles = Composer\Autoload\ComposerStaticInit414112f68a04b4d078687d18b2bb675e::$files;
+ } else {
+ $includeFiles = require __DIR__ . '/autoload_files.php';
+ }
+ foreach ($includeFiles as $fileIdentifier => $file) {
+ composerRequire414112f68a04b4d078687d18b2bb675e($fileIdentifier, $file);
+ }
+
return $loader;
}
}
+
+/**
+ * @param string $fileIdentifier
+ * @param string $file
+ * @return void
+ */
+function composerRequire414112f68a04b4d078687d18b2bb675e($fileIdentifier, $file)
+{
+ if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
+ $GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;
+
+ require $file;
+ }
+}
diff --git a/vendor/composer/autoload_static.php b/vendor/composer/autoload_static.php
index 5f324ac3..70fbac35 100644
--- a/vendor/composer/autoload_static.php
+++ b/vendor/composer/autoload_static.php
@@ -6,18 +6,55 @@
class ComposerStaticInit414112f68a04b4d078687d18b2bb675e
{
+ public static $files = array (
+ '6124b4c8570aa390c21fafd04a26c69f' => __DIR__ . '/..' . '/myclabs/deep-copy/src/DeepCopy/deep_copy.php',
+ 'ec07570ca5a812141189b1fa81503674' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Assert/Functions.php',
+ );
+
public static $prefixLengthsPsr4 = array (
+ 'W' =>
+ array (
+ 'WP_Mock\\' => 8,
+ ),
+ 'V' =>
+ array (
+ 'VariableAnalysis\\' => 17,
+ ),
'R' =>
array (
+ 'RtCamp\\GoogleLogin\\Tests\\' => 25,
'RtCamp\\GoogleLogin\\' => 19,
),
'P' =>
array (
'Psr\\Container\\' => 14,
+ 'PhpParser\\' => 10,
+ ),
+ 'L' =>
+ array (
+ 'LastCall\\DownloadsPlugin\\' => 25,
+ ),
+ 'D' =>
+ array (
+ 'Doctrine\\Instantiator\\' => 22,
+ 'DeepCopy\\' => 9,
+ 'Dealerdirect\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\' => 55,
),
);
public static $prefixDirsPsr4 = array (
+ 'WP_Mock\\' =>
+ array (
+ 0 => __DIR__ . '/..' . '/10up/wp_mock/php/WP_Mock',
+ ),
+ 'VariableAnalysis\\' =>
+ array (
+ 0 => __DIR__ . '/..' . '/sirbrillig/phpcs-variable-analysis/VariableAnalysis',
+ ),
+ 'RtCamp\\GoogleLogin\\Tests\\' =>
+ array (
+ 0 => __DIR__ . '/../..' . '/tests/php',
+ ),
'RtCamp\\GoogleLogin\\' =>
array (
0 => __DIR__ . '/../..' . '/src',
@@ -26,9 +63,36 @@ class ComposerStaticInit414112f68a04b4d078687d18b2bb675e
array (
0 => __DIR__ . '/..' . '/psr/container/src',
),
+ 'PhpParser\\' =>
+ array (
+ 0 => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser',
+ ),
+ 'LastCall\\DownloadsPlugin\\' =>
+ array (
+ 0 => __DIR__ . '/..' . '/civicrm/composer-downloads-plugin/src',
+ ),
+ 'Doctrine\\Instantiator\\' =>
+ array (
+ 0 => __DIR__ . '/..' . '/doctrine/instantiator/src/Doctrine/Instantiator',
+ ),
+ 'DeepCopy\\' =>
+ array (
+ 0 => __DIR__ . '/..' . '/myclabs/deep-copy/src/DeepCopy',
+ ),
+ 'Dealerdirect\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\' =>
+ array (
+ 0 => __DIR__ . '/..' . '/dealerdirect/phpcodesniffer-composer-installer/src',
+ ),
);
public static $prefixesPsr0 = array (
+ 'T' =>
+ array (
+ 'TOGoS_GitIgnore_' =>
+ array (
+ 0 => __DIR__ . '/..' . '/togos/gitignore/src/main/php',
+ ),
+ ),
'P' =>
array (
'Pimple' =>
@@ -36,6 +100,713 @@ class ComposerStaticInit414112f68a04b4d078687d18b2bb675e
0 => __DIR__ . '/..' . '/pimple/pimple/src',
),
),
+ 'M' =>
+ array (
+ 'Mockery' =>
+ array (
+ 0 => __DIR__ . '/..' . '/mockery/mockery/library',
+ ),
+ ),
+ );
+
+ public static $classMap = array (
+ 'Composer\\InstalledVersions' => __DIR__ . '/..' . '/composer/InstalledVersions.php',
+ 'Hamcrest\\Arrays\\IsArray' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/IsArray.php',
+ 'Hamcrest\\Arrays\\IsArrayContaining' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/IsArrayContaining.php',
+ 'Hamcrest\\Arrays\\IsArrayContainingInAnyOrder' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/IsArrayContainingInAnyOrder.php',
+ 'Hamcrest\\Arrays\\IsArrayContainingInOrder' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/IsArrayContainingInOrder.php',
+ 'Hamcrest\\Arrays\\IsArrayContainingKey' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/IsArrayContainingKey.php',
+ 'Hamcrest\\Arrays\\IsArrayContainingKeyValuePair' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/IsArrayContainingKeyValuePair.php',
+ 'Hamcrest\\Arrays\\IsArrayWithSize' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/IsArrayWithSize.php',
+ 'Hamcrest\\Arrays\\MatchingOnce' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/MatchingOnce.php',
+ 'Hamcrest\\Arrays\\SeriesMatchingOnce' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/SeriesMatchingOnce.php',
+ 'Hamcrest\\AssertionError' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/AssertionError.php',
+ 'Hamcrest\\BaseDescription' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/BaseDescription.php',
+ 'Hamcrest\\BaseMatcher' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/BaseMatcher.php',
+ 'Hamcrest\\Collection\\IsEmptyTraversable' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Collection/IsEmptyTraversable.php',
+ 'Hamcrest\\Collection\\IsTraversableWithSize' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Collection/IsTraversableWithSize.php',
+ 'Hamcrest\\Core\\AllOf' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/AllOf.php',
+ 'Hamcrest\\Core\\AnyOf' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/AnyOf.php',
+ 'Hamcrest\\Core\\CombinableMatcher' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/CombinableMatcher.php',
+ 'Hamcrest\\Core\\DescribedAs' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/DescribedAs.php',
+ 'Hamcrest\\Core\\Every' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/Every.php',
+ 'Hamcrest\\Core\\HasToString' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/HasToString.php',
+ 'Hamcrest\\Core\\Is' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/Is.php',
+ 'Hamcrest\\Core\\IsAnything' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsAnything.php',
+ 'Hamcrest\\Core\\IsCollectionContaining' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsCollectionContaining.php',
+ 'Hamcrest\\Core\\IsEqual' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsEqual.php',
+ 'Hamcrest\\Core\\IsIdentical' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsIdentical.php',
+ 'Hamcrest\\Core\\IsInstanceOf' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsInstanceOf.php',
+ 'Hamcrest\\Core\\IsNot' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsNot.php',
+ 'Hamcrest\\Core\\IsNull' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsNull.php',
+ 'Hamcrest\\Core\\IsSame' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsSame.php',
+ 'Hamcrest\\Core\\IsTypeOf' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsTypeOf.php',
+ 'Hamcrest\\Core\\Set' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/Set.php',
+ 'Hamcrest\\Core\\ShortcutCombination' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/ShortcutCombination.php',
+ 'Hamcrest\\Description' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Description.php',
+ 'Hamcrest\\DiagnosingMatcher' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/DiagnosingMatcher.php',
+ 'Hamcrest\\FeatureMatcher' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/FeatureMatcher.php',
+ 'Hamcrest\\Internal\\SelfDescribingValue' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Internal/SelfDescribingValue.php',
+ 'Hamcrest\\Matcher' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Matcher.php',
+ 'Hamcrest\\MatcherAssert' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/MatcherAssert.php',
+ 'Hamcrest\\Matchers' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Matchers.php',
+ 'Hamcrest\\NullDescription' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/NullDescription.php',
+ 'Hamcrest\\Number\\IsCloseTo' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Number/IsCloseTo.php',
+ 'Hamcrest\\Number\\OrderingComparison' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Number/OrderingComparison.php',
+ 'Hamcrest\\SelfDescribing' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/SelfDescribing.php',
+ 'Hamcrest\\StringDescription' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/StringDescription.php',
+ 'Hamcrest\\Text\\IsEmptyString' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/IsEmptyString.php',
+ 'Hamcrest\\Text\\IsEqualIgnoringCase' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/IsEqualIgnoringCase.php',
+ 'Hamcrest\\Text\\IsEqualIgnoringWhiteSpace' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/IsEqualIgnoringWhiteSpace.php',
+ 'Hamcrest\\Text\\MatchesPattern' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/MatchesPattern.php',
+ 'Hamcrest\\Text\\StringContains' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/StringContains.php',
+ 'Hamcrest\\Text\\StringContainsIgnoringCase' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/StringContainsIgnoringCase.php',
+ 'Hamcrest\\Text\\StringContainsInOrder' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/StringContainsInOrder.php',
+ 'Hamcrest\\Text\\StringEndsWith' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/StringEndsWith.php',
+ 'Hamcrest\\Text\\StringStartsWith' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/StringStartsWith.php',
+ 'Hamcrest\\Text\\SubstringMatcher' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/SubstringMatcher.php',
+ 'Hamcrest\\TypeSafeDiagnosingMatcher' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/TypeSafeDiagnosingMatcher.php',
+ 'Hamcrest\\TypeSafeMatcher' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/TypeSafeMatcher.php',
+ 'Hamcrest\\Type\\IsArray' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Type/IsArray.php',
+ 'Hamcrest\\Type\\IsBoolean' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Type/IsBoolean.php',
+ 'Hamcrest\\Type\\IsCallable' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Type/IsCallable.php',
+ 'Hamcrest\\Type\\IsDouble' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Type/IsDouble.php',
+ 'Hamcrest\\Type\\IsInteger' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Type/IsInteger.php',
+ 'Hamcrest\\Type\\IsNumeric' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Type/IsNumeric.php',
+ 'Hamcrest\\Type\\IsObject' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Type/IsObject.php',
+ 'Hamcrest\\Type\\IsResource' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Type/IsResource.php',
+ 'Hamcrest\\Type\\IsScalar' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Type/IsScalar.php',
+ 'Hamcrest\\Type\\IsString' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Type/IsString.php',
+ 'Hamcrest\\Util' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Util.php',
+ 'Hamcrest\\Xml\\HasXPath' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Xml/HasXPath.php',
+ 'PHPUnit\\Exception' => __DIR__ . '/..' . '/phpunit/phpunit/src/Exception.php',
+ 'PHPUnit\\Framework\\ActualValueIsNotAnObjectException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Exception/ActualValueIsNotAnObjectException.php',
+ 'PHPUnit\\Framework\\Assert' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Assert.php',
+ 'PHPUnit\\Framework\\AssertionFailedError' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Exception/AssertionFailedError.php',
+ 'PHPUnit\\Framework\\CodeCoverageException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Exception/CodeCoverageException.php',
+ 'PHPUnit\\Framework\\ComparisonMethodDoesNotAcceptParameterTypeException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Exception/ComparisonMethodDoesNotAcceptParameterTypeException.php',
+ 'PHPUnit\\Framework\\ComparisonMethodDoesNotDeclareBoolReturnTypeException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Exception/ComparisonMethodDoesNotDeclareBoolReturnTypeException.php',
+ 'PHPUnit\\Framework\\ComparisonMethodDoesNotDeclareExactlyOneParameterException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Exception/ComparisonMethodDoesNotDeclareExactlyOneParameterException.php',
+ 'PHPUnit\\Framework\\ComparisonMethodDoesNotDeclareParameterTypeException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Exception/ComparisonMethodDoesNotDeclareParameterTypeException.php',
+ 'PHPUnit\\Framework\\ComparisonMethodDoesNotExistException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Exception/ComparisonMethodDoesNotExistException.php',
+ 'PHPUnit\\Framework\\Constraint\\ArrayHasKey' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Traversable/ArrayHasKey.php',
+ 'PHPUnit\\Framework\\Constraint\\BinaryOperator' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Operator/BinaryOperator.php',
+ 'PHPUnit\\Framework\\Constraint\\Callback' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Callback.php',
+ 'PHPUnit\\Framework\\Constraint\\ClassHasAttribute' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Object/ClassHasAttribute.php',
+ 'PHPUnit\\Framework\\Constraint\\ClassHasStaticAttribute' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Object/ClassHasStaticAttribute.php',
+ 'PHPUnit\\Framework\\Constraint\\Constraint' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Constraint.php',
+ 'PHPUnit\\Framework\\Constraint\\Count' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Cardinality/Count.php',
+ 'PHPUnit\\Framework\\Constraint\\DirectoryExists' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Filesystem/DirectoryExists.php',
+ 'PHPUnit\\Framework\\Constraint\\Exception' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Exception/Exception.php',
+ 'PHPUnit\\Framework\\Constraint\\ExceptionCode' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Exception/ExceptionCode.php',
+ 'PHPUnit\\Framework\\Constraint\\ExceptionMessage' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Exception/ExceptionMessage.php',
+ 'PHPUnit\\Framework\\Constraint\\ExceptionMessageRegularExpression' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Exception/ExceptionMessageRegularExpression.php',
+ 'PHPUnit\\Framework\\Constraint\\FileExists' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Filesystem/FileExists.php',
+ 'PHPUnit\\Framework\\Constraint\\GreaterThan' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Cardinality/GreaterThan.php',
+ 'PHPUnit\\Framework\\Constraint\\IsAnything' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/IsAnything.php',
+ 'PHPUnit\\Framework\\Constraint\\IsEmpty' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Cardinality/IsEmpty.php',
+ 'PHPUnit\\Framework\\Constraint\\IsEqual' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Equality/IsEqual.php',
+ 'PHPUnit\\Framework\\Constraint\\IsEqualCanonicalizing' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Equality/IsEqualCanonicalizing.php',
+ 'PHPUnit\\Framework\\Constraint\\IsEqualIgnoringCase' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Equality/IsEqualIgnoringCase.php',
+ 'PHPUnit\\Framework\\Constraint\\IsEqualWithDelta' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Equality/IsEqualWithDelta.php',
+ 'PHPUnit\\Framework\\Constraint\\IsFalse' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Boolean/IsFalse.php',
+ 'PHPUnit\\Framework\\Constraint\\IsFinite' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Math/IsFinite.php',
+ 'PHPUnit\\Framework\\Constraint\\IsIdentical' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/IsIdentical.php',
+ 'PHPUnit\\Framework\\Constraint\\IsInfinite' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Math/IsInfinite.php',
+ 'PHPUnit\\Framework\\Constraint\\IsInstanceOf' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Type/IsInstanceOf.php',
+ 'PHPUnit\\Framework\\Constraint\\IsJson' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/String/IsJson.php',
+ 'PHPUnit\\Framework\\Constraint\\IsNan' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Math/IsNan.php',
+ 'PHPUnit\\Framework\\Constraint\\IsNull' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Type/IsNull.php',
+ 'PHPUnit\\Framework\\Constraint\\IsReadable' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Filesystem/IsReadable.php',
+ 'PHPUnit\\Framework\\Constraint\\IsTrue' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Boolean/IsTrue.php',
+ 'PHPUnit\\Framework\\Constraint\\IsType' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Type/IsType.php',
+ 'PHPUnit\\Framework\\Constraint\\IsWritable' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Filesystem/IsWritable.php',
+ 'PHPUnit\\Framework\\Constraint\\JsonMatches' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/JsonMatches.php',
+ 'PHPUnit\\Framework\\Constraint\\JsonMatchesErrorMessageProvider' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/JsonMatchesErrorMessageProvider.php',
+ 'PHPUnit\\Framework\\Constraint\\LessThan' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Cardinality/LessThan.php',
+ 'PHPUnit\\Framework\\Constraint\\LogicalAnd' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Operator/LogicalAnd.php',
+ 'PHPUnit\\Framework\\Constraint\\LogicalNot' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Operator/LogicalNot.php',
+ 'PHPUnit\\Framework\\Constraint\\LogicalOr' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Operator/LogicalOr.php',
+ '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\\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',
+ 'PHPUnit\\Framework\\Constraint\\StringContains' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/String/StringContains.php',
+ 'PHPUnit\\Framework\\Constraint\\StringEndsWith' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/String/StringEndsWith.php',
+ 'PHPUnit\\Framework\\Constraint\\StringMatchesFormatDescription' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/String/StringMatchesFormatDescription.php',
+ 'PHPUnit\\Framework\\Constraint\\StringStartsWith' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/String/StringStartsWith.php',
+ 'PHPUnit\\Framework\\Constraint\\TraversableContains' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Traversable/TraversableContains.php',
+ 'PHPUnit\\Framework\\Constraint\\TraversableContainsEqual' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Traversable/TraversableContainsEqual.php',
+ 'PHPUnit\\Framework\\Constraint\\TraversableContainsIdentical' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Traversable/TraversableContainsIdentical.php',
+ 'PHPUnit\\Framework\\Constraint\\TraversableContainsOnly' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Traversable/TraversableContainsOnly.php',
+ 'PHPUnit\\Framework\\Constraint\\UnaryOperator' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Operator/UnaryOperator.php',
+ 'PHPUnit\\Framework\\CoveredCodeNotExecutedException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Exception/CoveredCodeNotExecutedException.php',
+ 'PHPUnit\\Framework\\DataProviderTestSuite' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/DataProviderTestSuite.php',
+ 'PHPUnit\\Framework\\Error' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Exception/Error.php',
+ 'PHPUnit\\Framework\\ErrorTestCase' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/ErrorTestCase.php',
+ 'PHPUnit\\Framework\\Error\\Deprecated' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Error/Deprecated.php',
+ 'PHPUnit\\Framework\\Error\\Error' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Error/Error.php',
+ 'PHPUnit\\Framework\\Error\\Notice' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Error/Notice.php',
+ 'PHPUnit\\Framework\\Error\\Warning' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Error/Warning.php',
+ 'PHPUnit\\Framework\\Exception' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Exception/Exception.php',
+ 'PHPUnit\\Framework\\ExceptionWrapper' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/ExceptionWrapper.php',
+ 'PHPUnit\\Framework\\ExecutionOrderDependency' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/ExecutionOrderDependency.php',
+ 'PHPUnit\\Framework\\ExpectationFailedException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Exception/ExpectationFailedException.php',
+ 'PHPUnit\\Framework\\IncompleteTest' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/IncompleteTest.php',
+ 'PHPUnit\\Framework\\IncompleteTestCase' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/IncompleteTestCase.php',
+ 'PHPUnit\\Framework\\IncompleteTestError' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Exception/IncompleteTestError.php',
+ 'PHPUnit\\Framework\\InvalidArgumentException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Exception/InvalidArgumentException.php',
+ 'PHPUnit\\Framework\\InvalidCoversTargetException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Exception/InvalidCoversTargetException.php',
+ 'PHPUnit\\Framework\\InvalidDataProviderException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Exception/InvalidDataProviderException.php',
+ 'PHPUnit\\Framework\\InvalidParameterGroupException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/InvalidParameterGroupException.php',
+ 'PHPUnit\\Framework\\MissingCoversAnnotationException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Exception/MissingCoversAnnotationException.php',
+ 'PHPUnit\\Framework\\MockObject\\Api' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Api/Api.php',
+ 'PHPUnit\\Framework\\MockObject\\BadMethodCallException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Exception/BadMethodCallException.php',
+ 'PHPUnit\\Framework\\MockObject\\Builder\\Identity' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Builder/Identity.php',
+ 'PHPUnit\\Framework\\MockObject\\Builder\\InvocationMocker' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Builder/InvocationMocker.php',
+ 'PHPUnit\\Framework\\MockObject\\Builder\\InvocationStubber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Builder/InvocationStubber.php',
+ 'PHPUnit\\Framework\\MockObject\\Builder\\MethodNameMatch' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Builder/MethodNameMatch.php',
+ 'PHPUnit\\Framework\\MockObject\\Builder\\ParametersMatch' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Builder/ParametersMatch.php',
+ 'PHPUnit\\Framework\\MockObject\\Builder\\Stub' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Builder/Stub.php',
+ 'PHPUnit\\Framework\\MockObject\\CannotUseAddMethodsException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Exception/CannotUseAddMethodsException.php',
+ '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',
+ 'PHPUnit\\Framework\\MockObject\\Exception' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Exception/Exception.php',
+ 'PHPUnit\\Framework\\MockObject\\Generator' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Generator.php',
+ 'PHPUnit\\Framework\\MockObject\\IncompatibleReturnValueException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Exception/IncompatibleReturnValueException.php',
+ 'PHPUnit\\Framework\\MockObject\\InvalidMethodNameException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Exception/InvalidMethodNameException.php',
+ 'PHPUnit\\Framework\\MockObject\\Invocation' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Invocation.php',
+ 'PHPUnit\\Framework\\MockObject\\InvocationHandler' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/InvocationHandler.php',
+ 'PHPUnit\\Framework\\MockObject\\MatchBuilderNotFoundException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Exception/MatchBuilderNotFoundException.php',
+ 'PHPUnit\\Framework\\MockObject\\Matcher' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Matcher.php',
+ 'PHPUnit\\Framework\\MockObject\\MatcherAlreadyRegisteredException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Exception/MatcherAlreadyRegisteredException.php',
+ 'PHPUnit\\Framework\\MockObject\\Method' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Api/Method.php',
+ 'PHPUnit\\Framework\\MockObject\\MethodCannotBeConfiguredException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Exception/MethodCannotBeConfiguredException.php',
+ 'PHPUnit\\Framework\\MockObject\\MethodNameAlreadyConfiguredException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Exception/MethodNameAlreadyConfiguredException.php',
+ 'PHPUnit\\Framework\\MockObject\\MethodNameConstraint' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/MethodNameConstraint.php',
+ 'PHPUnit\\Framework\\MockObject\\MethodNameNotConfiguredException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Exception/MethodNameNotConfiguredException.php',
+ 'PHPUnit\\Framework\\MockObject\\MethodParametersAlreadyConfiguredException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Exception/MethodParametersAlreadyConfiguredException.php',
+ 'PHPUnit\\Framework\\MockObject\\MockBuilder' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/MockBuilder.php',
+ 'PHPUnit\\Framework\\MockObject\\MockClass' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/MockClass.php',
+ 'PHPUnit\\Framework\\MockObject\\MockMethod' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/MockMethod.php',
+ 'PHPUnit\\Framework\\MockObject\\MockMethodSet' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/MockMethodSet.php',
+ 'PHPUnit\\Framework\\MockObject\\MockObject' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/MockObject.php',
+ 'PHPUnit\\Framework\\MockObject\\MockTrait' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/MockTrait.php',
+ 'PHPUnit\\Framework\\MockObject\\MockType' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/MockType.php',
+ 'PHPUnit\\Framework\\MockObject\\OriginalConstructorInvocationRequiredException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Exception/OriginalConstructorInvocationRequiredException.php',
+ 'PHPUnit\\Framework\\MockObject\\ReflectionException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Exception/ReflectionException.php',
+ 'PHPUnit\\Framework\\MockObject\\ReturnValueNotConfiguredException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Exception/ReturnValueNotConfiguredException.php',
+ 'PHPUnit\\Framework\\MockObject\\Rule\\AnyInvokedCount' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Rule/AnyInvokedCount.php',
+ 'PHPUnit\\Framework\\MockObject\\Rule\\AnyParameters' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Rule/AnyParameters.php',
+ 'PHPUnit\\Framework\\MockObject\\Rule\\ConsecutiveParameters' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Rule/ConsecutiveParameters.php',
+ 'PHPUnit\\Framework\\MockObject\\Rule\\InvocationOrder' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Rule/InvocationOrder.php',
+ 'PHPUnit\\Framework\\MockObject\\Rule\\InvokedAtIndex' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Rule/InvokedAtIndex.php',
+ 'PHPUnit\\Framework\\MockObject\\Rule\\InvokedAtLeastCount' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Rule/InvokedAtLeastCount.php',
+ 'PHPUnit\\Framework\\MockObject\\Rule\\InvokedAtLeastOnce' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Rule/InvokedAtLeastOnce.php',
+ 'PHPUnit\\Framework\\MockObject\\Rule\\InvokedAtMostCount' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Rule/InvokedAtMostCount.php',
+ 'PHPUnit\\Framework\\MockObject\\Rule\\InvokedCount' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Rule/InvokedCount.php',
+ 'PHPUnit\\Framework\\MockObject\\Rule\\MethodName' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Rule/MethodName.php',
+ 'PHPUnit\\Framework\\MockObject\\Rule\\Parameters' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Rule/Parameters.php',
+ 'PHPUnit\\Framework\\MockObject\\Rule\\ParametersRule' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Rule/ParametersRule.php',
+ 'PHPUnit\\Framework\\MockObject\\RuntimeException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Exception/RuntimeException.php',
+ 'PHPUnit\\Framework\\MockObject\\SoapExtensionNotAvailableException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Exception/SoapExtensionNotAvailableException.php',
+ 'PHPUnit\\Framework\\MockObject\\Stub' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Stub.php',
+ 'PHPUnit\\Framework\\MockObject\\Stub\\ConsecutiveCalls' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Stub/ConsecutiveCalls.php',
+ 'PHPUnit\\Framework\\MockObject\\Stub\\Exception' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Stub/Exception.php',
+ 'PHPUnit\\Framework\\MockObject\\Stub\\ReturnArgument' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Stub/ReturnArgument.php',
+ 'PHPUnit\\Framework\\MockObject\\Stub\\ReturnCallback' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Stub/ReturnCallback.php',
+ 'PHPUnit\\Framework\\MockObject\\Stub\\ReturnReference' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Stub/ReturnReference.php',
+ 'PHPUnit\\Framework\\MockObject\\Stub\\ReturnSelf' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Stub/ReturnSelf.php',
+ 'PHPUnit\\Framework\\MockObject\\Stub\\ReturnStub' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Stub/ReturnStub.php',
+ 'PHPUnit\\Framework\\MockObject\\Stub\\ReturnValueMap' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Stub/ReturnValueMap.php',
+ 'PHPUnit\\Framework\\MockObject\\Stub\\Stub' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Stub/Stub.php',
+ 'PHPUnit\\Framework\\MockObject\\UnknownClassException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Exception/UnknownClassException.php',
+ 'PHPUnit\\Framework\\MockObject\\UnknownTraitException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Exception/UnknownTraitException.php',
+ 'PHPUnit\\Framework\\MockObject\\UnknownTypeException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Exception/UnknownTypeException.php',
+ 'PHPUnit\\Framework\\MockObject\\Verifiable' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Verifiable.php',
+ 'PHPUnit\\Framework\\NoChildTestSuiteException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Exception/NoChildTestSuiteException.php',
+ 'PHPUnit\\Framework\\OutputError' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Exception/OutputError.php',
+ 'PHPUnit\\Framework\\PHPTAssertionFailedError' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Exception/PHPTAssertionFailedError.php',
+ 'PHPUnit\\Framework\\Reorderable' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Reorderable.php',
+ 'PHPUnit\\Framework\\RiskyTestError' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Exception/RiskyTestError.php',
+ 'PHPUnit\\Framework\\SelfDescribing' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/SelfDescribing.php',
+ 'PHPUnit\\Framework\\SkippedTest' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/SkippedTest.php',
+ 'PHPUnit\\Framework\\SkippedTestCase' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/SkippedTestCase.php',
+ 'PHPUnit\\Framework\\SkippedTestError' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Exception/SkippedTestError.php',
+ 'PHPUnit\\Framework\\SkippedTestSuiteError' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Exception/SkippedTestSuiteError.php',
+ 'PHPUnit\\Framework\\SyntheticError' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Exception/SyntheticError.php',
+ 'PHPUnit\\Framework\\SyntheticSkippedError' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Exception/SyntheticSkippedError.php',
+ 'PHPUnit\\Framework\\Test' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Test.php',
+ 'PHPUnit\\Framework\\TestBuilder' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/TestBuilder.php',
+ 'PHPUnit\\Framework\\TestCase' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/TestCase.php',
+ 'PHPUnit\\Framework\\TestFailure' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/TestFailure.php',
+ 'PHPUnit\\Framework\\TestListener' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/TestListener.php',
+ 'PHPUnit\\Framework\\TestListenerDefaultImplementation' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/TestListenerDefaultImplementation.php',
+ 'PHPUnit\\Framework\\TestResult' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/TestResult.php',
+ 'PHPUnit\\Framework\\TestSuite' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/TestSuite.php',
+ 'PHPUnit\\Framework\\TestSuiteIterator' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/TestSuiteIterator.php',
+ 'PHPUnit\\Framework\\UnintentionallyCoveredCodeError' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Exception/UnintentionallyCoveredCodeError.php',
+ 'PHPUnit\\Framework\\Warning' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Exception/Warning.php',
+ 'PHPUnit\\Framework\\WarningTestCase' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/WarningTestCase.php',
+ 'PHPUnit\\Runner\\AfterIncompleteTestHook' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Hook/AfterIncompleteTestHook.php',
+ 'PHPUnit\\Runner\\AfterLastTestHook' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Hook/AfterLastTestHook.php',
+ 'PHPUnit\\Runner\\AfterRiskyTestHook' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Hook/AfterRiskyTestHook.php',
+ 'PHPUnit\\Runner\\AfterSkippedTestHook' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Hook/AfterSkippedTestHook.php',
+ 'PHPUnit\\Runner\\AfterSuccessfulTestHook' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Hook/AfterSuccessfulTestHook.php',
+ 'PHPUnit\\Runner\\AfterTestErrorHook' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Hook/AfterTestErrorHook.php',
+ 'PHPUnit\\Runner\\AfterTestFailureHook' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Hook/AfterTestFailureHook.php',
+ 'PHPUnit\\Runner\\AfterTestHook' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Hook/AfterTestHook.php',
+ 'PHPUnit\\Runner\\AfterTestWarningHook' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Hook/AfterTestWarningHook.php',
+ 'PHPUnit\\Runner\\BaseTestRunner' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/BaseTestRunner.php',
+ 'PHPUnit\\Runner\\BeforeFirstTestHook' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Hook/BeforeFirstTestHook.php',
+ 'PHPUnit\\Runner\\BeforeTestHook' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Hook/BeforeTestHook.php',
+ 'PHPUnit\\Runner\\DefaultTestResultCache' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/DefaultTestResultCache.php',
+ 'PHPUnit\\Runner\\Exception' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Exception.php',
+ 'PHPUnit\\Runner\\Extension\\ExtensionHandler' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Extension/ExtensionHandler.php',
+ 'PHPUnit\\Runner\\Extension\\PharLoader' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Extension/PharLoader.php',
+ 'PHPUnit\\Runner\\Filter\\ExcludeGroupFilterIterator' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Filter/ExcludeGroupFilterIterator.php',
+ 'PHPUnit\\Runner\\Filter\\Factory' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Filter/Factory.php',
+ 'PHPUnit\\Runner\\Filter\\GroupFilterIterator' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Filter/GroupFilterIterator.php',
+ 'PHPUnit\\Runner\\Filter\\IncludeGroupFilterIterator' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Filter/IncludeGroupFilterIterator.php',
+ 'PHPUnit\\Runner\\Filter\\NameFilterIterator' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Filter/NameFilterIterator.php',
+ 'PHPUnit\\Runner\\Hook' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Hook/Hook.php',
+ 'PHPUnit\\Runner\\NullTestResultCache' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/NullTestResultCache.php',
+ 'PHPUnit\\Runner\\PhptTestCase' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/PhptTestCase.php',
+ 'PHPUnit\\Runner\\ResultCacheExtension' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/ResultCacheExtension.php',
+ 'PHPUnit\\Runner\\StandardTestSuiteLoader' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/StandardTestSuiteLoader.php',
+ 'PHPUnit\\Runner\\TestHook' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Hook/TestHook.php',
+ 'PHPUnit\\Runner\\TestListenerAdapter' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Hook/TestListenerAdapter.php',
+ 'PHPUnit\\Runner\\TestResultCache' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/TestResultCache.php',
+ 'PHPUnit\\Runner\\TestSuiteLoader' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/TestSuiteLoader.php',
+ 'PHPUnit\\Runner\\TestSuiteSorter' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/TestSuiteSorter.php',
+ 'PHPUnit\\Runner\\Version' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Version.php',
+ 'PHPUnit\\TextUI\\CliArguments\\Builder' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/CliArguments/Builder.php',
+ 'PHPUnit\\TextUI\\CliArguments\\Configuration' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/CliArguments/Configuration.php',
+ 'PHPUnit\\TextUI\\CliArguments\\Exception' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/CliArguments/Exception.php',
+ 'PHPUnit\\TextUI\\CliArguments\\Mapper' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/CliArguments/Mapper.php',
+ 'PHPUnit\\TextUI\\Command' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Command.php',
+ 'PHPUnit\\TextUI\\DefaultResultPrinter' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/DefaultResultPrinter.php',
+ 'PHPUnit\\TextUI\\Exception' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Exception/Exception.php',
+ 'PHPUnit\\TextUI\\Help' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Help.php',
+ 'PHPUnit\\TextUI\\ReflectionException' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Exception/ReflectionException.php',
+ 'PHPUnit\\TextUI\\ResultPrinter' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/ResultPrinter.php',
+ 'PHPUnit\\TextUI\\RuntimeException' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Exception/RuntimeException.php',
+ 'PHPUnit\\TextUI\\TestDirectoryNotFoundException' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Exception/TestDirectoryNotFoundException.php',
+ 'PHPUnit\\TextUI\\TestFileNotFoundException' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Exception/TestFileNotFoundException.php',
+ 'PHPUnit\\TextUI\\TestRunner' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/TestRunner.php',
+ 'PHPUnit\\TextUI\\TestSuiteMapper' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/TestSuiteMapper.php',
+ 'PHPUnit\\TextUI\\XmlConfiguration\\CodeCoverage\\CodeCoverage' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/CodeCoverage/CodeCoverage.php',
+ 'PHPUnit\\TextUI\\XmlConfiguration\\CodeCoverage\\FilterMapper' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/CodeCoverage/FilterMapper.php',
+ 'PHPUnit\\TextUI\\XmlConfiguration\\CodeCoverage\\Filter\\Directory' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/CodeCoverage/Filter/Directory.php',
+ 'PHPUnit\\TextUI\\XmlConfiguration\\CodeCoverage\\Filter\\DirectoryCollection' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/CodeCoverage/Filter/DirectoryCollection.php',
+ 'PHPUnit\\TextUI\\XmlConfiguration\\CodeCoverage\\Filter\\DirectoryCollectionIterator' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/CodeCoverage/Filter/DirectoryCollectionIterator.php',
+ 'PHPUnit\\TextUI\\XmlConfiguration\\CodeCoverage\\Report\\Clover' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/CodeCoverage/Report/Clover.php',
+ 'PHPUnit\\TextUI\\XmlConfiguration\\CodeCoverage\\Report\\Cobertura' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/CodeCoverage/Report/Cobertura.php',
+ 'PHPUnit\\TextUI\\XmlConfiguration\\CodeCoverage\\Report\\Crap4j' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/CodeCoverage/Report/Crap4j.php',
+ 'PHPUnit\\TextUI\\XmlConfiguration\\CodeCoverage\\Report\\Html' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/CodeCoverage/Report/Html.php',
+ 'PHPUnit\\TextUI\\XmlConfiguration\\CodeCoverage\\Report\\Php' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/CodeCoverage/Report/Php.php',
+ 'PHPUnit\\TextUI\\XmlConfiguration\\CodeCoverage\\Report\\Text' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/CodeCoverage/Report/Text.php',
+ 'PHPUnit\\TextUI\\XmlConfiguration\\CodeCoverage\\Report\\Xml' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/CodeCoverage/Report/Xml.php',
+ 'PHPUnit\\TextUI\\XmlConfiguration\\Configuration' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Configuration.php',
+ 'PHPUnit\\TextUI\\XmlConfiguration\\Constant' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/PHP/Constant.php',
+ 'PHPUnit\\TextUI\\XmlConfiguration\\ConstantCollection' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/PHP/ConstantCollection.php',
+ 'PHPUnit\\TextUI\\XmlConfiguration\\ConstantCollectionIterator' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/PHP/ConstantCollectionIterator.php',
+ 'PHPUnit\\TextUI\\XmlConfiguration\\ConvertLogTypes' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Migration/Migrations/ConvertLogTypes.php',
+ 'PHPUnit\\TextUI\\XmlConfiguration\\CoverageCloverToReport' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Migration/Migrations/CoverageCloverToReport.php',
+ 'PHPUnit\\TextUI\\XmlConfiguration\\CoverageCrap4jToReport' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Migration/Migrations/CoverageCrap4jToReport.php',
+ 'PHPUnit\\TextUI\\XmlConfiguration\\CoverageHtmlToReport' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Migration/Migrations/CoverageHtmlToReport.php',
+ 'PHPUnit\\TextUI\\XmlConfiguration\\CoveragePhpToReport' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Migration/Migrations/CoveragePhpToReport.php',
+ 'PHPUnit\\TextUI\\XmlConfiguration\\CoverageTextToReport' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Migration/Migrations/CoverageTextToReport.php',
+ 'PHPUnit\\TextUI\\XmlConfiguration\\CoverageXmlToReport' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Migration/Migrations/CoverageXmlToReport.php',
+ 'PHPUnit\\TextUI\\XmlConfiguration\\Directory' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Filesystem/Directory.php',
+ 'PHPUnit\\TextUI\\XmlConfiguration\\DirectoryCollection' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Filesystem/DirectoryCollection.php',
+ 'PHPUnit\\TextUI\\XmlConfiguration\\DirectoryCollectionIterator' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Filesystem/DirectoryCollectionIterator.php',
+ 'PHPUnit\\TextUI\\XmlConfiguration\\Exception' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Exception.php',
+ 'PHPUnit\\TextUI\\XmlConfiguration\\Extension' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/PHPUnit/Extension.php',
+ 'PHPUnit\\TextUI\\XmlConfiguration\\ExtensionCollection' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/PHPUnit/ExtensionCollection.php',
+ 'PHPUnit\\TextUI\\XmlConfiguration\\ExtensionCollectionIterator' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/PHPUnit/ExtensionCollectionIterator.php',
+ 'PHPUnit\\TextUI\\XmlConfiguration\\File' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Filesystem/File.php',
+ 'PHPUnit\\TextUI\\XmlConfiguration\\FileCollection' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Filesystem/FileCollection.php',
+ 'PHPUnit\\TextUI\\XmlConfiguration\\FileCollectionIterator' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Filesystem/FileCollectionIterator.php',
+ 'PHPUnit\\TextUI\\XmlConfiguration\\Generator' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Generator.php',
+ 'PHPUnit\\TextUI\\XmlConfiguration\\Group' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Group/Group.php',
+ 'PHPUnit\\TextUI\\XmlConfiguration\\GroupCollection' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Group/GroupCollection.php',
+ 'PHPUnit\\TextUI\\XmlConfiguration\\GroupCollectionIterator' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Group/GroupCollectionIterator.php',
+ 'PHPUnit\\TextUI\\XmlConfiguration\\Groups' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Group/Groups.php',
+ 'PHPUnit\\TextUI\\XmlConfiguration\\IniSetting' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/PHP/IniSetting.php',
+ 'PHPUnit\\TextUI\\XmlConfiguration\\IniSettingCollection' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/PHP/IniSettingCollection.php',
+ 'PHPUnit\\TextUI\\XmlConfiguration\\IniSettingCollectionIterator' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/PHP/IniSettingCollectionIterator.php',
+ 'PHPUnit\\TextUI\\XmlConfiguration\\IntroduceCoverageElement' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Migration/Migrations/IntroduceCoverageElement.php',
+ 'PHPUnit\\TextUI\\XmlConfiguration\\Loader' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Loader.php',
+ 'PHPUnit\\TextUI\\XmlConfiguration\\LogToReportMigration' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Migration/Migrations/LogToReportMigration.php',
+ 'PHPUnit\\TextUI\\XmlConfiguration\\Logging\\Junit' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Logging/Junit.php',
+ 'PHPUnit\\TextUI\\XmlConfiguration\\Logging\\Logging' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Logging/Logging.php',
+ 'PHPUnit\\TextUI\\XmlConfiguration\\Logging\\TeamCity' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Logging/TeamCity.php',
+ 'PHPUnit\\TextUI\\XmlConfiguration\\Logging\\TestDox\\Html' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Logging/TestDox/Html.php',
+ 'PHPUnit\\TextUI\\XmlConfiguration\\Logging\\TestDox\\Text' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Logging/TestDox/Text.php',
+ 'PHPUnit\\TextUI\\XmlConfiguration\\Logging\\TestDox\\Xml' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Logging/TestDox/Xml.php',
+ 'PHPUnit\\TextUI\\XmlConfiguration\\Logging\\Text' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Logging/Text.php',
+ 'PHPUnit\\TextUI\\XmlConfiguration\\Migration' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Migration/Migrations/Migration.php',
+ 'PHPUnit\\TextUI\\XmlConfiguration\\MigrationBuilder' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Migration/MigrationBuilder.php',
+ 'PHPUnit\\TextUI\\XmlConfiguration\\MigrationBuilderException' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Migration/MigrationBuilderException.php',
+ 'PHPUnit\\TextUI\\XmlConfiguration\\MigrationException' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Migration/MigrationException.php',
+ '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\\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',
+ 'PHPUnit\\TextUI\\XmlConfiguration\\RemoveCacheTokensAttribute' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Migration/Migrations/RemoveCacheTokensAttribute.php',
+ 'PHPUnit\\TextUI\\XmlConfiguration\\RemoveEmptyFilter' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Migration/Migrations/RemoveEmptyFilter.php',
+ 'PHPUnit\\TextUI\\XmlConfiguration\\RemoveLogTypes' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Migration/Migrations/RemoveLogTypes.php',
+ 'PHPUnit\\TextUI\\XmlConfiguration\\TestDirectory' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/TestSuite/TestDirectory.php',
+ 'PHPUnit\\TextUI\\XmlConfiguration\\TestDirectoryCollection' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/TestSuite/TestDirectoryCollection.php',
+ 'PHPUnit\\TextUI\\XmlConfiguration\\TestDirectoryCollectionIterator' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/TestSuite/TestDirectoryCollectionIterator.php',
+ 'PHPUnit\\TextUI\\XmlConfiguration\\TestFile' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/TestSuite/TestFile.php',
+ 'PHPUnit\\TextUI\\XmlConfiguration\\TestFileCollection' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/TestSuite/TestFileCollection.php',
+ 'PHPUnit\\TextUI\\XmlConfiguration\\TestFileCollectionIterator' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/TestSuite/TestFileCollectionIterator.php',
+ 'PHPUnit\\TextUI\\XmlConfiguration\\TestSuite' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/TestSuite/TestSuite.php',
+ 'PHPUnit\\TextUI\\XmlConfiguration\\TestSuiteCollection' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/TestSuite/TestSuiteCollection.php',
+ 'PHPUnit\\TextUI\\XmlConfiguration\\TestSuiteCollectionIterator' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/TestSuite/TestSuiteCollectionIterator.php',
+ 'PHPUnit\\TextUI\\XmlConfiguration\\UpdateSchemaLocationTo93' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Migration/Migrations/UpdateSchemaLocationTo93.php',
+ 'PHPUnit\\TextUI\\XmlConfiguration\\Variable' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/PHP/Variable.php',
+ 'PHPUnit\\TextUI\\XmlConfiguration\\VariableCollection' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/PHP/VariableCollection.php',
+ 'PHPUnit\\TextUI\\XmlConfiguration\\VariableCollectionIterator' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/PHP/VariableCollectionIterator.php',
+ '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',
+ 'PHPUnit\\Util\\ExcludeList' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/ExcludeList.php',
+ 'PHPUnit\\Util\\FileLoader' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/FileLoader.php',
+ 'PHPUnit\\Util\\Filesystem' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Filesystem.php',
+ 'PHPUnit\\Util\\Filter' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Filter.php',
+ 'PHPUnit\\Util\\GlobalState' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/GlobalState.php',
+ 'PHPUnit\\Util\\InvalidDataSetException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/InvalidDataSetException.php',
+ 'PHPUnit\\Util\\Json' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Json.php',
+ 'PHPUnit\\Util\\Log\\JUnit' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Log/JUnit.php',
+ 'PHPUnit\\Util\\Log\\TeamCity' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Log/TeamCity.php',
+ 'PHPUnit\\Util\\PHP\\AbstractPhpProcess' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/PHP/AbstractPhpProcess.php',
+ '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',
+ 'PHPUnit\\Util\\TestDox\\HtmlResultPrinter' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/TestDox/HtmlResultPrinter.php',
+ 'PHPUnit\\Util\\TestDox\\NamePrettifier' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/TestDox/NamePrettifier.php',
+ 'PHPUnit\\Util\\TestDox\\ResultPrinter' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/TestDox/ResultPrinter.php',
+ 'PHPUnit\\Util\\TestDox\\TestDoxPrinter' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/TestDox/TestDoxPrinter.php',
+ 'PHPUnit\\Util\\TestDox\\TextResultPrinter' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/TestDox/TextResultPrinter.php',
+ 'PHPUnit\\Util\\TestDox\\XmlResultPrinter' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/TestDox/XmlResultPrinter.php',
+ 'PHPUnit\\Util\\TextTestListRenderer' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/TextTestListRenderer.php',
+ 'PHPUnit\\Util\\Type' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Type.php',
+ 'PHPUnit\\Util\\VersionComparisonOperator' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/VersionComparisonOperator.php',
+ 'PHPUnit\\Util\\XdebugFilterScriptGenerator' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/XdebugFilterScriptGenerator.php',
+ 'PHPUnit\\Util\\Xml' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Xml.php',
+ 'PHPUnit\\Util\\XmlTestListRenderer' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/XmlTestListRenderer.php',
+ 'PHPUnit\\Util\\Xml\\Exception' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Xml/Exception.php',
+ 'PHPUnit\\Util\\Xml\\FailedSchemaDetectionResult' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Xml/FailedSchemaDetectionResult.php',
+ 'PHPUnit\\Util\\Xml\\Loader' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Xml/Loader.php',
+ 'PHPUnit\\Util\\Xml\\SchemaDetectionResult' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Xml/SchemaDetectionResult.php',
+ 'PHPUnit\\Util\\Xml\\SchemaDetector' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Xml/SchemaDetector.php',
+ 'PHPUnit\\Util\\Xml\\SchemaFinder' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Xml/SchemaFinder.php',
+ 'PHPUnit\\Util\\Xml\\SnapshotNodeList' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Xml/SnapshotNodeList.php',
+ 'PHPUnit\\Util\\Xml\\SuccessfulSchemaDetectionResult' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Xml/SuccessfulSchemaDetectionResult.php',
+ 'PHPUnit\\Util\\Xml\\ValidationResult' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Xml/ValidationResult.php',
+ 'PHPUnit\\Util\\Xml\\Validator' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Xml/Validator.php',
+ 'PharIo\\Manifest\\Application' => __DIR__ . '/..' . '/phar-io/manifest/src/values/Application.php',
+ 'PharIo\\Manifest\\ApplicationName' => __DIR__ . '/..' . '/phar-io/manifest/src/values/ApplicationName.php',
+ 'PharIo\\Manifest\\Author' => __DIR__ . '/..' . '/phar-io/manifest/src/values/Author.php',
+ 'PharIo\\Manifest\\AuthorCollection' => __DIR__ . '/..' . '/phar-io/manifest/src/values/AuthorCollection.php',
+ 'PharIo\\Manifest\\AuthorCollectionIterator' => __DIR__ . '/..' . '/phar-io/manifest/src/values/AuthorCollectionIterator.php',
+ 'PharIo\\Manifest\\AuthorElement' => __DIR__ . '/..' . '/phar-io/manifest/src/xml/AuthorElement.php',
+ 'PharIo\\Manifest\\AuthorElementCollection' => __DIR__ . '/..' . '/phar-io/manifest/src/xml/AuthorElementCollection.php',
+ 'PharIo\\Manifest\\BundledComponent' => __DIR__ . '/..' . '/phar-io/manifest/src/values/BundledComponent.php',
+ 'PharIo\\Manifest\\BundledComponentCollection' => __DIR__ . '/..' . '/phar-io/manifest/src/values/BundledComponentCollection.php',
+ 'PharIo\\Manifest\\BundledComponentCollectionIterator' => __DIR__ . '/..' . '/phar-io/manifest/src/values/BundledComponentCollectionIterator.php',
+ 'PharIo\\Manifest\\BundlesElement' => __DIR__ . '/..' . '/phar-io/manifest/src/xml/BundlesElement.php',
+ 'PharIo\\Manifest\\ComponentElement' => __DIR__ . '/..' . '/phar-io/manifest/src/xml/ComponentElement.php',
+ 'PharIo\\Manifest\\ComponentElementCollection' => __DIR__ . '/..' . '/phar-io/manifest/src/xml/ComponentElementCollection.php',
+ 'PharIo\\Manifest\\ContainsElement' => __DIR__ . '/..' . '/phar-io/manifest/src/xml/ContainsElement.php',
+ 'PharIo\\Manifest\\CopyrightElement' => __DIR__ . '/..' . '/phar-io/manifest/src/xml/CopyrightElement.php',
+ 'PharIo\\Manifest\\CopyrightInformation' => __DIR__ . '/..' . '/phar-io/manifest/src/values/CopyrightInformation.php',
+ 'PharIo\\Manifest\\ElementCollection' => __DIR__ . '/..' . '/phar-io/manifest/src/xml/ElementCollection.php',
+ 'PharIo\\Manifest\\ElementCollectionException' => __DIR__ . '/..' . '/phar-io/manifest/src/exceptions/ElementCollectionException.php',
+ 'PharIo\\Manifest\\Email' => __DIR__ . '/..' . '/phar-io/manifest/src/values/Email.php',
+ 'PharIo\\Manifest\\Exception' => __DIR__ . '/..' . '/phar-io/manifest/src/exceptions/Exception.php',
+ 'PharIo\\Manifest\\ExtElement' => __DIR__ . '/..' . '/phar-io/manifest/src/xml/ExtElement.php',
+ 'PharIo\\Manifest\\ExtElementCollection' => __DIR__ . '/..' . '/phar-io/manifest/src/xml/ExtElementCollection.php',
+ 'PharIo\\Manifest\\Extension' => __DIR__ . '/..' . '/phar-io/manifest/src/values/Extension.php',
+ 'PharIo\\Manifest\\ExtensionElement' => __DIR__ . '/..' . '/phar-io/manifest/src/xml/ExtensionElement.php',
+ 'PharIo\\Manifest\\InvalidApplicationNameException' => __DIR__ . '/..' . '/phar-io/manifest/src/exceptions/InvalidApplicationNameException.php',
+ 'PharIo\\Manifest\\InvalidEmailException' => __DIR__ . '/..' . '/phar-io/manifest/src/exceptions/InvalidEmailException.php',
+ 'PharIo\\Manifest\\InvalidUrlException' => __DIR__ . '/..' . '/phar-io/manifest/src/exceptions/InvalidUrlException.php',
+ 'PharIo\\Manifest\\Library' => __DIR__ . '/..' . '/phar-io/manifest/src/values/Library.php',
+ 'PharIo\\Manifest\\License' => __DIR__ . '/..' . '/phar-io/manifest/src/values/License.php',
+ 'PharIo\\Manifest\\LicenseElement' => __DIR__ . '/..' . '/phar-io/manifest/src/xml/LicenseElement.php',
+ 'PharIo\\Manifest\\Manifest' => __DIR__ . '/..' . '/phar-io/manifest/src/values/Manifest.php',
+ 'PharIo\\Manifest\\ManifestDocument' => __DIR__ . '/..' . '/phar-io/manifest/src/xml/ManifestDocument.php',
+ 'PharIo\\Manifest\\ManifestDocumentException' => __DIR__ . '/..' . '/phar-io/manifest/src/exceptions/ManifestDocumentException.php',
+ 'PharIo\\Manifest\\ManifestDocumentLoadingException' => __DIR__ . '/..' . '/phar-io/manifest/src/exceptions/ManifestDocumentLoadingException.php',
+ 'PharIo\\Manifest\\ManifestDocumentMapper' => __DIR__ . '/..' . '/phar-io/manifest/src/ManifestDocumentMapper.php',
+ 'PharIo\\Manifest\\ManifestDocumentMapperException' => __DIR__ . '/..' . '/phar-io/manifest/src/exceptions/ManifestDocumentMapperException.php',
+ 'PharIo\\Manifest\\ManifestElement' => __DIR__ . '/..' . '/phar-io/manifest/src/xml/ManifestElement.php',
+ 'PharIo\\Manifest\\ManifestElementException' => __DIR__ . '/..' . '/phar-io/manifest/src/exceptions/ManifestElementException.php',
+ '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\\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',
+ 'PharIo\\Manifest\\Requirement' => __DIR__ . '/..' . '/phar-io/manifest/src/values/Requirement.php',
+ 'PharIo\\Manifest\\RequirementCollection' => __DIR__ . '/..' . '/phar-io/manifest/src/values/RequirementCollection.php',
+ 'PharIo\\Manifest\\RequirementCollectionIterator' => __DIR__ . '/..' . '/phar-io/manifest/src/values/RequirementCollectionIterator.php',
+ 'PharIo\\Manifest\\RequiresElement' => __DIR__ . '/..' . '/phar-io/manifest/src/xml/RequiresElement.php',
+ 'PharIo\\Manifest\\Type' => __DIR__ . '/..' . '/phar-io/manifest/src/values/Type.php',
+ 'PharIo\\Manifest\\Url' => __DIR__ . '/..' . '/phar-io/manifest/src/values/Url.php',
+ 'PharIo\\Version\\AbstractVersionConstraint' => __DIR__ . '/..' . '/phar-io/version/src/constraints/AbstractVersionConstraint.php',
+ 'PharIo\\Version\\AndVersionConstraintGroup' => __DIR__ . '/..' . '/phar-io/version/src/constraints/AndVersionConstraintGroup.php',
+ 'PharIo\\Version\\AnyVersionConstraint' => __DIR__ . '/..' . '/phar-io/version/src/constraints/AnyVersionConstraint.php',
+ 'PharIo\\Version\\BuildMetaData' => __DIR__ . '/..' . '/phar-io/version/src/BuildMetaData.php',
+ 'PharIo\\Version\\ExactVersionConstraint' => __DIR__ . '/..' . '/phar-io/version/src/constraints/ExactVersionConstraint.php',
+ 'PharIo\\Version\\Exception' => __DIR__ . '/..' . '/phar-io/version/src/exceptions/Exception.php',
+ 'PharIo\\Version\\GreaterThanOrEqualToVersionConstraint' => __DIR__ . '/..' . '/phar-io/version/src/constraints/GreaterThanOrEqualToVersionConstraint.php',
+ 'PharIo\\Version\\InvalidPreReleaseSuffixException' => __DIR__ . '/..' . '/phar-io/version/src/exceptions/InvalidPreReleaseSuffixException.php',
+ 'PharIo\\Version\\InvalidVersionException' => __DIR__ . '/..' . '/phar-io/version/src/exceptions/InvalidVersionException.php',
+ 'PharIo\\Version\\NoBuildMetaDataException' => __DIR__ . '/..' . '/phar-io/version/src/exceptions/NoBuildMetaDataException.php',
+ 'PharIo\\Version\\NoPreReleaseSuffixException' => __DIR__ . '/..' . '/phar-io/version/src/exceptions/NoPreReleaseSuffixException.php',
+ 'PharIo\\Version\\OrVersionConstraintGroup' => __DIR__ . '/..' . '/phar-io/version/src/constraints/OrVersionConstraintGroup.php',
+ 'PharIo\\Version\\PreReleaseSuffix' => __DIR__ . '/..' . '/phar-io/version/src/PreReleaseSuffix.php',
+ 'PharIo\\Version\\SpecificMajorAndMinorVersionConstraint' => __DIR__ . '/..' . '/phar-io/version/src/constraints/SpecificMajorAndMinorVersionConstraint.php',
+ 'PharIo\\Version\\SpecificMajorVersionConstraint' => __DIR__ . '/..' . '/phar-io/version/src/constraints/SpecificMajorVersionConstraint.php',
+ 'PharIo\\Version\\UnsupportedVersionConstraintException' => __DIR__ . '/..' . '/phar-io/version/src/exceptions/UnsupportedVersionConstraintException.php',
+ 'PharIo\\Version\\Version' => __DIR__ . '/..' . '/phar-io/version/src/Version.php',
+ 'PharIo\\Version\\VersionConstraint' => __DIR__ . '/..' . '/phar-io/version/src/constraints/VersionConstraint.php',
+ 'PharIo\\Version\\VersionConstraintParser' => __DIR__ . '/..' . '/phar-io/version/src/VersionConstraintParser.php',
+ 'PharIo\\Version\\VersionConstraintValue' => __DIR__ . '/..' . '/phar-io/version/src/VersionConstraintValue.php',
+ 'PharIo\\Version\\VersionNumber' => __DIR__ . '/..' . '/phar-io/version/src/VersionNumber.php',
+ 'SebastianBergmann\\CliParser\\AmbiguousOptionException' => __DIR__ . '/..' . '/sebastian/cli-parser/src/exceptions/AmbiguousOptionException.php',
+ 'SebastianBergmann\\CliParser\\Exception' => __DIR__ . '/..' . '/sebastian/cli-parser/src/exceptions/Exception.php',
+ 'SebastianBergmann\\CliParser\\OptionDoesNotAllowArgumentException' => __DIR__ . '/..' . '/sebastian/cli-parser/src/exceptions/OptionDoesNotAllowArgumentException.php',
+ 'SebastianBergmann\\CliParser\\Parser' => __DIR__ . '/..' . '/sebastian/cli-parser/src/Parser.php',
+ 'SebastianBergmann\\CliParser\\RequiredOptionArgumentMissingException' => __DIR__ . '/..' . '/sebastian/cli-parser/src/exceptions/RequiredOptionArgumentMissingException.php',
+ 'SebastianBergmann\\CliParser\\UnknownOptionException' => __DIR__ . '/..' . '/sebastian/cli-parser/src/exceptions/UnknownOptionException.php',
+ 'SebastianBergmann\\CodeCoverage\\BranchAndPathCoverageNotSupportedException' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Exception/BranchAndPathCoverageNotSupportedException.php',
+ 'SebastianBergmann\\CodeCoverage\\CodeCoverage' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/CodeCoverage.php',
+ 'SebastianBergmann\\CodeCoverage\\DeadCodeDetectionNotSupportedException' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Exception/DeadCodeDetectionNotSupportedException.php',
+ 'SebastianBergmann\\CodeCoverage\\Driver\\Driver' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Driver/Driver.php',
+ 'SebastianBergmann\\CodeCoverage\\Driver\\PathExistsButIsNotDirectoryException' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Exception/PathExistsButIsNotDirectoryException.php',
+ 'SebastianBergmann\\CodeCoverage\\Driver\\PcovDriver' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Driver/PcovDriver.php',
+ 'SebastianBergmann\\CodeCoverage\\Driver\\PcovNotAvailableException' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Exception/PcovNotAvailableException.php',
+ 'SebastianBergmann\\CodeCoverage\\Driver\\PhpdbgDriver' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Driver/PhpdbgDriver.php',
+ 'SebastianBergmann\\CodeCoverage\\Driver\\PhpdbgNotAvailableException' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Exception/PhpdbgNotAvailableException.php',
+ 'SebastianBergmann\\CodeCoverage\\Driver\\Selector' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Driver/Selector.php',
+ 'SebastianBergmann\\CodeCoverage\\Driver\\WriteOperationFailedException' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Exception/WriteOperationFailedException.php',
+ 'SebastianBergmann\\CodeCoverage\\Driver\\WrongXdebugVersionException' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Exception/WrongXdebugVersionException.php',
+ 'SebastianBergmann\\CodeCoverage\\Driver\\Xdebug2Driver' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Driver/Xdebug2Driver.php',
+ 'SebastianBergmann\\CodeCoverage\\Driver\\Xdebug2NotEnabledException' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Exception/Xdebug2NotEnabledException.php',
+ 'SebastianBergmann\\CodeCoverage\\Driver\\Xdebug3Driver' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Driver/Xdebug3Driver.php',
+ 'SebastianBergmann\\CodeCoverage\\Driver\\Xdebug3NotEnabledException' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Exception/Xdebug3NotEnabledException.php',
+ 'SebastianBergmann\\CodeCoverage\\Driver\\XdebugNotAvailableException' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Exception/XdebugNotAvailableException.php',
+ 'SebastianBergmann\\CodeCoverage\\Exception' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Exception/Exception.php',
+ 'SebastianBergmann\\CodeCoverage\\Filter' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Filter.php',
+ 'SebastianBergmann\\CodeCoverage\\InvalidArgumentException' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Exception/InvalidArgumentException.php',
+ 'SebastianBergmann\\CodeCoverage\\NoCodeCoverageDriverAvailableException' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Exception/NoCodeCoverageDriverAvailableException.php',
+ 'SebastianBergmann\\CodeCoverage\\NoCodeCoverageDriverWithPathCoverageSupportAvailableException' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Exception/NoCodeCoverageDriverWithPathCoverageSupportAvailableException.php',
+ 'SebastianBergmann\\CodeCoverage\\Node\\AbstractNode' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Node/AbstractNode.php',
+ 'SebastianBergmann\\CodeCoverage\\Node\\Builder' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Node/Builder.php',
+ 'SebastianBergmann\\CodeCoverage\\Node\\CrapIndex' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Node/CrapIndex.php',
+ 'SebastianBergmann\\CodeCoverage\\Node\\Directory' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Node/Directory.php',
+ 'SebastianBergmann\\CodeCoverage\\Node\\File' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Node/File.php',
+ 'SebastianBergmann\\CodeCoverage\\Node\\Iterator' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Node/Iterator.php',
+ 'SebastianBergmann\\CodeCoverage\\ParserException' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Exception/ParserException.php',
+ 'SebastianBergmann\\CodeCoverage\\ProcessedCodeCoverageData' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/ProcessedCodeCoverageData.php',
+ 'SebastianBergmann\\CodeCoverage\\RawCodeCoverageData' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/RawCodeCoverageData.php',
+ 'SebastianBergmann\\CodeCoverage\\ReflectionException' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Exception/ReflectionException.php',
+ 'SebastianBergmann\\CodeCoverage\\ReportAlreadyFinalizedException' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Exception/ReportAlreadyFinalizedException.php',
+ 'SebastianBergmann\\CodeCoverage\\Report\\Clover' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Report/Clover.php',
+ 'SebastianBergmann\\CodeCoverage\\Report\\Cobertura' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Report/Cobertura.php',
+ 'SebastianBergmann\\CodeCoverage\\Report\\Crap4j' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Report/Crap4j.php',
+ 'SebastianBergmann\\CodeCoverage\\Report\\Html\\Dashboard' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Report/Html/Renderer/Dashboard.php',
+ 'SebastianBergmann\\CodeCoverage\\Report\\Html\\Directory' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Report/Html/Renderer/Directory.php',
+ 'SebastianBergmann\\CodeCoverage\\Report\\Html\\Facade' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Report/Html/Facade.php',
+ 'SebastianBergmann\\CodeCoverage\\Report\\Html\\File' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Report/Html/Renderer/File.php',
+ 'SebastianBergmann\\CodeCoverage\\Report\\Html\\Renderer' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Report/Html/Renderer.php',
+ 'SebastianBergmann\\CodeCoverage\\Report\\PHP' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Report/PHP.php',
+ 'SebastianBergmann\\CodeCoverage\\Report\\Text' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Report/Text.php',
+ 'SebastianBergmann\\CodeCoverage\\Report\\Xml\\BuildInformation' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Report/Xml/BuildInformation.php',
+ 'SebastianBergmann\\CodeCoverage\\Report\\Xml\\Coverage' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Report/Xml/Coverage.php',
+ 'SebastianBergmann\\CodeCoverage\\Report\\Xml\\Directory' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Report/Xml/Directory.php',
+ 'SebastianBergmann\\CodeCoverage\\Report\\Xml\\Facade' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Report/Xml/Facade.php',
+ 'SebastianBergmann\\CodeCoverage\\Report\\Xml\\File' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Report/Xml/File.php',
+ 'SebastianBergmann\\CodeCoverage\\Report\\Xml\\Method' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Report/Xml/Method.php',
+ 'SebastianBergmann\\CodeCoverage\\Report\\Xml\\Node' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Report/Xml/Node.php',
+ 'SebastianBergmann\\CodeCoverage\\Report\\Xml\\Project' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Report/Xml/Project.php',
+ 'SebastianBergmann\\CodeCoverage\\Report\\Xml\\Report' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Report/Xml/Report.php',
+ 'SebastianBergmann\\CodeCoverage\\Report\\Xml\\Source' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Report/Xml/Source.php',
+ 'SebastianBergmann\\CodeCoverage\\Report\\Xml\\Tests' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Report/Xml/Tests.php',
+ 'SebastianBergmann\\CodeCoverage\\Report\\Xml\\Totals' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Report/Xml/Totals.php',
+ 'SebastianBergmann\\CodeCoverage\\Report\\Xml\\Unit' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Report/Xml/Unit.php',
+ 'SebastianBergmann\\CodeCoverage\\StaticAnalysisCacheNotConfiguredException' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Exception/StaticAnalysisCacheNotConfiguredException.php',
+ 'SebastianBergmann\\CodeCoverage\\StaticAnalysis\\CacheWarmer' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/StaticAnalysis/CacheWarmer.php',
+ 'SebastianBergmann\\CodeCoverage\\StaticAnalysis\\CachingFileAnalyser' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/StaticAnalysis/CachingFileAnalyser.php',
+ 'SebastianBergmann\\CodeCoverage\\StaticAnalysis\\CodeUnitFindingVisitor' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/StaticAnalysis/CodeUnitFindingVisitor.php',
+ 'SebastianBergmann\\CodeCoverage\\StaticAnalysis\\ExecutableLinesFindingVisitor' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/StaticAnalysis/ExecutableLinesFindingVisitor.php',
+ 'SebastianBergmann\\CodeCoverage\\StaticAnalysis\\FileAnalyser' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/StaticAnalysis/FileAnalyser.php',
+ 'SebastianBergmann\\CodeCoverage\\StaticAnalysis\\IgnoredLinesFindingVisitor' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/StaticAnalysis/IgnoredLinesFindingVisitor.php',
+ 'SebastianBergmann\\CodeCoverage\\StaticAnalysis\\ParsingFileAnalyser' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/StaticAnalysis/ParsingFileAnalyser.php',
+ 'SebastianBergmann\\CodeCoverage\\TestIdMissingException' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Exception/TestIdMissingException.php',
+ 'SebastianBergmann\\CodeCoverage\\UnintentionallyCoveredCodeException' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Exception/UnintentionallyCoveredCodeException.php',
+ 'SebastianBergmann\\CodeCoverage\\Util\\DirectoryCouldNotBeCreatedException' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Exception/DirectoryCouldNotBeCreatedException.php',
+ 'SebastianBergmann\\CodeCoverage\\Util\\Filesystem' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Util/Filesystem.php',
+ 'SebastianBergmann\\CodeCoverage\\Util\\Percentage' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Util/Percentage.php',
+ 'SebastianBergmann\\CodeCoverage\\Version' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Version.php',
+ 'SebastianBergmann\\CodeCoverage\\XmlException' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Exception/XmlException.php',
+ 'SebastianBergmann\\CodeUnitReverseLookup\\Wizard' => __DIR__ . '/..' . '/sebastian/code-unit-reverse-lookup/src/Wizard.php',
+ 'SebastianBergmann\\CodeUnit\\ClassMethodUnit' => __DIR__ . '/..' . '/sebastian/code-unit/src/ClassMethodUnit.php',
+ 'SebastianBergmann\\CodeUnit\\ClassUnit' => __DIR__ . '/..' . '/sebastian/code-unit/src/ClassUnit.php',
+ 'SebastianBergmann\\CodeUnit\\CodeUnit' => __DIR__ . '/..' . '/sebastian/code-unit/src/CodeUnit.php',
+ 'SebastianBergmann\\CodeUnit\\CodeUnitCollection' => __DIR__ . '/..' . '/sebastian/code-unit/src/CodeUnitCollection.php',
+ 'SebastianBergmann\\CodeUnit\\CodeUnitCollectionIterator' => __DIR__ . '/..' . '/sebastian/code-unit/src/CodeUnitCollectionIterator.php',
+ 'SebastianBergmann\\CodeUnit\\Exception' => __DIR__ . '/..' . '/sebastian/code-unit/src/exceptions/Exception.php',
+ 'SebastianBergmann\\CodeUnit\\FunctionUnit' => __DIR__ . '/..' . '/sebastian/code-unit/src/FunctionUnit.php',
+ 'SebastianBergmann\\CodeUnit\\InterfaceMethodUnit' => __DIR__ . '/..' . '/sebastian/code-unit/src/InterfaceMethodUnit.php',
+ 'SebastianBergmann\\CodeUnit\\InterfaceUnit' => __DIR__ . '/..' . '/sebastian/code-unit/src/InterfaceUnit.php',
+ 'SebastianBergmann\\CodeUnit\\InvalidCodeUnitException' => __DIR__ . '/..' . '/sebastian/code-unit/src/exceptions/InvalidCodeUnitException.php',
+ 'SebastianBergmann\\CodeUnit\\Mapper' => __DIR__ . '/..' . '/sebastian/code-unit/src/Mapper.php',
+ 'SebastianBergmann\\CodeUnit\\NoTraitException' => __DIR__ . '/..' . '/sebastian/code-unit/src/exceptions/NoTraitException.php',
+ 'SebastianBergmann\\CodeUnit\\ReflectionException' => __DIR__ . '/..' . '/sebastian/code-unit/src/exceptions/ReflectionException.php',
+ 'SebastianBergmann\\CodeUnit\\TraitMethodUnit' => __DIR__ . '/..' . '/sebastian/code-unit/src/TraitMethodUnit.php',
+ 'SebastianBergmann\\CodeUnit\\TraitUnit' => __DIR__ . '/..' . '/sebastian/code-unit/src/TraitUnit.php',
+ 'SebastianBergmann\\Comparator\\ArrayComparator' => __DIR__ . '/..' . '/sebastian/comparator/src/ArrayComparator.php',
+ 'SebastianBergmann\\Comparator\\Comparator' => __DIR__ . '/..' . '/sebastian/comparator/src/Comparator.php',
+ 'SebastianBergmann\\Comparator\\ComparisonFailure' => __DIR__ . '/..' . '/sebastian/comparator/src/ComparisonFailure.php',
+ 'SebastianBergmann\\Comparator\\DOMNodeComparator' => __DIR__ . '/..' . '/sebastian/comparator/src/DOMNodeComparator.php',
+ 'SebastianBergmann\\Comparator\\DateTimeComparator' => __DIR__ . '/..' . '/sebastian/comparator/src/DateTimeComparator.php',
+ 'SebastianBergmann\\Comparator\\DoubleComparator' => __DIR__ . '/..' . '/sebastian/comparator/src/DoubleComparator.php',
+ 'SebastianBergmann\\Comparator\\Exception' => __DIR__ . '/..' . '/sebastian/comparator/src/exceptions/Exception.php',
+ 'SebastianBergmann\\Comparator\\ExceptionComparator' => __DIR__ . '/..' . '/sebastian/comparator/src/ExceptionComparator.php',
+ 'SebastianBergmann\\Comparator\\Factory' => __DIR__ . '/..' . '/sebastian/comparator/src/Factory.php',
+ 'SebastianBergmann\\Comparator\\MockObjectComparator' => __DIR__ . '/..' . '/sebastian/comparator/src/MockObjectComparator.php',
+ 'SebastianBergmann\\Comparator\\NumericComparator' => __DIR__ . '/..' . '/sebastian/comparator/src/NumericComparator.php',
+ 'SebastianBergmann\\Comparator\\ObjectComparator' => __DIR__ . '/..' . '/sebastian/comparator/src/ObjectComparator.php',
+ 'SebastianBergmann\\Comparator\\ResourceComparator' => __DIR__ . '/..' . '/sebastian/comparator/src/ResourceComparator.php',
+ 'SebastianBergmann\\Comparator\\RuntimeException' => __DIR__ . '/..' . '/sebastian/comparator/src/exceptions/RuntimeException.php',
+ 'SebastianBergmann\\Comparator\\ScalarComparator' => __DIR__ . '/..' . '/sebastian/comparator/src/ScalarComparator.php',
+ 'SebastianBergmann\\Comparator\\SplObjectStorageComparator' => __DIR__ . '/..' . '/sebastian/comparator/src/SplObjectStorageComparator.php',
+ 'SebastianBergmann\\Comparator\\TypeComparator' => __DIR__ . '/..' . '/sebastian/comparator/src/TypeComparator.php',
+ 'SebastianBergmann\\Complexity\\Calculator' => __DIR__ . '/..' . '/sebastian/complexity/src/Calculator.php',
+ 'SebastianBergmann\\Complexity\\Complexity' => __DIR__ . '/..' . '/sebastian/complexity/src/Complexity/Complexity.php',
+ 'SebastianBergmann\\Complexity\\ComplexityCalculatingVisitor' => __DIR__ . '/..' . '/sebastian/complexity/src/Visitor/ComplexityCalculatingVisitor.php',
+ 'SebastianBergmann\\Complexity\\ComplexityCollection' => __DIR__ . '/..' . '/sebastian/complexity/src/Complexity/ComplexityCollection.php',
+ 'SebastianBergmann\\Complexity\\ComplexityCollectionIterator' => __DIR__ . '/..' . '/sebastian/complexity/src/Complexity/ComplexityCollectionIterator.php',
+ 'SebastianBergmann\\Complexity\\CyclomaticComplexityCalculatingVisitor' => __DIR__ . '/..' . '/sebastian/complexity/src/Visitor/CyclomaticComplexityCalculatingVisitor.php',
+ 'SebastianBergmann\\Complexity\\Exception' => __DIR__ . '/..' . '/sebastian/complexity/src/Exception/Exception.php',
+ 'SebastianBergmann\\Complexity\\RuntimeException' => __DIR__ . '/..' . '/sebastian/complexity/src/Exception/RuntimeException.php',
+ 'SebastianBergmann\\Diff\\Chunk' => __DIR__ . '/..' . '/sebastian/diff/src/Chunk.php',
+ 'SebastianBergmann\\Diff\\ConfigurationException' => __DIR__ . '/..' . '/sebastian/diff/src/Exception/ConfigurationException.php',
+ 'SebastianBergmann\\Diff\\Diff' => __DIR__ . '/..' . '/sebastian/diff/src/Diff.php',
+ 'SebastianBergmann\\Diff\\Differ' => __DIR__ . '/..' . '/sebastian/diff/src/Differ.php',
+ 'SebastianBergmann\\Diff\\Exception' => __DIR__ . '/..' . '/sebastian/diff/src/Exception/Exception.php',
+ 'SebastianBergmann\\Diff\\InvalidArgumentException' => __DIR__ . '/..' . '/sebastian/diff/src/Exception/InvalidArgumentException.php',
+ 'SebastianBergmann\\Diff\\Line' => __DIR__ . '/..' . '/sebastian/diff/src/Line.php',
+ 'SebastianBergmann\\Diff\\LongestCommonSubsequenceCalculator' => __DIR__ . '/..' . '/sebastian/diff/src/LongestCommonSubsequenceCalculator.php',
+ 'SebastianBergmann\\Diff\\MemoryEfficientLongestCommonSubsequenceCalculator' => __DIR__ . '/..' . '/sebastian/diff/src/MemoryEfficientLongestCommonSubsequenceCalculator.php',
+ 'SebastianBergmann\\Diff\\Output\\AbstractChunkOutputBuilder' => __DIR__ . '/..' . '/sebastian/diff/src/Output/AbstractChunkOutputBuilder.php',
+ 'SebastianBergmann\\Diff\\Output\\DiffOnlyOutputBuilder' => __DIR__ . '/..' . '/sebastian/diff/src/Output/DiffOnlyOutputBuilder.php',
+ 'SebastianBergmann\\Diff\\Output\\DiffOutputBuilderInterface' => __DIR__ . '/..' . '/sebastian/diff/src/Output/DiffOutputBuilderInterface.php',
+ 'SebastianBergmann\\Diff\\Output\\StrictUnifiedDiffOutputBuilder' => __DIR__ . '/..' . '/sebastian/diff/src/Output/StrictUnifiedDiffOutputBuilder.php',
+ 'SebastianBergmann\\Diff\\Output\\UnifiedDiffOutputBuilder' => __DIR__ . '/..' . '/sebastian/diff/src/Output/UnifiedDiffOutputBuilder.php',
+ 'SebastianBergmann\\Diff\\Parser' => __DIR__ . '/..' . '/sebastian/diff/src/Parser.php',
+ 'SebastianBergmann\\Diff\\TimeEfficientLongestCommonSubsequenceCalculator' => __DIR__ . '/..' . '/sebastian/diff/src/TimeEfficientLongestCommonSubsequenceCalculator.php',
+ 'SebastianBergmann\\Environment\\Console' => __DIR__ . '/..' . '/sebastian/environment/src/Console.php',
+ 'SebastianBergmann\\Environment\\OperatingSystem' => __DIR__ . '/..' . '/sebastian/environment/src/OperatingSystem.php',
+ 'SebastianBergmann\\Environment\\Runtime' => __DIR__ . '/..' . '/sebastian/environment/src/Runtime.php',
+ 'SebastianBergmann\\Exporter\\Exporter' => __DIR__ . '/..' . '/sebastian/exporter/src/Exporter.php',
+ 'SebastianBergmann\\FileIterator\\Facade' => __DIR__ . '/..' . '/phpunit/php-file-iterator/src/Facade.php',
+ 'SebastianBergmann\\FileIterator\\Factory' => __DIR__ . '/..' . '/phpunit/php-file-iterator/src/Factory.php',
+ 'SebastianBergmann\\FileIterator\\Iterator' => __DIR__ . '/..' . '/phpunit/php-file-iterator/src/Iterator.php',
+ 'SebastianBergmann\\GlobalState\\CodeExporter' => __DIR__ . '/..' . '/sebastian/global-state/src/CodeExporter.php',
+ 'SebastianBergmann\\GlobalState\\Exception' => __DIR__ . '/..' . '/sebastian/global-state/src/exceptions/Exception.php',
+ 'SebastianBergmann\\GlobalState\\ExcludeList' => __DIR__ . '/..' . '/sebastian/global-state/src/ExcludeList.php',
+ 'SebastianBergmann\\GlobalState\\Restorer' => __DIR__ . '/..' . '/sebastian/global-state/src/Restorer.php',
+ 'SebastianBergmann\\GlobalState\\RuntimeException' => __DIR__ . '/..' . '/sebastian/global-state/src/exceptions/RuntimeException.php',
+ 'SebastianBergmann\\GlobalState\\Snapshot' => __DIR__ . '/..' . '/sebastian/global-state/src/Snapshot.php',
+ 'SebastianBergmann\\Invoker\\Exception' => __DIR__ . '/..' . '/phpunit/php-invoker/src/exceptions/Exception.php',
+ 'SebastianBergmann\\Invoker\\Invoker' => __DIR__ . '/..' . '/phpunit/php-invoker/src/Invoker.php',
+ 'SebastianBergmann\\Invoker\\ProcessControlExtensionNotLoadedException' => __DIR__ . '/..' . '/phpunit/php-invoker/src/exceptions/ProcessControlExtensionNotLoadedException.php',
+ 'SebastianBergmann\\Invoker\\TimeoutException' => __DIR__ . '/..' . '/phpunit/php-invoker/src/exceptions/TimeoutException.php',
+ 'SebastianBergmann\\LinesOfCode\\Counter' => __DIR__ . '/..' . '/sebastian/lines-of-code/src/Counter.php',
+ 'SebastianBergmann\\LinesOfCode\\Exception' => __DIR__ . '/..' . '/sebastian/lines-of-code/src/Exception/Exception.php',
+ 'SebastianBergmann\\LinesOfCode\\IllogicalValuesException' => __DIR__ . '/..' . '/sebastian/lines-of-code/src/Exception/IllogicalValuesException.php',
+ 'SebastianBergmann\\LinesOfCode\\LineCountingVisitor' => __DIR__ . '/..' . '/sebastian/lines-of-code/src/LineCountingVisitor.php',
+ 'SebastianBergmann\\LinesOfCode\\LinesOfCode' => __DIR__ . '/..' . '/sebastian/lines-of-code/src/LinesOfCode.php',
+ 'SebastianBergmann\\LinesOfCode\\NegativeValueException' => __DIR__ . '/..' . '/sebastian/lines-of-code/src/Exception/NegativeValueException.php',
+ 'SebastianBergmann\\LinesOfCode\\RuntimeException' => __DIR__ . '/..' . '/sebastian/lines-of-code/src/Exception/RuntimeException.php',
+ 'SebastianBergmann\\ObjectEnumerator\\Enumerator' => __DIR__ . '/..' . '/sebastian/object-enumerator/src/Enumerator.php',
+ 'SebastianBergmann\\ObjectEnumerator\\Exception' => __DIR__ . '/..' . '/sebastian/object-enumerator/src/Exception.php',
+ 'SebastianBergmann\\ObjectEnumerator\\InvalidArgumentException' => __DIR__ . '/..' . '/sebastian/object-enumerator/src/InvalidArgumentException.php',
+ 'SebastianBergmann\\ObjectReflector\\Exception' => __DIR__ . '/..' . '/sebastian/object-reflector/src/Exception.php',
+ 'SebastianBergmann\\ObjectReflector\\InvalidArgumentException' => __DIR__ . '/..' . '/sebastian/object-reflector/src/InvalidArgumentException.php',
+ 'SebastianBergmann\\ObjectReflector\\ObjectReflector' => __DIR__ . '/..' . '/sebastian/object-reflector/src/ObjectReflector.php',
+ 'SebastianBergmann\\RecursionContext\\Context' => __DIR__ . '/..' . '/sebastian/recursion-context/src/Context.php',
+ 'SebastianBergmann\\RecursionContext\\Exception' => __DIR__ . '/..' . '/sebastian/recursion-context/src/Exception.php',
+ 'SebastianBergmann\\RecursionContext\\InvalidArgumentException' => __DIR__ . '/..' . '/sebastian/recursion-context/src/InvalidArgumentException.php',
+ 'SebastianBergmann\\ResourceOperations\\ResourceOperations' => __DIR__ . '/..' . '/sebastian/resource-operations/src/ResourceOperations.php',
+ 'SebastianBergmann\\Template\\Exception' => __DIR__ . '/..' . '/phpunit/php-text-template/src/exceptions/Exception.php',
+ 'SebastianBergmann\\Template\\InvalidArgumentException' => __DIR__ . '/..' . '/phpunit/php-text-template/src/exceptions/InvalidArgumentException.php',
+ 'SebastianBergmann\\Template\\RuntimeException' => __DIR__ . '/..' . '/phpunit/php-text-template/src/exceptions/RuntimeException.php',
+ 'SebastianBergmann\\Template\\Template' => __DIR__ . '/..' . '/phpunit/php-text-template/src/Template.php',
+ 'SebastianBergmann\\Timer\\Duration' => __DIR__ . '/..' . '/phpunit/php-timer/src/Duration.php',
+ 'SebastianBergmann\\Timer\\Exception' => __DIR__ . '/..' . '/phpunit/php-timer/src/exceptions/Exception.php',
+ 'SebastianBergmann\\Timer\\NoActiveTimerException' => __DIR__ . '/..' . '/phpunit/php-timer/src/exceptions/NoActiveTimerException.php',
+ 'SebastianBergmann\\Timer\\ResourceUsageFormatter' => __DIR__ . '/..' . '/phpunit/php-timer/src/ResourceUsageFormatter.php',
+ 'SebastianBergmann\\Timer\\TimeSinceStartOfRequestNotAvailableException' => __DIR__ . '/..' . '/phpunit/php-timer/src/exceptions/TimeSinceStartOfRequestNotAvailableException.php',
+ 'SebastianBergmann\\Timer\\Timer' => __DIR__ . '/..' . '/phpunit/php-timer/src/Timer.php',
+ 'SebastianBergmann\\Type\\CallableType' => __DIR__ . '/..' . '/sebastian/type/src/type/CallableType.php',
+ 'SebastianBergmann\\Type\\Exception' => __DIR__ . '/..' . '/sebastian/type/src/exception/Exception.php',
+ 'SebastianBergmann\\Type\\FalseType' => __DIR__ . '/..' . '/sebastian/type/src/type/FalseType.php',
+ 'SebastianBergmann\\Type\\GenericObjectType' => __DIR__ . '/..' . '/sebastian/type/src/type/GenericObjectType.php',
+ 'SebastianBergmann\\Type\\IntersectionType' => __DIR__ . '/..' . '/sebastian/type/src/type/IntersectionType.php',
+ 'SebastianBergmann\\Type\\IterableType' => __DIR__ . '/..' . '/sebastian/type/src/type/IterableType.php',
+ 'SebastianBergmann\\Type\\MixedType' => __DIR__ . '/..' . '/sebastian/type/src/type/MixedType.php',
+ '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',
+ 'SebastianBergmann\\Type\\UnknownType' => __DIR__ . '/..' . '/sebastian/type/src/type/UnknownType.php',
+ 'SebastianBergmann\\Type\\VoidType' => __DIR__ . '/..' . '/sebastian/type/src/type/VoidType.php',
+ 'SebastianBergmann\\Version' => __DIR__ . '/..' . '/sebastian/version/src/Version.php',
+ 'TheSeer\\Tokenizer\\Exception' => __DIR__ . '/..' . '/theseer/tokenizer/src/Exception.php',
+ 'TheSeer\\Tokenizer\\NamespaceUri' => __DIR__ . '/..' . '/theseer/tokenizer/src/NamespaceUri.php',
+ 'TheSeer\\Tokenizer\\NamespaceUriException' => __DIR__ . '/..' . '/theseer/tokenizer/src/NamespaceUriException.php',
+ 'TheSeer\\Tokenizer\\Token' => __DIR__ . '/..' . '/theseer/tokenizer/src/Token.php',
+ 'TheSeer\\Tokenizer\\TokenCollection' => __DIR__ . '/..' . '/theseer/tokenizer/src/TokenCollection.php',
+ 'TheSeer\\Tokenizer\\TokenCollectionException' => __DIR__ . '/..' . '/theseer/tokenizer/src/TokenCollectionException.php',
+ 'TheSeer\\Tokenizer\\Tokenizer' => __DIR__ . '/..' . '/theseer/tokenizer/src/Tokenizer.php',
+ 'TheSeer\\Tokenizer\\XMLSerializer' => __DIR__ . '/..' . '/theseer/tokenizer/src/XMLSerializer.php',
+ 'WP_Mock' => __DIR__ . '/..' . '/10up/wp_mock/php/WP_Mock.php',
);
public static function getInitializer(ClassLoader $loader)
@@ -44,6 +815,7 @@ public static function getInitializer(ClassLoader $loader)
$loader->prefixLengthsPsr4 = ComposerStaticInit414112f68a04b4d078687d18b2bb675e::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInit414112f68a04b4d078687d18b2bb675e::$prefixDirsPsr4;
$loader->prefixesPsr0 = ComposerStaticInit414112f68a04b4d078687d18b2bb675e::$prefixesPsr0;
+ $loader->classMap = ComposerStaticInit414112f68a04b4d078687d18b2bb675e::$classMap;
}, null, ClassLoader::class);
}
diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json
index 09972ca9..fba80b6a 100644
--- a/vendor/composer/installed.json
+++ b/vendor/composer/installed.json
@@ -1,100 +1,3295 @@
-[
- {
- "name": "pimple/pimple",
- "version": "v3.3.1",
- "version_normalized": "3.3.1.0",
- "source": {
- "type": "git",
- "url": "https://github.com/silexphp/Pimple.git",
- "reference": "21e45061c3429b1e06233475cc0e1f6fc774d5b0"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/silexphp/Pimple/zipball/21e45061c3429b1e06233475cc0e1f6fc774d5b0",
- "reference": "21e45061c3429b1e06233475cc0e1f6fc774d5b0",
- "shasum": ""
- },
- "require": {
- "php": ">=7.2.5",
- "psr/container": "^1.0"
- },
- "require-dev": {
- "symfony/phpunit-bridge": "^5.0"
- },
- "time": "2020-11-24T20:35:42+00:00",
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "3.3.x-dev"
- }
- },
- "installation-source": "dist",
- "autoload": {
- "psr-0": {
- "Pimple": "src/"
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "Fabien Potencier",
- "email": "fabien@symfony.com"
- }
- ],
- "description": "Pimple, a simple Dependency Injection Container",
- "homepage": "https://pimple.symfony.com",
- "keywords": [
- "container",
- "dependency injection"
- ]
- },
- {
- "name": "psr/container",
- "version": "1.1.2",
- "version_normalized": "1.1.2.0",
- "source": {
- "type": "git",
- "url": "https://github.com/php-fig/container.git",
- "reference": "513e0666f7216c7459170d56df27dfcefe1689ea"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/php-fig/container/zipball/513e0666f7216c7459170d56df27dfcefe1689ea",
- "reference": "513e0666f7216c7459170d56df27dfcefe1689ea",
- "shasum": ""
- },
- "require": {
- "php": ">=7.4.0"
- },
- "time": "2021-11-05T16:50:12+00:00",
- "type": "library",
- "installation-source": "dist",
- "autoload": {
- "psr-4": {
- "Psr\\Container\\": "src/"
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "PHP-FIG",
- "homepage": "https://www.php-fig.org/"
- }
- ],
- "description": "Common Container Interface (PHP FIG PSR-11)",
- "homepage": "https://github.com/php-fig/container",
- "keywords": [
- "PSR-11",
- "container",
- "container-interface",
- "container-interop",
- "psr"
- ]
- }
-]
+{
+ "packages": [
+ {
+ "name": "10up/wp_mock",
+ "version": "0.4.2",
+ "version_normalized": "0.4.2.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/10up/wp_mock.git",
+ "reference": "9019226eb50df275aa86bb15bfc98a619601ee49"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/10up/wp_mock/zipball/9019226eb50df275aa86bb15bfc98a619601ee49",
+ "reference": "9019226eb50df275aa86bb15bfc98a619601ee49",
+ "shasum": ""
+ },
+ "require": {
+ "antecedent/patchwork": "^2.1",
+ "mockery/mockery": "^1.0",
+ "php": ">=7.1",
+ "phpunit/phpunit": ">=7.0"
+ },
+ "require-dev": {
+ "behat/behat": "^3.0",
+ "php-coveralls/php-coveralls": "^2.1",
+ "sebastian/comparator": ">=1.2.3"
+ },
+ "time": "2019-03-16T03:44:39+00:00",
+ "type": "library",
+ "installation-source": "dist",
+ "autoload": {
+ "psr-4": {
+ "WP_Mock\\": "./php/WP_Mock"
+ },
+ "classmap": [
+ "php/WP_Mock.php"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "GPL-2.0-or-later"
+ ],
+ "description": "A mocking library to take the pain out of unit testing for WordPress",
+ "install-path": "../10up/wp_mock"
+ },
+ {
+ "name": "antecedent/patchwork",
+ "version": "2.1.21",
+ "version_normalized": "2.1.21.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/antecedent/patchwork.git",
+ "reference": "25c1fa0cd9a6e6d0d13863d8df8f050b6733f16d"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/antecedent/patchwork/zipball/25c1fa0cd9a6e6d0d13863d8df8f050b6733f16d",
+ "reference": "25c1fa0cd9a6e6d0d13863d8df8f050b6733f16d",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.4.0"
+ },
+ "require-dev": {
+ "phpunit/phpunit": ">=4"
+ },
+ "time": "2022-02-07T07:28:34+00:00",
+ "type": "library",
+ "installation-source": "dist",
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Ignas Rudaitis",
+ "email": "ignas.rudaitis@gmail.com"
+ }
+ ],
+ "description": "Method redefinition (monkey-patching) functionality for PHP.",
+ "homepage": "http://patchwork2.org/",
+ "keywords": [
+ "aop",
+ "aspect",
+ "interception",
+ "monkeypatching",
+ "redefinition",
+ "runkit",
+ "testing"
+ ],
+ "install-path": "../antecedent/patchwork"
+ },
+ {
+ "name": "automattic/vipwpcs",
+ "version": "2.3.3",
+ "version_normalized": "2.3.3.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/Automattic/VIP-Coding-Standards.git",
+ "reference": "6cd0a6a82bc0ac988dbf9d6a7c2e293dc8ac640b"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/Automattic/VIP-Coding-Standards/zipball/6cd0a6a82bc0ac988dbf9d6a7c2e293dc8ac640b",
+ "reference": "6cd0a6a82bc0ac988dbf9d6a7c2e293dc8ac640b",
+ "shasum": ""
+ },
+ "require": {
+ "dealerdirect/phpcodesniffer-composer-installer": "^0.4.1 || ^0.5 || ^0.6.2 || ^0.7",
+ "php": ">=5.4",
+ "sirbrillig/phpcs-variable-analysis": "^2.11.1",
+ "squizlabs/php_codesniffer": "^3.5.5",
+ "wp-coding-standards/wpcs": "^2.3"
+ },
+ "require-dev": {
+ "php-parallel-lint/php-console-highlighter": "^0.5",
+ "php-parallel-lint/php-parallel-lint": "^1.0",
+ "phpcompatibility/php-compatibility": "^9",
+ "phpcsstandards/phpcsdevtools": "^1.0",
+ "phpunit/phpunit": "^4 || ^5 || ^6 || ^7"
+ },
+ "time": "2021-09-29T16:20:23+00:00",
+ "type": "phpcodesniffer-standard",
+ "installation-source": "dist",
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Contributors",
+ "homepage": "https://github.com/Automattic/VIP-Coding-Standards/graphs/contributors"
+ }
+ ],
+ "description": "PHP_CodeSniffer rules (sniffs) to enforce WordPress VIP minimum coding conventions",
+ "keywords": [
+ "phpcs",
+ "standards",
+ "wordpress"
+ ],
+ "install-path": "../automattic/vipwpcs"
+ },
+ {
+ "name": "civicrm/composer-downloads-plugin",
+ "version": "v3.0.1",
+ "version_normalized": "3.0.1.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/civicrm/composer-downloads-plugin.git",
+ "reference": "3aabb6d259a86158d01829fc2c62a2afb9618877"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/civicrm/composer-downloads-plugin/zipball/3aabb6d259a86158d01829fc2c62a2afb9618877",
+ "reference": "3aabb6d259a86158d01829fc2c62a2afb9618877",
+ "shasum": ""
+ },
+ "require": {
+ "composer-plugin-api": "^1.1 || ^2.0",
+ "php": ">=5.6",
+ "togos/gitignore": "~1.1.1"
+ },
+ "require-dev": {
+ "composer/composer": "~1.0 || ~2.0",
+ "friendsofphp/php-cs-fixer": "^2.3",
+ "phpunit/phpunit": "^5.7",
+ "totten/process-helper": "^1.0.1"
+ },
+ "time": "2020-11-02T05:26:23+00:00",
+ "type": "composer-plugin",
+ "extra": {
+ "class": "LastCall\\DownloadsPlugin\\Plugin"
+ },
+ "installation-source": "dist",
+ "autoload": {
+ "psr-4": {
+ "LastCall\\DownloadsPlugin\\": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Rob Bayliss",
+ "email": "rob@lastcallmedia.com"
+ },
+ {
+ "name": "Tim Otten",
+ "email": "totten@civicrm.org"
+ }
+ ],
+ "description": "Composer plugin for downloading additional files within any composer package.",
+ "support": {
+ "source": "https://github.com/civicrm/composer-downloads-plugin/tree/v3.0.1"
+ },
+ "install-path": "../civicrm/composer-downloads-plugin"
+ },
+ {
+ "name": "dealerdirect/phpcodesniffer-composer-installer",
+ "version": "v0.7.2",
+ "version_normalized": "0.7.2.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/Dealerdirect/phpcodesniffer-composer-installer.git",
+ "reference": "1c968e542d8843d7cd71de3c5c9c3ff3ad71a1db"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/Dealerdirect/phpcodesniffer-composer-installer/zipball/1c968e542d8843d7cd71de3c5c9c3ff3ad71a1db",
+ "reference": "1c968e542d8843d7cd71de3c5c9c3ff3ad71a1db",
+ "shasum": ""
+ },
+ "require": {
+ "composer-plugin-api": "^1.0 || ^2.0",
+ "php": ">=5.3",
+ "squizlabs/php_codesniffer": "^2.0 || ^3.1.0 || ^4.0"
+ },
+ "require-dev": {
+ "composer/composer": "*",
+ "php-parallel-lint/php-parallel-lint": "^1.3.1",
+ "phpcompatibility/php-compatibility": "^9.0"
+ },
+ "time": "2022-02-04T12:51:07+00:00",
+ "type": "composer-plugin",
+ "extra": {
+ "class": "Dealerdirect\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\Plugin"
+ },
+ "installation-source": "dist",
+ "autoload": {
+ "psr-4": {
+ "Dealerdirect\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Franck Nijhof",
+ "email": "franck.nijhof@dealerdirect.com",
+ "homepage": "http://www.frenck.nl",
+ "role": "Developer / IT Manager"
+ },
+ {
+ "name": "Contributors",
+ "homepage": "https://github.com/Dealerdirect/phpcodesniffer-composer-installer/graphs/contributors"
+ }
+ ],
+ "description": "PHP_CodeSniffer Standards Composer Installer Plugin",
+ "homepage": "http://www.dealerdirect.com",
+ "keywords": [
+ "PHPCodeSniffer",
+ "PHP_CodeSniffer",
+ "code quality",
+ "codesniffer",
+ "composer",
+ "installer",
+ "phpcbf",
+ "phpcs",
+ "plugin",
+ "qa",
+ "quality",
+ "standard",
+ "standards",
+ "style guide",
+ "stylecheck",
+ "tests"
+ ],
+ "install-path": "../dealerdirect/phpcodesniffer-composer-installer"
+ },
+ {
+ "name": "doctrine/instantiator",
+ "version": "1.5.0",
+ "version_normalized": "1.5.0.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/doctrine/instantiator.git",
+ "reference": "0a0fa9780f5d4e507415a065172d26a98d02047b"
+ },
+ "dist": {
+ "type": "zip",
+ "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 || ^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.30 || ^5.4"
+ },
+ "time": "2022-12-30T00:15:36+00:00",
+ "type": "library",
+ "installation-source": "dist",
+ "autoload": {
+ "psr-4": {
+ "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Marco Pivetta",
+ "email": "ocramius@gmail.com",
+ "homepage": "https://ocramius.github.io/"
+ }
+ ],
+ "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors",
+ "homepage": "https://www.doctrine-project.org/projects/instantiator.html",
+ "keywords": [
+ "constructor",
+ "instantiate"
+ ],
+ "support": {
+ "issues": "https://github.com/doctrine/instantiator/issues",
+ "source": "https://github.com/doctrine/instantiator/tree/1.5.0"
+ },
+ "funding": [
+ {
+ "url": "https://www.doctrine-project.org/sponsorship.html",
+ "type": "custom"
+ },
+ {
+ "url": "https://www.patreon.com/phpdoctrine",
+ "type": "patreon"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/doctrine%2Finstantiator",
+ "type": "tidelift"
+ }
+ ],
+ "install-path": "../doctrine/instantiator"
+ },
+ {
+ "name": "hamcrest/hamcrest-php",
+ "version": "v2.0.1",
+ "version_normalized": "2.0.1.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/hamcrest/hamcrest-php.git",
+ "reference": "8c3d0a3f6af734494ad8f6fbbee0ba92422859f3"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/hamcrest/hamcrest-php/zipball/8c3d0a3f6af734494ad8f6fbbee0ba92422859f3",
+ "reference": "8c3d0a3f6af734494ad8f6fbbee0ba92422859f3",
+ "shasum": ""
+ },
+ "require": {
+ "php": "^5.3|^7.0|^8.0"
+ },
+ "replace": {
+ "cordoval/hamcrest-php": "*",
+ "davedevelopment/hamcrest-php": "*",
+ "kodova/hamcrest-php": "*"
+ },
+ "require-dev": {
+ "phpunit/php-file-iterator": "^1.4 || ^2.0",
+ "phpunit/phpunit": "^4.8.36 || ^5.7 || ^6.5 || ^7.0"
+ },
+ "time": "2020-07-09T08:09:16+00:00",
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "2.1-dev"
+ }
+ },
+ "installation-source": "dist",
+ "autoload": {
+ "classmap": [
+ "hamcrest"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "BSD-3-Clause"
+ ],
+ "description": "This is the PHP port of Hamcrest Matchers",
+ "keywords": [
+ "test"
+ ],
+ "install-path": "../hamcrest/hamcrest-php"
+ },
+ {
+ "name": "mockery/mockery",
+ "version": "1.5.1",
+ "version_normalized": "1.5.1.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/mockery/mockery.git",
+ "reference": "e92dcc83d5a51851baf5f5591d32cb2b16e3684e"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/mockery/mockery/zipball/e92dcc83d5a51851baf5f5591d32cb2b16e3684e",
+ "reference": "e92dcc83d5a51851baf5f5591d32cb2b16e3684e",
+ "shasum": ""
+ },
+ "require": {
+ "hamcrest/hamcrest-php": "^2.0.1",
+ "lib-pcre": ">=7.0",
+ "php": "^7.3 || ^8.0"
+ },
+ "conflict": {
+ "phpunit/phpunit": "<8.0"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "^8.5 || ^9.3"
+ },
+ "time": "2022-09-07T15:32:08+00:00",
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.4.x-dev"
+ }
+ },
+ "installation-source": "dist",
+ "autoload": {
+ "psr-0": {
+ "Mockery": "library/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "BSD-3-Clause"
+ ],
+ "authors": [
+ {
+ "name": "Pádraic Brady",
+ "email": "padraic.brady@gmail.com",
+ "homepage": "http://blog.astrumfutura.com"
+ },
+ {
+ "name": "Dave Marshall",
+ "email": "dave.marshall@atstsolutions.co.uk",
+ "homepage": "http://davedevelopment.co.uk"
+ }
+ ],
+ "description": "Mockery is a simple yet flexible PHP mock object framework",
+ "homepage": "https://github.com/mockery/mockery",
+ "keywords": [
+ "BDD",
+ "TDD",
+ "library",
+ "mock",
+ "mock objects",
+ "mockery",
+ "stub",
+ "test",
+ "test double",
+ "testing"
+ ],
+ "support": {
+ "issues": "https://github.com/mockery/mockery/issues",
+ "source": "https://github.com/mockery/mockery/tree/1.5.1"
+ },
+ "install-path": "../mockery/mockery"
+ },
+ {
+ "name": "myclabs/deep-copy",
+ "version": "1.11.0",
+ "version_normalized": "1.11.0.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/myclabs/DeepCopy.git",
+ "reference": "14daed4296fae74d9e3201d2c4925d1acb7aa614"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/14daed4296fae74d9e3201d2c4925d1acb7aa614",
+ "reference": "14daed4296fae74d9e3201d2c4925d1acb7aa614",
+ "shasum": ""
+ },
+ "require": {
+ "php": "^7.1 || ^8.0"
+ },
+ "conflict": {
+ "doctrine/collections": "<1.6.8",
+ "doctrine/common": "<2.13.3 || >=3,<3.2.2"
+ },
+ "require-dev": {
+ "doctrine/collections": "^1.6.8",
+ "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",
+ "type": "library",
+ "installation-source": "dist",
+ "autoload": {
+ "files": [
+ "src/DeepCopy/deep_copy.php"
+ ],
+ "psr-4": {
+ "DeepCopy\\": "src/DeepCopy/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "description": "Create deep copies (clones) of your objects",
+ "keywords": [
+ "clone",
+ "copy",
+ "duplicate",
+ "object",
+ "object graph"
+ ],
+ "funding": [
+ {
+ "url": "https://tidelift.com/funding/github/packagist/myclabs/deep-copy",
+ "type": "tidelift"
+ }
+ ],
+ "install-path": "../myclabs/deep-copy"
+ },
+ {
+ "name": "nikic/php-parser",
+ "version": "v4.15.3",
+ "version_normalized": "4.15.3.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/nikic/PHP-Parser.git",
+ "reference": "570e980a201d8ed0236b0a62ddf2c9cbb2034039"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/570e980a201d8ed0236b0a62ddf2c9cbb2034039",
+ "reference": "570e980a201d8ed0236b0a62ddf2c9cbb2034039",
+ "shasum": ""
+ },
+ "require": {
+ "ext-tokenizer": "*",
+ "php": ">=7.0"
+ },
+ "require-dev": {
+ "ircmaxell/php-yacc": "^0.0.7",
+ "phpunit/phpunit": "^6.5 || ^7.0 || ^8.0 || ^9.0"
+ },
+ "time": "2023-01-16T22:05:37+00:00",
+ "bin": [
+ "bin/php-parse"
+ ],
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "4.9-dev"
+ }
+ },
+ "installation-source": "dist",
+ "autoload": {
+ "psr-4": {
+ "PhpParser\\": "lib/PhpParser"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "BSD-3-Clause"
+ ],
+ "authors": [
+ {
+ "name": "Nikita Popov"
+ }
+ ],
+ "description": "A PHP parser written in PHP",
+ "keywords": [
+ "parser",
+ "php"
+ ],
+ "support": {
+ "issues": "https://github.com/nikic/PHP-Parser/issues",
+ "source": "https://github.com/nikic/PHP-Parser/tree/v4.15.3"
+ },
+ "install-path": "../nikic/php-parser"
+ },
+ {
+ "name": "phar-io/manifest",
+ "version": "2.0.3",
+ "version_normalized": "2.0.3.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/phar-io/manifest.git",
+ "reference": "97803eca37d319dfa7826cc2437fc020857acb53"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/phar-io/manifest/zipball/97803eca37d319dfa7826cc2437fc020857acb53",
+ "reference": "97803eca37d319dfa7826cc2437fc020857acb53",
+ "shasum": ""
+ },
+ "require": {
+ "ext-dom": "*",
+ "ext-phar": "*",
+ "ext-xmlwriter": "*",
+ "phar-io/version": "^3.0.1",
+ "php": "^7.2 || ^8.0"
+ },
+ "time": "2021-07-20T11:28:43+00:00",
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "2.0.x-dev"
+ }
+ },
+ "installation-source": "dist",
+ "autoload": {
+ "classmap": [
+ "src/"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "BSD-3-Clause"
+ ],
+ "authors": [
+ {
+ "name": "Arne Blankerts",
+ "email": "arne@blankerts.de",
+ "role": "Developer"
+ },
+ {
+ "name": "Sebastian Heuer",
+ "email": "sebastian@phpeople.de",
+ "role": "Developer"
+ },
+ {
+ "name": "Sebastian Bergmann",
+ "email": "sebastian@phpunit.de",
+ "role": "Developer"
+ }
+ ],
+ "description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)",
+ "install-path": "../phar-io/manifest"
+ },
+ {
+ "name": "phar-io/version",
+ "version": "3.2.1",
+ "version_normalized": "3.2.1.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/phar-io/version.git",
+ "reference": "4f7fd7836c6f332bb2933569e566a0d6c4cbed74"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/phar-io/version/zipball/4f7fd7836c6f332bb2933569e566a0d6c4cbed74",
+ "reference": "4f7fd7836c6f332bb2933569e566a0d6c4cbed74",
+ "shasum": ""
+ },
+ "require": {
+ "php": "^7.2 || ^8.0"
+ },
+ "time": "2022-02-21T01:04:05+00:00",
+ "type": "library",
+ "installation-source": "dist",
+ "autoload": {
+ "classmap": [
+ "src/"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "BSD-3-Clause"
+ ],
+ "authors": [
+ {
+ "name": "Arne Blankerts",
+ "email": "arne@blankerts.de",
+ "role": "Developer"
+ },
+ {
+ "name": "Sebastian Heuer",
+ "email": "sebastian@phpeople.de",
+ "role": "Developer"
+ },
+ {
+ "name": "Sebastian Bergmann",
+ "email": "sebastian@phpunit.de",
+ "role": "Developer"
+ }
+ ],
+ "description": "Library for handling version information and constraints",
+ "install-path": "../phar-io/version"
+ },
+ {
+ "name": "php-stubs/wordpress-stubs",
+ "version": "v6.1.1",
+ "version_normalized": "6.1.1.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/php-stubs/wordpress-stubs.git",
+ "reference": "601c429ba8d91ef50a2a1bec05a7cd38b88064ff"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/php-stubs/wordpress-stubs/zipball/601c429ba8d91ef50a2a1bec05a7cd38b88064ff",
+ "reference": "601c429ba8d91ef50a2a1bec05a7cd38b88064ff",
+ "shasum": ""
+ },
+ "require-dev": {
+ "nikic/php-parser": "< 4.12.0",
+ "php": "~7.3 || ~8.0",
+ "php-stubs/generator": "^0.8.3",
+ "phpdocumentor/reflection-docblock": "^5.3",
+ "phpstan/phpstan": "^1.2"
+ },
+ "suggest": {
+ "paragonie/sodium_compat": "Pure PHP implementation of libsodium",
+ "symfony/polyfill-php73": "Symfony polyfill backporting some PHP 7.3+ features to lower PHP versions",
+ "szepeviktor/phpstan-wordpress": "WordPress extensions for PHPStan"
+ },
+ "time": "2023-02-09T11:10:35+00:00",
+ "type": "library",
+ "installation-source": "dist",
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "description": "WordPress function and class declaration stubs for static analysis.",
+ "homepage": "https://github.com/php-stubs/wordpress-stubs",
+ "keywords": [
+ "PHPStan",
+ "static analysis",
+ "wordpress"
+ ],
+ "support": {
+ "issues": "https://github.com/php-stubs/wordpress-stubs/issues",
+ "source": "https://github.com/php-stubs/wordpress-stubs/tree/v6.1.1"
+ },
+ "install-path": "../php-stubs/wordpress-stubs"
+ },
+ {
+ "name": "phpcompatibility/php-compatibility",
+ "version": "9.3.5",
+ "version_normalized": "9.3.5.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/PHPCompatibility/PHPCompatibility.git",
+ "reference": "9fb324479acf6f39452e0655d2429cc0d3914243"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/PHPCompatibility/PHPCompatibility/zipball/9fb324479acf6f39452e0655d2429cc0d3914243",
+ "reference": "9fb324479acf6f39452e0655d2429cc0d3914243",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.3",
+ "squizlabs/php_codesniffer": "^2.3 || ^3.0.2"
+ },
+ "conflict": {
+ "squizlabs/php_codesniffer": "2.6.2"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "~4.5 || ^5.0 || ^6.0 || ^7.0"
+ },
+ "suggest": {
+ "dealerdirect/phpcodesniffer-composer-installer": "^0.5 || This Composer plugin will sort out the PHPCS 'installed_paths' automatically.",
+ "roave/security-advisories": "dev-master || Helps prevent installing dependencies with known security issues."
+ },
+ "time": "2019-12-27T09:44:58+00:00",
+ "type": "phpcodesniffer-standard",
+ "installation-source": "dist",
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "LGPL-3.0-or-later"
+ ],
+ "authors": [
+ {
+ "name": "Wim Godden",
+ "homepage": "https://github.com/wimg",
+ "role": "lead"
+ },
+ {
+ "name": "Juliette Reinders Folmer",
+ "homepage": "https://github.com/jrfnl",
+ "role": "lead"
+ },
+ {
+ "name": "Contributors",
+ "homepage": "https://github.com/PHPCompatibility/PHPCompatibility/graphs/contributors"
+ }
+ ],
+ "description": "A set of sniffs for PHP_CodeSniffer that checks for PHP cross-version compatibility.",
+ "homepage": "http://techblog.wimgodden.be/tag/codesniffer/",
+ "keywords": [
+ "compatibility",
+ "phpcs",
+ "standards"
+ ],
+ "install-path": "../phpcompatibility/php-compatibility"
+ },
+ {
+ "name": "phpcompatibility/phpcompatibility-paragonie",
+ "version": "1.3.2",
+ "version_normalized": "1.3.2.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/PHPCompatibility/PHPCompatibilityParagonie.git",
+ "reference": "bba5a9dfec7fcfbd679cfaf611d86b4d3759da26"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/PHPCompatibility/PHPCompatibilityParagonie/zipball/bba5a9dfec7fcfbd679cfaf611d86b4d3759da26",
+ "reference": "bba5a9dfec7fcfbd679cfaf611d86b4d3759da26",
+ "shasum": ""
+ },
+ "require": {
+ "phpcompatibility/php-compatibility": "^9.0"
+ },
+ "require-dev": {
+ "dealerdirect/phpcodesniffer-composer-installer": "^0.7",
+ "paragonie/random_compat": "dev-master",
+ "paragonie/sodium_compat": "dev-master"
+ },
+ "suggest": {
+ "dealerdirect/phpcodesniffer-composer-installer": "^0.7 || This Composer plugin will sort out the PHP_CodeSniffer 'installed_paths' automatically.",
+ "roave/security-advisories": "dev-master || Helps prevent installing dependencies with known security issues."
+ },
+ "time": "2022-10-25T01:46:02+00:00",
+ "type": "phpcodesniffer-standard",
+ "installation-source": "dist",
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "LGPL-3.0-or-later"
+ ],
+ "authors": [
+ {
+ "name": "Wim Godden",
+ "role": "lead"
+ },
+ {
+ "name": "Juliette Reinders Folmer",
+ "role": "lead"
+ }
+ ],
+ "description": "A set of rulesets for PHP_CodeSniffer to check for PHP cross-version compatibility issues in projects, while accounting for polyfills provided by the Paragonie polyfill libraries.",
+ "homepage": "http://phpcompatibility.com/",
+ "keywords": [
+ "compatibility",
+ "paragonie",
+ "phpcs",
+ "polyfill",
+ "standards",
+ "static analysis"
+ ],
+ "support": {
+ "issues": "https://github.com/PHPCompatibility/PHPCompatibilityParagonie/issues",
+ "source": "https://github.com/PHPCompatibility/PHPCompatibilityParagonie"
+ },
+ "install-path": "../phpcompatibility/phpcompatibility-paragonie"
+ },
+ {
+ "name": "phpcompatibility/phpcompatibility-wp",
+ "version": "2.1.4",
+ "version_normalized": "2.1.4.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/PHPCompatibility/PHPCompatibilityWP.git",
+ "reference": "b6c1e3ee1c35de6c41a511d5eb9bd03e447480a5"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/PHPCompatibility/PHPCompatibilityWP/zipball/b6c1e3ee1c35de6c41a511d5eb9bd03e447480a5",
+ "reference": "b6c1e3ee1c35de6c41a511d5eb9bd03e447480a5",
+ "shasum": ""
+ },
+ "require": {
+ "phpcompatibility/php-compatibility": "^9.0",
+ "phpcompatibility/phpcompatibility-paragonie": "^1.0"
+ },
+ "require-dev": {
+ "dealerdirect/phpcodesniffer-composer-installer": "^0.7"
+ },
+ "suggest": {
+ "dealerdirect/phpcodesniffer-composer-installer": "^0.7 || This Composer plugin will sort out the PHP_CodeSniffer 'installed_paths' automatically.",
+ "roave/security-advisories": "dev-master || Helps prevent installing dependencies with known security issues."
+ },
+ "time": "2022-10-24T09:00:36+00:00",
+ "type": "phpcodesniffer-standard",
+ "installation-source": "dist",
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "LGPL-3.0-or-later"
+ ],
+ "authors": [
+ {
+ "name": "Wim Godden",
+ "role": "lead"
+ },
+ {
+ "name": "Juliette Reinders Folmer",
+ "role": "lead"
+ }
+ ],
+ "description": "A ruleset for PHP_CodeSniffer to check for PHP cross-version compatibility issues in projects, while accounting for polyfills provided by WordPress.",
+ "homepage": "http://phpcompatibility.com/",
+ "keywords": [
+ "compatibility",
+ "phpcs",
+ "standards",
+ "static analysis",
+ "wordpress"
+ ],
+ "support": {
+ "issues": "https://github.com/PHPCompatibility/PHPCompatibilityWP/issues",
+ "source": "https://github.com/PHPCompatibility/PHPCompatibilityWP"
+ },
+ "install-path": "../phpcompatibility/phpcompatibility-wp"
+ },
+ {
+ "name": "phpunit/php-code-coverage",
+ "version": "9.2.24",
+ "version_normalized": "9.2.24.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/sebastianbergmann/php-code-coverage.git",
+ "reference": "2cf940ebc6355a9d430462811b5aaa308b174bed"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/2cf940ebc6355a9d430462811b5aaa308b174bed",
+ "reference": "2cf940ebc6355a9d430462811b5aaa308b174bed",
+ "shasum": ""
+ },
+ "require": {
+ "ext-dom": "*",
+ "ext-libxml": "*",
+ "ext-xmlwriter": "*",
+ "nikic/php-parser": "^4.14",
+ "php": ">=7.3",
+ "phpunit/php-file-iterator": "^3.0.3",
+ "phpunit/php-text-template": "^2.0.2",
+ "sebastian/code-unit-reverse-lookup": "^2.0.2",
+ "sebastian/complexity": "^2.0",
+ "sebastian/environment": "^5.1.2",
+ "sebastian/lines-of-code": "^1.0.3",
+ "sebastian/version": "^3.0.1",
+ "theseer/tokenizer": "^1.2.0"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "^9.3"
+ },
+ "suggest": {
+ "ext-pcov": "*",
+ "ext-xdebug": "*"
+ },
+ "time": "2023-01-26T08:26:55+00:00",
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "9.2-dev"
+ }
+ },
+ "installation-source": "dist",
+ "autoload": {
+ "classmap": [
+ "src/"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "BSD-3-Clause"
+ ],
+ "authors": [
+ {
+ "name": "Sebastian Bergmann",
+ "email": "sebastian@phpunit.de",
+ "role": "lead"
+ }
+ ],
+ "description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.",
+ "homepage": "https://github.com/sebastianbergmann/php-code-coverage",
+ "keywords": [
+ "coverage",
+ "testing",
+ "xunit"
+ ],
+ "support": {
+ "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues",
+ "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.24"
+ },
+ "funding": [
+ {
+ "url": "https://github.com/sebastianbergmann",
+ "type": "github"
+ }
+ ],
+ "install-path": "../phpunit/php-code-coverage"
+ },
+ {
+ "name": "phpunit/php-file-iterator",
+ "version": "3.0.6",
+ "version_normalized": "3.0.6.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/sebastianbergmann/php-file-iterator.git",
+ "reference": "cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf",
+ "reference": "cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=7.3"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "^9.3"
+ },
+ "time": "2021-12-02T12:48:52+00:00",
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "3.0-dev"
+ }
+ },
+ "installation-source": "dist",
+ "autoload": {
+ "classmap": [
+ "src/"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "BSD-3-Clause"
+ ],
+ "authors": [
+ {
+ "name": "Sebastian Bergmann",
+ "email": "sebastian@phpunit.de",
+ "role": "lead"
+ }
+ ],
+ "description": "FilterIterator implementation that filters files based on a list of suffixes.",
+ "homepage": "https://github.com/sebastianbergmann/php-file-iterator/",
+ "keywords": [
+ "filesystem",
+ "iterator"
+ ],
+ "funding": [
+ {
+ "url": "https://github.com/sebastianbergmann",
+ "type": "github"
+ }
+ ],
+ "install-path": "../phpunit/php-file-iterator"
+ },
+ {
+ "name": "phpunit/php-invoker",
+ "version": "3.1.1",
+ "version_normalized": "3.1.1.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/sebastianbergmann/php-invoker.git",
+ "reference": "5a10147d0aaf65b58940a0b72f71c9ac0423cc67"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/sebastianbergmann/php-invoker/zipball/5a10147d0aaf65b58940a0b72f71c9ac0423cc67",
+ "reference": "5a10147d0aaf65b58940a0b72f71c9ac0423cc67",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=7.3"
+ },
+ "require-dev": {
+ "ext-pcntl": "*",
+ "phpunit/phpunit": "^9.3"
+ },
+ "suggest": {
+ "ext-pcntl": "*"
+ },
+ "time": "2020-09-28T05:58:55+00:00",
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "3.1-dev"
+ }
+ },
+ "installation-source": "dist",
+ "autoload": {
+ "classmap": [
+ "src/"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "BSD-3-Clause"
+ ],
+ "authors": [
+ {
+ "name": "Sebastian Bergmann",
+ "email": "sebastian@phpunit.de",
+ "role": "lead"
+ }
+ ],
+ "description": "Invoke callables with a timeout",
+ "homepage": "https://github.com/sebastianbergmann/php-invoker/",
+ "keywords": [
+ "process"
+ ],
+ "funding": [
+ {
+ "url": "https://github.com/sebastianbergmann",
+ "type": "github"
+ }
+ ],
+ "install-path": "../phpunit/php-invoker"
+ },
+ {
+ "name": "phpunit/php-text-template",
+ "version": "2.0.4",
+ "version_normalized": "2.0.4.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/sebastianbergmann/php-text-template.git",
+ "reference": "5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28",
+ "reference": "5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=7.3"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "^9.3"
+ },
+ "time": "2020-10-26T05:33:50+00:00",
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "2.0-dev"
+ }
+ },
+ "installation-source": "dist",
+ "autoload": {
+ "classmap": [
+ "src/"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "BSD-3-Clause"
+ ],
+ "authors": [
+ {
+ "name": "Sebastian Bergmann",
+ "email": "sebastian@phpunit.de",
+ "role": "lead"
+ }
+ ],
+ "description": "Simple template engine.",
+ "homepage": "https://github.com/sebastianbergmann/php-text-template/",
+ "keywords": [
+ "template"
+ ],
+ "funding": [
+ {
+ "url": "https://github.com/sebastianbergmann",
+ "type": "github"
+ }
+ ],
+ "install-path": "../phpunit/php-text-template"
+ },
+ {
+ "name": "phpunit/php-timer",
+ "version": "5.0.3",
+ "version_normalized": "5.0.3.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/sebastianbergmann/php-timer.git",
+ "reference": "5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2",
+ "reference": "5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=7.3"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "^9.3"
+ },
+ "time": "2020-10-26T13:16:10+00:00",
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "5.0-dev"
+ }
+ },
+ "installation-source": "dist",
+ "autoload": {
+ "classmap": [
+ "src/"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "BSD-3-Clause"
+ ],
+ "authors": [
+ {
+ "name": "Sebastian Bergmann",
+ "email": "sebastian@phpunit.de",
+ "role": "lead"
+ }
+ ],
+ "description": "Utility class for timing",
+ "homepage": "https://github.com/sebastianbergmann/php-timer/",
+ "keywords": [
+ "timer"
+ ],
+ "funding": [
+ {
+ "url": "https://github.com/sebastianbergmann",
+ "type": "github"
+ }
+ ],
+ "install-path": "../phpunit/php-timer"
+ },
+ {
+ "name": "phpunit/phpunit",
+ "version": "9.6.3",
+ "version_normalized": "9.6.3.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/sebastianbergmann/phpunit.git",
+ "reference": "e7b1615e3e887d6c719121c6d4a44b0ab9645555"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/e7b1615e3e887d6c719121c6d4a44b0ab9645555",
+ "reference": "e7b1615e3e887d6c719121c6d4a44b0ab9645555",
+ "shasum": ""
+ },
+ "require": {
+ "doctrine/instantiator": "^1.3.1 || ^2",
+ "ext-dom": "*",
+ "ext-json": "*",
+ "ext-libxml": "*",
+ "ext-mbstring": "*",
+ "ext-xml": "*",
+ "ext-xmlwriter": "*",
+ "myclabs/deep-copy": "^1.10.1",
+ "phar-io/manifest": "^2.0.3",
+ "phar-io/version": "^3.0.2",
+ "php": ">=7.3",
+ "phpunit/php-code-coverage": "^9.2.13",
+ "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.8",
+ "sebastian/diff": "^4.0.3",
+ "sebastian/environment": "^5.1.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.2",
+ "sebastian/version": "^3.0.2"
+ },
+ "suggest": {
+ "ext-soap": "*",
+ "ext-xdebug": "*"
+ },
+ "time": "2023-02-04T13:37:15+00:00",
+ "bin": [
+ "phpunit"
+ ],
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "9.6-dev"
+ }
+ },
+ "installation-source": "dist",
+ "autoload": {
+ "files": [
+ "src/Framework/Assert/Functions.php"
+ ],
+ "classmap": [
+ "src/"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "BSD-3-Clause"
+ ],
+ "authors": [
+ {
+ "name": "Sebastian Bergmann",
+ "email": "sebastian@phpunit.de",
+ "role": "lead"
+ }
+ ],
+ "description": "The PHP Unit Testing framework.",
+ "homepage": "https://phpunit.de/",
+ "keywords": [
+ "phpunit",
+ "testing",
+ "xunit"
+ ],
+ "support": {
+ "issues": "https://github.com/sebastianbergmann/phpunit/issues",
+ "source": "https://github.com/sebastianbergmann/phpunit/tree/9.6.3"
+ },
+ "funding": [
+ {
+ "url": "https://phpunit.de/sponsors.html",
+ "type": "custom"
+ },
+ {
+ "url": "https://github.com/sebastianbergmann",
+ "type": "github"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/phpunit/phpunit",
+ "type": "tidelift"
+ }
+ ],
+ "install-path": "../phpunit/phpunit"
+ },
+ {
+ "name": "pimple/pimple",
+ "version": "v3.3.1",
+ "version_normalized": "3.3.1.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/silexphp/Pimple.git",
+ "reference": "21e45061c3429b1e06233475cc0e1f6fc774d5b0"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/silexphp/Pimple/zipball/21e45061c3429b1e06233475cc0e1f6fc774d5b0",
+ "reference": "21e45061c3429b1e06233475cc0e1f6fc774d5b0",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=7.2.5",
+ "psr/container": "^1.0"
+ },
+ "require-dev": {
+ "symfony/phpunit-bridge": "^5.0"
+ },
+ "time": "2020-11-24T20:35:42+00:00",
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "3.3.x-dev"
+ }
+ },
+ "installation-source": "dist",
+ "autoload": {
+ "psr-0": {
+ "Pimple": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Fabien Potencier",
+ "email": "fabien@symfony.com"
+ }
+ ],
+ "description": "Pimple, a simple Dependency Injection Container",
+ "homepage": "https://pimple.symfony.com",
+ "keywords": [
+ "container",
+ "dependency injection"
+ ],
+ "install-path": "../pimple/pimple"
+ },
+ {
+ "name": "psr/container",
+ "version": "1.1.2",
+ "version_normalized": "1.1.2.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/php-fig/container.git",
+ "reference": "513e0666f7216c7459170d56df27dfcefe1689ea"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/php-fig/container/zipball/513e0666f7216c7459170d56df27dfcefe1689ea",
+ "reference": "513e0666f7216c7459170d56df27dfcefe1689ea",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=7.4.0"
+ },
+ "time": "2021-11-05T16:50:12+00:00",
+ "type": "library",
+ "installation-source": "dist",
+ "autoload": {
+ "psr-4": {
+ "Psr\\Container\\": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "PHP-FIG",
+ "homepage": "https://www.php-fig.org/"
+ }
+ ],
+ "description": "Common Container Interface (PHP FIG PSR-11)",
+ "homepage": "https://github.com/php-fig/container",
+ "keywords": [
+ "PSR-11",
+ "container",
+ "container-interface",
+ "container-interop",
+ "psr"
+ ],
+ "install-path": "../psr/container"
+ },
+ {
+ "name": "roave/security-advisories",
+ "version": "dev-latest",
+ "version_normalized": "dev-latest",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/Roave/SecurityAdvisories.git",
+ "reference": "72ca3d8b529b6679ccbefcdc1433fa6aeb7564b8"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/Roave/SecurityAdvisories/zipball/72ca3d8b529b6679ccbefcdc1433fa6aeb7564b8",
+ "reference": "72ca3d8b529b6679ccbefcdc1433fa6aeb7564b8",
+ "shasum": ""
+ },
+ "conflict": {
+ "3f/pygmentize": "<1.2",
+ "admidio/admidio": "<4.1.9",
+ "adodb/adodb-php": "<=5.20.20|>=5.21,<=5.21.3",
+ "aheinze/cockpit": "<=2.2.1",
+ "akaunting/akaunting": "<2.1.13",
+ "akeneo/pim-community-dev": "<5.0.119|>=6,<6.0.53",
+ "alextselegidis/easyappointments": "<=1.4.3",
+ "alterphp/easyadmin-extension-bundle": ">=1.2,<1.2.11|>=1.3,<1.3.1",
+ "amazing/media2click": ">=1,<1.3.3",
+ "amphp/artax": "<1.0.6|>=2,<2.0.6",
+ "amphp/http": "<1.0.1",
+ "amphp/http-client": ">=4,<4.4",
+ "anchorcms/anchor-cms": "<=0.12.7",
+ "andreapollastri/cipi": "<=3.1.15",
+ "apereo/phpcas": "<1.6",
+ "api-platform/core": ">=2.2,<2.2.10|>=2.3,<2.3.6",
+ "appwrite/server-ce": "<0.11.1|>=0.12,<0.12.2",
+ "arc/web": "<3",
+ "area17/twill": "<1.2.5|>=2,<2.5.3",
+ "asymmetricrypt/asymmetricrypt": ">=0,<9.9.99",
+ "automad/automad": "<1.8",
+ "awesome-support/awesome-support": "<=6.0.7",
+ "aws/aws-sdk-php": ">=3,<3.2.1",
+ "backdrop/backdrop": "<=1.23",
+ "badaso/core": "<2.7",
+ "bagisto/bagisto": "<0.1.5",
+ "barrelstrength/sprout-base-email": "<1.2.7",
+ "barrelstrength/sprout-forms": "<3.9",
+ "barryvdh/laravel-translation-manager": "<0.6.2",
+ "barzahlen/barzahlen-php": "<2.0.1",
+ "baserproject/basercms": "<4.7.2",
+ "bassjobsen/bootstrap-3-typeahead": ">4.0.2",
+ "billz/raspap-webgui": "<=2.6.6",
+ "bk2k/bootstrap-package": ">=7.1,<7.1.2|>=8,<8.0.8|>=9,<9.0.4|>=9.1,<9.1.3|>=10,<10.0.10|>=11,<11.0.3",
+ "bmarshall511/wordpress_zero_spam": "<5.2.13",
+ "bolt/bolt": "<3.7.2",
+ "bolt/core": "<=4.2",
+ "bottelet/flarepoint": "<2.2.1",
+ "brightlocal/phpwhois": "<=4.2.5",
+ "brotkrueml/codehighlight": "<2.7",
+ "brotkrueml/schema": "<1.13.1|>=2,<2.5.1",
+ "brotkrueml/typo3-matomo-integration": "<1.3.2",
+ "buddypress/buddypress": "<7.2.1",
+ "bugsnag/bugsnag-laravel": ">=2,<2.0.2",
+ "bytefury/crater": "<6.0.2",
+ "cachethq/cachet": "<2.5.1",
+ "cakephp/cakephp": "<3.10.3|>=4,<4.0.10|>=4.2,<4.2.12|>=4.3,<4.3.11|>=4.4,<4.4.10|= 1.3.7|>=4.1,<4.1.4",
+ "cakephp/database": ">=4.2,<4.2.12|>=4.3,<4.3.11|>=4.4,<4.4.10",
+ "cardgate/magento2": "<2.0.33",
+ "cart2quote/module-quotation": ">=4.1.6,<=4.4.5|>=5,<5.4.4",
+ "cartalyst/sentry": "<=2.1.6",
+ "catfan/medoo": "<1.7.5",
+ "centreon/centreon": "<22.10-beta.1",
+ "cesnet/simplesamlphp-module-proxystatistics": "<3.1",
+ "cockpit-hq/cockpit": "<2.3.9",
+ "codeception/codeception": "<3.1.3|>=4,<4.1.22",
+ "codeigniter/framework": "<=3.0.6",
+ "codeigniter4/framework": "<4.2.11",
+ "codeigniter4/shield": "= 1.0.0-beta",
+ "codiad/codiad": "<=2.8.4",
+ "composer/composer": "<1.10.26|>=2-alpha.1,<2.2.12|>=2.3,<2.3.5",
+ "concrete5/concrete5": "<=9.1.3|>= 9.0.0RC1, < 9.1.3",
+ "concrete5/core": "<8.5.8|>=9,<9.1",
+ "contao-components/mediaelement": ">=2.14.2,<2.21.1",
+ "contao/contao": ">=4,<4.4.56|>=4.5,<4.9.18|>=4.10,<4.11.7|>=4.13,<4.13.3",
+ "contao/core": ">=2,<3.5.39",
+ "contao/core-bundle": "<4.9.18|>=4.10,<4.11.7|>=4.13,<4.13.3|= 4.10.0",
+ "contao/listing-bundle": ">=4,<4.4.8",
+ "contao/managed-edition": "<=1.5",
+ "craftcms/cms": "<3.7.55.2|>= 4.0.0-RC1, < 4.2.1",
+ "croogo/croogo": "<3.0.7",
+ "cuyz/valinor": "<0.12",
+ "czproject/git-php": "<4.0.3",
+ "darylldoyle/safe-svg": "<1.9.10",
+ "datadog/dd-trace": ">=0.30,<0.30.2",
+ "david-garcia/phpwhois": "<=4.3.1",
+ "dbrisinajumi/d2files": "<1",
+ "derhansen/fe_change_pwd": "<2.0.5|>=3,<3.0.3",
+ "derhansen/sf_event_mgt": "<4.3.1|>=5,<5.1.1",
+ "directmailteam/direct-mail": "<5.2.4",
+ "doctrine/annotations": ">=1,<1.2.7",
+ "doctrine/cache": ">=1,<1.3.2|>=1.4,<1.4.2",
+ "doctrine/common": ">=2,<2.4.3|>=2.5,<2.5.1",
+ "doctrine/dbal": ">=2,<2.0.8|>=2.1,<2.1.2|>=3,<3.1.4",
+ "doctrine/doctrine-bundle": "<1.5.2",
+ "doctrine/doctrine-module": "<=0.7.1",
+ "doctrine/mongodb-odm": ">=1,<1.0.2",
+ "doctrine/mongodb-odm-bundle": ">=2,<3.0.1",
+ "doctrine/orm": ">=2,<2.4.8|>=2.5,<2.5.1|>=2.8.3,<2.8.4",
+ "dolibarr/dolibarr": "<16|>=16.0.1,<16.0.3|= 12.0.5|>= 3.3.beta1, < 13.0.2",
+ "dompdf/dompdf": "<2.0.2|= 2.0.2",
+ "drupal/core": ">=7,<7.91|>=8,<9.3.19|>=9.4,<9.4.3",
+ "drupal/drupal": ">=7,<7.80|>=8,<8.9.16|>=9,<9.1.12|>=9.2,<9.2.4",
+ "dweeves/magmi": "<=0.7.24",
+ "ecodev/newsletter": "<=4",
+ "ectouch/ectouch": "<=2.7.2",
+ "elefant/cms": "<1.3.13",
+ "elgg/elgg": "<3.3.24|>=4,<4.0.5",
+ "endroid/qr-code-bundle": "<3.4.2",
+ "enshrined/svg-sanitize": "<0.15",
+ "erusev/parsedown": "<1.7.2",
+ "ether/logs": "<3.0.4",
+ "exceedone/exment": "<4.4.3|>=5,<5.0.3",
+ "exceedone/laravel-admin": "= 3.0.0|<2.2.3",
+ "ezsystems/demobundle": ">=5.4,<5.4.6.1",
+ "ezsystems/ez-support-tools": ">=2.2,<2.2.3",
+ "ezsystems/ezdemo-ls-extension": ">=5.4,<5.4.2.1",
+ "ezsystems/ezfind-ls": ">=5.3,<5.3.6.1|>=5.4,<5.4.11.1|>=2017.12,<2017.12.0.1",
+ "ezsystems/ezplatform": "<=1.13.6|>=2,<=2.5.24",
+ "ezsystems/ezplatform-admin-ui": ">=1.3,<1.3.5|>=1.4,<1.4.6|>=1.5,<1.5.29|>=2.3,<2.3.26",
+ "ezsystems/ezplatform-admin-ui-assets": ">=4,<4.2.1|>=5,<5.0.1|>=5.1,<5.1.1",
+ "ezsystems/ezplatform-graphql": ">=1-rc.1,<1.0.13|>=2-beta.1,<2.3.12",
+ "ezsystems/ezplatform-kernel": "<=1.2.5|>=1.3,<1.3.26",
+ "ezsystems/ezplatform-rest": ">=1.2,<=1.2.2|>=1.3,<1.3.8",
+ "ezsystems/ezplatform-richtext": ">=2.3,<=2.3.7",
+ "ezsystems/ezplatform-user": ">=1,<1.0.1",
+ "ezsystems/ezpublish-kernel": "<=6.13.8.1|>=7,<7.5.30",
+ "ezsystems/ezpublish-legacy": "<=2017.12.7.3|>=2018.6,<=2019.3.5.1",
+ "ezsystems/platform-ui-assets-bundle": ">=4.2,<4.2.3",
+ "ezsystems/repository-forms": ">=2.3,<2.3.2.1|>=2.5,<2.5.15",
+ "ezyang/htmlpurifier": "<4.1.1",
+ "facade/ignition": "<1.16.15|>=2,<2.4.2|>=2.5,<2.5.2",
+ "facturascripts/facturascripts": "<=2022.8",
+ "feehi/cms": "<=2.1.1",
+ "feehi/feehicms": "<=2.1.1",
+ "fenom/fenom": "<=2.12.1",
+ "filegator/filegator": "<7.8",
+ "firebase/php-jwt": "<2",
+ "fixpunkt/fp-masterquiz": "<2.2.1|>=3,<3.5.2",
+ "fixpunkt/fp-newsletter": "<1.1.1|>=2,<2.1.2|>=2.2,<3.2.6",
+ "flarum/core": "<1.6.3",
+ "flarum/mentions": "<1.6.3",
+ "flarum/sticky": ">=0.1-beta.14,<=0.1-beta.15",
+ "flarum/tags": "<=0.1-beta.13",
+ "fluidtypo3/vhs": "<5.1.1",
+ "fof/byobu": ">=0.3-beta.2,<1.1.7",
+ "fof/upload": "<1.2.3",
+ "fooman/tcpdf": "<6.2.22",
+ "forkcms/forkcms": "<5.11.1",
+ "fossar/tcpdf-parser": "<6.2.22",
+ "francoisjacquet/rosariosis": "<10.1",
+ "friendsofsymfony/oauth2-php": "<1.3",
+ "friendsofsymfony/rest-bundle": ">=1.2,<1.2.2",
+ "friendsofsymfony/user-bundle": ">=1.2,<1.3.5",
+ "friendsoftypo3/mediace": ">=7.6.2,<7.6.5",
+ "froala/wysiwyg-editor": "<3.2.7",
+ "froxlor/froxlor": "<2.0.10",
+ "fuel/core": "<1.8.1",
+ "gaoming13/wechat-php-sdk": "<=1.10.2",
+ "genix/cms": "<=1.1.11",
+ "getgrav/grav": "<1.7.34",
+ "getkirby/cms": "= 3.8.0|<3.5.8.2|>=3.6,<3.6.6.2|>=3.7,<3.7.5.1",
+ "getkirby/panel": "<2.5.14",
+ "getkirby/starterkit": "<=3.7.0.2",
+ "gilacms/gila": "<=1.11.4",
+ "globalpayments/php-sdk": "<2",
+ "google/protobuf": "<3.15",
+ "gos/web-socket-bundle": "<1.10.4|>=2,<2.6.1|>=3,<3.3",
+ "gree/jose": "<=2.2",
+ "gregwar/rst": "<1.0.3",
+ "grumpydictator/firefly-iii": "<5.8",
+ "guzzlehttp/guzzle": "<6.5.8|>=7,<7.4.5",
+ "guzzlehttp/psr7": "<1.8.4|>=2,<2.1.1",
+ "harvesthq/chosen": "<1.8.7",
+ "helloxz/imgurl": "= 2.31|<=2.31",
+ "hillelcoren/invoice-ninja": "<5.3.35",
+ "himiklab/yii2-jqgrid-widget": "<1.0.8",
+ "hjue/justwriting": "<=1",
+ "hov/jobfair": "<1.0.13|>=2,<2.0.2",
+ "hyn/multi-tenant": ">=5.6,<5.7.2",
+ "ibexa/admin-ui": ">=4.2,<4.2.3",
+ "ibexa/core": ">=4,<4.0.7|>=4.1,<4.1.4|>=4.2,<4.2.3",
+ "ibexa/graphql": ">=2.5,<2.5.31|>=3.3,<3.3.28|>=4.2,<4.2.3",
+ "ibexa/post-install": "<=1.0.4",
+ "icecoder/icecoder": "<=8.1",
+ "idno/known": "<=1.3.1",
+ "illuminate/auth": ">=4,<4.0.99|>=4.1,<=4.1.31|>=4.2,<=4.2.22|>=5,<=5.0.35|>=5.1,<=5.1.46|>=5.2,<=5.2.45|>=5.3,<=5.3.31|>=5.4,<=5.4.36|>=5.5,<5.5.10",
+ "illuminate/cookie": ">=4,<=4.0.11|>=4.1,<=4.1.99999|>=4.2,<=4.2.99999|>=5,<=5.0.99999|>=5.1,<=5.1.99999|>=5.2,<=5.2.99999|>=5.3,<=5.3.99999|>=5.4,<=5.4.99999|>=5.5,<=5.5.49|>=5.6,<=5.6.99999|>=5.7,<=5.7.99999|>=5.8,<=5.8.99999|>=6,<6.18.31|>=7,<7.22.4",
+ "illuminate/database": "<6.20.26|>=7,<7.30.5|>=8,<8.40",
+ "illuminate/encryption": ">=4,<=4.0.11|>=4.1,<=4.1.31|>=4.2,<=4.2.22|>=5,<=5.0.35|>=5.1,<=5.1.46|>=5.2,<=5.2.45|>=5.3,<=5.3.31|>=5.4,<=5.4.36|>=5.5,<5.5.40|>=5.6,<5.6.15",
+ "illuminate/view": "<6.20.42|>=7,<7.30.6|>=8,<8.75",
+ "impresscms/impresscms": "<=1.4.3",
+ "in2code/femanager": "<5.5.3|>=6,<6.3.4|>=7,<7.1",
+ "in2code/lux": "<17.6.1|>=18,<24.0.2",
+ "innologi/typo3-appointments": "<2.0.6",
+ "intelliants/subrion": "<=4.2.1",
+ "islandora/islandora": ">=2,<2.4.1",
+ "ivankristianto/phpwhois": "<=4.3",
+ "jackalope/jackalope-doctrine-dbal": "<1.7.4",
+ "james-heinrich/getid3": "<1.9.21",
+ "jasig/phpcas": "<1.3.3",
+ "joomla/archive": "<1.1.12|>=2,<2.0.1",
+ "joomla/filesystem": "<1.6.2|>=2,<2.0.1",
+ "joomla/filter": "<1.4.4|>=2,<2.0.1",
+ "joomla/input": ">=2,<2.0.2",
+ "joomla/session": "<1.3.1",
+ "joyqi/hyper-down": "<=2.4.27",
+ "jsdecena/laracom": "<2.0.9",
+ "jsmitty12/phpwhois": "<5.1",
+ "kazist/phpwhois": "<=4.2.6",
+ "kelvinmo/simplexrd": "<3.1.1",
+ "kevinpapst/kimai2": "<1.16.7",
+ "kitodo/presentation": "<3.1.2",
+ "klaviyo/magento2-extension": ">=1,<3",
+ "krayin/laravel-crm": "<1.2.2",
+ "kreait/firebase-php": ">=3.2,<3.8.1",
+ "la-haute-societe/tcpdf": "<6.2.22",
+ "laminas/laminas-diactoros": "<2.11.1",
+ "laminas/laminas-form": "<2.17.1|>=3,<3.0.2|>=3.1,<3.1.1",
+ "laminas/laminas-http": "<2.14.2",
+ "laravel/fortify": "<1.11.1",
+ "laravel/framework": "<6.20.42|>=7,<7.30.6|>=8,<8.75",
+ "laravel/socialite": ">=1,<1.0.99|>=2,<2.0.10",
+ "latte/latte": "<2.10.8",
+ "lavalite/cms": "<=5.8",
+ "lcobucci/jwt": ">=3.4,<3.4.6|>=4,<4.0.4|>=4.1,<4.1.5",
+ "league/commonmark": "<0.18.3",
+ "league/flysystem": "<1.1.4|>=2,<2.1.1",
+ "lexik/jwt-authentication-bundle": "<2.10.7|>=2.11,<2.11.3",
+ "librenms/librenms": "<22.10",
+ "liftkit/database": "<2.13.2",
+ "limesurvey/limesurvey": "<3.27.19",
+ "livehelperchat/livehelperchat": "<=3.91",
+ "livewire/livewire": ">2.2.4,<2.2.6",
+ "lms/routes": "<2.1.1",
+ "localizationteam/l10nmgr": "<7.4|>=8,<8.7|>=9,<9.2",
+ "luyadev/yii-helpers": "<1.2.1",
+ "magento/community-edition": ">=2,<2.2.10|>=2.3,<2.3.3",
+ "magento/magento1ce": "<1.9.4.3",
+ "magento/magento1ee": ">=1,<1.14.4.3",
+ "magento/product-community-edition": ">=2,<2.2.10|>=2.3,<2.3.2-p.2",
+ "marcwillmann/turn": "<0.3.3",
+ "matyhtf/framework": "<3.0.6",
+ "mautic/core": "<4.3|= 2.13.1",
+ "mediawiki/core": ">=1.27,<1.27.6|>=1.29,<1.29.3|>=1.30,<1.30.2|>=1.31,<1.31.9|>=1.32,<1.32.6|>=1.32.99,<1.33.3|>=1.33.99,<1.34.3|>=1.34.99,<1.35",
+ "melisplatform/melis-asset-manager": "<5.0.1",
+ "melisplatform/melis-cms": "<5.0.1",
+ "melisplatform/melis-front": "<5.0.1",
+ "mezzio/mezzio-swoole": "<3.7|>=4,<4.3",
+ "mgallegos/laravel-jqgrid": "<=1.3",
+ "microweber/microweber": "<1.3.2",
+ "miniorange/miniorange-saml": "<1.4.3",
+ "mittwald/typo3_forum": "<1.2.1",
+ "modx/revolution": "<= 2.8.3-pl|<2.8",
+ "mojo42/jirafeau": "<4.4",
+ "monolog/monolog": ">=1.8,<1.12",
+ "moodle/moodle": "<4.0.5",
+ "mustache/mustache": ">=2,<2.14.1",
+ "namshi/jose": "<2.2",
+ "neoan3-apps/template": "<1.1.1",
+ "neorazorx/facturascripts": "<2022.4",
+ "neos/flow": ">=1,<1.0.4|>=1.1,<1.1.1|>=2,<2.0.1|>=2.3,<2.3.16|>=3,<3.0.12|>=3.1,<3.1.10|>=3.2,<3.2.13|>=3.3,<3.3.13|>=4,<4.0.6",
+ "neos/form": ">=1.2,<4.3.3|>=5,<5.0.9|>=5.1,<5.1.3",
+ "neos/neos": ">=1.1,<1.1.3|>=1.2,<1.2.13|>=2,<2.0.4|>=2.3,<2.9.99|>=3,<3.0.20|>=3.1,<3.1.18|>=3.2,<3.2.14|>=3.3,<5.3.10|>=7,<7.0.9|>=7.1,<7.1.7|>=7.2,<7.2.6|>=7.3,<7.3.4|>=8,<8.0.2",
+ "neos/swiftmailer": ">=4.1,<4.1.99|>=5.4,<5.4.5",
+ "netgen/tagsbundle": ">=3.4,<3.4.11|>=4,<4.0.15",
+ "nette/application": ">=2,<2.0.19|>=2.1,<2.1.13|>=2.2,<2.2.10|>=2.3,<2.3.14|>=2.4,<2.4.16|>=3,<3.0.6",
+ "nette/nette": ">=2,<2.0.19|>=2.1,<2.1.13",
+ "nilsteampassnet/teampass": "<=2.1.27.36",
+ "notrinos/notrinos-erp": "<=0.7",
+ "noumo/easyii": "<=0.9",
+ "nukeviet/nukeviet": "<4.5.2",
+ "nystudio107/craft-seomatic": "<3.4.12",
+ "nzo/url-encryptor-bundle": ">=4,<4.3.2|>=5,<5.0.1",
+ "october/backend": "<1.1.2",
+ "october/cms": "= 1.1.1|= 1.0.471|= 1.0.469|>=1.0.319,<1.0.469",
+ "october/october": ">=1.0.319,<1.0.466|>=2.1,<2.1.12",
+ "october/rain": "<1.0.472|>=1.1,<1.1.2",
+ "october/system": "<1.0.476|>=1.1,<1.1.12|>=2,<2.2.34|>=3,<3.0.66",
+ "onelogin/php-saml": "<2.10.4",
+ "oneup/uploader-bundle": "<1.9.3|>=2,<2.1.5",
+ "open-web-analytics/open-web-analytics": "<1.7.4",
+ "opencart/opencart": "<=3.0.3.7",
+ "openid/php-openid": "<2.3",
+ "openmage/magento-lts": "<19.4.22|>=20,<20.0.19",
+ "orchid/platform": ">=9,<9.4.4",
+ "oro/commerce": ">=4.1,<5.0.6",
+ "oro/crm": ">=1.7,<1.7.4|>=3.1,<4.1.17|>=4.2,<4.2.7",
+ "oro/platform": ">=1.7,<1.7.4|>=3.1,<3.1.29|>=4.1,<4.1.17|>=4.2,<4.2.8",
+ "packbackbooks/lti-1-3-php-library": "<5",
+ "padraic/humbug_get_contents": "<1.1.2",
+ "pagarme/pagarme-php": ">=0,<3",
+ "pagekit/pagekit": "<=1.0.18",
+ "paragonie/random_compat": "<2",
+ "passbolt/passbolt_api": "<2.11",
+ "paypal/merchant-sdk-php": "<3.12",
+ "pear/archive_tar": "<1.4.14",
+ "pear/crypt_gpg": "<1.6.7",
+ "pegasus/google-for-jobs": "<1.5.1|>=2,<2.1.1",
+ "personnummer/personnummer": "<3.0.2",
+ "phanan/koel": "<5.1.4",
+ "php-mod/curl": "<2.3.2",
+ "phpfastcache/phpfastcache": "<6.1.5|>=7,<7.1.2|>=8,<8.0.7",
+ "phpmailer/phpmailer": "<6.5",
+ "phpmussel/phpmussel": ">=1,<1.6",
+ "phpmyadmin/phpmyadmin": "<5.2.1",
+ "phpmyfaq/phpmyfaq": "<=3.1.7",
+ "phpoffice/phpexcel": "<1.8",
+ "phpoffice/phpspreadsheet": "<1.16",
+ "phpseclib/phpseclib": "<2.0.31|>=3,<3.0.7",
+ "phpservermon/phpservermon": "<=3.5.2",
+ "phpunit/phpunit": ">=4.8.19,<4.8.28|>=5,<5.6.3",
+ "phpwhois/phpwhois": "<=4.2.5",
+ "phpxmlrpc/extras": "<0.6.1",
+ "phpxmlrpc/phpxmlrpc": "<4.9.2",
+ "pimcore/data-hub": "<1.2.4",
+ "pimcore/pimcore": "<10.5.16",
+ "pocketmine/bedrock-protocol": "<8.0.2",
+ "pocketmine/pocketmine-mp": "<4.12.5|>= 4.0.0-BETA5, < 4.4.2",
+ "pressbooks/pressbooks": "<5.18",
+ "prestashop/autoupgrade": ">=4,<4.10.1",
+ "prestashop/blockwishlist": ">=2,<2.1.1",
+ "prestashop/contactform": ">=1.0.1,<4.3",
+ "prestashop/gamification": "<2.3.2",
+ "prestashop/prestashop": "<1.7.8.8",
+ "prestashop/productcomments": "<5.0.2",
+ "prestashop/ps_emailsubscription": "<2.6.1",
+ "prestashop/ps_facetedsearch": "<3.4.1",
+ "prestashop/ps_linklist": "<3.1",
+ "privatebin/privatebin": "<1.4",
+ "processwire/processwire": "<=3.0.200",
+ "propel/propel": ">=2-alpha.1,<=2-alpha.7",
+ "propel/propel1": ">=1,<=1.7.1",
+ "pterodactyl/panel": "<1.7",
+ "ptrofimov/beanstalk_console": "<1.7.14",
+ "pusher/pusher-php-server": "<2.2.1",
+ "pwweb/laravel-core": "<=0.3.6-beta",
+ "pyrocms/pyrocms": "<=3.9.1",
+ "rainlab/debugbar-plugin": "<3.1",
+ "rankmath/seo-by-rank-math": "<=1.0.95",
+ "react/http": ">=0.7,<1.7",
+ "remdex/livehelperchat": "<3.99",
+ "rmccue/requests": ">=1.6,<1.8",
+ "robrichards/xmlseclibs": "<3.0.4",
+ "roots/soil": "<4.1",
+ "rudloff/alltube": "<3.0.3",
+ "s-cart/core": "<6.9",
+ "s-cart/s-cart": "<6.9",
+ "sabberworm/php-css-parser": ">=1,<1.0.1|>=2,<2.0.1|>=3,<3.0.1|>=4,<4.0.1|>=5,<5.0.9|>=5.1,<5.1.3|>=5.2,<5.2.1|>=6,<6.0.2|>=7,<7.0.4|>=8,<8.0.1|>=8.1,<8.1.1|>=8.2,<8.2.1|>=8.3,<8.3.1",
+ "sabre/dav": ">=1.6,<1.6.99|>=1.7,<1.7.11|>=1.8,<1.8.9",
+ "scheb/two-factor-bundle": ">=0,<3.26|>=4,<4.11",
+ "sensiolabs/connect": "<4.2.3",
+ "serluck/phpwhois": "<=4.2.6",
+ "shopware/core": "<=6.4.18",
+ "shopware/platform": "<=6.4.18",
+ "shopware/production": "<=6.3.5.2",
+ "shopware/shopware": "<=5.7.14",
+ "shopware/storefront": "<=6.4.8.1",
+ "shopxo/shopxo": "<2.2.6",
+ "showdoc/showdoc": "<2.10.4",
+ "silverstripe/admin": ">=1,<1.11.3",
+ "silverstripe/assets": ">=1,<1.11.1",
+ "silverstripe/cms": "<4.11.3",
+ "silverstripe/comments": ">=1.3,<1.9.99|>=2,<2.9.99|>=3,<3.1.1",
+ "silverstripe/forum": "<=0.6.1|>=0.7,<=0.7.3",
+ "silverstripe/framework": "<4.11.14",
+ "silverstripe/graphql": "<3.5.2|>=4-alpha.1,<4-alpha.2|= 4.0.0-alpha1",
+ "silverstripe/hybridsessions": ">=1,<2.4.1|>=2.5,<2.5.1",
+ "silverstripe/registry": ">=2.1,<2.1.2|>=2.2,<2.2.1",
+ "silverstripe/restfulserver": ">=1,<1.0.9|>=2,<2.0.4",
+ "silverstripe/silverstripe-omnipay": "<2.5.2|>=3,<3.0.2|>=3.1,<3.1.4|>=3.2,<3.2.1",
+ "silverstripe/subsites": ">=2,<2.6.1",
+ "silverstripe/taxonomy": ">=1.3,<1.3.1|>=2,<2.0.1",
+ "silverstripe/userforms": "<3",
+ "silverstripe/versioned-admin": ">=1,<1.11.1",
+ "simple-updates/phpwhois": "<=1",
+ "simplesamlphp/saml2": "<1.10.6|>=2,<2.3.8|>=3,<3.1.4",
+ "simplesamlphp/simplesamlphp": "<1.18.6",
+ "simplesamlphp/simplesamlphp-module-infocard": "<1.0.1",
+ "simplesamlphp/simplesamlphp-module-openid": "<1",
+ "simplesamlphp/simplesamlphp-module-openidprovider": "<0.9",
+ "simplito/elliptic-php": "<1.0.6",
+ "slim/slim": "<2.6",
+ "smarty/smarty": "<3.1.47|>=4,<4.2.1",
+ "snipe/snipe-it": "<=6.0.14|>= 6.0.0-RC-1, <= 6.0.0-RC-5",
+ "socalnick/scn-social-auth": "<1.15.2",
+ "socialiteproviders/steam": "<1.1",
+ "spatie/browsershot": "<3.57.4",
+ "spipu/html2pdf": "<5.2.4",
+ "spoonity/tcpdf": "<6.2.22",
+ "squizlabs/php_codesniffer": ">=1,<2.8.1|>=3,<3.0.1",
+ "ssddanbrown/bookstack": "<22.2.3",
+ "statamic/cms": "<3.2.39|>=3.3,<3.3.2",
+ "stormpath/sdk": ">=0,<9.9.99",
+ "studio-42/elfinder": "<2.1.59",
+ "subrion/cms": "<=4.2.1",
+ "sukohi/surpass": "<1",
+ "sulu/sulu": "= 2.4.0-RC1|<1.6.44|>=2,<2.2.18|>=2.3,<2.3.8",
+ "sumocoders/framework-user-bundle": "<1.4",
+ "swag/paypal": "<5.4.4",
+ "swiftmailer/swiftmailer": ">=4,<5.4.5",
+ "sylius/admin-bundle": ">=1,<1.0.17|>=1.1,<1.1.9|>=1.2,<1.2.2",
+ "sylius/grid": ">=1,<1.1.19|>=1.2,<1.2.18|>=1.3,<1.3.13|>=1.4,<1.4.5|>=1.5,<1.5.1",
+ "sylius/grid-bundle": "<1.10.1",
+ "sylius/paypal-plugin": ">=1,<1.2.4|>=1.3,<1.3.1",
+ "sylius/resource-bundle": "<1.3.14|>=1.4,<1.4.7|>=1.5,<1.5.2|>=1.6,<1.6.4",
+ "sylius/sylius": "<1.9.10|>=1.10,<1.10.11|>=1.11,<1.11.2",
+ "symbiote/silverstripe-multivaluefield": ">=3,<3.0.99",
+ "symbiote/silverstripe-queuedjobs": ">=3,<3.0.2|>=3.1,<3.1.4|>=4,<4.0.7|>=4.1,<4.1.2|>=4.2,<4.2.4|>=4.3,<4.3.3|>=4.4,<4.4.3|>=4.5,<4.5.1|>=4.6,<4.6.4",
+ "symbiote/silverstripe-seed": "<6.0.3",
+ "symbiote/silverstripe-versionedfiles": "<=2.0.3",
+ "symfont/process": ">=0",
+ "symfony/cache": ">=3.1,<3.4.35|>=4,<4.2.12|>=4.3,<4.3.8",
+ "symfony/dependency-injection": ">=2,<2.0.17|>=2.7,<2.7.51|>=2.8,<2.8.50|>=3,<3.4.26|>=4,<4.1.12|>=4.2,<4.2.7",
+ "symfony/error-handler": ">=4.4,<4.4.4|>=5,<5.0.4",
+ "symfony/form": ">=2.3,<2.3.35|>=2.4,<2.6.12|>=2.7,<2.7.50|>=2.8,<2.8.49|>=3,<3.4.20|>=4,<4.0.15|>=4.1,<4.1.9|>=4.2,<4.2.1",
+ "symfony/framework-bundle": ">=2,<2.3.18|>=2.4,<2.4.8|>=2.5,<2.5.2|>=2.7,<2.7.51|>=2.8,<2.8.50|>=3,<3.4.26|>=4,<4.1.12|>=4.2,<4.2.7|>=5.3.14,<=5.3.14|>=5.4.3,<=5.4.3|>=6.0.3,<=6.0.3|= 6.0.3|= 5.4.3|= 5.3.14",
+ "symfony/http-foundation": ">=2,<2.8.52|>=3,<3.4.35|>=4,<4.2.12|>=4.3,<4.3.8|>=4.4,<4.4.7|>=5,<5.0.7",
+ "symfony/http-kernel": ">=2,<4.4.50|>=5,<5.4.20|>=6,<6.0.20|>=6.1,<6.1.12|>=6.2,<6.2.6",
+ "symfony/intl": ">=2.7,<2.7.38|>=2.8,<2.8.31|>=3,<3.2.14|>=3.3,<3.3.13",
+ "symfony/maker-bundle": ">=1.27,<1.29.2|>=1.30,<1.31.1",
+ "symfony/mime": ">=4.3,<4.3.8",
+ "symfony/phpunit-bridge": ">=2.8,<2.8.50|>=3,<3.4.26|>=4,<4.1.12|>=4.2,<4.2.7",
+ "symfony/polyfill": ">=1,<1.10",
+ "symfony/polyfill-php55": ">=1,<1.10",
+ "symfony/proxy-manager-bridge": ">=2.7,<2.7.51|>=2.8,<2.8.50|>=3,<3.4.26|>=4,<4.1.12|>=4.2,<4.2.7",
+ "symfony/routing": ">=2,<2.0.19",
+ "symfony/security": ">=2,<2.7.51|>=2.8,<3.4.49|>=4,<4.4.24|>=5,<5.2.8",
+ "symfony/security-bundle": ">=2,<4.4.50|>=5,<5.4.20|>=6,<6.0.20|>=6.1,<6.1.12|>=6.2,<6.2.6",
+ "symfony/security-core": ">=2.4,<2.6.13|>=2.7,<2.7.9|>=2.7.30,<2.7.32|>=2.8,<3.4.49|>=4,<4.4.24|>=5,<5.2.9",
+ "symfony/security-csrf": ">=2.4,<2.7.48|>=2.8,<2.8.41|>=3,<3.3.17|>=3.4,<3.4.11|>=4,<4.0.11",
+ "symfony/security-guard": ">=2.8,<3.4.48|>=4,<4.4.23|>=5,<5.2.8",
+ "symfony/security-http": ">=2.3,<2.3.41|>=2.4,<2.7.51|>=2.8,<2.8.50|>=3,<3.4.26|>=4,<4.2.12|>=4.3,<4.3.8|>=4.4,<4.4.7|>=5,<5.0.7|>=5.1,<5.2.8|>=5.3,<5.3.2",
+ "symfony/serializer": ">=2,<2.0.11|>=4.1,<4.4.35|>=5,<5.3.12",
+ "symfony/symfony": ">=2,<4.4.50|>=5,<5.4.20|>=6,<6.0.20|>=6.1,<6.1.12|>=6.2,<6.2.6",
+ "symfony/translation": ">=2,<2.0.17",
+ "symfony/validator": ">=2,<2.0.24|>=2.1,<2.1.12|>=2.2,<2.2.5|>=2.3,<2.3.3",
+ "symfony/var-exporter": ">=4.2,<4.2.12|>=4.3,<4.3.8",
+ "symfony/web-profiler-bundle": ">=2,<2.3.19|>=2.4,<2.4.9|>=2.5,<2.5.4",
+ "symfony/yaml": ">=2,<2.0.22|>=2.1,<2.1.7",
+ "t3/dce": ">=2.2,<2.6.2",
+ "t3g/svg-sanitizer": "<1.0.3",
+ "tastyigniter/tastyigniter": "<3.3",
+ "tecnickcom/tcpdf": "<6.2.22",
+ "terminal42/contao-tablelookupwizard": "<3.3.5",
+ "thelia/backoffice-default-template": ">=2.1,<2.1.2",
+ "thelia/thelia": ">=2.1-beta.1,<2.1.3",
+ "theonedemon/phpwhois": "<=4.2.5",
+ "thinkcmf/thinkcmf": "<=5.1.7",
+ "thorsten/phpmyfaq": "<3.1.11",
+ "tinymce/tinymce": "<5.10.7|>=6,<6.3.1",
+ "titon/framework": ">=0,<9.9.99",
+ "tobiasbg/tablepress": "<= 2.0-RC1",
+ "topthink/framework": "<6.0.14",
+ "topthink/think": "<=6.0.9",
+ "topthink/thinkphp": "<=3.2.3",
+ "tribalsystems/zenario": "<=9.3.57595",
+ "truckersmp/phpwhois": "<=4.3.1",
+ "ttskch/pagination-service-provider": "<1",
+ "twig/twig": "<1.44.7|>=2,<2.15.3|>=3,<3.4.3",
+ "typo3/cms": "<2.0.5|>=3,<3.0.3|>=6.2,<6.2.30|>=7,<7.6.32|>=8,<8.7.38|>=9,<9.5.29|>=10,<10.4.35|>=11,<11.5.23|>=12,<12.2",
+ "typo3/cms-backend": ">=7,<=7.6.50|>=8,<=8.7.39|>=9,<=9.5.24|>=10,<=10.4.13|>=11,<=11.1",
+ "typo3/cms-core": "<8.7.51|>=9,<9.5.40|>=10,<10.4.36|>=11,<11.5.23|>=12,<12.2",
+ "typo3/cms-form": ">=8,<=8.7.39|>=9,<=9.5.24|>=10,<=10.4.13|>=11,<=11.1",
+ "typo3/flow": ">=1,<1.0.4|>=1.1,<1.1.1|>=2,<2.0.1|>=2.3,<2.3.16|>=3,<3.0.12|>=3.1,<3.1.10|>=3.2,<3.2.13|>=3.3,<3.3.13|>=4,<4.0.6",
+ "typo3/html-sanitizer": ">=1,<1.5|>=2,<2.1.1",
+ "typo3/neos": ">=1.1,<1.1.3|>=1.2,<1.2.13|>=2,<2.0.4|>=2.3,<2.3.99|>=3,<3.0.20|>=3.1,<3.1.18|>=3.2,<3.2.14|>=3.3,<3.3.23|>=4,<4.0.17|>=4.1,<4.1.16|>=4.2,<4.2.12|>=4.3,<4.3.3",
+ "typo3/phar-stream-wrapper": ">=1,<2.1.1|>=3,<3.1.1",
+ "typo3/swiftmailer": ">=4.1,<4.1.99|>=5.4,<5.4.5",
+ "typo3fluid/fluid": ">=2,<2.0.8|>=2.1,<2.1.7|>=2.2,<2.2.4|>=2.3,<2.3.7|>=2.4,<2.4.4|>=2.5,<2.5.11|>=2.6,<2.6.10",
+ "ua-parser/uap-php": "<3.8",
+ "unisharp/laravel-filemanager": "<=2.5.1",
+ "userfrosting/userfrosting": ">=0.3.1,<4.6.3",
+ "usmanhalalit/pixie": "<1.0.3|>=2,<2.0.2",
+ "vanilla/safecurl": "<0.9.2",
+ "verot/class.upload.php": "<=1.0.3|>=2,<=2.0.4",
+ "vova07/yii2-fileapi-widget": "<0.1.9",
+ "vrana/adminer": "<4.8.1",
+ "wallabag/tcpdf": "<6.2.22",
+ "wallabag/wallabag": "<2.5.4",
+ "wanglelecc/laracms": "<=1.0.3",
+ "web-auth/webauthn-framework": ">=3.3,<3.3.4",
+ "webcoast/deferred-image-processing": "<1.0.2",
+ "webpa/webpa": "<3.1.2",
+ "wikimedia/parsoid": "<0.12.2",
+ "willdurand/js-translation-bundle": "<2.1.1",
+ "wintercms/winter": "<1.0.475|>=1.1,<1.1.10|>=1.2,<1.2.1",
+ "woocommerce/woocommerce": "<6.6",
+ "wp-cli/wp-cli": "<2.5",
+ "wp-graphql/wp-graphql": "<0.3.5",
+ "wpanel/wpanel4-cms": "<=4.3.1",
+ "wwbn/avideo": "<12.4",
+ "xataface/xataface": "<3",
+ "xpressengine/xpressengine": "<3.0.15",
+ "yeswiki/yeswiki": "<4.1",
+ "yetiforce/yetiforce-crm": "<=6.4",
+ "yidashi/yii2cmf": "<=2",
+ "yii2mod/yii2-cms": "<1.9.2",
+ "yiisoft/yii": "<1.1.27",
+ "yiisoft/yii2": "<2.0.38",
+ "yiisoft/yii2-bootstrap": "<2.0.4",
+ "yiisoft/yii2-dev": "<2.0.43",
+ "yiisoft/yii2-elasticsearch": "<2.0.5",
+ "yiisoft/yii2-gii": "<=2.2.4",
+ "yiisoft/yii2-jui": "<2.0.4",
+ "yiisoft/yii2-redis": "<2.0.8",
+ "yikesinc/yikes-inc-easy-mailchimp-extender": "<6.8.6",
+ "yoast-seo-for-typo3/yoast_seo": "<7.2.3",
+ "yourls/yourls": "<=1.8.2",
+ "zendesk/zendesk_api_client_php": "<2.2.11",
+ "zendframework/zend-cache": ">=2.4,<2.4.8|>=2.5,<2.5.3",
+ "zendframework/zend-captcha": ">=2,<2.4.9|>=2.5,<2.5.2",
+ "zendframework/zend-crypt": ">=2,<2.4.9|>=2.5,<2.5.2",
+ "zendframework/zend-db": ">=2,<2.0.99|>=2.1,<2.1.99|>=2.2,<2.2.10|>=2.3,<2.3.5",
+ "zendframework/zend-developer-tools": ">=1.2.2,<1.2.3",
+ "zendframework/zend-diactoros": "<1.8.4",
+ "zendframework/zend-feed": "<2.10.3",
+ "zendframework/zend-form": ">=2,<2.2.7|>=2.3,<2.3.1",
+ "zendframework/zend-http": "<2.8.1",
+ "zendframework/zend-json": ">=2.1,<2.1.6|>=2.2,<2.2.6",
+ "zendframework/zend-ldap": ">=2,<2.0.99|>=2.1,<2.1.99|>=2.2,<2.2.8|>=2.3,<2.3.3",
+ "zendframework/zend-mail": ">=2,<2.4.11|>=2.5,<2.7.2",
+ "zendframework/zend-navigation": ">=2,<2.2.7|>=2.3,<2.3.1",
+ "zendframework/zend-session": ">=2,<2.0.99|>=2.1,<2.1.99|>=2.2,<2.2.9|>=2.3,<2.3.4",
+ "zendframework/zend-validator": ">=2.3,<2.3.6",
+ "zendframework/zend-view": ">=2,<2.2.7|>=2.3,<2.3.1",
+ "zendframework/zend-xmlrpc": ">=2.1,<2.1.6|>=2.2,<2.2.6",
+ "zendframework/zendframework": "<=3",
+ "zendframework/zendframework1": "<1.12.20",
+ "zendframework/zendopenid": ">=2,<2.0.2",
+ "zendframework/zendxml": ">=1,<1.0.1",
+ "zetacomponents/mail": "<1.8.2",
+ "zf-commons/zfc-user": "<1.2.2",
+ "zfcampus/zf-apigility-doctrine": ">=1,<1.0.3",
+ "zfr/zfr-oauth2-server-module": "<0.1.2",
+ "zoujingli/thinkadmin": "<6.0.22"
+ },
+ "time": "2023-02-14T01:32:29+00:00",
+ "default-branch": true,
+ "type": "metapackage",
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Marco Pivetta",
+ "email": "ocramius@gmail.com",
+ "role": "maintainer"
+ },
+ {
+ "name": "Ilya Tribusean",
+ "email": "slash3b@gmail.com",
+ "role": "maintainer"
+ }
+ ],
+ "description": "Prevents installation of composer packages with known security vulnerabilities: no API, simply require it",
+ "support": {
+ "issues": "https://github.com/Roave/SecurityAdvisories/issues",
+ "source": "https://github.com/Roave/SecurityAdvisories/tree/latest"
+ },
+ "funding": [
+ {
+ "url": "https://github.com/Ocramius",
+ "type": "github"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/roave/security-advisories",
+ "type": "tidelift"
+ }
+ ],
+ "install-path": null
+ },
+ {
+ "name": "sebastian/cli-parser",
+ "version": "1.0.1",
+ "version_normalized": "1.0.1.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/sebastianbergmann/cli-parser.git",
+ "reference": "442e7c7e687e42adc03470c7b668bc4b2402c0b2"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/442e7c7e687e42adc03470c7b668bc4b2402c0b2",
+ "reference": "442e7c7e687e42adc03470c7b668bc4b2402c0b2",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=7.3"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "^9.3"
+ },
+ "time": "2020-09-28T06:08:49+00:00",
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.0-dev"
+ }
+ },
+ "installation-source": "dist",
+ "autoload": {
+ "classmap": [
+ "src/"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "BSD-3-Clause"
+ ],
+ "authors": [
+ {
+ "name": "Sebastian Bergmann",
+ "email": "sebastian@phpunit.de",
+ "role": "lead"
+ }
+ ],
+ "description": "Library for parsing CLI options",
+ "homepage": "https://github.com/sebastianbergmann/cli-parser",
+ "funding": [
+ {
+ "url": "https://github.com/sebastianbergmann",
+ "type": "github"
+ }
+ ],
+ "install-path": "../sebastian/cli-parser"
+ },
+ {
+ "name": "sebastian/code-unit",
+ "version": "1.0.8",
+ "version_normalized": "1.0.8.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/sebastianbergmann/code-unit.git",
+ "reference": "1fc9f64c0927627ef78ba436c9b17d967e68e120"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/sebastianbergmann/code-unit/zipball/1fc9f64c0927627ef78ba436c9b17d967e68e120",
+ "reference": "1fc9f64c0927627ef78ba436c9b17d967e68e120",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=7.3"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "^9.3"
+ },
+ "time": "2020-10-26T13:08:54+00:00",
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.0-dev"
+ }
+ },
+ "installation-source": "dist",
+ "autoload": {
+ "classmap": [
+ "src/"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "BSD-3-Clause"
+ ],
+ "authors": [
+ {
+ "name": "Sebastian Bergmann",
+ "email": "sebastian@phpunit.de",
+ "role": "lead"
+ }
+ ],
+ "description": "Collection of value objects that represent the PHP code units",
+ "homepage": "https://github.com/sebastianbergmann/code-unit",
+ "funding": [
+ {
+ "url": "https://github.com/sebastianbergmann",
+ "type": "github"
+ }
+ ],
+ "install-path": "../sebastian/code-unit"
+ },
+ {
+ "name": "sebastian/code-unit-reverse-lookup",
+ "version": "2.0.3",
+ "version_normalized": "2.0.3.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git",
+ "reference": "ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5",
+ "reference": "ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=7.3"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "^9.3"
+ },
+ "time": "2020-09-28T05:30:19+00:00",
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "2.0-dev"
+ }
+ },
+ "installation-source": "dist",
+ "autoload": {
+ "classmap": [
+ "src/"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "BSD-3-Clause"
+ ],
+ "authors": [
+ {
+ "name": "Sebastian Bergmann",
+ "email": "sebastian@phpunit.de"
+ }
+ ],
+ "description": "Looks up which function or method a line of code belongs to",
+ "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/",
+ "funding": [
+ {
+ "url": "https://github.com/sebastianbergmann",
+ "type": "github"
+ }
+ ],
+ "install-path": "../sebastian/code-unit-reverse-lookup"
+ },
+ {
+ "name": "sebastian/comparator",
+ "version": "4.0.8",
+ "version_normalized": "4.0.8.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/sebastianbergmann/comparator.git",
+ "reference": "fa0f136dd2334583309d32b62544682ee972b51a"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/fa0f136dd2334583309d32b62544682ee972b51a",
+ "reference": "fa0f136dd2334583309d32b62544682ee972b51a",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=7.3",
+ "sebastian/diff": "^4.0",
+ "sebastian/exporter": "^4.0"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "^9.3"
+ },
+ "time": "2022-09-14T12:41:17+00:00",
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "4.0-dev"
+ }
+ },
+ "installation-source": "dist",
+ "autoload": {
+ "classmap": [
+ "src/"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "BSD-3-Clause"
+ ],
+ "authors": [
+ {
+ "name": "Sebastian Bergmann",
+ "email": "sebastian@phpunit.de"
+ },
+ {
+ "name": "Jeff Welch",
+ "email": "whatthejeff@gmail.com"
+ },
+ {
+ "name": "Volker Dusch",
+ "email": "github@wallbash.com"
+ },
+ {
+ "name": "Bernhard Schussek",
+ "email": "bschussek@2bepublished.at"
+ }
+ ],
+ "description": "Provides the functionality to compare PHP values for equality",
+ "homepage": "https://github.com/sebastianbergmann/comparator",
+ "keywords": [
+ "comparator",
+ "compare",
+ "equality"
+ ],
+ "support": {
+ "issues": "https://github.com/sebastianbergmann/comparator/issues",
+ "source": "https://github.com/sebastianbergmann/comparator/tree/4.0.8"
+ },
+ "funding": [
+ {
+ "url": "https://github.com/sebastianbergmann",
+ "type": "github"
+ }
+ ],
+ "install-path": "../sebastian/comparator"
+ },
+ {
+ "name": "sebastian/complexity",
+ "version": "2.0.2",
+ "version_normalized": "2.0.2.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/sebastianbergmann/complexity.git",
+ "reference": "739b35e53379900cc9ac327b2147867b8b6efd88"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/739b35e53379900cc9ac327b2147867b8b6efd88",
+ "reference": "739b35e53379900cc9ac327b2147867b8b6efd88",
+ "shasum": ""
+ },
+ "require": {
+ "nikic/php-parser": "^4.7",
+ "php": ">=7.3"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "^9.3"
+ },
+ "time": "2020-10-26T15:52:27+00:00",
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "2.0-dev"
+ }
+ },
+ "installation-source": "dist",
+ "autoload": {
+ "classmap": [
+ "src/"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "BSD-3-Clause"
+ ],
+ "authors": [
+ {
+ "name": "Sebastian Bergmann",
+ "email": "sebastian@phpunit.de",
+ "role": "lead"
+ }
+ ],
+ "description": "Library for calculating the complexity of PHP code units",
+ "homepage": "https://github.com/sebastianbergmann/complexity",
+ "funding": [
+ {
+ "url": "https://github.com/sebastianbergmann",
+ "type": "github"
+ }
+ ],
+ "install-path": "../sebastian/complexity"
+ },
+ {
+ "name": "sebastian/diff",
+ "version": "4.0.4",
+ "version_normalized": "4.0.4.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/sebastianbergmann/diff.git",
+ "reference": "3461e3fccc7cfdfc2720be910d3bd73c69be590d"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/3461e3fccc7cfdfc2720be910d3bd73c69be590d",
+ "reference": "3461e3fccc7cfdfc2720be910d3bd73c69be590d",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=7.3"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "^9.3",
+ "symfony/process": "^4.2 || ^5"
+ },
+ "time": "2020-10-26T13:10:38+00:00",
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "4.0-dev"
+ }
+ },
+ "installation-source": "dist",
+ "autoload": {
+ "classmap": [
+ "src/"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "BSD-3-Clause"
+ ],
+ "authors": [
+ {
+ "name": "Sebastian Bergmann",
+ "email": "sebastian@phpunit.de"
+ },
+ {
+ "name": "Kore Nordmann",
+ "email": "mail@kore-nordmann.de"
+ }
+ ],
+ "description": "Diff implementation",
+ "homepage": "https://github.com/sebastianbergmann/diff",
+ "keywords": [
+ "diff",
+ "udiff",
+ "unidiff",
+ "unified diff"
+ ],
+ "funding": [
+ {
+ "url": "https://github.com/sebastianbergmann",
+ "type": "github"
+ }
+ ],
+ "install-path": "../sebastian/diff"
+ },
+ {
+ "name": "sebastian/environment",
+ "version": "5.1.5",
+ "version_normalized": "5.1.5.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/sebastianbergmann/environment.git",
+ "reference": "830c43a844f1f8d5b7a1f6d6076b784454d8b7ed"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/830c43a844f1f8d5b7a1f6d6076b784454d8b7ed",
+ "reference": "830c43a844f1f8d5b7a1f6d6076b784454d8b7ed",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=7.3"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "^9.3"
+ },
+ "suggest": {
+ "ext-posix": "*"
+ },
+ "time": "2023-02-03T06:03:51+00:00",
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "5.1-dev"
+ }
+ },
+ "installation-source": "dist",
+ "autoload": {
+ "classmap": [
+ "src/"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "BSD-3-Clause"
+ ],
+ "authors": [
+ {
+ "name": "Sebastian Bergmann",
+ "email": "sebastian@phpunit.de"
+ }
+ ],
+ "description": "Provides functionality to handle HHVM/PHP environments",
+ "homepage": "http://www.github.com/sebastianbergmann/environment",
+ "keywords": [
+ "Xdebug",
+ "environment",
+ "hhvm"
+ ],
+ "support": {
+ "issues": "https://github.com/sebastianbergmann/environment/issues",
+ "source": "https://github.com/sebastianbergmann/environment/tree/5.1.5"
+ },
+ "funding": [
+ {
+ "url": "https://github.com/sebastianbergmann",
+ "type": "github"
+ }
+ ],
+ "install-path": "../sebastian/environment"
+ },
+ {
+ "name": "sebastian/exporter",
+ "version": "4.0.5",
+ "version_normalized": "4.0.5.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/sebastianbergmann/exporter.git",
+ "reference": "ac230ed27f0f98f597c8a2b6eb7ac563af5e5b9d"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/ac230ed27f0f98f597c8a2b6eb7ac563af5e5b9d",
+ "reference": "ac230ed27f0f98f597c8a2b6eb7ac563af5e5b9d",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=7.3",
+ "sebastian/recursion-context": "^4.0"
+ },
+ "require-dev": {
+ "ext-mbstring": "*",
+ "phpunit/phpunit": "^9.3"
+ },
+ "time": "2022-09-14T06:03:37+00:00",
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "4.0-dev"
+ }
+ },
+ "installation-source": "dist",
+ "autoload": {
+ "classmap": [
+ "src/"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "BSD-3-Clause"
+ ],
+ "authors": [
+ {
+ "name": "Sebastian Bergmann",
+ "email": "sebastian@phpunit.de"
+ },
+ {
+ "name": "Jeff Welch",
+ "email": "whatthejeff@gmail.com"
+ },
+ {
+ "name": "Volker Dusch",
+ "email": "github@wallbash.com"
+ },
+ {
+ "name": "Adam Harvey",
+ "email": "aharvey@php.net"
+ },
+ {
+ "name": "Bernhard Schussek",
+ "email": "bschussek@gmail.com"
+ }
+ ],
+ "description": "Provides the functionality to export PHP variables for visualization",
+ "homepage": "https://www.github.com/sebastianbergmann/exporter",
+ "keywords": [
+ "export",
+ "exporter"
+ ],
+ "support": {
+ "issues": "https://github.com/sebastianbergmann/exporter/issues",
+ "source": "https://github.com/sebastianbergmann/exporter/tree/4.0.5"
+ },
+ "funding": [
+ {
+ "url": "https://github.com/sebastianbergmann",
+ "type": "github"
+ }
+ ],
+ "install-path": "../sebastian/exporter"
+ },
+ {
+ "name": "sebastian/global-state",
+ "version": "5.0.5",
+ "version_normalized": "5.0.5.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/sebastianbergmann/global-state.git",
+ "reference": "0ca8db5a5fc9c8646244e629625ac486fa286bf2"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/0ca8db5a5fc9c8646244e629625ac486fa286bf2",
+ "reference": "0ca8db5a5fc9c8646244e629625ac486fa286bf2",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=7.3",
+ "sebastian/object-reflector": "^2.0",
+ "sebastian/recursion-context": "^4.0"
+ },
+ "require-dev": {
+ "ext-dom": "*",
+ "phpunit/phpunit": "^9.3"
+ },
+ "suggest": {
+ "ext-uopz": "*"
+ },
+ "time": "2022-02-14T08:28:10+00:00",
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "5.0-dev"
+ }
+ },
+ "installation-source": "dist",
+ "autoload": {
+ "classmap": [
+ "src/"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "BSD-3-Clause"
+ ],
+ "authors": [
+ {
+ "name": "Sebastian Bergmann",
+ "email": "sebastian@phpunit.de"
+ }
+ ],
+ "description": "Snapshotting of global state",
+ "homepage": "http://www.github.com/sebastianbergmann/global-state",
+ "keywords": [
+ "global state"
+ ],
+ "funding": [
+ {
+ "url": "https://github.com/sebastianbergmann",
+ "type": "github"
+ }
+ ],
+ "install-path": "../sebastian/global-state"
+ },
+ {
+ "name": "sebastian/lines-of-code",
+ "version": "1.0.3",
+ "version_normalized": "1.0.3.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/sebastianbergmann/lines-of-code.git",
+ "reference": "c1c2e997aa3146983ed888ad08b15470a2e22ecc"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/c1c2e997aa3146983ed888ad08b15470a2e22ecc",
+ "reference": "c1c2e997aa3146983ed888ad08b15470a2e22ecc",
+ "shasum": ""
+ },
+ "require": {
+ "nikic/php-parser": "^4.6",
+ "php": ">=7.3"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "^9.3"
+ },
+ "time": "2020-11-28T06:42:11+00:00",
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.0-dev"
+ }
+ },
+ "installation-source": "dist",
+ "autoload": {
+ "classmap": [
+ "src/"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "BSD-3-Clause"
+ ],
+ "authors": [
+ {
+ "name": "Sebastian Bergmann",
+ "email": "sebastian@phpunit.de",
+ "role": "lead"
+ }
+ ],
+ "description": "Library for counting the lines of code in PHP source code",
+ "homepage": "https://github.com/sebastianbergmann/lines-of-code",
+ "funding": [
+ {
+ "url": "https://github.com/sebastianbergmann",
+ "type": "github"
+ }
+ ],
+ "install-path": "../sebastian/lines-of-code"
+ },
+ {
+ "name": "sebastian/object-enumerator",
+ "version": "4.0.4",
+ "version_normalized": "4.0.4.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/sebastianbergmann/object-enumerator.git",
+ "reference": "5c9eeac41b290a3712d88851518825ad78f45c71"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/5c9eeac41b290a3712d88851518825ad78f45c71",
+ "reference": "5c9eeac41b290a3712d88851518825ad78f45c71",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=7.3",
+ "sebastian/object-reflector": "^2.0",
+ "sebastian/recursion-context": "^4.0"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "^9.3"
+ },
+ "time": "2020-10-26T13:12:34+00:00",
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "4.0-dev"
+ }
+ },
+ "installation-source": "dist",
+ "autoload": {
+ "classmap": [
+ "src/"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "BSD-3-Clause"
+ ],
+ "authors": [
+ {
+ "name": "Sebastian Bergmann",
+ "email": "sebastian@phpunit.de"
+ }
+ ],
+ "description": "Traverses array structures and object graphs to enumerate all referenced objects",
+ "homepage": "https://github.com/sebastianbergmann/object-enumerator/",
+ "funding": [
+ {
+ "url": "https://github.com/sebastianbergmann",
+ "type": "github"
+ }
+ ],
+ "install-path": "../sebastian/object-enumerator"
+ },
+ {
+ "name": "sebastian/object-reflector",
+ "version": "2.0.4",
+ "version_normalized": "2.0.4.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/sebastianbergmann/object-reflector.git",
+ "reference": "b4f479ebdbf63ac605d183ece17d8d7fe49c15c7"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/b4f479ebdbf63ac605d183ece17d8d7fe49c15c7",
+ "reference": "b4f479ebdbf63ac605d183ece17d8d7fe49c15c7",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=7.3"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "^9.3"
+ },
+ "time": "2020-10-26T13:14:26+00:00",
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "2.0-dev"
+ }
+ },
+ "installation-source": "dist",
+ "autoload": {
+ "classmap": [
+ "src/"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "BSD-3-Clause"
+ ],
+ "authors": [
+ {
+ "name": "Sebastian Bergmann",
+ "email": "sebastian@phpunit.de"
+ }
+ ],
+ "description": "Allows reflection of object attributes, including inherited and non-public ones",
+ "homepage": "https://github.com/sebastianbergmann/object-reflector/",
+ "funding": [
+ {
+ "url": "https://github.com/sebastianbergmann",
+ "type": "github"
+ }
+ ],
+ "install-path": "../sebastian/object-reflector"
+ },
+ {
+ "name": "sebastian/recursion-context",
+ "version": "4.0.5",
+ "version_normalized": "4.0.5.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/sebastianbergmann/recursion-context.git",
+ "reference": "e75bd0f07204fec2a0af9b0f3cfe97d05f92efc1"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/e75bd0f07204fec2a0af9b0f3cfe97d05f92efc1",
+ "reference": "e75bd0f07204fec2a0af9b0f3cfe97d05f92efc1",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=7.3"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "^9.3"
+ },
+ "time": "2023-02-03T06:07:39+00:00",
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "4.0-dev"
+ }
+ },
+ "installation-source": "dist",
+ "autoload": {
+ "classmap": [
+ "src/"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "BSD-3-Clause"
+ ],
+ "authors": [
+ {
+ "name": "Sebastian Bergmann",
+ "email": "sebastian@phpunit.de"
+ },
+ {
+ "name": "Jeff Welch",
+ "email": "whatthejeff@gmail.com"
+ },
+ {
+ "name": "Adam Harvey",
+ "email": "aharvey@php.net"
+ }
+ ],
+ "description": "Provides functionality to recursively process PHP variables",
+ "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.5"
+ },
+ "funding": [
+ {
+ "url": "https://github.com/sebastianbergmann",
+ "type": "github"
+ }
+ ],
+ "install-path": "../sebastian/recursion-context"
+ },
+ {
+ "name": "sebastian/resource-operations",
+ "version": "3.0.3",
+ "version_normalized": "3.0.3.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/sebastianbergmann/resource-operations.git",
+ "reference": "0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8",
+ "reference": "0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=7.3"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "^9.0"
+ },
+ "time": "2020-09-28T06:45:17+00:00",
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "3.0-dev"
+ }
+ },
+ "installation-source": "dist",
+ "autoload": {
+ "classmap": [
+ "src/"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "BSD-3-Clause"
+ ],
+ "authors": [
+ {
+ "name": "Sebastian Bergmann",
+ "email": "sebastian@phpunit.de"
+ }
+ ],
+ "description": "Provides a list of PHP built-in functions that operate on resources",
+ "homepage": "https://www.github.com/sebastianbergmann/resource-operations",
+ "funding": [
+ {
+ "url": "https://github.com/sebastianbergmann",
+ "type": "github"
+ }
+ ],
+ "install-path": "../sebastian/resource-operations"
+ },
+ {
+ "name": "sebastian/type",
+ "version": "3.2.1",
+ "version_normalized": "3.2.1.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/sebastianbergmann/type.git",
+ "reference": "75e2c2a32f5e0b3aef905b9ed0b179b953b3d7c7"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/75e2c2a32f5e0b3aef905b9ed0b179b953b3d7c7",
+ "reference": "75e2c2a32f5e0b3aef905b9ed0b179b953b3d7c7",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=7.3"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "^9.5"
+ },
+ "time": "2023-02-03T06:13:03+00:00",
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "3.2-dev"
+ }
+ },
+ "installation-source": "dist",
+ "autoload": {
+ "classmap": [
+ "src/"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "BSD-3-Clause"
+ ],
+ "authors": [
+ {
+ "name": "Sebastian Bergmann",
+ "email": "sebastian@phpunit.de",
+ "role": "lead"
+ }
+ ],
+ "description": "Collection of value objects that represent the types of the PHP type system",
+ "homepage": "https://github.com/sebastianbergmann/type",
+ "support": {
+ "issues": "https://github.com/sebastianbergmann/type/issues",
+ "source": "https://github.com/sebastianbergmann/type/tree/3.2.1"
+ },
+ "funding": [
+ {
+ "url": "https://github.com/sebastianbergmann",
+ "type": "github"
+ }
+ ],
+ "install-path": "../sebastian/type"
+ },
+ {
+ "name": "sebastian/version",
+ "version": "3.0.2",
+ "version_normalized": "3.0.2.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/sebastianbergmann/version.git",
+ "reference": "c6c1022351a901512170118436c764e473f6de8c"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/c6c1022351a901512170118436c764e473f6de8c",
+ "reference": "c6c1022351a901512170118436c764e473f6de8c",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=7.3"
+ },
+ "time": "2020-09-28T06:39:44+00:00",
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "3.0-dev"
+ }
+ },
+ "installation-source": "dist",
+ "autoload": {
+ "classmap": [
+ "src/"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "BSD-3-Clause"
+ ],
+ "authors": [
+ {
+ "name": "Sebastian Bergmann",
+ "email": "sebastian@phpunit.de",
+ "role": "lead"
+ }
+ ],
+ "description": "Library that helps with managing the version number of Git-hosted PHP projects",
+ "homepage": "https://github.com/sebastianbergmann/version",
+ "funding": [
+ {
+ "url": "https://github.com/sebastianbergmann",
+ "type": "github"
+ }
+ ],
+ "install-path": "../sebastian/version"
+ },
+ {
+ "name": "sirbrillig/phpcs-variable-analysis",
+ "version": "v2.11.10",
+ "version_normalized": "2.11.10.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/sirbrillig/phpcs-variable-analysis.git",
+ "reference": "0f25a3766f26df91d6bdda0c8931303fc85499d7"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/sirbrillig/phpcs-variable-analysis/zipball/0f25a3766f26df91d6bdda0c8931303fc85499d7",
+ "reference": "0f25a3766f26df91d6bdda0c8931303fc85499d7",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.4.0",
+ "squizlabs/php_codesniffer": "^3.5.6"
+ },
+ "require-dev": {
+ "dealerdirect/phpcodesniffer-composer-installer": "^0.7 || ^1.0",
+ "phpcsstandards/phpcsdevcs": "^1.1",
+ "phpstan/phpstan": "^1.7",
+ "phpunit/phpunit": "^4.8.36 || ^5.7.21 || ^6.5 || ^7.0 || ^8.0 || ^9.0",
+ "sirbrillig/phpcs-import-detection": "^1.1",
+ "vimeo/psalm": "^0.2 || ^0.3 || ^1.1 || ^4.24 || ^5.0@beta"
+ },
+ "time": "2023-01-05T18:45:16+00:00",
+ "type": "phpcodesniffer-standard",
+ "installation-source": "dist",
+ "autoload": {
+ "psr-4": {
+ "VariableAnalysis\\": "VariableAnalysis/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "BSD-2-Clause"
+ ],
+ "authors": [
+ {
+ "name": "Sam Graham",
+ "email": "php-codesniffer-variableanalysis@illusori.co.uk"
+ },
+ {
+ "name": "Payton Swick",
+ "email": "payton@foolord.com"
+ }
+ ],
+ "description": "A PHPCS sniff to detect problems with variables.",
+ "keywords": [
+ "phpcs",
+ "static analysis"
+ ],
+ "support": {
+ "issues": "https://github.com/sirbrillig/phpcs-variable-analysis/issues",
+ "source": "https://github.com/sirbrillig/phpcs-variable-analysis",
+ "wiki": "https://github.com/sirbrillig/phpcs-variable-analysis/wiki"
+ },
+ "install-path": "../sirbrillig/phpcs-variable-analysis"
+ },
+ {
+ "name": "squizlabs/php_codesniffer",
+ "version": "3.7.1",
+ "version_normalized": "3.7.1.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/squizlabs/PHP_CodeSniffer.git",
+ "reference": "1359e176e9307e906dc3d890bcc9603ff6d90619"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/1359e176e9307e906dc3d890bcc9603ff6d90619",
+ "reference": "1359e176e9307e906dc3d890bcc9603ff6d90619",
+ "shasum": ""
+ },
+ "require": {
+ "ext-simplexml": "*",
+ "ext-tokenizer": "*",
+ "ext-xmlwriter": "*",
+ "php": ">=5.4.0"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0"
+ },
+ "time": "2022-06-18T07:21:10+00:00",
+ "bin": [
+ "bin/phpcs",
+ "bin/phpcbf"
+ ],
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "3.x-dev"
+ }
+ },
+ "installation-source": "dist",
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "BSD-3-Clause"
+ ],
+ "authors": [
+ {
+ "name": "Greg Sherwood",
+ "role": "lead"
+ }
+ ],
+ "description": "PHP_CodeSniffer tokenizes PHP, JavaScript and CSS files and detects violations of a defined set of coding standards.",
+ "homepage": "https://github.com/squizlabs/PHP_CodeSniffer",
+ "keywords": [
+ "phpcs",
+ "standards"
+ ],
+ "install-path": "../squizlabs/php_codesniffer"
+ },
+ {
+ "name": "theseer/tokenizer",
+ "version": "1.2.1",
+ "version_normalized": "1.2.1.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/theseer/tokenizer.git",
+ "reference": "34a41e998c2183e22995f158c581e7b5e755ab9e"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/theseer/tokenizer/zipball/34a41e998c2183e22995f158c581e7b5e755ab9e",
+ "reference": "34a41e998c2183e22995f158c581e7b5e755ab9e",
+ "shasum": ""
+ },
+ "require": {
+ "ext-dom": "*",
+ "ext-tokenizer": "*",
+ "ext-xmlwriter": "*",
+ "php": "^7.2 || ^8.0"
+ },
+ "time": "2021-07-28T10:34:58+00:00",
+ "type": "library",
+ "installation-source": "dist",
+ "autoload": {
+ "classmap": [
+ "src/"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "BSD-3-Clause"
+ ],
+ "authors": [
+ {
+ "name": "Arne Blankerts",
+ "email": "arne@blankerts.de",
+ "role": "Developer"
+ }
+ ],
+ "description": "A small library for converting tokenized PHP source code into XML and potentially other formats",
+ "funding": [
+ {
+ "url": "https://github.com/theseer",
+ "type": "github"
+ }
+ ],
+ "install-path": "../theseer/tokenizer"
+ },
+ {
+ "name": "togos/gitignore",
+ "version": "1.1.1",
+ "version_normalized": "1.1.1.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/TOGoS/PHPGitIgnore.git",
+ "reference": "32bc0830e4123f670adcbf5ddda5bef362f4f4d4"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/TOGoS/PHPGitIgnore/zipball/32bc0830e4123f670adcbf5ddda5bef362f4f4d4",
+ "reference": "32bc0830e4123f670adcbf5ddda5bef362f4f4d4",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.2"
+ },
+ "require-dev": {
+ "togos/simpler-test": "1.1.1"
+ },
+ "time": "2019-04-19T19:16:58+00:00",
+ "type": "library",
+ "installation-source": "dist",
+ "autoload": {
+ "psr-0": {
+ "TOGoS_GitIgnore_": "src/main/php/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "description": "Parser for .gitignore (and sparse-checkout, and anything else using the same format) files",
+ "support": {
+ "issues": "https://github.com/TOGoS/PHPGitIgnore/issues",
+ "source": "https://github.com/TOGoS/PHPGitIgnore/tree/master"
+ },
+ "install-path": "../togos/gitignore"
+ },
+ {
+ "name": "wp-coding-standards/wpcs",
+ "version": "2.3.0",
+ "version_normalized": "2.3.0.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/WordPress/WordPress-Coding-Standards.git",
+ "reference": "7da1894633f168fe244afc6de00d141f27517b62"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/WordPress/WordPress-Coding-Standards/zipball/7da1894633f168fe244afc6de00d141f27517b62",
+ "reference": "7da1894633f168fe244afc6de00d141f27517b62",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.4",
+ "squizlabs/php_codesniffer": "^3.3.1"
+ },
+ "require-dev": {
+ "dealerdirect/phpcodesniffer-composer-installer": "^0.5 || ^0.6",
+ "phpcompatibility/php-compatibility": "^9.0",
+ "phpcsstandards/phpcsdevtools": "^1.0",
+ "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0"
+ },
+ "suggest": {
+ "dealerdirect/phpcodesniffer-composer-installer": "^0.6 || This Composer plugin will sort out the PHPCS 'installed_paths' automatically."
+ },
+ "time": "2020-05-13T23:57:56+00:00",
+ "type": "phpcodesniffer-standard",
+ "installation-source": "dist",
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Contributors",
+ "homepage": "https://github.com/WordPress/WordPress-Coding-Standards/graphs/contributors"
+ }
+ ],
+ "description": "PHP_CodeSniffer rules (sniffs) to enforce WordPress coding conventions",
+ "keywords": [
+ "phpcs",
+ "standards",
+ "wordpress"
+ ],
+ "install-path": "../wp-coding-standards/wpcs"
+ }
+ ],
+ "dev": true,
+ "dev-package-names": [
+ "10up/wp_mock",
+ "antecedent/patchwork",
+ "automattic/vipwpcs",
+ "civicrm/composer-downloads-plugin",
+ "dealerdirect/phpcodesniffer-composer-installer",
+ "doctrine/instantiator",
+ "hamcrest/hamcrest-php",
+ "mockery/mockery",
+ "myclabs/deep-copy",
+ "nikic/php-parser",
+ "phar-io/manifest",
+ "phar-io/version",
+ "php-stubs/wordpress-stubs",
+ "phpcompatibility/php-compatibility",
+ "phpcompatibility/phpcompatibility-paragonie",
+ "phpcompatibility/phpcompatibility-wp",
+ "phpunit/php-code-coverage",
+ "phpunit/php-file-iterator",
+ "phpunit/php-invoker",
+ "phpunit/php-text-template",
+ "phpunit/php-timer",
+ "phpunit/phpunit",
+ "roave/security-advisories",
+ "sebastian/cli-parser",
+ "sebastian/code-unit",
+ "sebastian/code-unit-reverse-lookup",
+ "sebastian/comparator",
+ "sebastian/complexity",
+ "sebastian/diff",
+ "sebastian/environment",
+ "sebastian/exporter",
+ "sebastian/global-state",
+ "sebastian/lines-of-code",
+ "sebastian/object-enumerator",
+ "sebastian/object-reflector",
+ "sebastian/recursion-context",
+ "sebastian/resource-operations",
+ "sebastian/type",
+ "sebastian/version",
+ "sirbrillig/phpcs-variable-analysis",
+ "squizlabs/php_codesniffer",
+ "theseer/tokenizer",
+ "togos/gitignore",
+ "wp-coding-standards/wpcs"
+ ]
+}
diff --git a/vendor/composer/installed.php b/vendor/composer/installed.php
new file mode 100644
index 00000000..c0aae560
--- /dev/null
+++ b/vendor/composer/installed.php
@@ -0,0 +1,457 @@
+ array(
+ 'pretty_version' => 'dev-develop',
+ 'version' => 'dev-develop',
+ 'type' => 'wordpress-plugin',
+ 'install_path' => __DIR__ . '/../../',
+ 'aliases' => array(),
+ 'reference' => '38c98fe46f42966d52b298d405d20a527d6f7789',
+ 'name' => 'rtcamp/login-with-google',
+ 'dev' => true,
+ ),
+ 'versions' => array(
+ '10up/wp_mock' => array(
+ 'pretty_version' => '0.4.2',
+ 'version' => '0.4.2.0',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../10up/wp_mock',
+ 'aliases' => array(),
+ 'reference' => '9019226eb50df275aa86bb15bfc98a619601ee49',
+ 'dev_requirement' => true,
+ ),
+ 'antecedent/patchwork' => array(
+ 'pretty_version' => '2.1.21',
+ 'version' => '2.1.21.0',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../antecedent/patchwork',
+ 'aliases' => array(),
+ 'reference' => '25c1fa0cd9a6e6d0d13863d8df8f050b6733f16d',
+ 'dev_requirement' => true,
+ ),
+ 'automattic/vipwpcs' => array(
+ 'pretty_version' => '2.3.3',
+ 'version' => '2.3.3.0',
+ 'type' => 'phpcodesniffer-standard',
+ 'install_path' => __DIR__ . '/../automattic/vipwpcs',
+ 'aliases' => array(),
+ 'reference' => '6cd0a6a82bc0ac988dbf9d6a7c2e293dc8ac640b',
+ 'dev_requirement' => true,
+ ),
+ 'civicrm/composer-downloads-plugin' => array(
+ 'pretty_version' => 'v3.0.1',
+ 'version' => '3.0.1.0',
+ 'type' => 'composer-plugin',
+ 'install_path' => __DIR__ . '/../civicrm/composer-downloads-plugin',
+ 'aliases' => array(),
+ 'reference' => '3aabb6d259a86158d01829fc2c62a2afb9618877',
+ 'dev_requirement' => true,
+ ),
+ 'cordoval/hamcrest-php' => array(
+ 'dev_requirement' => true,
+ 'replaced' => array(
+ 0 => '*',
+ ),
+ ),
+ 'davedevelopment/hamcrest-php' => array(
+ 'dev_requirement' => true,
+ 'replaced' => array(
+ 0 => '*',
+ ),
+ ),
+ 'dealerdirect/phpcodesniffer-composer-installer' => array(
+ 'pretty_version' => 'v0.7.2',
+ 'version' => '0.7.2.0',
+ 'type' => 'composer-plugin',
+ 'install_path' => __DIR__ . '/../dealerdirect/phpcodesniffer-composer-installer',
+ 'aliases' => array(),
+ 'reference' => '1c968e542d8843d7cd71de3c5c9c3ff3ad71a1db',
+ 'dev_requirement' => true,
+ ),
+ 'doctrine/instantiator' => array(
+ 'pretty_version' => '1.5.0',
+ 'version' => '1.5.0.0',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../doctrine/instantiator',
+ 'aliases' => array(),
+ 'reference' => '0a0fa9780f5d4e507415a065172d26a98d02047b',
+ 'dev_requirement' => true,
+ ),
+ 'hamcrest/hamcrest-php' => array(
+ 'pretty_version' => 'v2.0.1',
+ 'version' => '2.0.1.0',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../hamcrest/hamcrest-php',
+ 'aliases' => array(),
+ 'reference' => '8c3d0a3f6af734494ad8f6fbbee0ba92422859f3',
+ 'dev_requirement' => true,
+ ),
+ 'kodova/hamcrest-php' => array(
+ 'dev_requirement' => true,
+ 'replaced' => array(
+ 0 => '*',
+ ),
+ ),
+ 'mockery/mockery' => array(
+ 'pretty_version' => '1.5.1',
+ 'version' => '1.5.1.0',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../mockery/mockery',
+ 'aliases' => array(),
+ 'reference' => 'e92dcc83d5a51851baf5f5591d32cb2b16e3684e',
+ 'dev_requirement' => true,
+ ),
+ 'myclabs/deep-copy' => array(
+ 'pretty_version' => '1.11.0',
+ 'version' => '1.11.0.0',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../myclabs/deep-copy',
+ 'aliases' => array(),
+ 'reference' => '14daed4296fae74d9e3201d2c4925d1acb7aa614',
+ 'dev_requirement' => true,
+ ),
+ 'nikic/php-parser' => array(
+ 'pretty_version' => 'v4.15.3',
+ 'version' => '4.15.3.0',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../nikic/php-parser',
+ 'aliases' => array(),
+ 'reference' => '570e980a201d8ed0236b0a62ddf2c9cbb2034039',
+ 'dev_requirement' => true,
+ ),
+ 'phar-io/manifest' => array(
+ 'pretty_version' => '2.0.3',
+ 'version' => '2.0.3.0',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../phar-io/manifest',
+ 'aliases' => array(),
+ 'reference' => '97803eca37d319dfa7826cc2437fc020857acb53',
+ 'dev_requirement' => true,
+ ),
+ 'phar-io/version' => array(
+ 'pretty_version' => '3.2.1',
+ 'version' => '3.2.1.0',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../phar-io/version',
+ 'aliases' => array(),
+ 'reference' => '4f7fd7836c6f332bb2933569e566a0d6c4cbed74',
+ 'dev_requirement' => true,
+ ),
+ 'php-stubs/wordpress-stubs' => array(
+ 'pretty_version' => 'v6.1.1',
+ 'version' => '6.1.1.0',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../php-stubs/wordpress-stubs',
+ 'aliases' => array(),
+ 'reference' => '601c429ba8d91ef50a2a1bec05a7cd38b88064ff',
+ 'dev_requirement' => true,
+ ),
+ 'phpcompatibility/php-compatibility' => array(
+ 'pretty_version' => '9.3.5',
+ 'version' => '9.3.5.0',
+ 'type' => 'phpcodesniffer-standard',
+ 'install_path' => __DIR__ . '/../phpcompatibility/php-compatibility',
+ 'aliases' => array(),
+ 'reference' => '9fb324479acf6f39452e0655d2429cc0d3914243',
+ 'dev_requirement' => true,
+ ),
+ 'phpcompatibility/phpcompatibility-paragonie' => array(
+ 'pretty_version' => '1.3.2',
+ 'version' => '1.3.2.0',
+ 'type' => 'phpcodesniffer-standard',
+ 'install_path' => __DIR__ . '/../phpcompatibility/phpcompatibility-paragonie',
+ 'aliases' => array(),
+ 'reference' => 'bba5a9dfec7fcfbd679cfaf611d86b4d3759da26',
+ 'dev_requirement' => true,
+ ),
+ 'phpcompatibility/phpcompatibility-wp' => array(
+ 'pretty_version' => '2.1.4',
+ 'version' => '2.1.4.0',
+ 'type' => 'phpcodesniffer-standard',
+ 'install_path' => __DIR__ . '/../phpcompatibility/phpcompatibility-wp',
+ 'aliases' => array(),
+ 'reference' => 'b6c1e3ee1c35de6c41a511d5eb9bd03e447480a5',
+ 'dev_requirement' => true,
+ ),
+ 'phpunit/php-code-coverage' => array(
+ 'pretty_version' => '9.2.24',
+ 'version' => '9.2.24.0',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../phpunit/php-code-coverage',
+ 'aliases' => array(),
+ 'reference' => '2cf940ebc6355a9d430462811b5aaa308b174bed',
+ 'dev_requirement' => true,
+ ),
+ 'phpunit/php-file-iterator' => array(
+ 'pretty_version' => '3.0.6',
+ 'version' => '3.0.6.0',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../phpunit/php-file-iterator',
+ 'aliases' => array(),
+ 'reference' => 'cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf',
+ 'dev_requirement' => true,
+ ),
+ 'phpunit/php-invoker' => array(
+ 'pretty_version' => '3.1.1',
+ 'version' => '3.1.1.0',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../phpunit/php-invoker',
+ 'aliases' => array(),
+ 'reference' => '5a10147d0aaf65b58940a0b72f71c9ac0423cc67',
+ 'dev_requirement' => true,
+ ),
+ 'phpunit/php-text-template' => array(
+ 'pretty_version' => '2.0.4',
+ 'version' => '2.0.4.0',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../phpunit/php-text-template',
+ 'aliases' => array(),
+ 'reference' => '5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28',
+ 'dev_requirement' => true,
+ ),
+ 'phpunit/php-timer' => array(
+ 'pretty_version' => '5.0.3',
+ 'version' => '5.0.3.0',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../phpunit/php-timer',
+ 'aliases' => array(),
+ 'reference' => '5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2',
+ 'dev_requirement' => true,
+ ),
+ 'phpunit/phpunit' => array(
+ 'pretty_version' => '9.6.3',
+ 'version' => '9.6.3.0',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../phpunit/phpunit',
+ 'aliases' => array(),
+ 'reference' => 'e7b1615e3e887d6c719121c6d4a44b0ab9645555',
+ 'dev_requirement' => true,
+ ),
+ 'pimple/pimple' => array(
+ 'pretty_version' => 'v3.3.1',
+ 'version' => '3.3.1.0',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../pimple/pimple',
+ 'aliases' => array(),
+ 'reference' => '21e45061c3429b1e06233475cc0e1f6fc774d5b0',
+ 'dev_requirement' => false,
+ ),
+ 'psr/container' => array(
+ 'pretty_version' => '1.1.2',
+ 'version' => '1.1.2.0',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../psr/container',
+ 'aliases' => array(),
+ 'reference' => '513e0666f7216c7459170d56df27dfcefe1689ea',
+ 'dev_requirement' => false,
+ ),
+ 'roave/security-advisories' => array(
+ 'pretty_version' => 'dev-latest',
+ 'version' => 'dev-latest',
+ 'type' => 'metapackage',
+ 'install_path' => NULL,
+ 'aliases' => array(
+ 0 => '9999999-dev',
+ ),
+ 'reference' => '72ca3d8b529b6679ccbefcdc1433fa6aeb7564b8',
+ 'dev_requirement' => true,
+ ),
+ 'rtcamp/login-with-google' => array(
+ 'pretty_version' => 'dev-develop',
+ 'version' => 'dev-develop',
+ 'type' => 'wordpress-plugin',
+ 'install_path' => __DIR__ . '/../../',
+ 'aliases' => array(),
+ 'reference' => '38c98fe46f42966d52b298d405d20a527d6f7789',
+ 'dev_requirement' => false,
+ ),
+ 'sebastian/cli-parser' => array(
+ 'pretty_version' => '1.0.1',
+ 'version' => '1.0.1.0',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../sebastian/cli-parser',
+ 'aliases' => array(),
+ 'reference' => '442e7c7e687e42adc03470c7b668bc4b2402c0b2',
+ 'dev_requirement' => true,
+ ),
+ 'sebastian/code-unit' => array(
+ 'pretty_version' => '1.0.8',
+ 'version' => '1.0.8.0',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../sebastian/code-unit',
+ 'aliases' => array(),
+ 'reference' => '1fc9f64c0927627ef78ba436c9b17d967e68e120',
+ 'dev_requirement' => true,
+ ),
+ 'sebastian/code-unit-reverse-lookup' => array(
+ 'pretty_version' => '2.0.3',
+ 'version' => '2.0.3.0',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../sebastian/code-unit-reverse-lookup',
+ 'aliases' => array(),
+ 'reference' => 'ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5',
+ 'dev_requirement' => true,
+ ),
+ 'sebastian/comparator' => array(
+ 'pretty_version' => '4.0.8',
+ 'version' => '4.0.8.0',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../sebastian/comparator',
+ 'aliases' => array(),
+ 'reference' => 'fa0f136dd2334583309d32b62544682ee972b51a',
+ 'dev_requirement' => true,
+ ),
+ 'sebastian/complexity' => array(
+ 'pretty_version' => '2.0.2',
+ 'version' => '2.0.2.0',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../sebastian/complexity',
+ 'aliases' => array(),
+ 'reference' => '739b35e53379900cc9ac327b2147867b8b6efd88',
+ 'dev_requirement' => true,
+ ),
+ 'sebastian/diff' => array(
+ 'pretty_version' => '4.0.4',
+ 'version' => '4.0.4.0',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../sebastian/diff',
+ 'aliases' => array(),
+ 'reference' => '3461e3fccc7cfdfc2720be910d3bd73c69be590d',
+ 'dev_requirement' => true,
+ ),
+ 'sebastian/environment' => array(
+ 'pretty_version' => '5.1.5',
+ 'version' => '5.1.5.0',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../sebastian/environment',
+ 'aliases' => array(),
+ 'reference' => '830c43a844f1f8d5b7a1f6d6076b784454d8b7ed',
+ 'dev_requirement' => true,
+ ),
+ 'sebastian/exporter' => array(
+ 'pretty_version' => '4.0.5',
+ 'version' => '4.0.5.0',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../sebastian/exporter',
+ 'aliases' => array(),
+ 'reference' => 'ac230ed27f0f98f597c8a2b6eb7ac563af5e5b9d',
+ 'dev_requirement' => true,
+ ),
+ 'sebastian/global-state' => array(
+ 'pretty_version' => '5.0.5',
+ 'version' => '5.0.5.0',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../sebastian/global-state',
+ 'aliases' => array(),
+ 'reference' => '0ca8db5a5fc9c8646244e629625ac486fa286bf2',
+ 'dev_requirement' => true,
+ ),
+ 'sebastian/lines-of-code' => array(
+ 'pretty_version' => '1.0.3',
+ 'version' => '1.0.3.0',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../sebastian/lines-of-code',
+ 'aliases' => array(),
+ 'reference' => 'c1c2e997aa3146983ed888ad08b15470a2e22ecc',
+ 'dev_requirement' => true,
+ ),
+ 'sebastian/object-enumerator' => array(
+ 'pretty_version' => '4.0.4',
+ 'version' => '4.0.4.0',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../sebastian/object-enumerator',
+ 'aliases' => array(),
+ 'reference' => '5c9eeac41b290a3712d88851518825ad78f45c71',
+ 'dev_requirement' => true,
+ ),
+ 'sebastian/object-reflector' => array(
+ 'pretty_version' => '2.0.4',
+ 'version' => '2.0.4.0',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../sebastian/object-reflector',
+ 'aliases' => array(),
+ 'reference' => 'b4f479ebdbf63ac605d183ece17d8d7fe49c15c7',
+ 'dev_requirement' => true,
+ ),
+ 'sebastian/recursion-context' => array(
+ 'pretty_version' => '4.0.5',
+ 'version' => '4.0.5.0',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../sebastian/recursion-context',
+ 'aliases' => array(),
+ 'reference' => 'e75bd0f07204fec2a0af9b0f3cfe97d05f92efc1',
+ 'dev_requirement' => true,
+ ),
+ 'sebastian/resource-operations' => array(
+ 'pretty_version' => '3.0.3',
+ 'version' => '3.0.3.0',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../sebastian/resource-operations',
+ 'aliases' => array(),
+ 'reference' => '0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8',
+ 'dev_requirement' => true,
+ ),
+ 'sebastian/type' => array(
+ 'pretty_version' => '3.2.1',
+ 'version' => '3.2.1.0',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../sebastian/type',
+ 'aliases' => array(),
+ 'reference' => '75e2c2a32f5e0b3aef905b9ed0b179b953b3d7c7',
+ 'dev_requirement' => true,
+ ),
+ 'sebastian/version' => array(
+ 'pretty_version' => '3.0.2',
+ 'version' => '3.0.2.0',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../sebastian/version',
+ 'aliases' => array(),
+ 'reference' => 'c6c1022351a901512170118436c764e473f6de8c',
+ 'dev_requirement' => true,
+ ),
+ 'sirbrillig/phpcs-variable-analysis' => array(
+ 'pretty_version' => 'v2.11.10',
+ 'version' => '2.11.10.0',
+ 'type' => 'phpcodesniffer-standard',
+ 'install_path' => __DIR__ . '/../sirbrillig/phpcs-variable-analysis',
+ 'aliases' => array(),
+ 'reference' => '0f25a3766f26df91d6bdda0c8931303fc85499d7',
+ 'dev_requirement' => true,
+ ),
+ 'squizlabs/php_codesniffer' => array(
+ 'pretty_version' => '3.7.1',
+ 'version' => '3.7.1.0',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../squizlabs/php_codesniffer',
+ 'aliases' => array(),
+ 'reference' => '1359e176e9307e906dc3d890bcc9603ff6d90619',
+ 'dev_requirement' => true,
+ ),
+ 'theseer/tokenizer' => array(
+ 'pretty_version' => '1.2.1',
+ 'version' => '1.2.1.0',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../theseer/tokenizer',
+ 'aliases' => array(),
+ 'reference' => '34a41e998c2183e22995f158c581e7b5e755ab9e',
+ 'dev_requirement' => true,
+ ),
+ 'togos/gitignore' => array(
+ 'pretty_version' => '1.1.1',
+ 'version' => '1.1.1.0',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../togos/gitignore',
+ 'aliases' => array(),
+ 'reference' => '32bc0830e4123f670adcbf5ddda5bef362f4f4d4',
+ 'dev_requirement' => true,
+ ),
+ 'wp-coding-standards/wpcs' => array(
+ 'pretty_version' => '2.3.0',
+ 'version' => '2.3.0.0',
+ 'type' => 'phpcodesniffer-standard',
+ 'install_path' => __DIR__ . '/../wp-coding-standards/wpcs',
+ 'aliases' => array(),
+ 'reference' => '7da1894633f168fe244afc6de00d141f27517b62',
+ 'dev_requirement' => true,
+ ),
+ ),
+);
diff --git a/vendor/composer/platform_check.php b/vendor/composer/platform_check.php
new file mode 100644
index 00000000..580fa960
--- /dev/null
+++ b/vendor/composer/platform_check.php
@@ -0,0 +1,26 @@
+= 70400)) {
+ $issues[] = 'Your Composer dependencies require a PHP version ">= 7.4.0". You are running ' . PHP_VERSION . '.';
+}
+
+if ($issues) {
+ if (!headers_sent()) {
+ header('HTTP/1.1 500 Internal Server Error');
+ }
+ if (!ini_get('display_errors')) {
+ if (PHP_SAPI === 'cli' || PHP_SAPI === 'phpdbg') {
+ fwrite(STDERR, 'Composer detected issues in your platform:' . PHP_EOL.PHP_EOL . implode(PHP_EOL, $issues) . PHP_EOL.PHP_EOL);
+ } elseif (!headers_sent()) {
+ echo 'Composer detected issues in your platform:' . PHP_EOL.PHP_EOL . str_replace('You are running '.PHP_VERSION.'.', '', implode(PHP_EOL, $issues)) . PHP_EOL.PHP_EOL;
+ }
+ }
+ trigger_error(
+ 'Composer detected issues in your platform: ' . implode(' ', $issues),
+ E_USER_ERROR
+ );
+}
diff --git a/vendor/dealerdirect/phpcodesniffer-composer-installer/.github_changelog_generator b/vendor/dealerdirect/phpcodesniffer-composer-installer/.github_changelog_generator
new file mode 100644
index 00000000..a56afb45
--- /dev/null
+++ b/vendor/dealerdirect/phpcodesniffer-composer-installer/.github_changelog_generator
@@ -0,0 +1,34 @@
+add-issues-wo-labels=true
+add-pr-wo-labels=true
+author=true
+breaking-labels=backwards-incompatible,Backwards incompatible,breaking
+breaking-prefix=### Breaking changes
+bug-labels=bug - confirmed
+bug-prefix=### Fixes
+compare-link=true
+date-format=%Y-%m-%d
+deprecated-labels=deprecated,Deprecated,Type: Deprecated
+deprecated-prefix=### Deprecates
+enhancement-labels=improvement,documentation,builds / deploys / releases,feature request
+enhancement-prefix=### Changes
+exclude-labels=bug - unconfirmed,can't reproduce / won't fix,invalid,triage
+filter-issues-by-milestone=true
+header=
+http-cache=true
+issues=true
+issue-prefix=### Closes
+merge-prefix=### Pull request(s) without label
+output=
+project=phpcodesniffer-composer-installer
+pulls=true
+removed-labels=removed,Removed,Type: Removed
+removed-prefix=### Removes
+security-labels=security,Security,Type: Security
+security-prefix=### Security
+summary-labels=Release summary,release-summary,Summary,summary
+unreleased=true
+unreleased-label=Unreleased
+unreleased-only=true
+user=Dealerdirect
+usernames-as-github-logins=true
+verbose=false
diff --git a/vendor/dealerdirect/phpcodesniffer-composer-installer/.remarkrc b/vendor/dealerdirect/phpcodesniffer-composer-installer/.remarkrc
new file mode 100644
index 00000000..bfa065da
--- /dev/null
+++ b/vendor/dealerdirect/phpcodesniffer-composer-installer/.remarkrc
@@ -0,0 +1,6 @@
+{
+ "plugins": [
+ "remark-preset-lint-recommended",
+ ["remark-lint-list-item-indent", "space"]
+ ]
+}
diff --git a/vendor/dealerdirect/phpcodesniffer-composer-installer/.yamllint b/vendor/dealerdirect/phpcodesniffer-composer-installer/.yamllint
new file mode 100644
index 00000000..ef433bd4
--- /dev/null
+++ b/vendor/dealerdirect/phpcodesniffer-composer-installer/.yamllint
@@ -0,0 +1,8 @@
+---
+extends: default
+
+rules:
+ line-length:
+ level: warning
+ max: 120
+ truthy: {allowed-values: ["true", "false", "on"]}
diff --git a/vendor/dealerdirect/phpcodesniffer-composer-installer/CODE_OF_CONDUCT.md b/vendor/dealerdirect/phpcodesniffer-composer-installer/CODE_OF_CONDUCT.md
new file mode 100644
index 00000000..a408703d
--- /dev/null
+++ b/vendor/dealerdirect/phpcodesniffer-composer-installer/CODE_OF_CONDUCT.md
@@ -0,0 +1,129 @@
+
+# Contributor Covenant Code of Conduct
+
+## Our Pledge
+
+We as members, contributors, and leaders pledge to make participation in our
+community a harassment-free experience for everyone, regardless of age, body
+size, visible or invisible disability, ethnicity, sex characteristics, gender
+identity and expression, level of experience, education, socio-economic status,
+nationality, personal appearance, race, religion, or sexual identity
+and orientation.
+
+We pledge to act and interact in ways that contribute to an open, welcoming,
+diverse, inclusive, and healthy community.
+
+## Our Standards
+
+Examples of behavior that contributes to a positive environment for our
+community include:
+
+* Demonstrating empathy and kindness toward other people
+* Being respectful of differing opinions, viewpoints, and experiences
+* Giving and gracefully accepting constructive feedback
+* Accepting responsibility and apologizing to those affected by our mistakes,
+ and learning from the experience
+* Focusing on what is best not just for us as individuals, but for the
+ overall community
+
+Examples of unacceptable behavior include:
+
+* The use of sexualized language or imagery, and sexual attention or
+ advances of any kind
+* Trolling, insulting or derogatory comments, and personal or political attacks
+* Public or private harassment
+* Publishing others' private information, such as a physical or email
+ address, without their explicit permission
+* Other conduct which could reasonably be considered inappropriate in a
+ professional setting
+
+## Enforcement Responsibilities
+
+Community leaders are responsible for clarifying and enforcing our standards of
+acceptable behavior and will take appropriate and fair corrective action in
+response to any behavior that they deem inappropriate, threatening, offensive,
+or harmful.
+
+Community leaders have the right and responsibility to remove, edit, or reject
+comments, commits, code, wiki edits, issues, and other contributions that are
+not aligned to this Code of Conduct, and will communicate reasons for moderation
+decisions when appropriate.
+
+## Scope
+
+This Code of Conduct applies within all community spaces, and also applies when
+an individual is officially representing the community in public spaces.
+Examples of representing our community include using an official e-mail address,
+posting via an official social media account, or acting as an appointed
+representative at an online or offline event.
+
+## Enforcement
+
+Instances of abusive, harassing, or otherwise unacceptable behavior may be
+reported to the community leaders responsible for enforcement at
+.
+All complaints will be reviewed and investigated promptly and fairly.
+
+All community leaders are obligated to respect the privacy and security of the
+reporter of any incident.
+
+## Enforcement Guidelines
+
+Community leaders will follow these Community Impact Guidelines in determining
+the consequences for any action they deem in violation of this Code of Conduct:
+
+### 1. Correction
+
+**Community Impact**: Use of inappropriate language or other behavior deemed
+unprofessional or unwelcome in the community.
+
+**Consequence**: A private, written warning from community leaders, providing
+clarity around the nature of the violation and an explanation of why the
+behavior was inappropriate. A public apology may be requested.
+
+### 2. Warning
+
+**Community Impact**: A violation through a single incident or series
+of actions.
+
+**Consequence**: A warning with consequences for continued behavior. No
+interaction with the people involved, including unsolicited interaction with
+those enforcing the Code of Conduct, for a specified period of time. This
+includes avoiding interactions in community spaces as well as external channels
+like social media. Violating these terms may lead to a temporary or
+permanent ban.
+
+### 3. Temporary Ban
+
+**Community Impact**: A serious violation of community standards, including
+sustained inappropriate behavior.
+
+**Consequence**: A temporary ban from any sort of interaction or public
+communication with the community for a specified period of time. No public or
+private interaction with the people involved, including unsolicited interaction
+with those enforcing the Code of Conduct, is allowed during this period.
+Violating these terms may lead to a permanent ban.
+
+### 4. Permanent Ban
+
+**Community Impact**: Demonstrating a pattern of violation of community
+standards, including sustained inappropriate behavior, harassment of an
+individual, or aggression toward or disparagement of classes of individuals.
+
+**Consequence**: A permanent ban from any sort of public interaction within
+the community.
+
+## Attribution
+
+This Code of Conduct is adapted from the [Contributor Covenant][homepage],
+version 2.0, available at
+https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
+
+Community Impact Guidelines were inspired by [Mozilla's code of conduct
+enforcement ladder](https://github.com/mozilla/diversity).
+
+[homepage]: https://www.contributor-covenant.org
+
+For answers to common questions about this code of conduct, see the FAQ at
+https://www.contributor-covenant.org/faq. Translations are available at
+https://www.contributor-covenant.org/translations.
diff --git a/vendor/dealerdirect/phpcodesniffer-composer-installer/LICENSE.md b/vendor/dealerdirect/phpcodesniffer-composer-installer/LICENSE.md
new file mode 100644
index 00000000..893aafb7
--- /dev/null
+++ b/vendor/dealerdirect/phpcodesniffer-composer-installer/LICENSE.md
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2016-2022 Dealerdirect B.V.
+
+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/dealerdirect/phpcodesniffer-composer-installer/README.md b/vendor/dealerdirect/phpcodesniffer-composer-installer/README.md
new file mode 100644
index 00000000..b8ae2201
--- /dev/null
+++ b/vendor/dealerdirect/phpcodesniffer-composer-installer/README.md
@@ -0,0 +1,285 @@
+# PHP_CodeSniffer Standards Composer Installer Plugin
+
+![Project Stage][project-stage-shield]
+![Last Commit][last-updated-shield]
+![Awesome][awesome-shield]
+[![License][license-shield]](LICENSE.md)
+
+[![Tests][ghactionstest-shield]][ghactions]
+[![Scrutinizer][scrutinizer-shield]][scrutinizer]
+[![Latest Version on Packagist][packagist-version-shield]][packagist-version]
+[![Packagist][packagist-shield]][packagist]
+
+[![Contributor Covenant][code-of-conduct-shield]][code-of-conduct]
+
+This composer installer plugin allows for easy installation of [PHP_CodeSniffer][codesniffer] coding standards (rulesets).
+
+No more symbolic linking of directories, checking out repositories on specific locations or changing
+the `phpcs` configuration.
+
+## Usage
+
+Installation can be done with [Composer][composer], by requiring this package as a development dependency:
+
+```bash
+composer require --dev dealerdirect/phpcodesniffer-composer-installer
+```
+
+When using Composer 2.2 or higher, Composer will [ask for your permission](https://blog.packagist.com/composer-2-2/#more-secure-plugin-execution) to allow this plugin to execute code. For this plugin to be functional, permission needs to be granted.
+
+When permission has been granted, the following snippet will automatically be added to your `composer.json` file by Composer:
+```json
+{
+ "config": {
+ "allow-plugins": {
+ "dealerdirect/phpcodesniffer-composer-installer": true
+ }
+ }
+}
+```
+
+When using Composer < 2.2, you can add the permission flag ahead of the upgrade to Composer 2.2, by running:
+```bash
+composer config allow-plugins.dealerdirect/phpcodesniffer-composer-installer true
+```
+
+That's it.
+
+### Compatibility
+
+This plugin is compatible with:
+
+- PHP **5.x**, **7.x**, and **8.x** (Support for PHP v8 is available since [`v0.7.0`][v0.7])
+- [Composer][composer] **1.x** and **2.x** (Support for Composer v2 is available since [`v0.7.0`][v0.7])
+- [PHP_CodeSniffer][codesniffer] **2.x** and **3.x** (Support for PHP_CodeSniffer v3 is available since [`v0.4.0`][v0.4])
+
+
+> **ℹ️ Please Note:** [Composer treats _minor_ releases below 1.0.0 as _major_ releases][composer-manual-caret]. So version `0.7.x` (or higher) of this plugin must be _explicitly_ set as version constraint when using Composer 2.x or PHP 8.0. In other words: using `^0.6` will **not** work with Composer 2.x or PHP 8.0.
+
+### How it works
+
+Basically, this plugin executes the following steps:
+
+- This plugin searches for [`phpcodesniffer-standard` packages][] in all of your currently installed Composer packages.
+- Matching packages and the project itself are scanned for PHP_CodeSniffer rulesets.
+- The plugin will call PHP_CodeSniffer and configure the `installed_paths` option.
+
+### Example project
+
+The following is an example Composer project and has included
+multiple `phpcodesniffer-standard` packages.
+
+```json
+{
+ "name": "dealerdirect/example-project",
+ "description": "Just an example project",
+ "type": "project",
+ "require": {},
+ "require-dev": {
+ "dealerdirect/phpcodesniffer-composer-installer": "*",
+ "object-calisthenics/phpcs-calisthenics-rules": "*",
+ "phpcompatibility/php-compatibility": "*",
+ "wp-coding-standards/wpcs": "*"
+ },
+ "config": {
+ "allow-plugins": {
+ "dealerdirect/phpcodesniffer-composer-installer": true
+ }
+ }
+}
+```
+
+After running `composer install` PHP_CodeSniffer just works:
+
+```bash
+$ ./vendor/bin/phpcs -i
+The installed coding standards are MySource, PEAR, PSR1, PSR2, PSR12, Squiz, Zend, ObjectCalisthenics,
+PHPCompatibility, WordPress, WordPress-Core, WordPress-Docs and WordPress-Extra
+```
+
+### Calling the plugin directly
+
+In some circumstances, it is desirable to call this plugin's functionality
+directly. For instance, during development or in [CI][definition-ci] environments.
+
+As the plugin requires Composer to work, direct calls need to be wired through a
+project's `composer.json`.
+
+This is done by adding a call to the `Plugin::run` function in the `script`
+section of the `composer.json`:
+
+```json
+{
+ "scripts": {
+ "install-codestandards": [
+ "Dealerdirect\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\Plugin::run"
+ ]
+ }
+}
+```
+
+The command can then be called using `composer run-script install-codestandards` or
+referenced from other script configurations, as follows:
+
+```json
+{
+ "scripts": {
+ "install-codestandards": [
+ "Dealerdirect\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\Plugin::run"
+ ],
+ "post-install-cmd": [
+ "@install-codestandards"
+ ]
+ }
+}
+```
+
+For more details about Composer scripts, please refer to [the section on scripts
+in the Composer manual][composer-manual-scripts].
+
+### Changing the Coding Standards search depth
+
+By default, this plugin searches up for Coding Standards up to three directories
+deep. In most cases, this should be sufficient. However, this plugin allows
+you to customize the search depth setting if needed.
+
+```json
+{
+ "extra": {
+ "phpcodesniffer-search-depth": 5
+ }
+}
+```
+
+### Caveats
+
+When this plugin is installed globally, composer will load the _global_ plugin rather
+than the one from the local repository. Despite [this behavior being documented
+in the composer manual][using-composer-plugins], it could potentially confuse
+as another version of the plugin could be run and not the one specified by the project.
+
+## Developing Coding Standards
+
+Coding standard can be developed normally, as documented by [PHP_CodeSniffer][codesniffer], in the [Coding Standard Tutorial][tutorial].
+
+Create a composer package of your coding standard by adding a `composer.json` file.
+
+```json
+{
+ "name" : "acme/phpcodesniffer-our-standards",
+ "description" : "Package contains all coding standards of the Acme company",
+ "require" : {
+ "php" : ">=5.4.0",
+ "squizlabs/php_codesniffer" : "^3.6"
+ },
+ "type" : "phpcodesniffer-standard"
+}
+```
+
+Requirements:
+* The repository may contain one or more standards.
+* Each standard can have a separate directory no deeper than 3 levels from the repository root.
+* The package `type` must be `phpcodesniffer-standard`. Without this, the plugin will not trigger.
+
+### Requiring the plugin from within your coding standard
+
+If your coding standard itself depends on additional external PHPCS standards, this plugin can
+make life easier on your end-users by taking care of the installation of all standards - yours
+and your dependencies - for them.
+
+This can help reduce the number of support questions about setting the `installed_paths`, as well
+as simplify your standard's installation instructions.
+
+For this to work, make sure your external standard adds this plugin to the `composer.json` config
+via `require`, **not** `require-dev`.
+
+> :warning: Your end-user may already `require-dev` this plugin and/or other external standards used
+> by your end-users may require this plugin as well.
+>
+> To prevent your end-users getting into "_dependency hell_", make sure to make the version requirement
+> for this plugin flexible.
+>
+> As, for now, this plugin is still regarded as "unstable" (version < 1.0), remember that Composer
+> treats unstable minors as majors and will not be able to resolve one config requiring this plugin
+> at version `^0.5`, while another requires it at version `^0.6`.
+> Either allow multiple minors or use `*` as the version requirement.
+>
+> Some examples of flexible requirements which can be used:
+> ```bash
+> composer require dealerdirect/phpcodesniffer-composer-installer:"*"
+> composer require dealerdirect/phpcodesniffer-composer-installer:"0.*"
+> composer require dealerdirect/phpcodesniffer-composer-installer:"^0.4.1 || ^0.5 || ^0.6 || ^0.7"
+> ```
+
+## Changelog
+
+This repository does not contain a `CHANGELOG.md` file, however, we do publish a changelog on each release
+using the [GitHub releases][changelog] functionality.
+
+## Contributing
+
+This is an active open-source project. We are always open to people who want to
+use the code or contribute to it.
+
+We've set up a separate document for our [contribution guidelines][contributing-guidelines].
+
+Thank you for being involved! :heart_eyes:
+
+## Authors & contributors
+
+The original idea and setup of this repository is by [Franck Nijhof][frenck], employee @ Dealerdirect.
+
+For a full list of all author and/or contributors, check [the contributors page][contributors].
+
+## License
+
+The MIT License (MIT)
+
+Copyright (c) 2016-2022 Dealerdirect B.V.
+
+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.
+
+[awesome-shield]: https://img.shields.io/badge/awesome%3F-yes-brightgreen.svg
+[changelog]: https://github.com/Dealerdirect/phpcodesniffer-composer-installer/releases
+[code-of-conduct-shield]: https://img.shields.io/badge/Contributor%20Covenant-v2.0-ff69b4.svg
+[code-of-conduct]: CODE_OF_CONDUCT.md
+[codesniffer]: https://github.com/squizlabs/PHP_CodeSniffer
+[composer-manual-scripts]: https://getcomposer.org/doc/articles/scripts.md
+[composer-manual-caret]: https://getcomposer.org/doc/articles/versions.md#caret-version-range-
+[composer]: https://getcomposer.org/
+[contributing-guidelines]: CONTRIBUTING.md
+[contributors]: https://github.com/Dealerdirect/phpcodesniffer-composer-installer/graphs/contributors
+[definition-ci]: https://en.wikipedia.org/wiki/Continuous_integration
+[frenck]: https://github.com/frenck
+[last-updated-shield]: https://img.shields.io/github/last-commit/Dealerdirect/phpcodesniffer-composer-installer.svg
+[license-shield]: https://img.shields.io/github/license/dealerdirect/phpcodesniffer-composer-installer.svg
+[packagist-shield]: https://img.shields.io/packagist/dt/dealerdirect/phpcodesniffer-composer-installer.svg
+[packagist-version-shield]: https://img.shields.io/packagist/v/dealerdirect/phpcodesniffer-composer-installer.svg
+[packagist-version]: https://packagist.org/packages/dealerdirect/phpcodesniffer-composer-installer
+[packagist]: https://packagist.org/packages/dealerdirect/phpcodesniffer-composer-installer
+[`phpcodesniffer-standard` packages]: https://packagist.org/explore/?type=phpcodesniffer-standard
+[project-stage-shield]: https://img.shields.io/badge/Project%20Stage-Development-yellowgreen.svg
+[scrutinizer-shield]: https://img.shields.io/scrutinizer/g/dealerdirect/phpcodesniffer-composer-installer.svg
+[scrutinizer]: https://scrutinizer-ci.com/g/dealerdirect/phpcodesniffer-composer-installer/
+[ghactionstest-shield]: https://github.com/Dealerdirect/phpcodesniffer-composer-installer/actions/workflows/integrationtest.yml/badge.svg
+[ghactions]: https://github.com/Dealerdirect/phpcodesniffer-composer-installer/actions/workflows/integrationtest.yml
+[tutorial]: https://github.com/squizlabs/PHP_CodeSniffer/wiki/Coding-Standard-Tutorial
+[using-composer-plugins]: https://getcomposer.org/doc/articles/plugins.md#using-plugins
+[v0.4]: https://github.com/Dealerdirect/phpcodesniffer-composer-installer/releases/tag/v0.4.0
+[v0.7]: https://github.com/Dealerdirect/phpcodesniffer-composer-installer/releases/tag/v0.7.0
diff --git a/vendor/dealerdirect/phpcodesniffer-composer-installer/bin/generate-changelog.sh b/vendor/dealerdirect/phpcodesniffer-composer-installer/bin/generate-changelog.sh
new file mode 100644
index 00000000..42dd8d8f
--- /dev/null
+++ b/vendor/dealerdirect/phpcodesniffer-composer-installer/bin/generate-changelog.sh
@@ -0,0 +1,49 @@
+#!/usr/bin/env bash
+
+set -o errexit -o errtrace -o nounset -o pipefail
+
+: ${GITHUB_CHANGELOG_GENERATOR:=github_changelog_generator}
+: ${GEM:=gem}
+
+generate_changelog() {
+ local -r sVersion="${1?One parameter required: }"
+
+ if ! command -v "${GITHUB_CHANGELOG_GENERATOR}" >/dev/null 2>&1;then
+ echo "This script requires the '${GITHUB_CHANGELOG_GENERATOR}' Ruby Gem"
+
+ if ! command -v "${GEM}" >/dev/null 2>&1;then
+ echo "Could not find the '${GEM}' command needed to install 'github_changelog_generator'!" >&2
+ echo 'Aborting.'
+ exit 67
+ else
+ echo "Installing '${GITHUB_CHANGELOG_GENERATOR}'..."
+ gem install github_changelog_generator
+ fi
+ fi
+
+ local -r sChangelog="$(
+ "${GITHUB_CHANGELOG_GENERATOR}" \
+ --user Dealerdirect \
+ --project phpcodesniffer-composer-installer \
+ --token "$(cat ~/.github-token)" \
+ --future-release "${sVersion}" \
+ --enhancement-label '### Changes' \
+ --bugs-label '### Fixes' \
+ --issues-label '### Closes' \
+ --usernames-as-github-logins \
+ --bug-labels 'bug - confirmed' \
+ --enhancement-labels 'improvement','documentation','builds / deploys / releases','feature request' \
+ --exclude-labels 'bug - unconfirmed',"can't reproduce / won't fix",'invalid','triage' \
+ --unreleased-only \
+ --output '' 2>/dev/null
+ )" || echo "There was a problem running '${GITHUB_CHANGELOG_GENERATOR}'"
+
+ echo "${sChangelog}" | sed -E 's/\[\\(#[0-9]+)\]\([^)]+\)/\1/' | head -n -3
+}
+
+if [[ "${BASH_SOURCE[0]}" != "$0" ]]; then
+ export -f generate_changelog
+else
+ generate_changelog "${@}"
+ exit $?
+fi
diff --git a/vendor/dealerdirect/phpcodesniffer-composer-installer/composer.json b/vendor/dealerdirect/phpcodesniffer-composer-installer/composer.json
new file mode 100644
index 00000000..e5b72c9e
--- /dev/null
+++ b/vendor/dealerdirect/phpcodesniffer-composer-installer/composer.json
@@ -0,0 +1,57 @@
+{
+ "name": "dealerdirect/phpcodesniffer-composer-installer",
+ "description": "PHP_CodeSniffer Standards Composer Installer Plugin",
+ "type": "composer-plugin",
+ "keywords": [
+ "composer", "installer", "plugin",
+ "phpcs", "phpcbf", "codesniffer", "phpcodesniffer", "php_codesniffer",
+ "standard", "standards", "style guide", "stylecheck",
+ "qa", "quality", "code quality", "tests"
+ ],
+ "homepage": "http://www.dealerdirect.com",
+ "license": "MIT",
+ "authors": [
+ {
+ "name": "Franck Nijhof",
+ "email": "franck.nijhof@dealerdirect.com",
+ "homepage": "http://www.frenck.nl",
+ "role": "Developer / IT Manager"
+ },
+ {
+ "name" : "Contributors",
+ "homepage" : "https://github.com/Dealerdirect/phpcodesniffer-composer-installer/graphs/contributors"
+ }
+ ],
+ "support": {
+ "issues": "https://github.com/dealerdirect/phpcodesniffer-composer-installer/issues",
+ "source": "https://github.com/dealerdirect/phpcodesniffer-composer-installer"
+ },
+ "require": {
+ "php": ">=5.3",
+ "composer-plugin-api": "^1.0 || ^2.0",
+ "squizlabs/php_codesniffer": "^2.0 || ^3.1.0 || ^4.0"
+ },
+ "require-dev": {
+ "composer/composer": "*",
+ "phpcompatibility/php-compatibility": "^9.0",
+ "php-parallel-lint/php-parallel-lint": "^1.3.1"
+ },
+ "minimum-stability": "dev",
+ "prefer-stable": true,
+ "autoload": {
+ "psr-4": {
+ "Dealerdirect\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\": "src/"
+ }
+ },
+ "extra": {
+ "class": "Dealerdirect\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\Plugin"
+ },
+ "scripts": {
+ "install-codestandards": [
+ "Dealerdirect\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\Plugin::run"
+ ],
+ "lint": [
+ "@php ./vendor/php-parallel-lint/php-parallel-lint/parallel-lint . -e php --exclude vendor --exclude .git"
+ ]
+ }
+}
diff --git a/vendor/dealerdirect/phpcodesniffer-composer-installer/src/Plugin.php b/vendor/dealerdirect/phpcodesniffer-composer-installer/src/Plugin.php
new file mode 100644
index 00000000..75653e49
--- /dev/null
+++ b/vendor/dealerdirect/phpcodesniffer-composer-installer/src/Plugin.php
@@ -0,0 +1,621 @@
+
+ */
+class Plugin implements PluginInterface, EventSubscriberInterface
+{
+ const KEY_MAX_DEPTH = 'phpcodesniffer-search-depth';
+
+ const MESSAGE_ERROR_WRONG_MAX_DEPTH =
+ 'The value of "%s" (in the composer.json "extra".section) must be an integer larger then %d, %s given.';
+
+ const MESSAGE_NOT_INSTALLED = 'PHPCodeSniffer is not installed';
+ const MESSAGE_NOTHING_TO_INSTALL = 'Nothing to install or update';
+ const MESSAGE_PLUGIN_UNINSTALLED = 'PHPCodeSniffer Composer Installer is uninstalled';
+ const MESSAGE_RUNNING_INSTALLER = 'Running PHPCodeSniffer Composer Installer';
+
+ const PACKAGE_NAME = 'squizlabs/php_codesniffer';
+ const PACKAGE_TYPE = 'phpcodesniffer-standard';
+
+ const PHPCS_CONFIG_REGEX = '`%s:[^\r\n]+`';
+ const PHPCS_CONFIG_KEY = 'installed_paths';
+
+ const PLUGIN_NAME = 'dealerdirect/phpcodesniffer-composer-installer';
+
+ /**
+ * @var Composer
+ */
+ private $composer;
+
+ /**
+ * @var string
+ */
+ private $cwd;
+
+ /**
+ * @var Filesystem
+ */
+ private $filesystem;
+
+ /**
+ * @var array
+ */
+ private $installedPaths;
+
+ /**
+ * @var IOInterface
+ */
+ private $io;
+
+ /**
+ * @var ProcessExecutor
+ */
+ private $processExecutor;
+
+ /**
+ * Triggers the plugin's main functionality.
+ *
+ * Makes it possible to run the plugin as a custom command.
+ *
+ * @param Event $event
+ *
+ * @throws \InvalidArgumentException
+ * @throws \RuntimeException
+ * @throws LogicException
+ * @throws ProcessFailedException
+ * @throws RuntimeException
+ */
+ public static function run(Event $event)
+ {
+ $io = $event->getIO();
+ $composer = $event->getComposer();
+
+ $instance = new static();
+
+ $instance->io = $io;
+ $instance->composer = $composer;
+ $instance->init();
+ $instance->onDependenciesChangedEvent();
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @throws \RuntimeException
+ * @throws LogicException
+ * @throws ProcessFailedException
+ * @throws RuntimeException
+ */
+ public function activate(Composer $composer, IOInterface $io)
+ {
+ $this->composer = $composer;
+ $this->io = $io;
+
+ $this->init();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function deactivate(Composer $composer, IOInterface $io)
+ {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function uninstall(Composer $composer, IOInterface $io)
+ {
+ }
+
+ /**
+ * Prepares the plugin so it's main functionality can be run.
+ *
+ * @throws \RuntimeException
+ * @throws LogicException
+ * @throws ProcessFailedException
+ * @throws RuntimeException
+ */
+ private function init()
+ {
+ $this->cwd = getcwd();
+ $this->installedPaths = array();
+
+ $this->processExecutor = new ProcessExecutor($this->io);
+ $this->filesystem = new Filesystem($this->processExecutor);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public static function getSubscribedEvents()
+ {
+ return array(
+ ScriptEvents::POST_INSTALL_CMD => array(
+ array('onDependenciesChangedEvent', 0),
+ ),
+ ScriptEvents::POST_UPDATE_CMD => array(
+ array('onDependenciesChangedEvent', 0),
+ ),
+ );
+ }
+
+ /**
+ * Entry point for post install and post update events.
+ *
+ * @throws \InvalidArgumentException
+ * @throws LogicException
+ * @throws ProcessFailedException
+ * @throws RuntimeException
+ */
+ public function onDependenciesChangedEvent()
+ {
+ $io = $this->io;
+ $isVerbose = $io->isVerbose();
+ $exitCode = 0;
+
+ if ($isVerbose) {
+ $io->write(sprintf('%s ', self::MESSAGE_RUNNING_INSTALLER));
+ }
+
+ if ($this->isPHPCodeSnifferInstalled() === true) {
+ $this->loadInstalledPaths();
+ $installPathCleaned = $this->cleanInstalledPaths();
+ $installPathUpdated = $this->updateInstalledPaths();
+
+ if ($installPathCleaned === true || $installPathUpdated === true) {
+ $exitCode = $this->saveInstalledPaths();
+ } elseif ($isVerbose) {
+ $io->write(sprintf('%s ', self::MESSAGE_NOTHING_TO_INSTALL));
+ }
+ } else {
+ $pluginPackage = $this
+ ->composer
+ ->getRepositoryManager()
+ ->getLocalRepository()
+ ->findPackages(self::PLUGIN_NAME)
+ ;
+
+ $isPluginUninstalled = count($pluginPackage) === 0;
+
+ if ($isPluginUninstalled) {
+ if ($isVerbose) {
+ $io->write(sprintf('%s ', self::MESSAGE_PLUGIN_UNINSTALLED));
+ }
+ } else {
+ $exitCode = 1;
+ if ($isVerbose) {
+ $io->write(sprintf('%s ', self::MESSAGE_NOT_INSTALLED));
+ }
+ }
+ }
+
+ return $exitCode;
+ }
+
+ /**
+ * Load all paths from PHP_CodeSniffer into an array.
+ *
+ * @throws LogicException
+ * @throws ProcessFailedException
+ * @throws RuntimeException
+ */
+ private function loadInstalledPaths()
+ {
+ if ($this->isPHPCodeSnifferInstalled() === true) {
+ $this->processExecutor->execute(
+ 'phpcs --config-show',
+ $output,
+ $this->composer->getConfig()->get('bin-dir')
+ );
+
+ $regex = sprintf(self::PHPCS_CONFIG_REGEX, self::PHPCS_CONFIG_KEY);
+ if (preg_match($regex, $output, $match) === 1) {
+ $phpcsInstalledPaths = str_replace(self::PHPCS_CONFIG_KEY . ': ', '', $match[0]);
+ $phpcsInstalledPaths = trim($phpcsInstalledPaths);
+
+ if ($phpcsInstalledPaths !== '') {
+ $this->installedPaths = explode(',', $phpcsInstalledPaths);
+ }
+ }
+ }
+ }
+
+ /**
+ * Save all coding standard paths back into PHP_CodeSniffer
+ *
+ * @throws LogicException
+ * @throws ProcessFailedException
+ * @throws RuntimeException
+ *
+ * @return int Exit code. 0 for success, 1 or higher for failure.
+ */
+ private function saveInstalledPaths()
+ {
+ // Check if we found installed paths to set.
+ if (count($this->installedPaths) !== 0) {
+ sort($this->installedPaths);
+ $paths = implode(',', $this->installedPaths);
+ $arguments = array('--config-set', self::PHPCS_CONFIG_KEY, $paths);
+ $configMessage = sprintf(
+ 'PHP CodeSniffer Config %s set to %s ',
+ self::PHPCS_CONFIG_KEY,
+ $paths
+ );
+ } else {
+ // Delete the installed paths if none were found.
+ $arguments = array('--config-delete', self::PHPCS_CONFIG_KEY);
+ $configMessage = sprintf(
+ 'PHP CodeSniffer Config %s delete ',
+ self::PHPCS_CONFIG_KEY
+ );
+ }
+
+ // Prepare message in case of failure
+ $failMessage = sprintf(
+ 'Failed to set PHP CodeSniffer %s Config',
+ self::PHPCS_CONFIG_KEY
+ );
+
+ // Determine the path to the main PHPCS file.
+ $phpcsPath = $this->getPHPCodeSnifferInstallPath();
+ if (file_exists($phpcsPath . '/bin/phpcs') === true) {
+ // PHPCS 3.x.
+ $phpcsExecutable = './bin/phpcs';
+ } else {
+ // PHPCS 2.x.
+ $phpcsExecutable = './scripts/phpcs';
+ }
+
+ // Okay, lets rock!
+ $command = vsprintf(
+ '%s %s %s',
+ array(
+ 'php executable' => $this->getPhpExecCommand(),
+ 'phpcs executable' => $phpcsExecutable,
+ 'arguments' => implode(' ', $arguments),
+ )
+ );
+
+ $exitCode = $this->processExecutor->execute($command, $configResult, $phpcsPath);
+ if ($exitCode === 0) {
+ $exitCode = $this->verifySaveSuccess();
+ }
+
+ if ($exitCode === 0) {
+ $this->io->write($configMessage);
+ } else {
+ $this->io->write($failMessage);
+ }
+
+ if ($this->io->isVerbose() && !empty($configResult)) {
+ $this->io->write(sprintf('%s ', $configResult));
+ }
+
+ return $exitCode;
+ }
+
+ /**
+ * Verify that the paths which were expected to be saved, have been.
+ *
+ * @return int Exit code. 0 for success, 1 for failure.
+ */
+ private function verifySaveSuccess()
+ {
+ $exitCode = 1;
+ $expectedPaths = $this->installedPaths;
+
+ // Request the currently set installed paths after the save.
+ $this->loadInstalledPaths();
+
+ $registeredPaths = array_intersect($this->installedPaths, $expectedPaths);
+ $registeredCount = count($registeredPaths);
+ $expectedCount = count($expectedPaths);
+
+ if ($expectedCount === $registeredCount) {
+ $exitCode = 0;
+ }
+
+ if ($exitCode === 1 && $this->io->isVerbose()) {
+ $verificationMessage = sprintf(
+ "Paths to external standards found by the plugin: %s \n"
+ . 'Actual paths registered with PHPCS: %s ',
+ implode(', ', $expectedPaths),
+ implode(', ', $this->installedPaths)
+ );
+ $this->io->write($verificationMessage);
+ }
+
+ return $exitCode;
+ }
+
+ /**
+ * Get the path to the current PHP version being used.
+ *
+ * Duplicate of the same in the EventDispatcher class in Composer itself.
+ */
+ protected function getPhpExecCommand()
+ {
+ $finder = new PhpExecutableFinder();
+
+ $phpPath = $finder->find(false);
+
+ if ($phpPath === false) {
+ throw new \RuntimeException('Failed to locate PHP binary to execute ' . $phpPath);
+ }
+
+ $phpArgs = $finder->findArguments();
+ $phpArgs = $phpArgs
+ ? ' ' . implode(' ', $phpArgs)
+ : ''
+ ;
+
+ $command = ProcessExecutor::escape($phpPath) .
+ $phpArgs .
+ ' -d allow_url_fopen=' . ProcessExecutor::escape(ini_get('allow_url_fopen')) .
+ ' -d disable_functions=' . ProcessExecutor::escape(ini_get('disable_functions')) .
+ ' -d memory_limit=' . ProcessExecutor::escape(ini_get('memory_limit'))
+ ;
+
+ return $command;
+ }
+
+ /**
+ * Iterate trough all known paths and check if they are still valid.
+ *
+ * If path does not exists, is not an directory or isn't readable, the path
+ * is removed from the list.
+ *
+ * @return bool True if changes where made, false otherwise
+ */
+ private function cleanInstalledPaths()
+ {
+ $changes = false;
+ foreach ($this->installedPaths as $key => $path) {
+ // This might be a relative path as well
+ $alternativePath = realpath($this->getPHPCodeSnifferInstallPath() . \DIRECTORY_SEPARATOR . $path);
+
+ if (
+ (is_dir($path) === false || is_readable($path) === false) &&
+ (
+ $alternativePath === false ||
+ is_dir($alternativePath) === false ||
+ is_readable($alternativePath) === false
+ )
+ ) {
+ unset($this->installedPaths[$key]);
+ $changes = true;
+ }
+ }
+ return $changes;
+ }
+
+ /**
+ * Check all installed packages (including the root package) against
+ * the installed paths from PHP_CodeSniffer and add the missing ones.
+ *
+ * @return bool True if changes where made, false otherwise
+ *
+ * @throws \InvalidArgumentException
+ * @throws \RuntimeException
+ */
+ private function updateInstalledPaths()
+ {
+ $changes = false;
+
+ $searchPaths = array($this->cwd);
+ $codingStandardPackages = $this->getPHPCodingStandardPackages();
+ foreach ($codingStandardPackages as $package) {
+ $installPath = $this->composer->getInstallationManager()->getInstallPath($package);
+ if ($this->filesystem->isAbsolutePath($installPath) === false) {
+ $installPath = $this->filesystem->normalizePath(
+ $this->cwd . \DIRECTORY_SEPARATOR . $installPath
+ );
+ }
+ $searchPaths[] = $installPath;
+ }
+
+ $finder = new Finder();
+ $finder->files()
+ ->depth('<= ' . $this->getMaxDepth())
+ ->depth('>= ' . $this->getMinDepth())
+ ->ignoreUnreadableDirs()
+ ->ignoreVCS(true)
+ ->in($searchPaths)
+ ->name('ruleset.xml');
+
+ // Process each found possible ruleset.
+ foreach ($finder as $ruleset) {
+ $standardsPath = $ruleset->getPath();
+
+ // Pick the directory above the directory containing the standard, unless this is the project root.
+ if ($standardsPath !== $this->cwd) {
+ $standardsPath = dirname($standardsPath);
+ }
+
+ // Use relative paths for local project repositories.
+ if ($this->isRunningGlobally() === false) {
+ $standardsPath = $this->filesystem->findShortestPath(
+ $this->getPHPCodeSnifferInstallPath(),
+ $standardsPath,
+ true
+ );
+ }
+
+ // De-duplicate and add when directory is not configured.
+ if (in_array($standardsPath, $this->installedPaths, true) === false) {
+ $this->installedPaths[] = $standardsPath;
+ $changes = true;
+ }
+ }
+
+ return $changes;
+ }
+
+ /**
+ * Iterates through Composers' local repository looking for valid Coding
+ * Standard packages.
+ *
+ * If the package is the RootPackage (the one the plugin is installed into),
+ * the package is ignored for now since it needs a different install path logic.
+ *
+ * @return array Composer packages containing coding standard(s)
+ */
+ private function getPHPCodingStandardPackages()
+ {
+ $codingStandardPackages = array_filter(
+ $this->composer->getRepositoryManager()->getLocalRepository()->getPackages(),
+ function (PackageInterface $package) {
+ if ($package instanceof AliasPackage) {
+ return false;
+ }
+ return $package->getType() === Plugin::PACKAGE_TYPE;
+ }
+ );
+
+ if (
+ ! $this->composer->getPackage() instanceof RootPackageInterface
+ && $this->composer->getPackage()->getType() === self::PACKAGE_TYPE
+ ) {
+ $codingStandardPackages[] = $this->composer->getPackage();
+ }
+
+ return $codingStandardPackages;
+ }
+
+ /**
+ * Searches for the installed PHP_CodeSniffer Composer package
+ *
+ * @param null|string|\Composer\Semver\Constraint\ConstraintInterface $versionConstraint to match against
+ *
+ * @return PackageInterface|null
+ */
+ private function getPHPCodeSnifferPackage($versionConstraint = null)
+ {
+ $packages = $this
+ ->composer
+ ->getRepositoryManager()
+ ->getLocalRepository()
+ ->findPackages(self::PACKAGE_NAME, $versionConstraint);
+
+ return array_shift($packages);
+ }
+
+ /**
+ * Returns the path to the PHP_CodeSniffer package installation location
+ *
+ * @return string
+ */
+ private function getPHPCodeSnifferInstallPath()
+ {
+ return $this->composer->getInstallationManager()->getInstallPath($this->getPHPCodeSnifferPackage());
+ }
+
+ /**
+ * Simple check if PHP_CodeSniffer is installed.
+ *
+ * @param null|string|\Composer\Semver\Constraint\ConstraintInterface $versionConstraint to match against
+ *
+ * @return bool Whether PHP_CodeSniffer is installed
+ */
+ private function isPHPCodeSnifferInstalled($versionConstraint = null)
+ {
+ return ($this->getPHPCodeSnifferPackage($versionConstraint) !== null);
+ }
+
+ /**
+ * Test if composer is running "global"
+ * This check kinda dirty, but it is the "Composer Way"
+ *
+ * @return bool Whether Composer is running "globally"
+ *
+ * @throws \RuntimeException
+ */
+ private function isRunningGlobally()
+ {
+ return ($this->composer->getConfig()->get('home') === $this->cwd);
+ }
+
+ /**
+ * Determines the maximum search depth when searching for Coding Standards.
+ *
+ * @return int
+ *
+ * @throws \InvalidArgumentException
+ */
+ private function getMaxDepth()
+ {
+ $maxDepth = 3;
+
+ $extra = $this->composer->getPackage()->getExtra();
+
+ if (array_key_exists(self::KEY_MAX_DEPTH, $extra)) {
+ $maxDepth = $extra[self::KEY_MAX_DEPTH];
+ $minDepth = $this->getMinDepth();
+
+ if (
+ (string) (int) $maxDepth !== (string) $maxDepth /* Must be an integer or cleanly castable to one */
+ || $maxDepth <= $minDepth /* Larger than the minimum */
+ || is_float($maxDepth) === true /* Within the boundaries of integer */
+ ) {
+ $message = vsprintf(
+ self::MESSAGE_ERROR_WRONG_MAX_DEPTH,
+ array(
+ 'key' => self::KEY_MAX_DEPTH,
+ 'min' => $minDepth,
+ 'given' => var_export($maxDepth, true),
+ )
+ );
+
+ throw new \InvalidArgumentException($message);
+ }
+ }
+
+ return (int) $maxDepth;
+ }
+
+ /**
+ * Returns the minimal search depth for Coding Standard packages.
+ *
+ * Usually this is 0, unless PHP_CodeSniffer >= 3 is used.
+ *
+ * @return int
+ */
+ private function getMinDepth()
+ {
+ if ($this->isPHPCodeSnifferInstalled('>= 3.0.0') !== true) {
+ return 1;
+ }
+ return 0;
+ }
+}
diff --git a/vendor/doctrine/instantiator/.doctrine-project.json b/vendor/doctrine/instantiator/.doctrine-project.json
new file mode 100644
index 00000000..24ae36e0
--- /dev/null
+++ b/vendor/doctrine/instantiator/.doctrine-project.json
@@ -0,0 +1,47 @@
+{
+ "active": true,
+ "name": "Instantiator",
+ "slug": "instantiator",
+ "docsSlug": "doctrine-instantiator",
+ "codePath": "/src",
+ "versions": [
+ {
+ "name": "1.5",
+ "branchName": "1.5.x",
+ "slug": "latest",
+ "upcoming": true
+ },
+ {
+ "name": "1.4",
+ "branchName": "1.4.x",
+ "slug": "1.4",
+ "aliases": [
+ "current",
+ "stable"
+ ],
+ "maintained": true,
+ "current": true
+ },
+ {
+ "name": "1.3",
+ "branchName": "1.3.x",
+ "slug": "1.3",
+ "maintained": false
+ },
+ {
+ "name": "1.2",
+ "branchName": "1.2.x",
+ "slug": "1.2"
+ },
+ {
+ "name": "1.1",
+ "branchName": "1.1.x",
+ "slug": "1.1"
+ },
+ {
+ "name": "1.0",
+ "branchName": "1.0.x",
+ "slug": "1.0"
+ }
+ ]
+}
diff --git a/vendor/doctrine/instantiator/CONTRIBUTING.md b/vendor/doctrine/instantiator/CONTRIBUTING.md
new file mode 100644
index 00000000..c1a2c42e
--- /dev/null
+++ b/vendor/doctrine/instantiator/CONTRIBUTING.md
@@ -0,0 +1,35 @@
+# Contributing
+
+ * Follow the [Doctrine Coding Standard](https://github.com/doctrine/coding-standard)
+ * The project will follow strict [object calisthenics](http://www.slideshare.net/guilhermeblanco/object-calisthenics-applied-to-php)
+ * Any contribution must provide tests for additional introduced conditions
+ * Any un-confirmed issue needs a failing test case before being accepted
+ * Pull requests must be sent from a new hotfix/feature branch, not from `master`.
+
+## Installation
+
+To install the project and run the tests, you need to clone it first:
+
+```sh
+$ git clone git://github.com/doctrine/instantiator.git
+```
+
+You will then need to run a composer installation:
+
+```sh
+$ cd Instantiator
+$ curl -s https://getcomposer.org/installer | php
+$ php composer.phar update
+```
+
+## Testing
+
+The PHPUnit version to be used is the one installed as a dev- dependency via composer:
+
+```sh
+$ ./vendor/bin/phpunit
+```
+
+Accepted coverage for new contributions is 80%. Any contribution not satisfying this requirement
+won't be merged.
+
diff --git a/vendor/doctrine/instantiator/LICENSE b/vendor/doctrine/instantiator/LICENSE
new file mode 100644
index 00000000..4d983d1a
--- /dev/null
+++ b/vendor/doctrine/instantiator/LICENSE
@@ -0,0 +1,19 @@
+Copyright (c) 2014 Doctrine Project
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of
+this software and associated documentation files (the "Software"), to deal in
+the Software without restriction, including without limitation the rights to
+use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
+of the Software, and to permit persons to whom the Software is furnished to do
+so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/vendor/doctrine/instantiator/README.md b/vendor/doctrine/instantiator/README.md
new file mode 100644
index 00000000..1fa95679
--- /dev/null
+++ b/vendor/doctrine/instantiator/README.md
@@ -0,0 +1,38 @@
+# Instantiator
+
+This library provides a way of avoiding usage of constructors when instantiating PHP classes.
+
+[![Build Status](https://travis-ci.org/doctrine/instantiator.svg?branch=master)](https://travis-ci.org/doctrine/instantiator)
+[![Code Coverage](https://codecov.io/gh/doctrine/instantiator/branch/master/graph/badge.svg)](https://codecov.io/gh/doctrine/instantiator/branch/master)
+[![Dependency Status](https://www.versioneye.com/package/php--doctrine--instantiator/badge.svg)](https://www.versioneye.com/package/php--doctrine--instantiator)
+
+[![Latest Stable Version](https://poser.pugx.org/doctrine/instantiator/v/stable.png)](https://packagist.org/packages/doctrine/instantiator)
+[![Latest Unstable Version](https://poser.pugx.org/doctrine/instantiator/v/unstable.png)](https://packagist.org/packages/doctrine/instantiator)
+
+## Installation
+
+The suggested installation method is via [composer](https://getcomposer.org/):
+
+```sh
+composer require doctrine/instantiator
+```
+
+## Usage
+
+The instantiator is able to create new instances of any class without using the constructor or any API of the class
+itself:
+
+```php
+$instantiator = new \Doctrine\Instantiator\Instantiator();
+
+$instance = $instantiator->instantiate(\My\ClassName\Here::class);
+```
+
+## Contributing
+
+Please read the [CONTRIBUTING.md](CONTRIBUTING.md) contents if you wish to help out!
+
+## Credits
+
+This library was migrated from [ocramius/instantiator](https://github.com/Ocramius/Instantiator), which
+has been donated to the doctrine organization, and which is now deprecated in favour of this package.
diff --git a/vendor/doctrine/instantiator/composer.json b/vendor/doctrine/instantiator/composer.json
new file mode 100644
index 00000000..fab81720
--- /dev/null
+++ b/vendor/doctrine/instantiator/composer.json
@@ -0,0 +1,48 @@
+{
+ "name": "doctrine/instantiator",
+ "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors",
+ "type": "library",
+ "license": "MIT",
+ "homepage": "https://www.doctrine-project.org/projects/instantiator.html",
+ "keywords": [
+ "instantiate",
+ "constructor"
+ ],
+ "authors": [
+ {
+ "name": "Marco Pivetta",
+ "email": "ocramius@gmail.com",
+ "homepage": "https://ocramius.github.io/"
+ }
+ ],
+ "require": {
+ "php": "^7.1 || ^8.0"
+ },
+ "require-dev": {
+ "ext-phar": "*",
+ "ext-pdo": "*",
+ "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.30 || ^5.4"
+ },
+ "autoload": {
+ "psr-4": {
+ "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/"
+ }
+ },
+ "autoload-dev": {
+ "psr-0": {
+ "DoctrineTest\\InstantiatorPerformance\\": "tests",
+ "DoctrineTest\\InstantiatorTest\\": "tests",
+ "DoctrineTest\\InstantiatorTestAsset\\": "tests"
+ }
+ },
+ "config": {
+ "allow-plugins": {
+ "dealerdirect/phpcodesniffer-composer-installer": true
+ }
+ }
+}
diff --git a/vendor/doctrine/instantiator/docs/en/index.rst b/vendor/doctrine/instantiator/docs/en/index.rst
new file mode 100644
index 00000000..0c85da0b
--- /dev/null
+++ b/vendor/doctrine/instantiator/docs/en/index.rst
@@ -0,0 +1,68 @@
+Introduction
+============
+
+This library provides a way of avoiding usage of constructors when instantiating PHP classes.
+
+Installation
+============
+
+The suggested installation method is via `composer`_:
+
+.. code-block:: console
+
+ $ composer require doctrine/instantiator
+
+Usage
+=====
+
+The instantiator is able to create new instances of any class without
+using the constructor or any API of the class itself:
+
+.. code-block:: php
+
+ instantiate(User::class);
+
+Contributing
+============
+
+- Follow the `Doctrine Coding Standard`_
+- The project will follow strict `object calisthenics`_
+- Any contribution must provide tests for additional introduced
+ conditions
+- Any un-confirmed issue needs a failing test case before being
+ accepted
+- Pull requests must be sent from a new hotfix/feature branch, not from
+ ``master``.
+
+Testing
+=======
+
+The PHPUnit version to be used is the one installed as a dev- dependency
+via composer:
+
+.. code-block:: console
+
+ $ ./vendor/bin/phpunit
+
+Accepted coverage for new contributions is 80%. Any contribution not
+satisfying this requirement won’t be merged.
+
+Credits
+=======
+
+This library was migrated from `ocramius/instantiator`_, which has been
+donated to the doctrine organization, and which is now deprecated in
+favour of this package.
+
+.. _composer: https://getcomposer.org/
+.. _CONTRIBUTING.md: CONTRIBUTING.md
+.. _ocramius/instantiator: https://github.com/Ocramius/Instantiator
+.. _Doctrine Coding Standard: https://github.com/doctrine/coding-standard
+.. _object calisthenics: http://www.slideshare.net/guilhermeblanco/object-calisthenics-applied-to-php
diff --git a/vendor/doctrine/instantiator/docs/en/sidebar.rst b/vendor/doctrine/instantiator/docs/en/sidebar.rst
new file mode 100644
index 00000000..0c364791
--- /dev/null
+++ b/vendor/doctrine/instantiator/docs/en/sidebar.rst
@@ -0,0 +1,4 @@
+.. toctree::
+ :depth: 3
+
+ index
diff --git a/vendor/doctrine/instantiator/psalm.xml b/vendor/doctrine/instantiator/psalm.xml
new file mode 100644
index 00000000..e9b622b3
--- /dev/null
+++ b/vendor/doctrine/instantiator/psalm.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+
+
+
+
diff --git a/vendor/doctrine/instantiator/src/Doctrine/Instantiator/Exception/ExceptionInterface.php b/vendor/doctrine/instantiator/src/Doctrine/Instantiator/Exception/ExceptionInterface.php
new file mode 100644
index 00000000..e6a5195f
--- /dev/null
+++ b/vendor/doctrine/instantiator/src/Doctrine/Instantiator/Exception/ExceptionInterface.php
@@ -0,0 +1,12 @@
+ $reflectionClass
+ *
+ * @template T of object
+ */
+ public static function fromAbstractClass(ReflectionClass $reflectionClass): self
+ {
+ return new self(sprintf(
+ 'The provided class "%s" is abstract, and cannot be instantiated',
+ $reflectionClass->getName()
+ ));
+ }
+
+ public static function fromEnum(string $className): self
+ {
+ return new self(sprintf(
+ 'The provided class "%s" is an enum, and cannot be instantiated',
+ $className
+ ));
+ }
+}
diff --git a/vendor/doctrine/instantiator/src/Doctrine/Instantiator/Exception/UnexpectedValueException.php b/vendor/doctrine/instantiator/src/Doctrine/Instantiator/Exception/UnexpectedValueException.php
new file mode 100644
index 00000000..4e55ac52
--- /dev/null
+++ b/vendor/doctrine/instantiator/src/Doctrine/Instantiator/Exception/UnexpectedValueException.php
@@ -0,0 +1,59 @@
+ $reflectionClass
+ *
+ * @template T of object
+ */
+ public static function fromSerializationTriggeredException(
+ ReflectionClass $reflectionClass,
+ Exception $exception
+ ): self {
+ return new self(
+ sprintf(
+ 'An exception was raised while trying to instantiate an instance of "%s" via un-serialization',
+ $reflectionClass->getName()
+ ),
+ 0,
+ $exception
+ );
+ }
+
+ /**
+ * @phpstan-param ReflectionClass $reflectionClass
+ *
+ * @template T of object
+ */
+ public static function fromUncleanUnSerialization(
+ ReflectionClass $reflectionClass,
+ string $errorString,
+ int $errorCode,
+ string $errorFile,
+ int $errorLine
+ ): self {
+ return new self(
+ sprintf(
+ 'Could not produce an instance of "%s" via un-serialization, since an error was triggered '
+ . 'in file "%s" at line "%d"',
+ $reflectionClass->getName(),
+ $errorFile,
+ $errorLine
+ ),
+ 0,
+ new Exception($errorString, $errorCode)
+ );
+ }
+}
diff --git a/vendor/doctrine/instantiator/src/Doctrine/Instantiator/Instantiator.php b/vendor/doctrine/instantiator/src/Doctrine/Instantiator/Instantiator.php
new file mode 100644
index 00000000..10067a0f
--- /dev/null
+++ b/vendor/doctrine/instantiator/src/Doctrine/Instantiator/Instantiator.php
@@ -0,0 +1,262 @@
+ $className
+ *
+ * @return object
+ * @phpstan-return T
+ *
+ * @throws ExceptionInterface
+ *
+ * @template T of object
+ */
+ public function instantiate($className)
+ {
+ if (isset(self::$cachedCloneables[$className])) {
+ /** @phpstan-var T */
+ $cachedCloneable = self::$cachedCloneables[$className];
+
+ return clone $cachedCloneable;
+ }
+
+ if (isset(self::$cachedInstantiators[$className])) {
+ $factory = self::$cachedInstantiators[$className];
+
+ return $factory();
+ }
+
+ return $this->buildAndCacheFromFactory($className);
+ }
+
+ /**
+ * Builds the requested object and caches it in static properties for performance
+ *
+ * @phpstan-param class-string $className
+ *
+ * @return object
+ * @phpstan-return T
+ *
+ * @template T of object
+ */
+ private function buildAndCacheFromFactory(string $className)
+ {
+ $factory = self::$cachedInstantiators[$className] = $this->buildFactory($className);
+ $instance = $factory();
+
+ if ($this->isSafeToClone(new ReflectionClass($instance))) {
+ self::$cachedCloneables[$className] = clone $instance;
+ }
+
+ return $instance;
+ }
+
+ /**
+ * Builds a callable capable of instantiating the given $className without
+ * invoking its constructor.
+ *
+ * @phpstan-param class-string $className
+ *
+ * @phpstan-return callable(): T
+ *
+ * @throws InvalidArgumentException
+ * @throws UnexpectedValueException
+ * @throws ReflectionException
+ *
+ * @template T of object
+ */
+ private function buildFactory(string $className): callable
+ {
+ $reflectionClass = $this->getReflectionClass($className);
+
+ if ($this->isInstantiableViaReflection($reflectionClass)) {
+ return [$reflectionClass, 'newInstanceWithoutConstructor'];
+ }
+
+ $serializedString = sprintf(
+ '%s:%d:"%s":0:{}',
+ is_subclass_of($className, Serializable::class) ? self::SERIALIZATION_FORMAT_USE_UNSERIALIZER : self::SERIALIZATION_FORMAT_AVOID_UNSERIALIZER,
+ strlen($className),
+ $className
+ );
+
+ $this->checkIfUnSerializationIsSupported($reflectionClass, $serializedString);
+
+ return static function () use ($serializedString) {
+ return unserialize($serializedString);
+ };
+ }
+
+ /**
+ * @phpstan-param class-string $className
+ *
+ * @phpstan-return ReflectionClass
+ *
+ * @throws InvalidArgumentException
+ * @throws ReflectionException
+ *
+ * @template T of object
+ */
+ private function getReflectionClass(string $className): ReflectionClass
+ {
+ if (! class_exists($className)) {
+ throw InvalidArgumentException::fromNonExistingClass($className);
+ }
+
+ if (PHP_VERSION_ID >= 80100 && enum_exists($className, false)) {
+ throw InvalidArgumentException::fromEnum($className);
+ }
+
+ $reflection = new ReflectionClass($className);
+
+ if ($reflection->isAbstract()) {
+ throw InvalidArgumentException::fromAbstractClass($reflection);
+ }
+
+ return $reflection;
+ }
+
+ /**
+ * @phpstan-param ReflectionClass $reflectionClass
+ *
+ * @throws UnexpectedValueException
+ *
+ * @template T of object
+ */
+ private function checkIfUnSerializationIsSupported(ReflectionClass $reflectionClass, string $serializedString): void
+ {
+ set_error_handler(static function (int $code, string $message, string $file, int $line) use ($reflectionClass, &$error): bool {
+ $error = UnexpectedValueException::fromUncleanUnSerialization(
+ $reflectionClass,
+ $message,
+ $code,
+ $file,
+ $line
+ );
+
+ return true;
+ });
+
+ try {
+ $this->attemptInstantiationViaUnSerialization($reflectionClass, $serializedString);
+ } finally {
+ restore_error_handler();
+ }
+
+ if ($error) {
+ throw $error;
+ }
+ }
+
+ /**
+ * @phpstan-param ReflectionClass $reflectionClass
+ *
+ * @throws UnexpectedValueException
+ *
+ * @template T of object
+ */
+ private function attemptInstantiationViaUnSerialization(ReflectionClass $reflectionClass, string $serializedString): void
+ {
+ try {
+ unserialize($serializedString);
+ } catch (Exception $exception) {
+ throw UnexpectedValueException::fromSerializationTriggeredException($reflectionClass, $exception);
+ }
+ }
+
+ /**
+ * @phpstan-param ReflectionClass $reflectionClass
+ *
+ * @template T of object
+ */
+ private function isInstantiableViaReflection(ReflectionClass $reflectionClass): bool
+ {
+ return ! ($this->hasInternalAncestors($reflectionClass) && $reflectionClass->isFinal());
+ }
+
+ /**
+ * Verifies whether the given class is to be considered internal
+ *
+ * @phpstan-param ReflectionClass $reflectionClass
+ *
+ * @template T of object
+ */
+ private function hasInternalAncestors(ReflectionClass $reflectionClass): bool
+ {
+ do {
+ if ($reflectionClass->isInternal()) {
+ return true;
+ }
+
+ $reflectionClass = $reflectionClass->getParentClass();
+ } while ($reflectionClass);
+
+ return false;
+ }
+
+ /**
+ * Checks if a class is cloneable
+ *
+ * Classes implementing `__clone` cannot be safely cloned, as that may cause side-effects.
+ *
+ * @phpstan-param ReflectionClass $reflectionClass
+ *
+ * @template T of object
+ */
+ private function isSafeToClone(ReflectionClass $reflectionClass): bool
+ {
+ return $reflectionClass->isCloneable()
+ && ! $reflectionClass->hasMethod('__clone')
+ && ! $reflectionClass->isSubclassOf(ArrayIterator::class);
+ }
+}
diff --git a/vendor/doctrine/instantiator/src/Doctrine/Instantiator/InstantiatorInterface.php b/vendor/doctrine/instantiator/src/Doctrine/Instantiator/InstantiatorInterface.php
new file mode 100644
index 00000000..10508b56
--- /dev/null
+++ b/vendor/doctrine/instantiator/src/Doctrine/Instantiator/InstantiatorInterface.php
@@ -0,0 +1,24 @@
+ $className
+ *
+ * @return object
+ * @phpstan-return T
+ *
+ * @throws ExceptionInterface
+ *
+ * @template T of object
+ */
+ public function instantiate($className);
+}
diff --git a/vendor/hamcrest/hamcrest-php/.coveralls.yml b/vendor/hamcrest/hamcrest-php/.coveralls.yml
new file mode 100644
index 00000000..f2f9ed58
--- /dev/null
+++ b/vendor/hamcrest/hamcrest-php/.coveralls.yml
@@ -0,0 +1 @@
+src_dir: hamcrest
diff --git a/vendor/hamcrest/hamcrest-php/.github/workflows/tests.yml b/vendor/hamcrest/hamcrest-php/.github/workflows/tests.yml
new file mode 100644
index 00000000..06255a1b
--- /dev/null
+++ b/vendor/hamcrest/hamcrest-php/.github/workflows/tests.yml
@@ -0,0 +1,38 @@
+name: tests
+
+on:
+ push:
+ pull_request:
+
+jobs:
+ tests:
+
+ runs-on: ubuntu-latest
+ strategy:
+ matrix:
+ php: ['7.0', '7.1', '7.2', '7.3', '7.4', '8.0']
+
+ name: PHP ${{ matrix.php }}
+
+ steps:
+ - name: Checkout code
+ uses: actions/checkout@v2
+
+ - name: Setup PHP
+ uses: shivammathur/setup-php@v2
+ with:
+ php-version: ${{ matrix.php }}
+ extensions: curl
+ tools: composer:v2
+ coverage: none
+
+ - name: Install PHP 7 dependencies
+ run: composer update --prefer-dist --no-interaction --no-progress
+ if: "matrix.php != '8.0'"
+
+ - name: Install PHP 8 dependencies
+ run: composer update --prefer-dist --no-interaction --no-progress --ignore-platform-reqs
+ if: "matrix.php == '8.0'"
+
+ - name: Execute tests
+ run: vendor/bin/phpunit -c tests/phpunit.xml.dist
diff --git a/vendor/hamcrest/hamcrest-php/.gitignore b/vendor/hamcrest/hamcrest-php/.gitignore
new file mode 100644
index 00000000..987e2a25
--- /dev/null
+++ b/vendor/hamcrest/hamcrest-php/.gitignore
@@ -0,0 +1,2 @@
+composer.lock
+vendor
diff --git a/vendor/hamcrest/hamcrest-php/.gush.yml b/vendor/hamcrest/hamcrest-php/.gush.yml
new file mode 100644
index 00000000..b7c226d5
--- /dev/null
+++ b/vendor/hamcrest/hamcrest-php/.gush.yml
@@ -0,0 +1,7 @@
+adapter: github
+issue_tracker: github
+meta-header: "Copyright (c) 2009-2015 hamcrest.org"
+table-pr:
+ fixed_tickets: ['Fixed Tickets', '']
+ license: ['License', MIT]
+base: master
diff --git a/vendor/hamcrest/hamcrest-php/.travis.yml b/vendor/hamcrest/hamcrest-php/.travis.yml
new file mode 100644
index 00000000..3b5651fa
--- /dev/null
+++ b/vendor/hamcrest/hamcrest-php/.travis.yml
@@ -0,0 +1,23 @@
+language: php
+
+dist: trusty
+
+matrix:
+ include:
+ - name: PHP 5.3
+ php: 5.3
+ dist: precise
+ - name: PHP 5.4
+ php: 5.4
+ - name: PHP 5.5
+ php: 5.5
+ - name: PHP 5.6
+ php: 5.6
+ - name: HHVM 3.18
+ php: hhvm-3.18
+
+install:
+ - travis_retry composer update --prefer-dist --no-progress
+
+script:
+ - vendor/bin/phpunit -c tests/phpunit.xml.dist
diff --git a/vendor/hamcrest/hamcrest-php/CHANGES.txt b/vendor/hamcrest/hamcrest-php/CHANGES.txt
new file mode 100644
index 00000000..bad8bcfe
--- /dev/null
+++ b/vendor/hamcrest/hamcrest-php/CHANGES.txt
@@ -0,0 +1,173 @@
+== Version 2.0.1: Released Jul 09 2020 ==
+
+* Added support for PHP 8
+
+
+== Version 2.0: Released Feb 26 2016 ==
+
+* Removed automatic loading of global functions
+
+
+== Version 1.1.0: Released Feb 2 2012 ==
+
+Issues Fixed: 121, 138, 147
+
+* Added non-empty matchers to complement the emptiness-matching forms.
+
+ - nonEmptyString()
+ - nonEmptyArray()
+ - nonEmptyTraversable()
+
+* Added ability to pass variable arguments to several array-based matcher
+ factory methods so they work like allOf() et al.
+
+ - anArray()
+ - arrayContainingInAnyOrder(), containsInAnyOrder()
+ - arrayContaining(), contains()
+ - stringContainsInOrder()
+
+* Matchers that accept an array of matchers now also accept variable arguments.
+ Any non-matcher arguments are wrapped by IsEqual.
+
+* Added noneOf() as a shortcut for not(anyOf()).
+
+
+== Version 1.0.0: Released Jan 20 2012 ==
+
+Issues Fixed: 119, 136, 139, 141, 148, 149, 172
+
+* Moved hamcrest.php into Hamcrest folder and renamed to Hamcrest.php.
+ This is more in line with PEAR packaging standards.
+
+* Renamed callable() to callableValue() for compatibility with PHP 5.4.
+
+* Added Hamcrest_Text_StringContainsIgnoringCase to assert using stripos().
+
+ assertThat('fOObAr', containsStringIgnoringCase('oba'));
+ assertThat('fOObAr', containsString('oba')->ignoringCase());
+
+* Fixed Hamcrest_Core_IsInstanceOf to return false for native types.
+
+* Moved string-based matchers to Hamcrest_Text package.
+ StringContains, StringEndsWith, StringStartsWith, and SubstringMatcher
+
+* Hamcrest.php and Hamcrest_Matchers.php are now built from @factory doctags.
+ Added @factory doctag to every static factory method.
+
+* Hamcrest_Matchers and Hamcrest.php now import each matcher as-needed
+ and Hamcrest.php calls the matchers directly instead of Hamcrest_Matchers.
+
+
+== Version 0.3.0: Released Jul 26 2010 ==
+
+* Added running count to Hamcrest_MatcherAssert with methods to get and reset it.
+ This can be used by unit testing frameworks for reporting.
+
+* Added Hamcrest_Core_HasToString to assert return value of toString() or __toString().
+
+ assertThat($anObject, hasToString('foo'));
+
+* Added Hamcrest_Type_IsScalar to assert is_scalar().
+ Matches values of type bool, int, float, double, and string.
+
+ assertThat($count, scalarValue());
+ assertThat('foo', scalarValue());
+
+* Added Hamcrest_Collection package.
+
+ - IsEmptyTraversable
+ - IsTraversableWithSize
+
+ assertThat($iterator, emptyTraversable());
+ assertThat($iterator, traversableWithSize(5));
+
+* Added Hamcrest_Xml_HasXPath to assert XPath expressions or the content of nodes in an XML/HTML DOM.
+
+ assertThat($dom, hasXPath('books/book/title'));
+ assertThat($dom, hasXPath('books/book[contains(title, "Alice")]', 3));
+ assertThat($dom, hasXPath('books/book/title', 'Alice in Wonderland'));
+ assertThat($dom, hasXPath('count(books/book)', greaterThan(10)));
+
+* Added aliases to match the Java API.
+
+ hasEntry() -> hasKeyValuePair()
+ hasValue() -> hasItemInArray()
+ contains() -> arrayContaining()
+ containsInAnyOrder() -> arrayContainingInAnyOrder()
+
+* Added optional subtype to Hamcrest_TypeSafeMatcher to enforce object class or resource type.
+
+* Hamcrest_TypeSafeDiagnosingMatcher now extends Hamcrest_TypeSafeMatcher.
+
+
+== Version 0.2.0: Released Jul 14 2010 ==
+
+Issues Fixed: 109, 111, 114, 115
+
+* Description::appendValues() and appendValueList() accept Iterator and IteratorAggregate. [111]
+ BaseDescription::appendValue() handles IteratorAggregate.
+
+* assertThat() accepts a single boolean parameter and
+ wraps any non-Matcher third parameter with equalTo().
+
+* Removed null return value from assertThat(). [114]
+
+* Fixed wrong variable name in contains(). [109]
+
+* Added Hamcrest_Core_IsSet to assert isset().
+
+ assertThat(array('foo' => 'bar'), set('foo'));
+ assertThat(array('foo' => 'bar'), notSet('bar'));
+
+* Added Hamcrest_Core_IsTypeOf to assert built-in types with gettype(). [115]
+ Types: array, boolean, double, integer, null, object, resource, and string.
+ Note that gettype() returns "double" for float values.
+
+ assertThat($count, typeOf('integer'));
+ assertThat(3.14159, typeOf('double'));
+ assertThat(array('foo', 'bar'), typeOf('array'));
+ assertThat(new stdClass(), typeOf('object'));
+
+* Added type-specific matchers in new Hamcrest_Type package.
+
+ - IsArray
+ - IsBoolean
+ - IsDouble (includes float values)
+ - IsInteger
+ - IsObject
+ - IsResource
+ - IsString
+
+ assertThat($count, integerValue());
+ assertThat(3.14159, floatValue());
+ assertThat('foo', stringValue());
+
+* Added Hamcrest_Type_IsNumeric to assert is_numeric().
+ Matches values of type int and float/double or strings that are formatted as numbers.
+
+ assertThat(5, numericValue());
+ assertThat('-5e+3', numericValue());
+
+* Added Hamcrest_Type_IsCallable to assert is_callable().
+
+ assertThat('preg_match', callable());
+ assertThat(array('SomeClass', 'SomeMethod'), callable());
+ assertThat(array($object, 'SomeMethod'), callable());
+ assertThat($object, callable());
+ assertThat(function ($x, $y) { return $x + $y; }, callable());
+
+* Added Hamcrest_Text_MatchesPattern for regex matching with preg_match().
+
+ assertThat('foobar', matchesPattern('/o+b/'));
+
+* Added aliases:
+ - atLeast() for greaterThanOrEqualTo()
+ - atMost() for lessThanOrEqualTo()
+
+
+== Version 0.1.0: Released Jul 7 2010 ==
+
+* Created PEAR package
+
+* Core matchers
+
diff --git a/vendor/hamcrest/hamcrest-php/LICENSE.txt b/vendor/hamcrest/hamcrest-php/LICENSE.txt
new file mode 100644
index 00000000..91cd329a
--- /dev/null
+++ b/vendor/hamcrest/hamcrest-php/LICENSE.txt
@@ -0,0 +1,27 @@
+BSD License
+
+Copyright (c) 2000-2014, www.hamcrest.org
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+Redistributions of source code must retain the above copyright notice, this list of
+conditions and the following disclaimer. Redistributions in binary form must reproduce
+the above copyright notice, this list of conditions and the following disclaimer in
+the documentation and/or other materials provided with the distribution.
+
+Neither the name of Hamcrest 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.
diff --git a/vendor/hamcrest/hamcrest-php/README.md b/vendor/hamcrest/hamcrest-php/README.md
new file mode 100644
index 00000000..52e20413
--- /dev/null
+++ b/vendor/hamcrest/hamcrest-php/README.md
@@ -0,0 +1,488 @@
+This is the PHP port of Hamcrest Matchers
+=========================================
+
+[![Build Status](https://travis-ci.org/hamcrest/hamcrest-php.png?branch=master)](https://travis-ci.org/hamcrest/hamcrest-php)
+
+Hamcrest is a matching library originally written for Java, but
+subsequently ported to many other languages. hamcrest-php is the
+official PHP port of Hamcrest and essentially follows a literal
+translation of the original Java API for Hamcrest, with a few
+Exceptions, mostly down to PHP language barriers:
+
+ 1. `instanceOf($theClass)` is actually `anInstanceOf($theClass)`
+
+ 2. `both(containsString('a'))->and(containsString('b'))`
+ is actually `both(containsString('a'))->andAlso(containsString('b'))`
+
+ 3. `either(containsString('a'))->or(containsString('b'))`
+ is actually `either(containsString('a'))->orElse(containsString('b'))`
+
+ 4. Unless it would be non-semantic for a matcher to do so, hamcrest-php
+ allows dynamic typing for it's input, in "the PHP way". Exception are
+ where semantics surrounding the type itself would suggest otherwise,
+ such as stringContains() and greaterThan().
+
+ 5. Several official matchers have not been ported because they don't
+ make sense or don't apply in PHP:
+
+ - `typeCompatibleWith($theClass)`
+ - `eventFrom($source)`
+ - `hasProperty($name)` **
+ - `samePropertyValuesAs($obj)` **
+
+ 6. When most of the collections matchers are finally ported, PHP-specific
+ aliases will probably be created due to a difference in naming
+ conventions between Java's Arrays, Collections, Sets and Maps compared
+ with PHP's Arrays.
+
+---
+** [Unless we consider POPO's (Plain Old PHP Objects) akin to JavaBeans]
+ - The POPO thing is a joke. Java devs coin the term POJO's (Plain Old
+ Java Objects).
+
+
+Usage
+-----
+
+Hamcrest matchers are easy to use as:
+
+```php
+Hamcrest_MatcherAssert::assertThat('a', Hamcrest_Matchers::equalToIgnoringCase('A'));
+```
+
+Alternatively, you can use the global proxy-functions:
+
+```php
+$result = true;
+// with an identifier
+assertThat("result should be true", $result, equalTo(true));
+
+// without an identifier
+assertThat($result, equalTo(true));
+
+// evaluate a boolean expression
+assertThat($result === true);
+
+// with syntactic sugar is()
+assertThat(true, is(true));
+```
+
+:warning: **NOTE:** the global proxy-functions aren't autoloaded by default, so you will need to load them first:
+
+```php
+\Hamcrest\Util::registerGlobalFunctions();
+```
+
+For brevity, all of the examples below use the proxy-functions.
+
+
+Documentation
+-------------
+A tutorial can be found on the [Hamcrest site](https://code.google.com/archive/p/hamcrest/wikis/TutorialPHP.wiki).
+
+
+Available Matchers
+------------------
+* [Array](../master/README.md#array)
+* [Collection](../master/README.md#collection)
+* [Object](../master/README.md#object)
+* [Numbers](../master/README.md#numbers)
+* [Type checking](../master/README.md#type-checking)
+* [XML](../master/README.md#xml)
+
+
+### Array
+
+* `anArray` - evaluates an array
+```php
+assertThat([], anArray());
+```
+
+* `hasItemInArray` - check if item exists in array
+```php
+$list = range(2, 7, 2);
+$item = 4;
+assertThat($list, hasItemInArray($item));
+```
+
+* `hasValue` - alias of hasItemInArray
+
+* `arrayContainingInAnyOrder` - check if array contains elements in any order
+```php
+assertThat([2, 4, 6], arrayContainingInAnyOrder([6, 4, 2]));
+assertThat([2, 4, 6], arrayContainingInAnyOrder([4, 2, 6]));
+```
+
+* `containsInAnyOrder` - alias of arrayContainingInAnyOrder
+
+* `arrayContaining` - An array with elements that match the given matchers in the same order.
+```php
+assertThat([2, 4, 6], arrayContaining([2, 4, 6]));
+assertthat([2, 4, 6], not(arrayContaining([6, 4, 2])));
+```
+
+* `contains` - check array in same order
+```php
+assertThat([2, 4, 6], contains([2, 4, 6]));
+```
+
+* `hasKeyInArray` - check if array has given key
+```php
+assertThat(['name'=> 'foobar'], hasKeyInArray('name'));
+```
+
+* `hasKey` - alias of hasKeyInArray
+
+* `hasKeyValuePair` - check if arary has given key, value pair
+```php
+assertThat(['name'=> 'foobar'], hasKeyValuePair('name', 'foobar'));
+```
+* `hasEntry` - same as hasKeyValuePair
+
+* `arrayWithSize` - check array has given size
+```php
+assertthat([2, 4, 6], arrayWithSize(3));
+```
+* `emptyArray` - check if array is emtpy
+```php
+assertThat([], emptyArray());
+```
+
+* `nonEmptyArray`
+```php
+assertThat([1], nonEmptyArray());
+```
+
+### Collection
+
+* `emptyTraversable` - check if traversable is empty
+```php
+$empty_it = new EmptyIterator;
+assertThat($empty_it, emptyTraversable());
+```
+
+* `nonEmptyTraversable` - check if traversable isn't empty
+```php
+$non_empty_it = new ArrayIterator(range(1, 10));
+assertThat($non_empty_it, nonEmptyTraversable());
+a
+```
+
+* `traversableWithSize`
+```php
+$non_empty_it = new ArrayIterator(range(1, 10));
+assertThat($non_empty_it, traversableWithSize(count(range(1, 10))));
+`
+```
+
+### Core
+
+* `allOf` - Evaluates to true only if ALL of the passed in matchers evaluate to true.
+```php
+assertThat([2,4,6], allOf(hasValue(2), arrayWithSize(3)));
+```
+
+* `anyOf` - Evaluates to true if ANY of the passed in matchers evaluate to true.
+```php
+assertThat([2, 4, 6], anyOf(hasValue(8), hasValue(2)));
+```
+
+* `noneOf` - Evaluates to false if ANY of the passed in matchers evaluate to true.
+```php
+assertThat([2, 4, 6], noneOf(hasValue(1), hasValue(3)));
+```
+
+* `both` + `andAlso` - This is useful for fluently combining matchers that must both pass.
+```php
+assertThat([2, 4, 6], both(hasValue(2))->andAlso(hasValue(4)));
+```
+
+* `either` + `orElse` - This is useful for fluently combining matchers where either may pass,
+```php
+assertThat([2, 4, 6], either(hasValue(2))->orElse(hasValue(4)));
+```
+
+* `describedAs` - Wraps an existing matcher and overrides the description when it fails.
+```php
+$expected = "Dog";
+$found = null;
+// this assertion would result error message as Expected: is not null but: was null
+//assertThat("Expected {$expected}, got {$found}", $found, is(notNullValue()));
+// and this assertion would result error message as Expected: Dog but: was null
+//assertThat($found, describedAs($expected, notNullValue()));
+```
+
+* `everyItem` - A matcher to apply to every element in an array.
+```php
+assertThat([2, 4, 6], everyItem(notNullValue()));
+```
+
+* `hasItem` - check array has given item, it can take a matcher argument
+```php
+assertThat([2, 4, 6], hasItem(equalTo(2)));
+```
+
+* `hasItems` - check array has givem items, it can take multiple matcher as arguments
+```php
+assertThat([1, 3, 5], hasItems(equalTo(1), equalTo(3)));
+```
+
+### Object
+
+* `hasToString` - check `__toString` or `toString` method
+```php
+class Foo {
+ public $name = null;
+
+ public function __toString() {
+ return "[Foo]Instance";
+ }
+}
+$foo = new Foo;
+assertThat($foo, hasToString(equalTo("[Foo]Instance")));
+```
+
+* `equalTo` - compares two instances using comparison operator '=='
+```php
+$foo = new Foo;
+$foo2 = new Foo;
+assertThat($foo, equalTo($foo2));
+```
+
+* `identicalTo` - compares two instances using identity operator '==='
+```php
+assertThat($foo, is(not(identicalTo($foo2))));
+```
+
+* `anInstanceOf` - check instance is an instance|sub-class of given class
+```php
+assertThat($foo, anInstanceOf(Foo::class));
+```
+
+* `any` - alias of `anInstanceOf`
+
+* `nullValue` check null
+```php
+assertThat(null, is(nullValue()));
+```
+
+* `notNullValue` check not null
+```php
+assertThat("", notNullValue());
+```
+
+* `sameInstance` - check for same instance
+```php
+assertThat($foo, is(not(sameInstance($foo2))));
+assertThat($foo, is(sameInstance($foo)));
+```
+
+* `typeOf`- check type
+```php
+assertThat(1, typeOf("integer"));
+```
+
+* `notSet` - check if instance property is not set
+```php
+assertThat($foo, notSet("name"));
+```
+
+* `set` - check if instance property is set
+```php
+$foo->name = "bar";
+assertThat($foo, set("name"));
+```
+
+### Numbers
+
+* `closeTo` - check value close to a range
+```php
+assertThat(3, closeTo(3, 0.5));
+```
+
+* `comparesEqualTo` - check with '=='
+```php
+assertThat(2, comparesEqualTo(2));
+```
+
+* `greaterThan` - check '>'
+```
+assertThat(2, greaterThan(1));
+```
+
+* `greaterThanOrEqualTo`
+```php
+assertThat(2, greaterThanOrEqualTo(2));
+```
+
+* `atLeast` - The value is >= given value
+```php
+assertThat(3, atLeast(2));
+```
+* `lessThan`
+```php
+assertThat(2, lessThan(3));
+```
+
+* `lessThanOrEqualTo`
+```php
+assertThat(2, lessThanOrEqualTo(3));
+```
+
+* `atMost` - The value is <= given value
+```php
+assertThat(2, atMost(3));
+```
+
+### String
+
+* `emptyString` - check for empty string
+```php
+assertThat("", emptyString());
+```
+
+* `isEmptyOrNullString`
+```php
+assertThat(null, isEmptyOrNullString());
+```
+
+* `nullOrEmptyString`
+```php
+assertThat("", nullOrEmptyString());
+```
+
+* `isNonEmptyString`
+```php
+assertThat("foo", isNonEmptyString());
+```
+
+* `nonEmptyString`
+```php
+assertThat("foo", nonEmptyString());
+```
+
+* `equalToIgnoringCase`
+```php
+assertThat("Foo", equalToIgnoringCase("foo"));
+```
+* `equalToIgnoringWhiteSpace`
+```php
+assertThat(" Foo ", equalToIgnoringWhiteSpace("Foo"));
+```
+
+* `matchesPattern` - matches with regex pattern
+```php
+assertThat("foobarbaz", matchesPattern('/(foo)(bar)(baz)/'));
+```
+
+* `containsString` - check for substring
+```php
+assertThat("foobar", containsString("foo"));
+```
+
+* `containsStringIgnoringCase`
+```php
+assertThat("fooBar", containsStringIgnoringCase("bar"));
+```
+
+* `stringContainsInOrder`
+```php
+assertThat("foo", stringContainsInOrder("foo"));
+```
+
+* `endsWith` - check string that ends with given value
+```php
+assertThat("foo", endsWith("oo"));
+```
+
+* `startsWith` - check string that starts with given value
+```php
+assertThat("bar", startsWith("ba"));
+```
+
+### Type-checking
+
+* `arrayValue` - check array type
+```php
+assertThat([], arrayValue());
+```
+
+* `booleanValue`
+```php
+assertThat(true, booleanValue());
+```
+* `boolValue` - alias of booleanValue
+
+* `callableValue` - check if value is callable
+```php
+$func = function () {};
+assertThat($func, callableValue());
+```
+* `doubleValue`
+```php
+assertThat(3.14, doubleValue());
+```
+
+* `floatValue`
+```php
+assertThat(3.14, floatValue());
+```
+
+* `integerValue`
+```php
+assertThat(1, integerValue());
+```
+
+* `intValue` - alias of `integerValue`
+
+* `numericValue` - check if value is numeric
+```php
+assertThat("123", numericValue());
+```
+
+* `objectValue` - check for object
+```php
+$obj = new stdClass;
+assertThat($obj, objectValue());
+```
+* `anObject`
+```php
+assertThat($obj, anObject());
+```
+
+* `resourceValue` - check resource type
+```php
+$fp = fopen("/tmp/foo", "w+");
+assertThat($fp, resourceValue());
+```
+
+* `scalarValue` - check for scaler value
+```php
+assertThat(1, scalarValue());
+```
+
+* `stringValue`
+```php
+assertThat("", stringValue());
+```
+
+### XML
+
+* `hasXPath` - check xml with a xpath
+```php
+$xml = <<
+
+ 1
+
+
+ 2
+
+
+XML;
+
+$doc = new DOMDocument;
+$doc->loadXML($xml);
+assertThat($doc, hasXPath("book", 2));
+```
+
diff --git a/vendor/hamcrest/hamcrest-php/composer.json b/vendor/hamcrest/hamcrest-php/composer.json
new file mode 100644
index 00000000..712ad965
--- /dev/null
+++ b/vendor/hamcrest/hamcrest-php/composer.json
@@ -0,0 +1,37 @@
+{
+ "name": "hamcrest/hamcrest-php",
+ "type": "library",
+ "description": "This is the PHP port of Hamcrest Matchers",
+ "keywords": ["test"],
+ "license": "BSD-3-Clause",
+ "authors": [
+ ],
+
+ "autoload": {
+ "classmap": ["hamcrest"]
+ },
+ "autoload-dev": {
+ "classmap": ["tests", "generator"]
+ },
+
+ "require": {
+ "php": "^5.3|^7.0|^8.0"
+ },
+
+ "require-dev": {
+ "phpunit/php-file-iterator": "^1.4 || ^2.0",
+ "phpunit/phpunit": "^4.8.36 || ^5.7 || ^6.5 || ^7.0"
+ },
+
+ "replace": {
+ "kodova/hamcrest-php": "*",
+ "davedevelopment/hamcrest-php": "*",
+ "cordoval/hamcrest-php": "*"
+ },
+
+ "extra": {
+ "branch-alias": {
+ "dev-master": "2.1-dev"
+ }
+ }
+}
diff --git a/vendor/hamcrest/hamcrest-php/generator/FactoryCall.php b/vendor/hamcrest/hamcrest-php/generator/FactoryCall.php
new file mode 100644
index 00000000..83965b2a
--- /dev/null
+++ b/vendor/hamcrest/hamcrest-php/generator/FactoryCall.php
@@ -0,0 +1,41 @@
+method = $method;
+ $this->name = $name;
+ }
+
+ public function getMethod()
+ {
+ return $this->method;
+ }
+
+ public function getName()
+ {
+ return $this->name;
+ }
+}
diff --git a/vendor/hamcrest/hamcrest-php/generator/FactoryClass.php b/vendor/hamcrest/hamcrest-php/generator/FactoryClass.php
new file mode 100644
index 00000000..a09cb73c
--- /dev/null
+++ b/vendor/hamcrest/hamcrest-php/generator/FactoryClass.php
@@ -0,0 +1,71 @@
+file = $file;
+ $this->reflector = $class;
+ $this->extractFactoryMethods();
+ }
+
+ public function extractFactoryMethods()
+ {
+ $this->methods = array();
+ foreach ($this->getPublicStaticMethods() as $method) {
+ if ($method->isFactory()) {
+ $this->methods[] = $method;
+ }
+ }
+ }
+
+ public function getPublicStaticMethods()
+ {
+ $methods = array();
+ foreach ($this->reflector->getMethods(ReflectionMethod::IS_STATIC) as $method) {
+ if ($method->isPublic() && $method->getDeclaringClass() == $this->reflector) {
+ $methods[] = new FactoryMethod($this, $method);
+ }
+ }
+ return $methods;
+ }
+
+ public function getFile()
+ {
+ return $this->file;
+ }
+
+ public function getName()
+ {
+ return $this->reflector->name;
+ }
+
+ public function isFactory()
+ {
+ return !empty($this->methods);
+ }
+
+ public function getMethods()
+ {
+ return $this->methods;
+ }
+}
diff --git a/vendor/hamcrest/hamcrest-php/generator/FactoryFile.php b/vendor/hamcrest/hamcrest-php/generator/FactoryFile.php
new file mode 100644
index 00000000..dd6109b1
--- /dev/null
+++ b/vendor/hamcrest/hamcrest-php/generator/FactoryFile.php
@@ -0,0 +1,121 @@
+file = $file;
+ $this->indent = $indent;
+ }
+
+ abstract public function addCall(FactoryCall $call);
+
+ abstract public function build();
+
+ public function addFileHeader()
+ {
+ $this->code = '';
+ $this->addPart('file_header');
+ }
+
+ public function addPart($name)
+ {
+ $this->addCode($this->readPart($name));
+ }
+
+ public function addCode($code)
+ {
+ $this->code .= $code;
+ }
+
+ public function readPart($name)
+ {
+ return file_get_contents(__DIR__ . "/parts/$name.txt");
+ }
+
+ public function generateFactoryCall(FactoryCall $call)
+ {
+ $method = $call->getMethod();
+ $code = $method->getComment($this->indent) . "\n";
+ $code .= $this->generateDeclaration($call->getName(), $method);
+ $code .= $this->generateCall($method);
+ $code .= $this->generateClosing();
+ return $code;
+ }
+
+ public function generateDeclaration($name, FactoryMethod $method)
+ {
+ $code = $this->indent . $this->getDeclarationModifiers()
+ . 'function ' . $name . '('
+ . $this->generateDeclarationArguments($method)
+ . ')' . "\n" . $this->indent . '{' . "\n";
+ return $code;
+ }
+
+ public function getDeclarationModifiers()
+ {
+ return '';
+ }
+
+ public function generateDeclarationArguments(FactoryMethod $method)
+ {
+ if ($method->acceptsVariableArguments()) {
+ return '/* args... */';
+ } else {
+ return $method->getParameterDeclarations();
+ }
+ }
+
+ public function generateImport(FactoryMethod $method)
+ {
+ return $this->indent . self::INDENT . "require_once '" . $method->getClass()->getFile() . "';" . "\n";
+ }
+
+ public function generateCall(FactoryMethod $method)
+ {
+ $code = '';
+ if ($method->acceptsVariableArguments()) {
+ $code .= $this->indent . self::INDENT . '$args = func_get_args();' . "\n";
+ }
+
+ $code .= $this->indent . self::INDENT . 'return ';
+ if ($method->acceptsVariableArguments()) {
+ $code .= 'call_user_func_array(array(\''
+ . '\\' . $method->getClassName() . '\', \''
+ . $method->getName() . '\'), $args);' . "\n";
+ } else {
+ $code .= '\\' . $method->getClassName() . '::'
+ . $method->getName() . '('
+ . $method->getParameterInvocations() . ');' . "\n";
+ }
+
+ return $code;
+ }
+
+ public function generateClosing()
+ {
+ return $this->indent . '}' . "\n";
+ }
+
+ public function write()
+ {
+ file_put_contents($this->file, $this->code);
+ }
+}
diff --git a/vendor/hamcrest/hamcrest-php/generator/FactoryGenerator.php b/vendor/hamcrest/hamcrest-php/generator/FactoryGenerator.php
new file mode 100644
index 00000000..242875a0
--- /dev/null
+++ b/vendor/hamcrest/hamcrest-php/generator/FactoryGenerator.php
@@ -0,0 +1,124 @@
+path = $path;
+ $this->factoryFiles = array();
+ }
+
+ public function addFactoryFile(FactoryFile $factoryFile)
+ {
+ $this->factoryFiles[] = $factoryFile;
+ }
+
+ public function generate()
+ {
+ $classes = $this->getClassesWithFactoryMethods();
+ foreach ($classes as $class) {
+ foreach ($class->getMethods() as $method) {
+ foreach ($method->getCalls() as $call) {
+ foreach ($this->factoryFiles as $file) {
+ $file->addCall($call);
+ }
+ }
+ }
+ }
+ }
+
+ public function write()
+ {
+ foreach ($this->factoryFiles as $file) {
+ $file->build();
+ $file->write();
+ }
+ }
+
+ public function getClassesWithFactoryMethods()
+ {
+ $classes = array();
+ $files = $this->getSortedFiles();
+ foreach ($files as $file) {
+ $class = $this->getFactoryClass($file);
+ if ($class !== null) {
+ $classes[] = $class;
+ }
+ }
+
+ return $classes;
+ }
+
+ public function getSortedFiles()
+ {
+ $iter = $this->getFileIterator();
+ $files = array();
+ foreach ($iter as $file) {
+ $files[] = $file;
+ }
+ sort($files, SORT_STRING);
+
+ return $files;
+ }
+
+ private function getFileIterator()
+ {
+ $factoryClass = class_exists('File_Iterator_Factory') ? 'File_Iterator_Factory' : 'SebastianBergmann\FileIterator\Factory';
+
+ $factory = new $factoryClass();
+
+ return $factory->getFileIterator($this->path, '.php');
+ }
+
+ public function getFactoryClass($file)
+ {
+ $name = $this->getFactoryClassName($file);
+ if ($name !== null) {
+ require_once $file;
+
+ if (class_exists($name)) {
+ $class = new FactoryClass(substr($file, strpos($file, 'Hamcrest/')), new ReflectionClass($name));
+ if ($class->isFactory()) {
+ return $class;
+ }
+ }
+ }
+
+ return null;
+ }
+
+ public function getFactoryClassName($file)
+ {
+ $content = file_get_contents($file);
+ if (preg_match('/namespace\s+(.+);/', $content, $namespace)
+ && preg_match('/\n\s*class\s+(\w+)\s+extends\b/', $content, $className)
+ && preg_match('/@factory\b/', $content)
+ ) {
+ return $namespace[1] . '\\' . $className[1];
+ }
+
+ return null;
+ }
+}
diff --git a/vendor/hamcrest/hamcrest-php/generator/FactoryMethod.php b/vendor/hamcrest/hamcrest-php/generator/FactoryMethod.php
new file mode 100644
index 00000000..8a05371b
--- /dev/null
+++ b/vendor/hamcrest/hamcrest-php/generator/FactoryMethod.php
@@ -0,0 +1,231 @@
+class = $class;
+ $this->reflector = $reflector;
+ $this->extractCommentWithoutLeadingShashesAndStars();
+ $this->extractFactoryNamesFromComment();
+ $this->extractParameters();
+ }
+
+ public function extractCommentWithoutLeadingShashesAndStars()
+ {
+ $this->comment = explode("\n", $this->reflector->getDocComment());
+ foreach ($this->comment as &$line) {
+ $line = preg_replace('#^\s*(/\\*+|\\*+/|\\*)\s?#', '', $line);
+ }
+ $this->trimLeadingBlankLinesFromComment();
+ $this->trimTrailingBlankLinesFromComment();
+ }
+
+ public function trimLeadingBlankLinesFromComment()
+ {
+ while (count($this->comment) > 0) {
+ $line = array_shift($this->comment);
+ if (trim($line) != '') {
+ array_unshift($this->comment, $line);
+ break;
+ }
+ }
+ }
+
+ public function trimTrailingBlankLinesFromComment()
+ {
+ while (count($this->comment) > 0) {
+ $line = array_pop($this->comment);
+ if (trim($line) != '') {
+ array_push($this->comment, $line);
+ break;
+ }
+ }
+ }
+
+ public function extractFactoryNamesFromComment()
+ {
+ $this->calls = array();
+ for ($i = 0; $i < count($this->comment); $i++) {
+ if ($this->extractFactoryNamesFromLine($this->comment[$i])) {
+ unset($this->comment[$i]);
+ }
+ }
+ $this->trimTrailingBlankLinesFromComment();
+ }
+
+ public function extractFactoryNamesFromLine($line)
+ {
+ if (preg_match('/^\s*@factory(\s+(.+))?$/', $line, $match)) {
+ $this->createCalls(
+ $this->extractFactoryNamesFromAnnotation(
+ isset($match[2]) ? trim($match[2]) : null
+ )
+ );
+ return true;
+ }
+ return false;
+ }
+
+ public function extractFactoryNamesFromAnnotation($value)
+ {
+ $primaryName = $this->reflector->getName();
+ if (empty($value)) {
+ return array($primaryName);
+ }
+ preg_match_all('/(\.{3}|-|[a-zA-Z_][a-zA-Z_0-9]*)/', $value, $match);
+ $names = $match[0];
+ if (in_array('...', $names)) {
+ $this->isVarArgs = true;
+ }
+ if (!in_array('-', $names) && !in_array($primaryName, $names)) {
+ array_unshift($names, $primaryName);
+ }
+ return $names;
+ }
+
+ public function createCalls(array $names)
+ {
+ $names = array_unique($names);
+ foreach ($names as $name) {
+ if ($name != '-' && $name != '...') {
+ $this->calls[] = new FactoryCall($this, $name);
+ }
+ }
+ }
+
+ public function extractParameters()
+ {
+ $this->parameters = array();
+ if (!$this->isVarArgs) {
+ foreach ($this->reflector->getParameters() as $parameter) {
+ $this->parameters[] = new FactoryParameter($this, $parameter);
+ }
+ }
+ }
+
+ public function getParameterDeclarations()
+ {
+ if ($this->isVarArgs || !$this->hasParameters()) {
+ return '';
+ }
+ $params = array();
+ foreach ($this->parameters as /** @var $parameter FactoryParameter */
+ $parameter) {
+ $params[] = $parameter->getDeclaration();
+ }
+ return implode(', ', $params);
+ }
+
+ public function getParameterInvocations()
+ {
+ if ($this->isVarArgs) {
+ return '';
+ }
+ $params = array();
+ foreach ($this->parameters as $parameter) {
+ $params[] = $parameter->getInvocation();
+ }
+ return implode(', ', $params);
+ }
+
+
+ public function getClass()
+ {
+ return $this->class;
+ }
+
+ public function getClassName()
+ {
+ return $this->class->getName();
+ }
+
+ public function getName()
+ {
+ return $this->reflector->name;
+ }
+
+ public function isFactory()
+ {
+ return count($this->calls) > 0;
+ }
+
+ public function getCalls()
+ {
+ return $this->calls;
+ }
+
+ public function acceptsVariableArguments()
+ {
+ return $this->isVarArgs;
+ }
+
+ public function hasParameters()
+ {
+ return !empty($this->parameters);
+ }
+
+ public function getParameters()
+ {
+ return $this->parameters;
+ }
+
+ public function getFullName()
+ {
+ return $this->getClassName() . '::' . $this->getName();
+ }
+
+ public function getCommentText()
+ {
+ return implode("\n", $this->comment);
+ }
+
+ public function getComment($indent = '')
+ {
+ $comment = $indent . '/**';
+ foreach ($this->comment as $line) {
+ $comment .= "\n" . rtrim($indent . ' * ' . $line);
+ }
+ $comment .= "\n" . $indent . ' */';
+ return $comment;
+ }
+}
diff --git a/vendor/hamcrest/hamcrest-php/generator/FactoryParameter.php b/vendor/hamcrest/hamcrest-php/generator/FactoryParameter.php
new file mode 100644
index 00000000..82b707ac
--- /dev/null
+++ b/vendor/hamcrest/hamcrest-php/generator/FactoryParameter.php
@@ -0,0 +1,131 @@
+method = $method;
+ $this->reflector = $reflector;
+ }
+
+ /**
+ * Compute the declaration code.
+ *
+ * @return string
+ */
+ public function getDeclaration()
+ {
+ $code = $this->getTypeCode() . $this->getInvocation();
+
+ if ($this->reflector->isOptional()) {
+ $default = $this->reflector->getDefaultValue();
+ if (is_null($default)) {
+ $default = 'null';
+ } elseif (is_bool($default)) {
+ $default = $default ? 'true' : 'false';
+ } elseif (is_string($default)) {
+ $default = "'" . $default . "'";
+ } elseif (is_numeric($default)) {
+ $default = strval($default);
+ } elseif (is_array($default)) {
+ $default = 'array()';
+ } else {
+ echo 'Warning: unknown default type for ' . $this->getMethod()->getFullName() . "\n";
+ var_dump($default);
+ $default = 'null';
+ }
+ $code .= ' = ' . $default;
+ }
+ return $code;
+ }
+
+ /**
+ * Compute the type code for the paramater.
+ *
+ * @return string
+ */
+ private function getTypeCode()
+ {
+ // Handle PHP 5 separately
+ if (PHP_VERSION_ID < 70000) {
+ if ($this->reflector->isArray()) {
+ return 'array';
+ }
+
+ $class = $this->reflector->getClass();
+
+ return $class ? sprintf('\\%s ', $class->getName()) : '';
+ }
+
+ if (!$this->reflector->hasType()) {
+ return '';
+ }
+
+ $type = $this->reflector->getType();
+ $name = self::getQualifiedName($type);
+
+ // PHP 7.1+ supports nullable types via a leading question mark
+ return (PHP_VERSION_ID >= 70100 && $type->allowsNull()) ? sprintf('?%s ', $name) : sprintf('%s ', $name);
+ }
+
+ /**
+ * Compute qualified name for the given type.
+ *
+ * This function knows how to prefix class names with a leading slash and
+ * also how to handle PHP 8's union types.
+ *
+ * @param ReflectionType $type
+ *
+ * @return string
+ */
+ private static function getQualifiedName(ReflectionType $type)
+ {
+ // PHP 8 union types can be recursively processed
+ if ($type instanceof ReflectionUnionType) {
+ return implode('|', array_map(function (ReflectionType $type) {
+ // The "self::" call within a Closure is fine here because this
+ // code will only ever be executed on PHP 7.0+
+ return self::getQualifiedName($type);
+ }, $type->getTypes()));
+ }
+
+ // PHP 7.0 doesn't have named types, but 7.1+ does
+ $name = $type instanceof ReflectionNamedType ? $type->getName() : (string) $type;
+
+ return $type->isBuiltin() ? $name : sprintf('\\%s', $name);
+ }
+
+ /**
+ * Compute the invocation code.
+ *
+ * @return string
+ */
+ public function getInvocation()
+ {
+ return sprintf('$%s', $this->reflector->getName());
+ }
+
+ /**
+ * Compute the method name.
+ *
+ * @return string
+ */
+ public function getMethod()
+ {
+ return $this->method;
+ }
+}
diff --git a/vendor/hamcrest/hamcrest-php/generator/GlobalFunctionFile.php b/vendor/hamcrest/hamcrest-php/generator/GlobalFunctionFile.php
new file mode 100644
index 00000000..ec8b1b39
--- /dev/null
+++ b/vendor/hamcrest/hamcrest-php/generator/GlobalFunctionFile.php
@@ -0,0 +1,42 @@
+functions = '';
+ }
+
+ public function addCall(FactoryCall $call)
+ {
+ $this->functions .= "\n" . $this->generateFactoryCall($call);
+ }
+
+ public function build()
+ {
+ $this->addFileHeader();
+ $this->addPart('functions_imports');
+ $this->addPart('functions_header');
+ $this->addCode($this->functions);
+ $this->addPart('functions_footer');
+ }
+
+ public function generateFactoryCall(FactoryCall $call)
+ {
+ $code = "if (!function_exists('{$call->getName()}')) {\n";
+ $code.= parent::generateFactoryCall($call);
+ $code.= "}\n";
+
+ return $code;
+ }
+}
diff --git a/vendor/hamcrest/hamcrest-php/generator/StaticMethodFile.php b/vendor/hamcrest/hamcrest-php/generator/StaticMethodFile.php
new file mode 100644
index 00000000..44cec02f
--- /dev/null
+++ b/vendor/hamcrest/hamcrest-php/generator/StaticMethodFile.php
@@ -0,0 +1,38 @@
+methods = '';
+ }
+
+ public function addCall(FactoryCall $call)
+ {
+ $this->methods .= PHP_EOL . $this->generateFactoryCall($call);
+ }
+
+ public function getDeclarationModifiers()
+ {
+ return 'public static ';
+ }
+
+ public function build()
+ {
+ $this->addFileHeader();
+ $this->addPart('matchers_imports');
+ $this->addPart('matchers_header');
+ $this->addCode($this->methods);
+ $this->addPart('matchers_footer');
+ }
+}
diff --git a/vendor/hamcrest/hamcrest-php/generator/parts/file_header.txt b/vendor/hamcrest/hamcrest-php/generator/parts/file_header.txt
new file mode 100644
index 00000000..7b352e44
--- /dev/null
+++ b/vendor/hamcrest/hamcrest-php/generator/parts/file_header.txt
@@ -0,0 +1,7 @@
+
+ * //With an identifier
+ * assertThat("assertion identifier", $apple->flavour(), equalTo("tasty"));
+ * //Without an identifier
+ * assertThat($apple->flavour(), equalTo("tasty"));
+ * //Evaluating a boolean expression
+ * assertThat("some error", $a > $b);
+ *
+ */
+ function assertThat()
+ {
+ $args = func_get_args();
+ call_user_func_array(
+ array('Hamcrest\MatcherAssert', 'assertThat'),
+ $args
+ );
+ }
+}
diff --git a/vendor/hamcrest/hamcrest-php/generator/parts/functions_imports.txt b/vendor/hamcrest/hamcrest-php/generator/parts/functions_imports.txt
new file mode 100644
index 00000000..e69de29b
diff --git a/vendor/hamcrest/hamcrest-php/generator/parts/matchers_footer.txt b/vendor/hamcrest/hamcrest-php/generator/parts/matchers_footer.txt
new file mode 100644
index 00000000..5c34318c
--- /dev/null
+++ b/vendor/hamcrest/hamcrest-php/generator/parts/matchers_footer.txt
@@ -0,0 +1 @@
+}
diff --git a/vendor/hamcrest/hamcrest-php/generator/parts/matchers_header.txt b/vendor/hamcrest/hamcrest-php/generator/parts/matchers_header.txt
new file mode 100644
index 00000000..4f8bb2b7
--- /dev/null
+++ b/vendor/hamcrest/hamcrest-php/generator/parts/matchers_header.txt
@@ -0,0 +1,7 @@
+
+
+/**
+ * A series of static factories for all hamcrest matchers.
+ */
+class Matchers
+{
diff --git a/vendor/hamcrest/hamcrest-php/generator/parts/matchers_imports.txt b/vendor/hamcrest/hamcrest-php/generator/parts/matchers_imports.txt
new file mode 100644
index 00000000..7dd68495
--- /dev/null
+++ b/vendor/hamcrest/hamcrest-php/generator/parts/matchers_imports.txt
@@ -0,0 +1,2 @@
+
+namespace Hamcrest;
\ No newline at end of file
diff --git a/vendor/hamcrest/hamcrest-php/generator/run.php b/vendor/hamcrest/hamcrest-php/generator/run.php
new file mode 100644
index 00000000..924d752f
--- /dev/null
+++ b/vendor/hamcrest/hamcrest-php/generator/run.php
@@ -0,0 +1,37 @@
+addFactoryFile(new StaticMethodFile(STATIC_MATCHERS_FILE));
+$generator->addFactoryFile(new GlobalFunctionFile(GLOBAL_FUNCTIONS_FILE));
+$generator->generate();
+$generator->write();
diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest.php
new file mode 100644
index 00000000..55a2dd8c
--- /dev/null
+++ b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest.php
@@ -0,0 +1,882 @@
+
+ * //With an identifier
+ * assertThat("assertion identifier", $apple->flavour(), equalTo("tasty"));
+ * //Without an identifier
+ * assertThat($apple->flavour(), equalTo("tasty"));
+ * //Evaluating a boolean expression
+ * assertThat("some error", $a > $b);
+ *
+ */
+ function assertThat()
+ {
+ $args = func_get_args();
+ call_user_func_array(
+ array('Hamcrest\MatcherAssert', 'assertThat'),
+ $args
+ );
+ }
+}
+
+if (!function_exists('anArray')) {
+ /**
+ * Evaluates to true only if each $matcher[$i] is satisfied by $array[$i].
+ */
+ function anArray(/* args... */)
+ {
+ $args = func_get_args();
+ return call_user_func_array(array('\Hamcrest\Arrays\IsArray', 'anArray'), $args);
+ }
+}
+
+if (!function_exists('hasItemInArray')) {
+ /**
+ * Evaluates to true if any item in an array satisfies the given matcher.
+ *
+ * @param mixed $item as a {@link Hamcrest\Matcher} or a value.
+ *
+ * @return \Hamcrest\Arrays\IsArrayContaining
+ */
+ function hasItemInArray($item)
+ {
+ return \Hamcrest\Arrays\IsArrayContaining::hasItemInArray($item);
+ }
+}
+
+if (!function_exists('hasValue')) {
+ /**
+ * Evaluates to true if any item in an array satisfies the given matcher.
+ *
+ * @param mixed $item as a {@link Hamcrest\Matcher} or a value.
+ *
+ * @return \Hamcrest\Arrays\IsArrayContaining
+ */
+ function hasValue($item)
+ {
+ return \Hamcrest\Arrays\IsArrayContaining::hasItemInArray($item);
+ }
+}
+
+if (!function_exists('arrayContainingInAnyOrder')) {
+ /**
+ * An array with elements that match the given matchers.
+ */
+ function arrayContainingInAnyOrder(/* args... */)
+ {
+ $args = func_get_args();
+ return call_user_func_array(array('\Hamcrest\Arrays\IsArrayContainingInAnyOrder', 'arrayContainingInAnyOrder'), $args);
+ }
+}
+
+if (!function_exists('containsInAnyOrder')) {
+ /**
+ * An array with elements that match the given matchers.
+ */
+ function containsInAnyOrder(/* args... */)
+ {
+ $args = func_get_args();
+ return call_user_func_array(array('\Hamcrest\Arrays\IsArrayContainingInAnyOrder', 'arrayContainingInAnyOrder'), $args);
+ }
+}
+
+if (!function_exists('arrayContaining')) {
+ /**
+ * An array with elements that match the given matchers in the same order.
+ */
+ function arrayContaining(/* args... */)
+ {
+ $args = func_get_args();
+ return call_user_func_array(array('\Hamcrest\Arrays\IsArrayContainingInOrder', 'arrayContaining'), $args);
+ }
+}
+
+if (!function_exists('contains')) {
+ /**
+ * An array with elements that match the given matchers in the same order.
+ */
+ function contains(/* args... */)
+ {
+ $args = func_get_args();
+ return call_user_func_array(array('\Hamcrest\Arrays\IsArrayContainingInOrder', 'arrayContaining'), $args);
+ }
+}
+
+if (!function_exists('hasKeyInArray')) {
+ /**
+ * Evaluates to true if any key in an array matches the given matcher.
+ *
+ * @param mixed $key as a {@link Hamcrest\Matcher} or a value.
+ *
+ * @return \Hamcrest\Arrays\IsArrayContainingKey
+ */
+ function hasKeyInArray($key)
+ {
+ return \Hamcrest\Arrays\IsArrayContainingKey::hasKeyInArray($key);
+ }
+}
+
+if (!function_exists('hasKey')) {
+ /**
+ * Evaluates to true if any key in an array matches the given matcher.
+ *
+ * @param mixed $key as a {@link Hamcrest\Matcher} or a value.
+ *
+ * @return \Hamcrest\Arrays\IsArrayContainingKey
+ */
+ function hasKey($key)
+ {
+ return \Hamcrest\Arrays\IsArrayContainingKey::hasKeyInArray($key);
+ }
+}
+
+if (!function_exists('hasKeyValuePair')) {
+ /**
+ * Test if an array has both an key and value in parity with each other.
+ */
+ function hasKeyValuePair($key, $value)
+ {
+ return \Hamcrest\Arrays\IsArrayContainingKeyValuePair::hasKeyValuePair($key, $value);
+ }
+}
+
+if (!function_exists('hasEntry')) {
+ /**
+ * Test if an array has both an key and value in parity with each other.
+ */
+ function hasEntry($key, $value)
+ {
+ return \Hamcrest\Arrays\IsArrayContainingKeyValuePair::hasKeyValuePair($key, $value);
+ }
+}
+
+if (!function_exists('arrayWithSize')) {
+ /**
+ * Does array size satisfy a given matcher?
+ *
+ * @param \Hamcrest\Matcher|int $size as a {@link Hamcrest\Matcher} or a value.
+ *
+ * @return \Hamcrest\Arrays\IsArrayWithSize
+ */
+ function arrayWithSize($size)
+ {
+ return \Hamcrest\Arrays\IsArrayWithSize::arrayWithSize($size);
+ }
+}
+
+if (!function_exists('emptyArray')) {
+ /**
+ * Matches an empty array.
+ */
+ function emptyArray()
+ {
+ return \Hamcrest\Arrays\IsArrayWithSize::emptyArray();
+ }
+}
+
+if (!function_exists('nonEmptyArray')) {
+ /**
+ * Matches an empty array.
+ */
+ function nonEmptyArray()
+ {
+ return \Hamcrest\Arrays\IsArrayWithSize::nonEmptyArray();
+ }
+}
+
+if (!function_exists('emptyTraversable')) {
+ /**
+ * Returns true if traversable is empty.
+ */
+ function emptyTraversable()
+ {
+ return \Hamcrest\Collection\IsEmptyTraversable::emptyTraversable();
+ }
+}
+
+if (!function_exists('nonEmptyTraversable')) {
+ /**
+ * Returns true if traversable is not empty.
+ */
+ function nonEmptyTraversable()
+ {
+ return \Hamcrest\Collection\IsEmptyTraversable::nonEmptyTraversable();
+ }
+}
+
+if (!function_exists('traversableWithSize')) {
+ /**
+ * Does traversable size satisfy a given matcher?
+ */
+ function traversableWithSize($size)
+ {
+ return \Hamcrest\Collection\IsTraversableWithSize::traversableWithSize($size);
+ }
+}
+
+if (!function_exists('allOf')) {
+ /**
+ * Evaluates to true only if ALL of the passed in matchers evaluate to true.
+ */
+ function allOf(/* args... */)
+ {
+ $args = func_get_args();
+ return call_user_func_array(array('\Hamcrest\Core\AllOf', 'allOf'), $args);
+ }
+}
+
+if (!function_exists('anyOf')) {
+ /**
+ * Evaluates to true if ANY of the passed in matchers evaluate to true.
+ */
+ function anyOf(/* args... */)
+ {
+ $args = func_get_args();
+ return call_user_func_array(array('\Hamcrest\Core\AnyOf', 'anyOf'), $args);
+ }
+}
+
+if (!function_exists('noneOf')) {
+ /**
+ * Evaluates to false if ANY of the passed in matchers evaluate to true.
+ */
+ function noneOf(/* args... */)
+ {
+ $args = func_get_args();
+ return call_user_func_array(array('\Hamcrest\Core\AnyOf', 'noneOf'), $args);
+ }
+}
+
+if (!function_exists('both')) {
+ /**
+ * This is useful for fluently combining matchers that must both pass.
+ * For example:
+ *
+ * assertThat($string, both(containsString("a"))->andAlso(containsString("b")));
+ *
+ */
+ function both(\Hamcrest\Matcher $matcher)
+ {
+ return \Hamcrest\Core\CombinableMatcher::both($matcher);
+ }
+}
+
+if (!function_exists('either')) {
+ /**
+ * This is useful for fluently combining matchers where either may pass,
+ * for example:
+ *
+ * assertThat($string, either(containsString("a"))->orElse(containsString("b")));
+ *
+ */
+ function either(\Hamcrest\Matcher $matcher)
+ {
+ return \Hamcrest\Core\CombinableMatcher::either($matcher);
+ }
+}
+
+if (!function_exists('describedAs')) {
+ /**
+ * Wraps an existing matcher and overrides the description when it fails.
+ */
+ function describedAs(/* args... */)
+ {
+ $args = func_get_args();
+ return call_user_func_array(array('\Hamcrest\Core\DescribedAs', 'describedAs'), $args);
+ }
+}
+
+if (!function_exists('everyItem')) {
+ /**
+ * @param Matcher $itemMatcher
+ * A matcher to apply to every element in an array.
+ *
+ * @return \Hamcrest\Core\Every
+ * Evaluates to TRUE for a collection in which every item matches $itemMatcher
+ */
+ function everyItem(\Hamcrest\Matcher $itemMatcher)
+ {
+ return \Hamcrest\Core\Every::everyItem($itemMatcher);
+ }
+}
+
+if (!function_exists('hasToString')) {
+ /**
+ * Does array size satisfy a given matcher?
+ */
+ function hasToString($matcher)
+ {
+ return \Hamcrest\Core\HasToString::hasToString($matcher);
+ }
+}
+
+if (!function_exists('is')) {
+ /**
+ * Decorates another Matcher, retaining the behavior but allowing tests
+ * to be slightly more expressive.
+ *
+ * For example: assertThat($cheese, equalTo($smelly))
+ * vs. assertThat($cheese, is(equalTo($smelly)))
+ */
+ function is($value)
+ {
+ return \Hamcrest\Core\Is::is($value);
+ }
+}
+
+if (!function_exists('anything')) {
+ /**
+ * This matcher always evaluates to true.
+ *
+ * @param string $description A meaningful string used when describing itself.
+ *
+ * @return \Hamcrest\Core\IsAnything
+ */
+ function anything($description = 'ANYTHING')
+ {
+ return \Hamcrest\Core\IsAnything::anything($description);
+ }
+}
+
+if (!function_exists('hasItem')) {
+ /**
+ * Test if the value is an array containing this matcher.
+ *
+ * Example:
+ *
+ * assertThat(array('a', 'b'), hasItem(equalTo('b')));
+ * //Convenience defaults to equalTo()
+ * assertThat(array('a', 'b'), hasItem('b'));
+ *
+ */
+ function hasItem(/* args... */)
+ {
+ $args = func_get_args();
+ return call_user_func_array(array('\Hamcrest\Core\IsCollectionContaining', 'hasItem'), $args);
+ }
+}
+
+if (!function_exists('hasItems')) {
+ /**
+ * Test if the value is an array containing elements that match all of these
+ * matchers.
+ *
+ * Example:
+ *
+ * assertThat(array('a', 'b', 'c'), hasItems(equalTo('a'), equalTo('b')));
+ *
+ */
+ function hasItems(/* args... */)
+ {
+ $args = func_get_args();
+ return call_user_func_array(array('\Hamcrest\Core\IsCollectionContaining', 'hasItems'), $args);
+ }
+}
+
+if (!function_exists('equalTo')) {
+ /**
+ * Is the value equal to another value, as tested by the use of the "=="
+ * comparison operator?
+ */
+ function equalTo($item)
+ {
+ return \Hamcrest\Core\IsEqual::equalTo($item);
+ }
+}
+
+if (!function_exists('identicalTo')) {
+ /**
+ * Tests of the value is identical to $value as tested by the "===" operator.
+ */
+ function identicalTo($value)
+ {
+ return \Hamcrest\Core\IsIdentical::identicalTo($value);
+ }
+}
+
+if (!function_exists('anInstanceOf')) {
+ /**
+ * Is the value an instance of a particular type?
+ * This version assumes no relationship between the required type and
+ * the signature of the method that sets it up, for example in
+ * assertThat($anObject, anInstanceOf('Thing'));
+ */
+ function anInstanceOf($theClass)
+ {
+ return \Hamcrest\Core\IsInstanceOf::anInstanceOf($theClass);
+ }
+}
+
+if (!function_exists('any')) {
+ /**
+ * Is the value an instance of a particular type?
+ * This version assumes no relationship between the required type and
+ * the signature of the method that sets it up, for example in
+ * assertThat($anObject, anInstanceOf('Thing'));
+ */
+ function any($theClass)
+ {
+ return \Hamcrest\Core\IsInstanceOf::anInstanceOf($theClass);
+ }
+}
+
+if (!function_exists('not')) {
+ /**
+ * Matches if value does not match $value.
+ */
+ function not($value)
+ {
+ return \Hamcrest\Core\IsNot::not($value);
+ }
+}
+
+if (!function_exists('nullValue')) {
+ /**
+ * Matches if value is null.
+ */
+ function nullValue()
+ {
+ return \Hamcrest\Core\IsNull::nullValue();
+ }
+}
+
+if (!function_exists('notNullValue')) {
+ /**
+ * Matches if value is not null.
+ */
+ function notNullValue()
+ {
+ return \Hamcrest\Core\IsNull::notNullValue();
+ }
+}
+
+if (!function_exists('sameInstance')) {
+ /**
+ * Creates a new instance of IsSame.
+ *
+ * @param mixed $object
+ * The predicate evaluates to true only when the argument is
+ * this object.
+ *
+ * @return \Hamcrest\Core\IsSame
+ */
+ function sameInstance($object)
+ {
+ return \Hamcrest\Core\IsSame::sameInstance($object);
+ }
+}
+
+if (!function_exists('typeOf')) {
+ /**
+ * Is the value a particular built-in type?
+ */
+ function typeOf($theType)
+ {
+ return \Hamcrest\Core\IsTypeOf::typeOf($theType);
+ }
+}
+
+if (!function_exists('set')) {
+ /**
+ * Matches if value (class, object, or array) has named $property.
+ */
+ function set($property)
+ {
+ return \Hamcrest\Core\Set::set($property);
+ }
+}
+
+if (!function_exists('notSet')) {
+ /**
+ * Matches if value (class, object, or array) does not have named $property.
+ */
+ function notSet($property)
+ {
+ return \Hamcrest\Core\Set::notSet($property);
+ }
+}
+
+if (!function_exists('closeTo')) {
+ /**
+ * Matches if value is a number equal to $value within some range of
+ * acceptable error $delta.
+ */
+ function closeTo($value, $delta)
+ {
+ return \Hamcrest\Number\IsCloseTo::closeTo($value, $delta);
+ }
+}
+
+if (!function_exists('comparesEqualTo')) {
+ /**
+ * The value is not > $value, nor < $value.
+ */
+ function comparesEqualTo($value)
+ {
+ return \Hamcrest\Number\OrderingComparison::comparesEqualTo($value);
+ }
+}
+
+if (!function_exists('greaterThan')) {
+ /**
+ * The value is > $value.
+ */
+ function greaterThan($value)
+ {
+ return \Hamcrest\Number\OrderingComparison::greaterThan($value);
+ }
+}
+
+if (!function_exists('greaterThanOrEqualTo')) {
+ /**
+ * The value is >= $value.
+ */
+ function greaterThanOrEqualTo($value)
+ {
+ return \Hamcrest\Number\OrderingComparison::greaterThanOrEqualTo($value);
+ }
+}
+
+if (!function_exists('atLeast')) {
+ /**
+ * The value is >= $value.
+ */
+ function atLeast($value)
+ {
+ return \Hamcrest\Number\OrderingComparison::greaterThanOrEqualTo($value);
+ }
+}
+
+if (!function_exists('lessThan')) {
+ /**
+ * The value is < $value.
+ */
+ function lessThan($value)
+ {
+ return \Hamcrest\Number\OrderingComparison::lessThan($value);
+ }
+}
+
+if (!function_exists('lessThanOrEqualTo')) {
+ /**
+ * The value is <= $value.
+ */
+ function lessThanOrEqualTo($value)
+ {
+ return \Hamcrest\Number\OrderingComparison::lessThanOrEqualTo($value);
+ }
+}
+
+if (!function_exists('atMost')) {
+ /**
+ * The value is <= $value.
+ */
+ function atMost($value)
+ {
+ return \Hamcrest\Number\OrderingComparison::lessThanOrEqualTo($value);
+ }
+}
+
+if (!function_exists('isEmptyString')) {
+ /**
+ * Matches if value is a zero-length string.
+ */
+ function isEmptyString()
+ {
+ return \Hamcrest\Text\IsEmptyString::isEmptyString();
+ }
+}
+
+if (!function_exists('emptyString')) {
+ /**
+ * Matches if value is a zero-length string.
+ */
+ function emptyString()
+ {
+ return \Hamcrest\Text\IsEmptyString::isEmptyString();
+ }
+}
+
+if (!function_exists('isEmptyOrNullString')) {
+ /**
+ * Matches if value is null or a zero-length string.
+ */
+ function isEmptyOrNullString()
+ {
+ return \Hamcrest\Text\IsEmptyString::isEmptyOrNullString();
+ }
+}
+
+if (!function_exists('nullOrEmptyString')) {
+ /**
+ * Matches if value is null or a zero-length string.
+ */
+ function nullOrEmptyString()
+ {
+ return \Hamcrest\Text\IsEmptyString::isEmptyOrNullString();
+ }
+}
+
+if (!function_exists('isNonEmptyString')) {
+ /**
+ * Matches if value is a non-zero-length string.
+ */
+ function isNonEmptyString()
+ {
+ return \Hamcrest\Text\IsEmptyString::isNonEmptyString();
+ }
+}
+
+if (!function_exists('nonEmptyString')) {
+ /**
+ * Matches if value is a non-zero-length string.
+ */
+ function nonEmptyString()
+ {
+ return \Hamcrest\Text\IsEmptyString::isNonEmptyString();
+ }
+}
+
+if (!function_exists('equalToIgnoringCase')) {
+ /**
+ * Matches if value is a string equal to $string, regardless of the case.
+ */
+ function equalToIgnoringCase($string)
+ {
+ return \Hamcrest\Text\IsEqualIgnoringCase::equalToIgnoringCase($string);
+ }
+}
+
+if (!function_exists('equalToIgnoringWhiteSpace')) {
+ /**
+ * Matches if value is a string equal to $string, regardless of whitespace.
+ */
+ function equalToIgnoringWhiteSpace($string)
+ {
+ return \Hamcrest\Text\IsEqualIgnoringWhiteSpace::equalToIgnoringWhiteSpace($string);
+ }
+}
+
+if (!function_exists('matchesPattern')) {
+ /**
+ * Matches if value is a string that matches regular expression $pattern.
+ */
+ function matchesPattern($pattern)
+ {
+ return \Hamcrest\Text\MatchesPattern::matchesPattern($pattern);
+ }
+}
+
+if (!function_exists('containsString')) {
+ /**
+ * Matches if value is a string that contains $substring.
+ */
+ function containsString($substring)
+ {
+ return \Hamcrest\Text\StringContains::containsString($substring);
+ }
+}
+
+if (!function_exists('containsStringIgnoringCase')) {
+ /**
+ * Matches if value is a string that contains $substring regardless of the case.
+ */
+ function containsStringIgnoringCase($substring)
+ {
+ return \Hamcrest\Text\StringContainsIgnoringCase::containsStringIgnoringCase($substring);
+ }
+}
+
+if (!function_exists('stringContainsInOrder')) {
+ /**
+ * Matches if value contains $substrings in a constrained order.
+ */
+ function stringContainsInOrder(/* args... */)
+ {
+ $args = func_get_args();
+ return call_user_func_array(array('\Hamcrest\Text\StringContainsInOrder', 'stringContainsInOrder'), $args);
+ }
+}
+
+if (!function_exists('endsWith')) {
+ /**
+ * Matches if value is a string that ends with $substring.
+ */
+ function endsWith($substring)
+ {
+ return \Hamcrest\Text\StringEndsWith::endsWith($substring);
+ }
+}
+
+if (!function_exists('startsWith')) {
+ /**
+ * Matches if value is a string that starts with $substring.
+ */
+ function startsWith($substring)
+ {
+ return \Hamcrest\Text\StringStartsWith::startsWith($substring);
+ }
+}
+
+if (!function_exists('arrayValue')) {
+ /**
+ * Is the value an array?
+ */
+ function arrayValue()
+ {
+ return \Hamcrest\Type\IsArray::arrayValue();
+ }
+}
+
+if (!function_exists('booleanValue')) {
+ /**
+ * Is the value a boolean?
+ */
+ function booleanValue()
+ {
+ return \Hamcrest\Type\IsBoolean::booleanValue();
+ }
+}
+
+if (!function_exists('boolValue')) {
+ /**
+ * Is the value a boolean?
+ */
+ function boolValue()
+ {
+ return \Hamcrest\Type\IsBoolean::booleanValue();
+ }
+}
+
+if (!function_exists('callableValue')) {
+ /**
+ * Is the value callable?
+ */
+ function callableValue()
+ {
+ return \Hamcrest\Type\IsCallable::callableValue();
+ }
+}
+
+if (!function_exists('doubleValue')) {
+ /**
+ * Is the value a float/double?
+ */
+ function doubleValue()
+ {
+ return \Hamcrest\Type\IsDouble::doubleValue();
+ }
+}
+
+if (!function_exists('floatValue')) {
+ /**
+ * Is the value a float/double?
+ */
+ function floatValue()
+ {
+ return \Hamcrest\Type\IsDouble::doubleValue();
+ }
+}
+
+if (!function_exists('integerValue')) {
+ /**
+ * Is the value an integer?
+ */
+ function integerValue()
+ {
+ return \Hamcrest\Type\IsInteger::integerValue();
+ }
+}
+
+if (!function_exists('intValue')) {
+ /**
+ * Is the value an integer?
+ */
+ function intValue()
+ {
+ return \Hamcrest\Type\IsInteger::integerValue();
+ }
+}
+
+if (!function_exists('numericValue')) {
+ /**
+ * Is the value a numeric?
+ */
+ function numericValue()
+ {
+ return \Hamcrest\Type\IsNumeric::numericValue();
+ }
+}
+
+if (!function_exists('objectValue')) {
+ /**
+ * Is the value an object?
+ */
+ function objectValue()
+ {
+ return \Hamcrest\Type\IsObject::objectValue();
+ }
+}
+
+if (!function_exists('anObject')) {
+ /**
+ * Is the value an object?
+ */
+ function anObject()
+ {
+ return \Hamcrest\Type\IsObject::objectValue();
+ }
+}
+
+if (!function_exists('resourceValue')) {
+ /**
+ * Is the value a resource?
+ */
+ function resourceValue()
+ {
+ return \Hamcrest\Type\IsResource::resourceValue();
+ }
+}
+
+if (!function_exists('scalarValue')) {
+ /**
+ * Is the value a scalar (boolean, integer, double, or string)?
+ */
+ function scalarValue()
+ {
+ return \Hamcrest\Type\IsScalar::scalarValue();
+ }
+}
+
+if (!function_exists('stringValue')) {
+ /**
+ * Is the value a string?
+ */
+ function stringValue()
+ {
+ return \Hamcrest\Type\IsString::stringValue();
+ }
+}
+
+if (!function_exists('hasXPath')) {
+ /**
+ * Wraps $matcher
with {@link Hamcrest\Core\IsEqual)
+ * if it's not a matcher and the XPath in count()
+ * if it's an integer.
+ */
+ function hasXPath($xpath, $matcher = null)
+ {
+ return \Hamcrest\Xml\HasXPath::hasXPath($xpath, $matcher);
+ }
+}
diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/IsArray.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/IsArray.php
new file mode 100644
index 00000000..9ea56970
--- /dev/null
+++ b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/IsArray.php
@@ -0,0 +1,118 @@
+_elementMatchers = $elementMatchers;
+ }
+
+ protected function matchesSafely($array)
+ {
+ if (array_keys($array) != array_keys($this->_elementMatchers)) {
+ return false;
+ }
+
+ /** @var $matcher \Hamcrest\Matcher */
+ foreach ($this->_elementMatchers as $k => $matcher) {
+ if (!$matcher->matches($array[$k])) {
+ return false;
+ }
+ }
+
+ return true;
+ }
+
+ protected function describeMismatchSafely($actual, Description $mismatchDescription)
+ {
+ if (count($actual) != count($this->_elementMatchers)) {
+ $mismatchDescription->appendText('array length was ' . count($actual));
+
+ return;
+ } elseif (array_keys($actual) != array_keys($this->_elementMatchers)) {
+ $mismatchDescription->appendText('array keys were ')
+ ->appendValueList(
+ $this->descriptionStart(),
+ $this->descriptionSeparator(),
+ $this->descriptionEnd(),
+ array_keys($actual)
+ )
+ ;
+
+ return;
+ }
+
+ /** @var $matcher \Hamcrest\Matcher */
+ foreach ($this->_elementMatchers as $k => $matcher) {
+ if (!$matcher->matches($actual[$k])) {
+ $mismatchDescription->appendText('element ')->appendValue($k)
+ ->appendText(' was ')->appendValue($actual[$k]);
+
+ return;
+ }
+ }
+ }
+
+ public function describeTo(Description $description)
+ {
+ $description->appendList(
+ $this->descriptionStart(),
+ $this->descriptionSeparator(),
+ $this->descriptionEnd(),
+ $this->_elementMatchers
+ );
+ }
+
+ /**
+ * Evaluates to true only if each $matcher[$i] is satisfied by $array[$i].
+ *
+ * @factory ...
+ */
+ public static function anArray(/* args... */)
+ {
+ $args = func_get_args();
+
+ return new self(Util::createMatcherArray($args));
+ }
+
+ // -- Protected Methods
+
+ protected function descriptionStart()
+ {
+ return '[';
+ }
+
+ protected function descriptionSeparator()
+ {
+ return ', ';
+ }
+
+ protected function descriptionEnd()
+ {
+ return ']';
+ }
+}
diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/IsArrayContaining.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/IsArrayContaining.php
new file mode 100644
index 00000000..0e4a1eda
--- /dev/null
+++ b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/IsArrayContaining.php
@@ -0,0 +1,63 @@
+_elementMatcher = $elementMatcher;
+ }
+
+ protected function matchesSafely($array)
+ {
+ foreach ($array as $element) {
+ if ($this->_elementMatcher->matches($element)) {
+ return true;
+ }
+ }
+
+ return false;
+ }
+
+ protected function describeMismatchSafely($array, Description $mismatchDescription)
+ {
+ $mismatchDescription->appendText('was ')->appendValue($array);
+ }
+
+ public function describeTo(Description $description)
+ {
+ $description
+ ->appendText('an array containing ')
+ ->appendDescriptionOf($this->_elementMatcher)
+ ;
+ }
+
+ /**
+ * Evaluates to true if any item in an array satisfies the given matcher.
+ *
+ * @param mixed $item as a {@link Hamcrest\Matcher} or a value.
+ *
+ * @return \Hamcrest\Arrays\IsArrayContaining
+ * @factory hasValue
+ */
+ public static function hasItemInArray($item)
+ {
+ return new self(Util::wrapValueWithIsEqual($item));
+ }
+}
diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/IsArrayContainingInAnyOrder.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/IsArrayContainingInAnyOrder.php
new file mode 100644
index 00000000..9009026b
--- /dev/null
+++ b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/IsArrayContainingInAnyOrder.php
@@ -0,0 +1,59 @@
+_elementMatchers = $elementMatchers;
+ }
+
+ protected function matchesSafelyWithDiagnosticDescription($array, Description $mismatchDescription)
+ {
+ $matching = new MatchingOnce($this->_elementMatchers, $mismatchDescription);
+
+ foreach ($array as $element) {
+ if (!$matching->matches($element)) {
+ return false;
+ }
+ }
+
+ return $matching->isFinished($array);
+ }
+
+ public function describeTo(Description $description)
+ {
+ $description->appendList('[', ', ', ']', $this->_elementMatchers)
+ ->appendText(' in any order')
+ ;
+ }
+
+ /**
+ * An array with elements that match the given matchers.
+ *
+ * @factory containsInAnyOrder ...
+ */
+ public static function arrayContainingInAnyOrder(/* args... */)
+ {
+ $args = func_get_args();
+
+ return new self(Util::createMatcherArray($args));
+ }
+}
diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/IsArrayContainingInOrder.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/IsArrayContainingInOrder.php
new file mode 100644
index 00000000..61157404
--- /dev/null
+++ b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/IsArrayContainingInOrder.php
@@ -0,0 +1,57 @@
+_elementMatchers = $elementMatchers;
+ }
+
+ protected function matchesSafelyWithDiagnosticDescription($array, Description $mismatchDescription)
+ {
+ $series = new SeriesMatchingOnce($this->_elementMatchers, $mismatchDescription);
+
+ foreach ($array as $element) {
+ if (!$series->matches($element)) {
+ return false;
+ }
+ }
+
+ return $series->isFinished();
+ }
+
+ public function describeTo(Description $description)
+ {
+ $description->appendList('[', ', ', ']', $this->_elementMatchers);
+ }
+
+ /**
+ * An array with elements that match the given matchers in the same order.
+ *
+ * @factory contains ...
+ */
+ public static function arrayContaining(/* args... */)
+ {
+ $args = func_get_args();
+
+ return new self(Util::createMatcherArray($args));
+ }
+}
diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/IsArrayContainingKey.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/IsArrayContainingKey.php
new file mode 100644
index 00000000..523477e7
--- /dev/null
+++ b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/IsArrayContainingKey.php
@@ -0,0 +1,75 @@
+_keyMatcher = $keyMatcher;
+ }
+
+ protected function matchesSafely($array)
+ {
+ foreach ($array as $key => $element) {
+ if ($this->_keyMatcher->matches($key)) {
+ return true;
+ }
+ }
+
+ return false;
+ }
+
+ protected function describeMismatchSafely($array, Description $mismatchDescription)
+ {
+ //Not using appendValueList() so that keys can be shown
+ $mismatchDescription->appendText('array was ')
+ ->appendText('[')
+ ;
+ $loop = false;
+ foreach ($array as $key => $value) {
+ if ($loop) {
+ $mismatchDescription->appendText(', ');
+ }
+ $mismatchDescription->appendValue($key)->appendText(' => ')->appendValue($value);
+ $loop = true;
+ }
+ $mismatchDescription->appendText(']');
+ }
+
+ public function describeTo(Description $description)
+ {
+ $description
+ ->appendText('array with key ')
+ ->appendDescriptionOf($this->_keyMatcher)
+ ;
+ }
+
+ /**
+ * Evaluates to true if any key in an array matches the given matcher.
+ *
+ * @param mixed $key as a {@link Hamcrest\Matcher} or a value.
+ *
+ * @return \Hamcrest\Arrays\IsArrayContainingKey
+ * @factory hasKey
+ */
+ public static function hasKeyInArray($key)
+ {
+ return new self(Util::wrapValueWithIsEqual($key));
+ }
+}
diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/IsArrayContainingKeyValuePair.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/IsArrayContainingKeyValuePair.php
new file mode 100644
index 00000000..9ac3eba8
--- /dev/null
+++ b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/IsArrayContainingKeyValuePair.php
@@ -0,0 +1,80 @@
+_keyMatcher = $keyMatcher;
+ $this->_valueMatcher = $valueMatcher;
+ }
+
+ protected function matchesSafely($array)
+ {
+ foreach ($array as $key => $value) {
+ if ($this->_keyMatcher->matches($key) && $this->_valueMatcher->matches($value)) {
+ return true;
+ }
+ }
+
+ return false;
+ }
+
+ protected function describeMismatchSafely($array, Description $mismatchDescription)
+ {
+ //Not using appendValueList() so that keys can be shown
+ $mismatchDescription->appendText('array was ')
+ ->appendText('[')
+ ;
+ $loop = false;
+ foreach ($array as $key => $value) {
+ if ($loop) {
+ $mismatchDescription->appendText(', ');
+ }
+ $mismatchDescription->appendValue($key)->appendText(' => ')->appendValue($value);
+ $loop = true;
+ }
+ $mismatchDescription->appendText(']');
+ }
+
+ public function describeTo(Description $description)
+ {
+ $description->appendText('array containing [')
+ ->appendDescriptionOf($this->_keyMatcher)
+ ->appendText(' => ')
+ ->appendDescriptionOf($this->_valueMatcher)
+ ->appendText(']')
+ ;
+ }
+
+ /**
+ * Test if an array has both an key and value in parity with each other.
+ *
+ * @factory hasEntry
+ */
+ public static function hasKeyValuePair($key, $value)
+ {
+ return new self(
+ Util::wrapValueWithIsEqual($key),
+ Util::wrapValueWithIsEqual($value)
+ );
+ }
+}
diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/IsArrayWithSize.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/IsArrayWithSize.php
new file mode 100644
index 00000000..074375ce
--- /dev/null
+++ b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/IsArrayWithSize.php
@@ -0,0 +1,73 @@
+_elementMatchers = $elementMatchers;
+ $this->_mismatchDescription = $mismatchDescription;
+ }
+
+ public function matches($item)
+ {
+ return $this->_isNotSurplus($item) && $this->_isMatched($item);
+ }
+
+ public function isFinished($items)
+ {
+ if (empty($this->_elementMatchers)) {
+ return true;
+ }
+
+ $this->_mismatchDescription
+ ->appendText('No item matches: ')->appendList('', ', ', '', $this->_elementMatchers)
+ ->appendText(' in ')->appendValueList('[', ', ', ']', $items)
+ ;
+
+ return false;
+ }
+
+ // -- Private Methods
+
+ private function _isNotSurplus($item)
+ {
+ if (empty($this->_elementMatchers)) {
+ $this->_mismatchDescription->appendText('Not matched: ')->appendValue($item);
+
+ return false;
+ }
+
+ return true;
+ }
+
+ private function _isMatched($item)
+ {
+ /** @var $matcher \Hamcrest\Matcher */
+ foreach ($this->_elementMatchers as $i => $matcher) {
+ if ($matcher->matches($item)) {
+ unset($this->_elementMatchers[$i]);
+
+ return true;
+ }
+ }
+
+ $this->_mismatchDescription->appendText('Not matched: ')->appendValue($item);
+
+ return false;
+ }
+}
diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/SeriesMatchingOnce.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/SeriesMatchingOnce.php
new file mode 100644
index 00000000..12a912d8
--- /dev/null
+++ b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/SeriesMatchingOnce.php
@@ -0,0 +1,75 @@
+_elementMatchers = $elementMatchers;
+ $this->_keys = array_keys($elementMatchers);
+ $this->_mismatchDescription = $mismatchDescription;
+ }
+
+ public function matches($item)
+ {
+ return $this->_isNotSurplus($item) && $this->_isMatched($item);
+ }
+
+ public function isFinished()
+ {
+ if (!empty($this->_elementMatchers)) {
+ $nextMatcher = current($this->_elementMatchers);
+ $this->_mismatchDescription->appendText('No item matched: ')->appendDescriptionOf($nextMatcher);
+
+ return false;
+ }
+
+ return true;
+ }
+
+ // -- Private Methods
+
+ private function _isNotSurplus($item)
+ {
+ if (empty($this->_elementMatchers)) {
+ $this->_mismatchDescription->appendText('Not matched: ')->appendValue($item);
+
+ return false;
+ }
+
+ return true;
+ }
+
+ private function _isMatched($item)
+ {
+ $this->_nextMatchKey = array_shift($this->_keys);
+ $nextMatcher = array_shift($this->_elementMatchers);
+
+ if (!$nextMatcher->matches($item)) {
+ $this->_describeMismatch($nextMatcher, $item);
+
+ return false;
+ }
+
+ return true;
+ }
+
+ private function _describeMismatch(Matcher $matcher, $item)
+ {
+ $this->_mismatchDescription->appendText('item with key ' . $this->_nextMatchKey . ': ');
+ $matcher->describeMismatch($item, $this->_mismatchDescription);
+ }
+}
diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/AssertionError.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/AssertionError.php
new file mode 100644
index 00000000..3a2a0e7c
--- /dev/null
+++ b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/AssertionError.php
@@ -0,0 +1,10 @@
+append($text);
+
+ return $this;
+ }
+
+ public function appendDescriptionOf(SelfDescribing $value)
+ {
+ $value->describeTo($this);
+
+ return $this;
+ }
+
+ public function appendValue($value)
+ {
+ if (is_null($value)) {
+ $this->append('null');
+ } elseif (is_string($value)) {
+ $this->_toPhpSyntax($value);
+ } elseif (is_float($value)) {
+ $this->append('<');
+ $this->append($value);
+ $this->append('F>');
+ } elseif (is_bool($value)) {
+ $this->append('<');
+ $this->append($value ? 'true' : 'false');
+ $this->append('>');
+ } elseif (is_array($value) || $value instanceof \Iterator || $value instanceof \IteratorAggregate) {
+ $this->appendValueList('[', ', ', ']', $value);
+ } elseif (is_object($value) && !method_exists($value, '__toString')) {
+ $this->append('<');
+ $this->append(get_class($value));
+ $this->append('>');
+ } else {
+ $this->append('<');
+ $this->append($value);
+ $this->append('>');
+ }
+
+ return $this;
+ }
+
+ public function appendValueList($start, $separator, $end, $values)
+ {
+ $list = array();
+ foreach ($values as $v) {
+ $list[] = new SelfDescribingValue($v);
+ }
+
+ $this->appendList($start, $separator, $end, $list);
+
+ return $this;
+ }
+
+ public function appendList($start, $separator, $end, $values)
+ {
+ $this->append($start);
+
+ $separate = false;
+
+ foreach ($values as $value) {
+ /*if (!($value instanceof Hamcrest\SelfDescribing)) {
+ $value = new Hamcrest\Internal\SelfDescribingValue($value);
+ }*/
+
+ if ($separate) {
+ $this->append($separator);
+ }
+
+ $this->appendDescriptionOf($value);
+
+ $separate = true;
+ }
+
+ $this->append($end);
+
+ return $this;
+ }
+
+ // -- Protected Methods
+
+ /**
+ * Append the String $str to the description.
+ */
+ abstract protected function append($str);
+
+ // -- Private Methods
+
+ private function _toPhpSyntax($value)
+ {
+ $str = '"';
+ for ($i = 0, $len = strlen($value); $i < $len; ++$i) {
+ switch ($value[$i]) {
+ case '"':
+ $str .= '\\"';
+ break;
+
+ case "\t":
+ $str .= '\\t';
+ break;
+
+ case "\r":
+ $str .= '\\r';
+ break;
+
+ case "\n":
+ $str .= '\\n';
+ break;
+
+ default:
+ $str .= $value[$i];
+ }
+ }
+ $str .= '"';
+ $this->append($str);
+ }
+}
diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/BaseMatcher.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/BaseMatcher.php
new file mode 100644
index 00000000..06055698
--- /dev/null
+++ b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/BaseMatcher.php
@@ -0,0 +1,30 @@
+appendText('was ')->appendValue($item);
+ }
+
+ public function __toString()
+ {
+ return StringDescription::toString($this);
+ }
+
+ public function __invoke()
+ {
+ return call_user_func_array(array($this, 'matches'), func_get_args());
+ }
+}
diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Collection/IsEmptyTraversable.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Collection/IsEmptyTraversable.php
new file mode 100644
index 00000000..8ab58ea5
--- /dev/null
+++ b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Collection/IsEmptyTraversable.php
@@ -0,0 +1,71 @@
+_empty = $empty;
+ }
+
+ public function matches($item)
+ {
+ if (!$item instanceof \Traversable) {
+ return false;
+ }
+
+ foreach ($item as $value) {
+ return !$this->_empty;
+ }
+
+ return $this->_empty;
+ }
+
+ public function describeTo(Description $description)
+ {
+ $description->appendText($this->_empty ? 'an empty traversable' : 'a non-empty traversable');
+ }
+
+ /**
+ * Returns true if traversable is empty.
+ *
+ * @factory
+ */
+ public static function emptyTraversable()
+ {
+ if (!self::$_INSTANCE) {
+ self::$_INSTANCE = new self;
+ }
+
+ return self::$_INSTANCE;
+ }
+
+ /**
+ * Returns true if traversable is not empty.
+ *
+ * @factory
+ */
+ public static function nonEmptyTraversable()
+ {
+ if (!self::$_NOT_INSTANCE) {
+ self::$_NOT_INSTANCE = new self(false);
+ }
+
+ return self::$_NOT_INSTANCE;
+ }
+}
diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Collection/IsTraversableWithSize.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Collection/IsTraversableWithSize.php
new file mode 100644
index 00000000..c95edc5c
--- /dev/null
+++ b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Collection/IsTraversableWithSize.php
@@ -0,0 +1,47 @@
+false.
+ */
+class AllOf extends DiagnosingMatcher
+{
+
+ private $_matchers;
+
+ public function __construct(array $matchers)
+ {
+ Util::checkAllAreMatchers($matchers);
+
+ $this->_matchers = $matchers;
+ }
+
+ public function matchesWithDiagnosticDescription($item, Description $mismatchDescription)
+ {
+ /** @var $matcher \Hamcrest\Matcher */
+ foreach ($this->_matchers as $matcher) {
+ if (!$matcher->matches($item)) {
+ $mismatchDescription->appendDescriptionOf($matcher)->appendText(' ');
+ $matcher->describeMismatch($item, $mismatchDescription);
+
+ return false;
+ }
+ }
+
+ return true;
+ }
+
+ public function describeTo(Description $description)
+ {
+ $description->appendList('(', ' and ', ')', $this->_matchers);
+ }
+
+ /**
+ * Evaluates to true only if ALL of the passed in matchers evaluate to true.
+ *
+ * @factory ...
+ */
+ public static function allOf(/* args... */)
+ {
+ $args = func_get_args();
+
+ return new self(Util::createMatcherArray($args));
+ }
+}
diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/AnyOf.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/AnyOf.php
new file mode 100644
index 00000000..4504279f
--- /dev/null
+++ b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/AnyOf.php
@@ -0,0 +1,58 @@
+true.
+ */
+class AnyOf extends ShortcutCombination
+{
+
+ public function __construct(array $matchers)
+ {
+ parent::__construct($matchers);
+ }
+
+ public function matches($item)
+ {
+ return $this->matchesWithShortcut($item, true);
+ }
+
+ public function describeTo(Description $description)
+ {
+ $this->describeToWithOperator($description, 'or');
+ }
+
+ /**
+ * Evaluates to true if ANY of the passed in matchers evaluate to true.
+ *
+ * @factory ...
+ */
+ public static function anyOf(/* args... */)
+ {
+ $args = func_get_args();
+
+ return new self(Util::createMatcherArray($args));
+ }
+
+ /**
+ * Evaluates to false if ANY of the passed in matchers evaluate to true.
+ *
+ * @factory ...
+ */
+ public static function noneOf(/* args... */)
+ {
+ $args = func_get_args();
+
+ return IsNot::not(
+ new self(Util::createMatcherArray($args))
+ );
+ }
+}
diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/CombinableMatcher.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/CombinableMatcher.php
new file mode 100644
index 00000000..e3b4aa78
--- /dev/null
+++ b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/CombinableMatcher.php
@@ -0,0 +1,78 @@
+_matcher = $matcher;
+ }
+
+ public function matches($item)
+ {
+ return $this->_matcher->matches($item);
+ }
+
+ public function describeTo(Description $description)
+ {
+ $description->appendDescriptionOf($this->_matcher);
+ }
+
+ /** Diversion from Hamcrest-Java... Logical "and" not permitted */
+ public function andAlso(Matcher $other)
+ {
+ return new self(new AllOf($this->_templatedListWith($other)));
+ }
+
+ /** Diversion from Hamcrest-Java... Logical "or" not permitted */
+ public function orElse(Matcher $other)
+ {
+ return new self(new AnyOf($this->_templatedListWith($other)));
+ }
+
+ /**
+ * This is useful for fluently combining matchers that must both pass.
+ * For example:
+ *
+ * assertThat($string, both(containsString("a"))->andAlso(containsString("b")));
+ *
+ *
+ * @factory
+ */
+ public static function both(Matcher $matcher)
+ {
+ return new self($matcher);
+ }
+
+ /**
+ * This is useful for fluently combining matchers where either may pass,
+ * for example:
+ *
+ * assertThat($string, either(containsString("a"))->orElse(containsString("b")));
+ *
+ *
+ * @factory
+ */
+ public static function either(Matcher $matcher)
+ {
+ return new self($matcher);
+ }
+
+ // -- Private Methods
+
+ private function _templatedListWith(Matcher $other)
+ {
+ return array($this->_matcher, $other);
+ }
+}
diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/DescribedAs.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/DescribedAs.php
new file mode 100644
index 00000000..5b2583fa
--- /dev/null
+++ b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/DescribedAs.php
@@ -0,0 +1,68 @@
+_descriptionTemplate = $descriptionTemplate;
+ $this->_matcher = $matcher;
+ $this->_values = $values;
+ }
+
+ public function matches($item)
+ {
+ return $this->_matcher->matches($item);
+ }
+
+ public function describeTo(Description $description)
+ {
+ $textStart = 0;
+ while (preg_match(self::ARG_PATTERN, $this->_descriptionTemplate, $matches, PREG_OFFSET_CAPTURE, $textStart)) {
+ $text = $matches[0][0];
+ $index = $matches[1][0];
+ $offset = $matches[0][1];
+
+ $description->appendText(substr($this->_descriptionTemplate, $textStart, $offset - $textStart));
+ $description->appendValue($this->_values[$index]);
+
+ $textStart = $offset + strlen($text);
+ }
+
+ if ($textStart < strlen($this->_descriptionTemplate)) {
+ $description->appendText(substr($this->_descriptionTemplate, $textStart));
+ }
+ }
+
+ /**
+ * Wraps an existing matcher and overrides the description when it fails.
+ *
+ * @factory ...
+ */
+ public static function describedAs(/* $description, Hamcrest\Matcher $matcher, $values... */)
+ {
+ $args = func_get_args();
+ $description = array_shift($args);
+ $matcher = array_shift($args);
+ $values = $args;
+
+ return new self($description, $matcher, $values);
+ }
+}
diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/Every.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/Every.php
new file mode 100644
index 00000000..d686f8da
--- /dev/null
+++ b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/Every.php
@@ -0,0 +1,56 @@
+_matcher = $matcher;
+ }
+
+ protected function matchesSafelyWithDiagnosticDescription($items, Description $mismatchDescription)
+ {
+ foreach ($items as $item) {
+ if (!$this->_matcher->matches($item)) {
+ $mismatchDescription->appendText('an item ');
+ $this->_matcher->describeMismatch($item, $mismatchDescription);
+
+ return false;
+ }
+ }
+
+ return true;
+ }
+
+ public function describeTo(Description $description)
+ {
+ $description->appendText('every item is ')->appendDescriptionOf($this->_matcher);
+ }
+
+ /**
+ * @param Matcher $itemMatcher
+ * A matcher to apply to every element in an array.
+ *
+ * @return \Hamcrest\Core\Every
+ * Evaluates to TRUE for a collection in which every item matches $itemMatcher
+ *
+ * @factory
+ */
+ public static function everyItem(Matcher $itemMatcher)
+ {
+ return new self($itemMatcher);
+ }
+}
diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/HasToString.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/HasToString.php
new file mode 100644
index 00000000..45bd9102
--- /dev/null
+++ b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/HasToString.php
@@ -0,0 +1,56 @@
+toString();
+ }
+
+ return (string) $actual;
+ }
+
+ /**
+ * Does array size satisfy a given matcher?
+ *
+ * @factory
+ */
+ public static function hasToString($matcher)
+ {
+ return new self(Util::wrapValueWithIsEqual($matcher));
+ }
+}
diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/Is.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/Is.php
new file mode 100644
index 00000000..41266dc1
--- /dev/null
+++ b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/Is.php
@@ -0,0 +1,57 @@
+_matcher = $matcher;
+ }
+
+ public function matches($arg)
+ {
+ return $this->_matcher->matches($arg);
+ }
+
+ public function describeTo(Description $description)
+ {
+ $description->appendText('is ')->appendDescriptionOf($this->_matcher);
+ }
+
+ public function describeMismatch($item, Description $mismatchDescription)
+ {
+ $this->_matcher->describeMismatch($item, $mismatchDescription);
+ }
+
+ /**
+ * Decorates another Matcher, retaining the behavior but allowing tests
+ * to be slightly more expressive.
+ *
+ * For example: assertThat($cheese, equalTo($smelly))
+ * vs. assertThat($cheese, is(equalTo($smelly)))
+ *
+ * @factory
+ */
+ public static function is($value)
+ {
+ return new self(Util::wrapValueWithIsEqual($value));
+ }
+}
diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsAnything.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsAnything.php
new file mode 100644
index 00000000..f20e6c0d
--- /dev/null
+++ b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsAnything.php
@@ -0,0 +1,45 @@
+true.
+ */
+class IsAnything extends BaseMatcher
+{
+
+ private $_message;
+
+ public function __construct($message = 'ANYTHING')
+ {
+ $this->_message = $message;
+ }
+
+ public function matches($item)
+ {
+ return true;
+ }
+
+ public function describeTo(Description $description)
+ {
+ $description->appendText($this->_message);
+ }
+
+ /**
+ * This matcher always evaluates to true.
+ *
+ * @param string $description A meaningful string used when describing itself.
+ *
+ * @return \Hamcrest\Core\IsAnything
+ * @factory
+ */
+ public static function anything($description = 'ANYTHING')
+ {
+ return new self($description);
+ }
+}
diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsCollectionContaining.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsCollectionContaining.php
new file mode 100644
index 00000000..5e60426d
--- /dev/null
+++ b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsCollectionContaining.php
@@ -0,0 +1,93 @@
+_elementMatcher = $elementMatcher;
+ }
+
+ protected function matchesSafely($items)
+ {
+ foreach ($items as $item) {
+ if ($this->_elementMatcher->matches($item)) {
+ return true;
+ }
+ }
+
+ return false;
+ }
+
+ protected function describeMismatchSafely($items, Description $mismatchDescription)
+ {
+ $mismatchDescription->appendText('was ')->appendValue($items);
+ }
+
+ public function describeTo(Description $description)
+ {
+ $description
+ ->appendText('a collection containing ')
+ ->appendDescriptionOf($this->_elementMatcher)
+ ;
+ }
+
+ /**
+ * Test if the value is an array containing this matcher.
+ *
+ * Example:
+ *
+ * assertThat(array('a', 'b'), hasItem(equalTo('b')));
+ * //Convenience defaults to equalTo()
+ * assertThat(array('a', 'b'), hasItem('b'));
+ *
+ *
+ * @factory ...
+ */
+ public static function hasItem()
+ {
+ $args = func_get_args();
+ $firstArg = array_shift($args);
+
+ return new self(Util::wrapValueWithIsEqual($firstArg));
+ }
+
+ /**
+ * Test if the value is an array containing elements that match all of these
+ * matchers.
+ *
+ * Example:
+ *
+ * assertThat(array('a', 'b', 'c'), hasItems(equalTo('a'), equalTo('b')));
+ *
+ *
+ * @factory ...
+ */
+ public static function hasItems(/* args... */)
+ {
+ $args = func_get_args();
+ $matchers = array();
+
+ foreach ($args as $arg) {
+ $matchers[] = self::hasItem($arg);
+ }
+
+ return AllOf::allOf($matchers);
+ }
+}
diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsEqual.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsEqual.php
new file mode 100644
index 00000000..523fba0b
--- /dev/null
+++ b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsEqual.php
@@ -0,0 +1,44 @@
+_item = $item;
+ }
+
+ public function matches($arg)
+ {
+ return (($arg == $this->_item) && ($this->_item == $arg));
+ }
+
+ public function describeTo(Description $description)
+ {
+ $description->appendValue($this->_item);
+ }
+
+ /**
+ * Is the value equal to another value, as tested by the use of the "=="
+ * comparison operator?
+ *
+ * @factory
+ */
+ public static function equalTo($item)
+ {
+ return new self($item);
+ }
+}
diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsIdentical.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsIdentical.php
new file mode 100644
index 00000000..28f7b36e
--- /dev/null
+++ b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsIdentical.php
@@ -0,0 +1,38 @@
+_value = $value;
+ }
+
+ public function describeTo(Description $description)
+ {
+ $description->appendValue($this->_value);
+ }
+
+ /**
+ * Tests of the value is identical to $value as tested by the "===" operator.
+ *
+ * @factory
+ */
+ public static function identicalTo($value)
+ {
+ return new self($value);
+ }
+}
diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsInstanceOf.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsInstanceOf.php
new file mode 100644
index 00000000..7a5c92a6
--- /dev/null
+++ b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsInstanceOf.php
@@ -0,0 +1,67 @@
+_theClass = $theClass;
+ }
+
+ protected function matchesWithDiagnosticDescription($item, Description $mismatchDescription)
+ {
+ if (!is_object($item)) {
+ $mismatchDescription->appendText('was ')->appendValue($item);
+
+ return false;
+ }
+
+ if (!($item instanceof $this->_theClass)) {
+ $mismatchDescription->appendText('[' . get_class($item) . '] ')
+ ->appendValue($item);
+
+ return false;
+ }
+
+ return true;
+ }
+
+ public function describeTo(Description $description)
+ {
+ $description->appendText('an instance of ')
+ ->appendText($this->_theClass)
+ ;
+ }
+
+ /**
+ * Is the value an instance of a particular type?
+ * This version assumes no relationship between the required type and
+ * the signature of the method that sets it up, for example in
+ * assertThat($anObject, anInstanceOf('Thing'));
+ *
+ * @factory any
+ */
+ public static function anInstanceOf($theClass)
+ {
+ return new self($theClass);
+ }
+}
diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsNot.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsNot.php
new file mode 100644
index 00000000..167f0d06
--- /dev/null
+++ b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsNot.php
@@ -0,0 +1,44 @@
+_matcher = $matcher;
+ }
+
+ public function matches($arg)
+ {
+ return !$this->_matcher->matches($arg);
+ }
+
+ public function describeTo(Description $description)
+ {
+ $description->appendText('not ')->appendDescriptionOf($this->_matcher);
+ }
+
+ /**
+ * Matches if value does not match $value.
+ *
+ * @factory
+ */
+ public static function not($value)
+ {
+ return new self(Util::wrapValueWithIsEqual($value));
+ }
+}
diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsNull.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsNull.php
new file mode 100644
index 00000000..91a454c1
--- /dev/null
+++ b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsNull.php
@@ -0,0 +1,56 @@
+appendText('null');
+ }
+
+ /**
+ * Matches if value is null.
+ *
+ * @factory
+ */
+ public static function nullValue()
+ {
+ if (!self::$_INSTANCE) {
+ self::$_INSTANCE = new self();
+ }
+
+ return self::$_INSTANCE;
+ }
+
+ /**
+ * Matches if value is not null.
+ *
+ * @factory
+ */
+ public static function notNullValue()
+ {
+ if (!self::$_NOT_INSTANCE) {
+ self::$_NOT_INSTANCE = IsNot::not(self::nullValue());
+ }
+
+ return self::$_NOT_INSTANCE;
+ }
+}
diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsSame.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsSame.php
new file mode 100644
index 00000000..81078705
--- /dev/null
+++ b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsSame.php
@@ -0,0 +1,51 @@
+_object = $object;
+ }
+
+ public function matches($object)
+ {
+ return ($object === $this->_object) && ($this->_object === $object);
+ }
+
+ public function describeTo(Description $description)
+ {
+ $description->appendText('sameInstance(')
+ ->appendValue($this->_object)
+ ->appendText(')')
+ ;
+ }
+
+ /**
+ * Creates a new instance of IsSame.
+ *
+ * @param mixed $object
+ * The predicate evaluates to true only when the argument is
+ * this object.
+ *
+ * @return \Hamcrest\Core\IsSame
+ * @factory
+ */
+ public static function sameInstance($object)
+ {
+ return new self($object);
+ }
+}
diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsTypeOf.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsTypeOf.php
new file mode 100644
index 00000000..d24f0f94
--- /dev/null
+++ b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsTypeOf.php
@@ -0,0 +1,71 @@
+_theType = strtolower($theType);
+ }
+
+ public function matches($item)
+ {
+ return strtolower(gettype($item)) == $this->_theType;
+ }
+
+ public function describeTo(Description $description)
+ {
+ $description->appendText(self::getTypeDescription($this->_theType));
+ }
+
+ public function describeMismatch($item, Description $description)
+ {
+ if ($item === null) {
+ $description->appendText('was null');
+ } else {
+ $description->appendText('was ')
+ ->appendText(self::getTypeDescription(strtolower(gettype($item))))
+ ->appendText(' ')
+ ->appendValue($item)
+ ;
+ }
+ }
+
+ public static function getTypeDescription($type)
+ {
+ if ($type == 'null') {
+ return 'null';
+ }
+
+ return (strpos('aeiou', substr($type, 0, 1)) === false ? 'a ' : 'an ')
+ . $type;
+ }
+
+ /**
+ * Is the value a particular built-in type?
+ *
+ * @factory
+ */
+ public static function typeOf($theType)
+ {
+ return new self($theType);
+ }
+}
diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/Set.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/Set.php
new file mode 100644
index 00000000..cdc45d53
--- /dev/null
+++ b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/Set.php
@@ -0,0 +1,95 @@
+
+ * assertThat(array('a', 'b'), set('b'));
+ * assertThat($foo, set('bar'));
+ * assertThat('Server', notSet('defaultPort'));
+ *
+ *
+ * @todo Replace $property with a matcher and iterate all property names.
+ */
+class Set extends BaseMatcher
+{
+
+ private $_property;
+ private $_not;
+
+ public function __construct($property, $not = false)
+ {
+ $this->_property = $property;
+ $this->_not = $not;
+ }
+
+ public function matches($item)
+ {
+ if ($item === null) {
+ return false;
+ }
+ $property = $this->_property;
+ if (is_array($item)) {
+ $result = isset($item[$property]);
+ } elseif (is_object($item)) {
+ $result = isset($item->$property);
+ } elseif (is_string($item)) {
+ $result = isset($item::$$property);
+ } else {
+ throw new \InvalidArgumentException('Must pass an object, array, or class name');
+ }
+
+ return $this->_not ? !$result : $result;
+ }
+
+ public function describeTo(Description $description)
+ {
+ $description->appendText($this->_not ? 'unset property ' : 'set property ')->appendText($this->_property);
+ }
+
+ public function describeMismatch($item, Description $description)
+ {
+ $value = '';
+ if (!$this->_not) {
+ $description->appendText('was not set');
+ } else {
+ $property = $this->_property;
+ if (is_array($item)) {
+ $value = $item[$property];
+ } elseif (is_object($item)) {
+ $value = $item->$property;
+ } elseif (is_string($item)) {
+ $value = $item::$$property;
+ }
+ parent::describeMismatch($value, $description);
+ }
+ }
+
+ /**
+ * Matches if value (class, object, or array) has named $property.
+ *
+ * @factory
+ */
+ public static function set($property)
+ {
+ return new self($property);
+ }
+
+ /**
+ * Matches if value (class, object, or array) does not have named $property.
+ *
+ * @factory
+ */
+ public static function notSet($property)
+ {
+ return new self($property, true);
+ }
+}
diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/ShortcutCombination.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/ShortcutCombination.php
new file mode 100644
index 00000000..d93db74f
--- /dev/null
+++ b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/ShortcutCombination.php
@@ -0,0 +1,43 @@
+
+ */
+ private $_matchers;
+
+ public function __construct(array $matchers)
+ {
+ Util::checkAllAreMatchers($matchers);
+
+ $this->_matchers = $matchers;
+ }
+
+ protected function matchesWithShortcut($item, $shortcut)
+ {
+ /** @var $matcher \Hamcrest\Matcher */
+ foreach ($this->_matchers as $matcher) {
+ if ($matcher->matches($item) == $shortcut) {
+ return $shortcut;
+ }
+ }
+
+ return !$shortcut;
+ }
+
+ public function describeToWithOperator(Description $description, $operator)
+ {
+ $description->appendList('(', ' ' . $operator . ' ', ')', $this->_matchers);
+ }
+}
diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Description.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Description.php
new file mode 100644
index 00000000..9a482dbf
--- /dev/null
+++ b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Description.php
@@ -0,0 +1,70 @@
+matchesWithDiagnosticDescription($item, new NullDescription());
+ }
+
+ public function describeMismatch($item, Description $mismatchDescription)
+ {
+ $this->matchesWithDiagnosticDescription($item, $mismatchDescription);
+ }
+
+ abstract protected function matchesWithDiagnosticDescription($item, Description $mismatchDescription);
+}
diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/FeatureMatcher.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/FeatureMatcher.php
new file mode 100644
index 00000000..59f6cc73
--- /dev/null
+++ b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/FeatureMatcher.php
@@ -0,0 +1,67 @@
+featureValueOf() in a subclass to pull out the feature to be
+ * matched against.
+ */
+abstract class FeatureMatcher extends TypeSafeDiagnosingMatcher
+{
+
+ private $_subMatcher;
+ private $_featureDescription;
+ private $_featureName;
+
+ /**
+ * Constructor.
+ *
+ * @param string $type
+ * @param string $subtype
+ * @param \Hamcrest\Matcher $subMatcher The matcher to apply to the feature
+ * @param string $featureDescription Descriptive text to use in describeTo
+ * @param string $featureName Identifying text for mismatch message
+ */
+ public function __construct($type, $subtype, Matcher $subMatcher, $featureDescription, $featureName)
+ {
+ parent::__construct($type, $subtype);
+
+ $this->_subMatcher = $subMatcher;
+ $this->_featureDescription = $featureDescription;
+ $this->_featureName = $featureName;
+ }
+
+ /**
+ * Implement this to extract the interesting feature.
+ *
+ * @param mixed $actual the target object
+ *
+ * @return mixed the feature to be matched
+ */
+ abstract protected function featureValueOf($actual);
+
+ public function matchesSafelyWithDiagnosticDescription($actual, Description $mismatchDescription)
+ {
+ $featureValue = $this->featureValueOf($actual);
+
+ if (!$this->_subMatcher->matches($featureValue)) {
+ $mismatchDescription->appendText($this->_featureName)
+ ->appendText(' was ')->appendValue($featureValue);
+
+ return false;
+ }
+
+ return true;
+ }
+
+ final public function describeTo(Description $description)
+ {
+ $description->appendText($this->_featureDescription)->appendText(' ')
+ ->appendDescriptionOf($this->_subMatcher)
+ ;
+ }
+}
diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Internal/SelfDescribingValue.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Internal/SelfDescribingValue.php
new file mode 100644
index 00000000..995da71d
--- /dev/null
+++ b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Internal/SelfDescribingValue.php
@@ -0,0 +1,27 @@
+_value = $value;
+ }
+
+ public function describeTo(Description $description)
+ {
+ $description->appendValue($this->_value);
+ }
+}
diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Matcher.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Matcher.php
new file mode 100644
index 00000000..e5dcf093
--- /dev/null
+++ b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Matcher.php
@@ -0,0 +1,50 @@
+
+ * Matcher implementations should NOT directly implement this interface .
+ * Instead, extend the {@link Hamcrest\BaseMatcher} abstract class,
+ * which will ensure that the Matcher API can grow to support
+ * new features and remain compatible with all Matcher implementations.
+ *
+ * For easy access to common Matcher implementations, use the static factory
+ * methods in {@link Hamcrest\CoreMatchers}.
+ *
+ * @see Hamcrest\CoreMatchers
+ * @see Hamcrest\BaseMatcher
+ */
+interface Matcher extends SelfDescribing
+{
+
+ /**
+ * Evaluates the matcher for argument $item .
+ *
+ * @param mixed $item the object against which the matcher is evaluated.
+ *
+ * @return boolean true
if $item matches,
+ * otherwise false
.
+ *
+ * @see Hamcrest\BaseMatcher
+ */
+ public function matches($item);
+
+ /**
+ * Generate a description of why the matcher has not accepted the item.
+ * The description will be part of a larger description of why a matching
+ * failed, so it should be concise.
+ * This method assumes that matches($item)
is false, but
+ * will not check this.
+ *
+ * @param mixed $item The item that the Matcher has rejected.
+ * @param Description $description
+ * @return
+ */
+ public function describeMismatch($item, Description $description);
+}
diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/MatcherAssert.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/MatcherAssert.php
new file mode 100644
index 00000000..d546dbee
--- /dev/null
+++ b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/MatcherAssert.php
@@ -0,0 +1,118 @@
+
+ * // With an identifier
+ * assertThat("apple flavour", $apple->flavour(), equalTo("tasty"));
+ * // Without an identifier
+ * assertThat($apple->flavour(), equalTo("tasty"));
+ * // Evaluating a boolean expression
+ * assertThat("some error", $a > $b);
+ * assertThat($a > $b);
+ *
+ */
+ public static function assertThat(/* $args ... */)
+ {
+ $args = func_get_args();
+ switch (count($args)) {
+ case 1:
+ self::$_count++;
+ if (!$args[0]) {
+ throw new AssertionError();
+ }
+ break;
+
+ case 2:
+ self::$_count++;
+ if ($args[1] instanceof Matcher) {
+ self::doAssert('', $args[0], $args[1]);
+ } elseif (!$args[1]) {
+ throw new AssertionError($args[0]);
+ }
+ break;
+
+ case 3:
+ self::$_count++;
+ self::doAssert(
+ $args[0],
+ $args[1],
+ Util::wrapValueWithIsEqual($args[2])
+ );
+ break;
+
+ default:
+ throw new \InvalidArgumentException('assertThat() requires one to three arguments');
+ }
+ }
+
+ /**
+ * Returns the number of assertions performed.
+ *
+ * @return int
+ */
+ public static function getCount()
+ {
+ return self::$_count;
+ }
+
+ /**
+ * Resets the number of assertions performed to zero.
+ */
+ public static function resetCount()
+ {
+ self::$_count = 0;
+ }
+
+ /**
+ * Performs the actual assertion logic.
+ *
+ * If $matcher
doesn't match $actual
,
+ * throws a {@link Hamcrest\AssertionError} with a description
+ * of the failure along with the optional $identifier
.
+ *
+ * @param string $identifier added to the message upon failure
+ * @param mixed $actual value to compare against $matcher
+ * @param \Hamcrest\Matcher $matcher applied to $actual
+ * @throws AssertionError
+ */
+ private static function doAssert($identifier, $actual, Matcher $matcher)
+ {
+ if (!$matcher->matches($actual)) {
+ $description = new StringDescription();
+ if (!empty($identifier)) {
+ $description->appendText($identifier . PHP_EOL);
+ }
+ $description->appendText('Expected: ')
+ ->appendDescriptionOf($matcher)
+ ->appendText(PHP_EOL . ' but: ');
+
+ $matcher->describeMismatch($actual, $description);
+
+ throw new AssertionError((string) $description);
+ }
+ }
+}
diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Matchers.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Matchers.php
new file mode 100644
index 00000000..23232e45
--- /dev/null
+++ b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Matchers.php
@@ -0,0 +1,713 @@
+
+ * assertThat($string, both(containsString("a"))->andAlso(containsString("b")));
+ *
+ */
+ public static function both(\Hamcrest\Matcher $matcher)
+ {
+ return \Hamcrest\Core\CombinableMatcher::both($matcher);
+ }
+
+ /**
+ * This is useful for fluently combining matchers where either may pass,
+ * for example:
+ *
+ * assertThat($string, either(containsString("a"))->orElse(containsString("b")));
+ *
+ */
+ public static function either(\Hamcrest\Matcher $matcher)
+ {
+ return \Hamcrest\Core\CombinableMatcher::either($matcher);
+ }
+
+ /**
+ * Wraps an existing matcher and overrides the description when it fails.
+ */
+ public static function describedAs(/* args... */)
+ {
+ $args = func_get_args();
+ return call_user_func_array(array('\Hamcrest\Core\DescribedAs', 'describedAs'), $args);
+ }
+
+ /**
+ * @param Matcher $itemMatcher
+ * A matcher to apply to every element in an array.
+ *
+ * @return \Hamcrest\Core\Every
+ * Evaluates to TRUE for a collection in which every item matches $itemMatcher
+ */
+ public static function everyItem(\Hamcrest\Matcher $itemMatcher)
+ {
+ return \Hamcrest\Core\Every::everyItem($itemMatcher);
+ }
+
+ /**
+ * Does array size satisfy a given matcher?
+ */
+ public static function hasToString($matcher)
+ {
+ return \Hamcrest\Core\HasToString::hasToString($matcher);
+ }
+
+ /**
+ * Decorates another Matcher, retaining the behavior but allowing tests
+ * to be slightly more expressive.
+ *
+ * For example: assertThat($cheese, equalTo($smelly))
+ * vs. assertThat($cheese, is(equalTo($smelly)))
+ */
+ public static function is($value)
+ {
+ return \Hamcrest\Core\Is::is($value);
+ }
+
+ /**
+ * This matcher always evaluates to true.
+ *
+ * @param string $description A meaningful string used when describing itself.
+ *
+ * @return \Hamcrest\Core\IsAnything
+ */
+ public static function anything($description = 'ANYTHING')
+ {
+ return \Hamcrest\Core\IsAnything::anything($description);
+ }
+
+ /**
+ * Test if the value is an array containing this matcher.
+ *
+ * Example:
+ *
+ * assertThat(array('a', 'b'), hasItem(equalTo('b')));
+ * //Convenience defaults to equalTo()
+ * assertThat(array('a', 'b'), hasItem('b'));
+ *
+ */
+ public static function hasItem(/* args... */)
+ {
+ $args = func_get_args();
+ return call_user_func_array(array('\Hamcrest\Core\IsCollectionContaining', 'hasItem'), $args);
+ }
+
+ /**
+ * Test if the value is an array containing elements that match all of these
+ * matchers.
+ *
+ * Example:
+ *
+ * assertThat(array('a', 'b', 'c'), hasItems(equalTo('a'), equalTo('b')));
+ *
+ */
+ public static function hasItems(/* args... */)
+ {
+ $args = func_get_args();
+ return call_user_func_array(array('\Hamcrest\Core\IsCollectionContaining', 'hasItems'), $args);
+ }
+
+ /**
+ * Is the value equal to another value, as tested by the use of the "=="
+ * comparison operator?
+ */
+ public static function equalTo($item)
+ {
+ return \Hamcrest\Core\IsEqual::equalTo($item);
+ }
+
+ /**
+ * Tests of the value is identical to $value as tested by the "===" operator.
+ */
+ public static function identicalTo($value)
+ {
+ return \Hamcrest\Core\IsIdentical::identicalTo($value);
+ }
+
+ /**
+ * Is the value an instance of a particular type?
+ * This version assumes no relationship between the required type and
+ * the signature of the method that sets it up, for example in
+ * assertThat($anObject, anInstanceOf('Thing'));
+ */
+ public static function anInstanceOf($theClass)
+ {
+ return \Hamcrest\Core\IsInstanceOf::anInstanceOf($theClass);
+ }
+
+ /**
+ * Is the value an instance of a particular type?
+ * This version assumes no relationship between the required type and
+ * the signature of the method that sets it up, for example in
+ * assertThat($anObject, anInstanceOf('Thing'));
+ */
+ public static function any($theClass)
+ {
+ return \Hamcrest\Core\IsInstanceOf::anInstanceOf($theClass);
+ }
+
+ /**
+ * Matches if value does not match $value.
+ */
+ public static function not($value)
+ {
+ return \Hamcrest\Core\IsNot::not($value);
+ }
+
+ /**
+ * Matches if value is null.
+ */
+ public static function nullValue()
+ {
+ return \Hamcrest\Core\IsNull::nullValue();
+ }
+
+ /**
+ * Matches if value is not null.
+ */
+ public static function notNullValue()
+ {
+ return \Hamcrest\Core\IsNull::notNullValue();
+ }
+
+ /**
+ * Creates a new instance of IsSame.
+ *
+ * @param mixed $object
+ * The predicate evaluates to true only when the argument is
+ * this object.
+ *
+ * @return \Hamcrest\Core\IsSame
+ */
+ public static function sameInstance($object)
+ {
+ return \Hamcrest\Core\IsSame::sameInstance($object);
+ }
+
+ /**
+ * Is the value a particular built-in type?
+ */
+ public static function typeOf($theType)
+ {
+ return \Hamcrest\Core\IsTypeOf::typeOf($theType);
+ }
+
+ /**
+ * Matches if value (class, object, or array) has named $property.
+ */
+ public static function set($property)
+ {
+ return \Hamcrest\Core\Set::set($property);
+ }
+
+ /**
+ * Matches if value (class, object, or array) does not have named $property.
+ */
+ public static function notSet($property)
+ {
+ return \Hamcrest\Core\Set::notSet($property);
+ }
+
+ /**
+ * Matches if value is a number equal to $value within some range of
+ * acceptable error $delta.
+ */
+ public static function closeTo($value, $delta)
+ {
+ return \Hamcrest\Number\IsCloseTo::closeTo($value, $delta);
+ }
+
+ /**
+ * The value is not > $value, nor < $value.
+ */
+ public static function comparesEqualTo($value)
+ {
+ return \Hamcrest\Number\OrderingComparison::comparesEqualTo($value);
+ }
+
+ /**
+ * The value is > $value.
+ */
+ public static function greaterThan($value)
+ {
+ return \Hamcrest\Number\OrderingComparison::greaterThan($value);
+ }
+
+ /**
+ * The value is >= $value.
+ */
+ public static function greaterThanOrEqualTo($value)
+ {
+ return \Hamcrest\Number\OrderingComparison::greaterThanOrEqualTo($value);
+ }
+
+ /**
+ * The value is >= $value.
+ */
+ public static function atLeast($value)
+ {
+ return \Hamcrest\Number\OrderingComparison::greaterThanOrEqualTo($value);
+ }
+
+ /**
+ * The value is < $value.
+ */
+ public static function lessThan($value)
+ {
+ return \Hamcrest\Number\OrderingComparison::lessThan($value);
+ }
+
+ /**
+ * The value is <= $value.
+ */
+ public static function lessThanOrEqualTo($value)
+ {
+ return \Hamcrest\Number\OrderingComparison::lessThanOrEqualTo($value);
+ }
+
+ /**
+ * The value is <= $value.
+ */
+ public static function atMost($value)
+ {
+ return \Hamcrest\Number\OrderingComparison::lessThanOrEqualTo($value);
+ }
+
+ /**
+ * Matches if value is a zero-length string.
+ */
+ public static function isEmptyString()
+ {
+ return \Hamcrest\Text\IsEmptyString::isEmptyString();
+ }
+
+ /**
+ * Matches if value is a zero-length string.
+ */
+ public static function emptyString()
+ {
+ return \Hamcrest\Text\IsEmptyString::isEmptyString();
+ }
+
+ /**
+ * Matches if value is null or a zero-length string.
+ */
+ public static function isEmptyOrNullString()
+ {
+ return \Hamcrest\Text\IsEmptyString::isEmptyOrNullString();
+ }
+
+ /**
+ * Matches if value is null or a zero-length string.
+ */
+ public static function nullOrEmptyString()
+ {
+ return \Hamcrest\Text\IsEmptyString::isEmptyOrNullString();
+ }
+
+ /**
+ * Matches if value is a non-zero-length string.
+ */
+ public static function isNonEmptyString()
+ {
+ return \Hamcrest\Text\IsEmptyString::isNonEmptyString();
+ }
+
+ /**
+ * Matches if value is a non-zero-length string.
+ */
+ public static function nonEmptyString()
+ {
+ return \Hamcrest\Text\IsEmptyString::isNonEmptyString();
+ }
+
+ /**
+ * Matches if value is a string equal to $string, regardless of the case.
+ */
+ public static function equalToIgnoringCase($string)
+ {
+ return \Hamcrest\Text\IsEqualIgnoringCase::equalToIgnoringCase($string);
+ }
+
+ /**
+ * Matches if value is a string equal to $string, regardless of whitespace.
+ */
+ public static function equalToIgnoringWhiteSpace($string)
+ {
+ return \Hamcrest\Text\IsEqualIgnoringWhiteSpace::equalToIgnoringWhiteSpace($string);
+ }
+
+ /**
+ * Matches if value is a string that matches regular expression $pattern.
+ */
+ public static function matchesPattern($pattern)
+ {
+ return \Hamcrest\Text\MatchesPattern::matchesPattern($pattern);
+ }
+
+ /**
+ * Matches if value is a string that contains $substring.
+ */
+ public static function containsString($substring)
+ {
+ return \Hamcrest\Text\StringContains::containsString($substring);
+ }
+
+ /**
+ * Matches if value is a string that contains $substring regardless of the case.
+ */
+ public static function containsStringIgnoringCase($substring)
+ {
+ return \Hamcrest\Text\StringContainsIgnoringCase::containsStringIgnoringCase($substring);
+ }
+
+ /**
+ * Matches if value contains $substrings in a constrained order.
+ */
+ public static function stringContainsInOrder(/* args... */)
+ {
+ $args = func_get_args();
+ return call_user_func_array(array('\Hamcrest\Text\StringContainsInOrder', 'stringContainsInOrder'), $args);
+ }
+
+ /**
+ * Matches if value is a string that ends with $substring.
+ */
+ public static function endsWith($substring)
+ {
+ return \Hamcrest\Text\StringEndsWith::endsWith($substring);
+ }
+
+ /**
+ * Matches if value is a string that starts with $substring.
+ */
+ public static function startsWith($substring)
+ {
+ return \Hamcrest\Text\StringStartsWith::startsWith($substring);
+ }
+
+ /**
+ * Is the value an array?
+ */
+ public static function arrayValue()
+ {
+ return \Hamcrest\Type\IsArray::arrayValue();
+ }
+
+ /**
+ * Is the value a boolean?
+ */
+ public static function booleanValue()
+ {
+ return \Hamcrest\Type\IsBoolean::booleanValue();
+ }
+
+ /**
+ * Is the value a boolean?
+ */
+ public static function boolValue()
+ {
+ return \Hamcrest\Type\IsBoolean::booleanValue();
+ }
+
+ /**
+ * Is the value callable?
+ */
+ public static function callableValue()
+ {
+ return \Hamcrest\Type\IsCallable::callableValue();
+ }
+
+ /**
+ * Is the value a float/double?
+ */
+ public static function doubleValue()
+ {
+ return \Hamcrest\Type\IsDouble::doubleValue();
+ }
+
+ /**
+ * Is the value a float/double?
+ */
+ public static function floatValue()
+ {
+ return \Hamcrest\Type\IsDouble::doubleValue();
+ }
+
+ /**
+ * Is the value an integer?
+ */
+ public static function integerValue()
+ {
+ return \Hamcrest\Type\IsInteger::integerValue();
+ }
+
+ /**
+ * Is the value an integer?
+ */
+ public static function intValue()
+ {
+ return \Hamcrest\Type\IsInteger::integerValue();
+ }
+
+ /**
+ * Is the value a numeric?
+ */
+ public static function numericValue()
+ {
+ return \Hamcrest\Type\IsNumeric::numericValue();
+ }
+
+ /**
+ * Is the value an object?
+ */
+ public static function objectValue()
+ {
+ return \Hamcrest\Type\IsObject::objectValue();
+ }
+
+ /**
+ * Is the value an object?
+ */
+ public static function anObject()
+ {
+ return \Hamcrest\Type\IsObject::objectValue();
+ }
+
+ /**
+ * Is the value a resource?
+ */
+ public static function resourceValue()
+ {
+ return \Hamcrest\Type\IsResource::resourceValue();
+ }
+
+ /**
+ * Is the value a scalar (boolean, integer, double, or string)?
+ */
+ public static function scalarValue()
+ {
+ return \Hamcrest\Type\IsScalar::scalarValue();
+ }
+
+ /**
+ * Is the value a string?
+ */
+ public static function stringValue()
+ {
+ return \Hamcrest\Type\IsString::stringValue();
+ }
+
+ /**
+ * Wraps $matcher
with {@link Hamcrest\Core\IsEqual)
+ * if it's not a matcher and the XPath in count()
+ * if it's an integer.
+ */
+ public static function hasXPath($xpath, $matcher = null)
+ {
+ return \Hamcrest\Xml\HasXPath::hasXPath($xpath, $matcher);
+ }
+}
diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/NullDescription.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/NullDescription.php
new file mode 100644
index 00000000..aae8e461
--- /dev/null
+++ b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/NullDescription.php
@@ -0,0 +1,43 @@
+_value = $value;
+ $this->_delta = $delta;
+ }
+
+ protected function matchesSafely($item)
+ {
+ return $this->_actualDelta($item) <= 0.0;
+ }
+
+ protected function describeMismatchSafely($item, Description $mismatchDescription)
+ {
+ $mismatchDescription->appendValue($item)
+ ->appendText(' differed by ')
+ ->appendValue($this->_actualDelta($item))
+ ;
+ }
+
+ public function describeTo(Description $description)
+ {
+ $description->appendText('a numeric value within ')
+ ->appendValue($this->_delta)
+ ->appendText(' of ')
+ ->appendValue($this->_value)
+ ;
+ }
+
+ /**
+ * Matches if value is a number equal to $value within some range of
+ * acceptable error $delta.
+ *
+ * @factory
+ */
+ public static function closeTo($value, $delta)
+ {
+ return new self($value, $delta);
+ }
+
+ // -- Private Methods
+
+ private function _actualDelta($item)
+ {
+ return (abs(($item - $this->_value)) - $this->_delta);
+ }
+}
diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Number/OrderingComparison.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Number/OrderingComparison.php
new file mode 100644
index 00000000..369d0cfa
--- /dev/null
+++ b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Number/OrderingComparison.php
@@ -0,0 +1,132 @@
+_value = $value;
+ $this->_minCompare = $minCompare;
+ $this->_maxCompare = $maxCompare;
+ }
+
+ protected function matchesSafely($other)
+ {
+ $compare = $this->_compare($this->_value, $other);
+
+ return ($this->_minCompare <= $compare) && ($compare <= $this->_maxCompare);
+ }
+
+ protected function describeMismatchSafely($item, Description $mismatchDescription)
+ {
+ $mismatchDescription
+ ->appendValue($item)->appendText(' was ')
+ ->appendText($this->_comparison($this->_compare($this->_value, $item)))
+ ->appendText(' ')->appendValue($this->_value)
+ ;
+ }
+
+ public function describeTo(Description $description)
+ {
+ $description->appendText('a value ')
+ ->appendText($this->_comparison($this->_minCompare))
+ ;
+ if ($this->_minCompare != $this->_maxCompare) {
+ $description->appendText(' or ')
+ ->appendText($this->_comparison($this->_maxCompare))
+ ;
+ }
+ $description->appendText(' ')->appendValue($this->_value);
+ }
+
+ /**
+ * The value is not > $value, nor < $value.
+ *
+ * @factory
+ */
+ public static function comparesEqualTo($value)
+ {
+ return new self($value, 0, 0);
+ }
+
+ /**
+ * The value is > $value.
+ *
+ * @factory
+ */
+ public static function greaterThan($value)
+ {
+ return new self($value, -1, -1);
+ }
+
+ /**
+ * The value is >= $value.
+ *
+ * @factory atLeast
+ */
+ public static function greaterThanOrEqualTo($value)
+ {
+ return new self($value, -1, 0);
+ }
+
+ /**
+ * The value is < $value.
+ *
+ * @factory
+ */
+ public static function lessThan($value)
+ {
+ return new self($value, 1, 1);
+ }
+
+ /**
+ * The value is <= $value.
+ *
+ * @factory atMost
+ */
+ public static function lessThanOrEqualTo($value)
+ {
+ return new self($value, 0, 1);
+ }
+
+ // -- Private Methods
+
+ private function _compare($left, $right)
+ {
+ $a = $left;
+ $b = $right;
+
+ if ($a < $b) {
+ return -1;
+ } elseif ($a == $b) {
+ return 0;
+ } else {
+ return 1;
+ }
+ }
+
+ private function _comparison($compare)
+ {
+ if ($compare > 0) {
+ return 'less than';
+ } elseif ($compare == 0) {
+ return 'equal to';
+ } else {
+ return 'greater than';
+ }
+ }
+}
diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/SelfDescribing.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/SelfDescribing.php
new file mode 100644
index 00000000..872fdf9c
--- /dev/null
+++ b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/SelfDescribing.php
@@ -0,0 +1,23 @@
+_out = (string) $out;
+ }
+
+ public function __toString()
+ {
+ return $this->_out;
+ }
+
+ /**
+ * Return the description of a {@link Hamcrest\SelfDescribing} object as a
+ * String.
+ *
+ * @param \Hamcrest\SelfDescribing $selfDescribing
+ * The object to be described.
+ *
+ * @return string
+ * The description of the object.
+ */
+ public static function toString(SelfDescribing $selfDescribing)
+ {
+ $self = new self();
+
+ return (string) $self->appendDescriptionOf($selfDescribing);
+ }
+
+ /**
+ * Alias for {@link toString()}.
+ */
+ public static function asString(SelfDescribing $selfDescribing)
+ {
+ return self::toString($selfDescribing);
+ }
+
+ // -- Protected Methods
+
+ protected function append($str)
+ {
+ $this->_out .= $str;
+ }
+}
diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/IsEmptyString.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/IsEmptyString.php
new file mode 100644
index 00000000..2ae61b96
--- /dev/null
+++ b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/IsEmptyString.php
@@ -0,0 +1,85 @@
+_empty = $empty;
+ }
+
+ public function matches($item)
+ {
+ return $this->_empty
+ ? ($item === '')
+ : is_string($item) && $item !== '';
+ }
+
+ public function describeTo(Description $description)
+ {
+ $description->appendText($this->_empty ? 'an empty string' : 'a non-empty string');
+ }
+
+ /**
+ * Matches if value is a zero-length string.
+ *
+ * @factory emptyString
+ */
+ public static function isEmptyString()
+ {
+ if (!self::$_INSTANCE) {
+ self::$_INSTANCE = new self(true);
+ }
+
+ return self::$_INSTANCE;
+ }
+
+ /**
+ * Matches if value is null or a zero-length string.
+ *
+ * @factory nullOrEmptyString
+ */
+ public static function isEmptyOrNullString()
+ {
+ if (!self::$_NULL_OR_EMPTY_INSTANCE) {
+ self::$_NULL_OR_EMPTY_INSTANCE = AnyOf::anyOf(
+ IsNull::nullvalue(),
+ self::isEmptyString()
+ );
+ }
+
+ return self::$_NULL_OR_EMPTY_INSTANCE;
+ }
+
+ /**
+ * Matches if value is a non-zero-length string.
+ *
+ * @factory nonEmptyString
+ */
+ public static function isNonEmptyString()
+ {
+ if (!self::$_NOT_INSTANCE) {
+ self::$_NOT_INSTANCE = new self(false);
+ }
+
+ return self::$_NOT_INSTANCE;
+ }
+}
diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/IsEqualIgnoringCase.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/IsEqualIgnoringCase.php
new file mode 100644
index 00000000..3836a8c3
--- /dev/null
+++ b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/IsEqualIgnoringCase.php
@@ -0,0 +1,52 @@
+_string = $string;
+ }
+
+ protected function matchesSafely($item)
+ {
+ return strtolower($this->_string) === strtolower($item);
+ }
+
+ protected function describeMismatchSafely($item, Description $mismatchDescription)
+ {
+ $mismatchDescription->appendText('was ')->appendText($item);
+ }
+
+ public function describeTo(Description $description)
+ {
+ $description->appendText('equalToIgnoringCase(')
+ ->appendValue($this->_string)
+ ->appendText(')')
+ ;
+ }
+
+ /**
+ * Matches if value is a string equal to $string, regardless of the case.
+ *
+ * @factory
+ */
+ public static function equalToIgnoringCase($string)
+ {
+ return new self($string);
+ }
+}
diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/IsEqualIgnoringWhiteSpace.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/IsEqualIgnoringWhiteSpace.php
new file mode 100644
index 00000000..853692b0
--- /dev/null
+++ b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/IsEqualIgnoringWhiteSpace.php
@@ -0,0 +1,66 @@
+_string = $string;
+ }
+
+ protected function matchesSafely($item)
+ {
+ return (strtolower($this->_stripSpace($item))
+ === strtolower($this->_stripSpace($this->_string)));
+ }
+
+ protected function describeMismatchSafely($item, Description $mismatchDescription)
+ {
+ $mismatchDescription->appendText('was ')->appendText($item);
+ }
+
+ public function describeTo(Description $description)
+ {
+ $description->appendText('equalToIgnoringWhiteSpace(')
+ ->appendValue($this->_string)
+ ->appendText(')')
+ ;
+ }
+
+ /**
+ * Matches if value is a string equal to $string, regardless of whitespace.
+ *
+ * @factory
+ */
+ public static function equalToIgnoringWhiteSpace($string)
+ {
+ return new self($string);
+ }
+
+ // -- Private Methods
+
+ private function _stripSpace($string)
+ {
+ $parts = preg_split("/[\r\n\t ]+/", $string);
+ foreach ($parts as $i => $part) {
+ $parts[$i] = trim($part, " \r\n\t");
+ }
+
+ return trim(implode(' ', $parts), " \r\n\t");
+ }
+}
diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/MatchesPattern.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/MatchesPattern.php
new file mode 100644
index 00000000..fa0d68ee
--- /dev/null
+++ b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/MatchesPattern.php
@@ -0,0 +1,40 @@
+_substring, (string) $item) >= 1;
+ }
+
+ protected function relationship()
+ {
+ return 'matching';
+ }
+}
diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/StringContains.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/StringContains.php
new file mode 100644
index 00000000..b92786b6
--- /dev/null
+++ b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/StringContains.php
@@ -0,0 +1,45 @@
+_substring);
+ }
+
+ /**
+ * Matches if value is a string that contains $substring.
+ *
+ * @factory
+ */
+ public static function containsString($substring)
+ {
+ return new self($substring);
+ }
+
+ // -- Protected Methods
+
+ protected function evalSubstringOf($item)
+ {
+ return (false !== strpos((string) $item, $this->_substring));
+ }
+
+ protected function relationship()
+ {
+ return 'containing';
+ }
+}
diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/StringContainsIgnoringCase.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/StringContainsIgnoringCase.php
new file mode 100644
index 00000000..69f37c25
--- /dev/null
+++ b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/StringContainsIgnoringCase.php
@@ -0,0 +1,40 @@
+_substring));
+ }
+
+ protected function relationship()
+ {
+ return 'containing in any case';
+ }
+}
diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/StringContainsInOrder.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/StringContainsInOrder.php
new file mode 100644
index 00000000..e75de65d
--- /dev/null
+++ b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/StringContainsInOrder.php
@@ -0,0 +1,66 @@
+_substrings = $substrings;
+ }
+
+ protected function matchesSafely($item)
+ {
+ $fromIndex = 0;
+
+ foreach ($this->_substrings as $substring) {
+ if (false === $fromIndex = strpos($item, $substring, $fromIndex)) {
+ return false;
+ }
+ }
+
+ return true;
+ }
+
+ protected function describeMismatchSafely($item, Description $mismatchDescription)
+ {
+ $mismatchDescription->appendText('was ')->appendText($item);
+ }
+
+ public function describeTo(Description $description)
+ {
+ $description->appendText('a string containing ')
+ ->appendValueList('', ', ', '', $this->_substrings)
+ ->appendText(' in order')
+ ;
+ }
+
+ /**
+ * Matches if value contains $substrings in a constrained order.
+ *
+ * @factory ...
+ */
+ public static function stringContainsInOrder(/* args... */)
+ {
+ $args = func_get_args();
+
+ if (isset($args[0]) && is_array($args[0])) {
+ $args = $args[0];
+ }
+
+ return new self($args);
+ }
+}
diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/StringEndsWith.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/StringEndsWith.php
new file mode 100644
index 00000000..f802ee4d
--- /dev/null
+++ b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/StringEndsWith.php
@@ -0,0 +1,40 @@
+_substring))) === $this->_substring);
+ }
+
+ protected function relationship()
+ {
+ return 'ending with';
+ }
+}
diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/StringStartsWith.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/StringStartsWith.php
new file mode 100644
index 00000000..79c95656
--- /dev/null
+++ b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/StringStartsWith.php
@@ -0,0 +1,40 @@
+_substring)) === $this->_substring);
+ }
+
+ protected function relationship()
+ {
+ return 'starting with';
+ }
+}
diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/SubstringMatcher.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/SubstringMatcher.php
new file mode 100644
index 00000000..e560ad62
--- /dev/null
+++ b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/SubstringMatcher.php
@@ -0,0 +1,45 @@
+_substring = $substring;
+ }
+
+ protected function matchesSafely($item)
+ {
+ return $this->evalSubstringOf($item);
+ }
+
+ protected function describeMismatchSafely($item, Description $mismatchDescription)
+ {
+ $mismatchDescription->appendText('was "')->appendText($item)->appendText('"');
+ }
+
+ public function describeTo(Description $description)
+ {
+ $description->appendText('a string ')
+ ->appendText($this->relationship())
+ ->appendText(' ')
+ ->appendValue($this->_substring)
+ ;
+ }
+
+ abstract protected function evalSubstringOf($string);
+
+ abstract protected function relationship();
+}
diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Type/IsArray.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Type/IsArray.php
new file mode 100644
index 00000000..9179102f
--- /dev/null
+++ b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Type/IsArray.php
@@ -0,0 +1,32 @@
+isHexadecimal($item)) {
+ return true;
+ }
+
+ return is_numeric($item);
+ }
+
+ /**
+ * Return if the string passed is a valid hexadecimal number.
+ * This check is necessary because PHP 7 doesn't recognize hexadecimal string as numeric anymore.
+ *
+ * @param mixed $item
+ * @return boolean
+ */
+ private function isHexadecimal($item)
+ {
+ if (is_string($item) && preg_match('/^0x(.*)$/', $item, $matches)) {
+ return ctype_xdigit($matches[1]);
+ }
+
+ return false;
+ }
+
+ /**
+ * Is the value a numeric?
+ *
+ * @factory
+ */
+ public static function numericValue()
+ {
+ return new self;
+ }
+}
diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Type/IsObject.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Type/IsObject.php
new file mode 100644
index 00000000..65918fcf
--- /dev/null
+++ b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Type/IsObject.php
@@ -0,0 +1,32 @@
+matchesSafelyWithDiagnosticDescription($item, new NullDescription());
+ }
+
+ final public function describeMismatchSafely($item, Description $mismatchDescription)
+ {
+ $this->matchesSafelyWithDiagnosticDescription($item, $mismatchDescription);
+ }
+
+ // -- Protected Methods
+
+ /**
+ * Subclasses should implement these. The item will already have been checked for
+ * the specific type.
+ */
+ abstract protected function matchesSafelyWithDiagnosticDescription($item, Description $mismatchDescription);
+}
diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/TypeSafeMatcher.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/TypeSafeMatcher.php
new file mode 100644
index 00000000..56e299a9
--- /dev/null
+++ b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/TypeSafeMatcher.php
@@ -0,0 +1,107 @@
+_expectedType = $expectedType;
+ $this->_expectedSubtype = $expectedSubtype;
+ }
+
+ final public function matches($item)
+ {
+ return $this->_isSafeType($item) && $this->matchesSafely($item);
+ }
+
+ final public function describeMismatch($item, Description $mismatchDescription)
+ {
+ if (!$this->_isSafeType($item)) {
+ parent::describeMismatch($item, $mismatchDescription);
+ } else {
+ $this->describeMismatchSafely($item, $mismatchDescription);
+ }
+ }
+
+ // -- Protected Methods
+
+ /**
+ * The item will already have been checked for the specific type and subtype.
+ */
+ abstract protected function matchesSafely($item);
+
+ /**
+ * The item will already have been checked for the specific type and subtype.
+ */
+ abstract protected function describeMismatchSafely($item, Description $mismatchDescription);
+
+ // -- Private Methods
+
+ private function _isSafeType($value)
+ {
+ switch ($this->_expectedType) {
+
+ case self::TYPE_ANY:
+ return true;
+
+ case self::TYPE_STRING:
+ return is_string($value) || is_numeric($value);
+
+ case self::TYPE_NUMERIC:
+ return is_numeric($value) || is_string($value);
+
+ case self::TYPE_ARRAY:
+ return is_array($value);
+
+ case self::TYPE_OBJECT:
+ return is_object($value)
+ && ($this->_expectedSubtype === null
+ || $value instanceof $this->_expectedSubtype);
+
+ case self::TYPE_RESOURCE:
+ return is_resource($value)
+ && ($this->_expectedSubtype === null
+ || get_resource_type($value) == $this->_expectedSubtype);
+
+ case self::TYPE_BOOLEAN:
+ return true;
+
+ default:
+ return true;
+
+ }
+ }
+}
diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Util.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Util.php
new file mode 100644
index 00000000..169b0366
--- /dev/null
+++ b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Util.php
@@ -0,0 +1,76 @@
+ all items are
+ */
+ public static function createMatcherArray(array $items)
+ {
+ //Extract single array item
+ if (count($items) == 1 && is_array($items[0])) {
+ $items = $items[0];
+ }
+
+ //Replace non-matchers
+ foreach ($items as &$item) {
+ if (!($item instanceof Matcher)) {
+ $item = Core\IsEqual::equalTo($item);
+ }
+ }
+
+ return $items;
+ }
+}
diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Xml/HasXPath.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Xml/HasXPath.php
new file mode 100644
index 00000000..d9764e45
--- /dev/null
+++ b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Xml/HasXPath.php
@@ -0,0 +1,195 @@
+_xpath = $xpath;
+ $this->_matcher = $matcher;
+ }
+
+ /**
+ * Matches if the XPath matches against the DOM node and the matcher.
+ *
+ * @param string|\DOMNode $actual
+ * @param Description $mismatchDescription
+ * @return bool
+ */
+ protected function matchesWithDiagnosticDescription($actual, Description $mismatchDescription)
+ {
+ if (is_string($actual)) {
+ $actual = $this->createDocument($actual);
+ } elseif (!$actual instanceof \DOMNode) {
+ $mismatchDescription->appendText('was ')->appendValue($actual);
+
+ return false;
+ }
+ $result = $this->evaluate($actual);
+ if ($result instanceof \DOMNodeList) {
+ return $this->matchesContent($result, $mismatchDescription);
+ } else {
+ return $this->matchesExpression($result, $mismatchDescription);
+ }
+ }
+
+ /**
+ * Creates and returns a DOMDocument
from the given
+ * XML or HTML string.
+ *
+ * @param string $text
+ * @return \DOMDocument built from $text
+ * @throws \InvalidArgumentException if the document is not valid
+ */
+ protected function createDocument($text)
+ {
+ $document = new \DOMDocument();
+ if (preg_match('/^\s*<\?xml/', $text)) {
+ if (!@$document->loadXML($text)) {
+ throw new \InvalidArgumentException('Must pass a valid XML document');
+ }
+ } else {
+ if (!@$document->loadHTML($text)) {
+ throw new \InvalidArgumentException('Must pass a valid HTML or XHTML document');
+ }
+ }
+
+ return $document;
+ }
+
+ /**
+ * Applies the configured XPath to the DOM node and returns either
+ * the result if it's an expression or the node list if it's a query.
+ *
+ * @param \DOMNode $node context from which to issue query
+ * @return mixed result of expression or DOMNodeList from query
+ */
+ protected function evaluate(\DOMNode $node)
+ {
+ if ($node instanceof \DOMDocument) {
+ $xpathDocument = new \DOMXPath($node);
+
+ return $xpathDocument->evaluate($this->_xpath);
+ } else {
+ $xpathDocument = new \DOMXPath($node->ownerDocument);
+
+ return $xpathDocument->evaluate($this->_xpath, $node);
+ }
+ }
+
+ /**
+ * Matches if the list of nodes is not empty and the content of at least
+ * one node matches the configured matcher, if supplied.
+ *
+ * @param \DOMNodeList $nodes selected by the XPath query
+ * @param Description $mismatchDescription
+ * @return bool
+ */
+ protected function matchesContent(\DOMNodeList $nodes, Description $mismatchDescription)
+ {
+ if ($nodes->length == 0) {
+ $mismatchDescription->appendText('XPath returned no results');
+ } elseif ($this->_matcher === null) {
+ return true;
+ } else {
+ foreach ($nodes as $node) {
+ if ($this->_matcher->matches($node->textContent)) {
+ return true;
+ }
+ }
+ $content = array();
+ foreach ($nodes as $node) {
+ $content[] = $node->textContent;
+ }
+ $mismatchDescription->appendText('XPath returned ')
+ ->appendValue($content);
+ }
+
+ return false;
+ }
+
+ /**
+ * Matches if the result of the XPath expression matches the configured
+ * matcher or evaluates to true
if there is none.
+ *
+ * @param mixed $result result of the XPath expression
+ * @param Description $mismatchDescription
+ * @return bool
+ */
+ protected function matchesExpression($result, Description $mismatchDescription)
+ {
+ if ($this->_matcher === null) {
+ if ($result) {
+ return true;
+ }
+ $mismatchDescription->appendText('XPath expression result was ')
+ ->appendValue($result);
+ } else {
+ if ($this->_matcher->matches($result)) {
+ return true;
+ }
+ $mismatchDescription->appendText('XPath expression result ');
+ $this->_matcher->describeMismatch($result, $mismatchDescription);
+ }
+
+ return false;
+ }
+
+ public function describeTo(Description $description)
+ {
+ $description->appendText('XML or HTML document with XPath "')
+ ->appendText($this->_xpath)
+ ->appendText('"');
+ if ($this->_matcher !== null) {
+ $description->appendText(' ');
+ $this->_matcher->describeTo($description);
+ }
+ }
+
+ /**
+ * Wraps $matcher
with {@link Hamcrest\Core\IsEqual)
+ * if it's not a matcher and the XPath in count()
+ * if it's an integer.
+ *
+ * @factory
+ */
+ public static function hasXPath($xpath, $matcher = null)
+ {
+ if ($matcher === null || $matcher instanceof Matcher) {
+ return new self($xpath, $matcher);
+ } elseif (is_int($matcher) && strpos($xpath, 'count(') !== 0) {
+ $xpath = 'count(' . $xpath . ')';
+ }
+
+ return new self($xpath, IsEqual::equalTo($matcher));
+ }
+}
diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/AbstractMatcherTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/AbstractMatcherTest.php
new file mode 100644
index 00000000..8a1fb2a9
--- /dev/null
+++ b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/AbstractMatcherTest.php
@@ -0,0 +1,68 @@
+assertTrue($matcher->matches($arg), $message);
+ }
+
+ public function assertDoesNotMatch(\Hamcrest\Matcher $matcher, $arg, $message)
+ {
+ $this->assertFalse($matcher->matches($arg), $message);
+ }
+
+ public function assertDescription($expected, \Hamcrest\Matcher $matcher)
+ {
+ $description = new \Hamcrest\StringDescription();
+ $description->appendDescriptionOf($matcher);
+ $this->assertEquals($expected, (string) $description, 'Expected description');
+ }
+
+ public function assertMismatchDescription($expected, \Hamcrest\Matcher $matcher, $arg)
+ {
+ $description = new \Hamcrest\StringDescription();
+ $this->assertFalse(
+ $matcher->matches($arg),
+ 'Precondtion: Matcher should not match item'
+ );
+ $matcher->describeMismatch($arg, $description);
+ $this->assertEquals(
+ $expected,
+ (string) $description,
+ 'Expected mismatch description'
+ );
+ }
+
+ public function testIsNullSafe()
+ {
+ //Should not generate any notices
+ $this->createMatcher()->matches(null);
+ $this->createMatcher()->describeMismatch(
+ null,
+ new \Hamcrest\NullDescription()
+ );
+ }
+
+ public function testCopesWithUnknownTypes()
+ {
+ //Should not generate any notices
+ $this->createMatcher()->matches(new UnknownType());
+ $this->createMatcher()->describeMismatch(
+ new UnknownType(),
+ new NullDescription()
+ );
+ }
+}
diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Array/IsArrayContainingInAnyOrderTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Array/IsArrayContainingInAnyOrderTest.php
new file mode 100644
index 00000000..45d9f138
--- /dev/null
+++ b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Array/IsArrayContainingInAnyOrderTest.php
@@ -0,0 +1,54 @@
+assertDescription('[<1>, <2>] in any order', containsInAnyOrder(array(1, 2)));
+ }
+
+ public function testMatchesItemsInAnyOrder()
+ {
+ $this->assertMatches(containsInAnyOrder(array(1, 2, 3)), array(1, 2, 3), 'in order');
+ $this->assertMatches(containsInAnyOrder(array(1, 2, 3)), array(3, 2, 1), 'out of order');
+ $this->assertMatches(containsInAnyOrder(array(1)), array(1), 'single');
+ }
+
+ public function testAppliesMatchersInAnyOrder()
+ {
+ $this->assertMatches(
+ containsInAnyOrder(array(1, 2, 3)),
+ array(1, 2, 3),
+ 'in order'
+ );
+ $this->assertMatches(
+ containsInAnyOrder(array(1, 2, 3)),
+ array(3, 2, 1),
+ 'out of order'
+ );
+ $this->assertMatches(
+ containsInAnyOrder(array(1)),
+ array(1),
+ 'single'
+ );
+ }
+
+ public function testMismatchesItemsInAnyOrder()
+ {
+ $matcher = containsInAnyOrder(array(1, 2, 3));
+
+ $this->assertMismatchDescription('was null', $matcher, null);
+ $this->assertMismatchDescription('No item matches: <1>, <2>, <3> in []', $matcher, array());
+ $this->assertMismatchDescription('No item matches: <2>, <3> in [<1>]', $matcher, array(1));
+ $this->assertMismatchDescription('Not matched: <4>', $matcher, array(4, 3, 2, 1));
+ }
+}
diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Array/IsArrayContainingInOrderTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Array/IsArrayContainingInOrderTest.php
new file mode 100644
index 00000000..a9e4e5b0
--- /dev/null
+++ b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Array/IsArrayContainingInOrderTest.php
@@ -0,0 +1,48 @@
+assertDescription('[<1>, <2>]', arrayContaining(array(1, 2)));
+ }
+
+ public function testMatchesItemsInOrder()
+ {
+ $this->assertMatches(arrayContaining(array(1, 2, 3)), array(1, 2, 3), 'in order');
+ $this->assertMatches(arrayContaining(array(1)), array(1), 'single');
+ }
+
+ public function testAppliesMatchersInOrder()
+ {
+ $this->assertMatches(
+ arrayContaining(array(1, 2, 3)),
+ array(1, 2, 3),
+ 'in order'
+ );
+ $this->assertMatches(arrayContaining(array(1)), array(1), 'single');
+ }
+
+ public function testMismatchesItemsInAnyOrder()
+ {
+ if (defined('HHVM_VERSION')) {
+ $this->markTestSkipped('Broken on HHVM.');
+ }
+
+ $matcher = arrayContaining(array(1, 2, 3));
+ $this->assertMismatchDescription('was null', $matcher, null);
+ $this->assertMismatchDescription('No item matched: <1>', $matcher, array());
+ $this->assertMismatchDescription('No item matched: <2>', $matcher, array(1));
+ $this->assertMismatchDescription('item with key 0: was <4>', $matcher, array(4, 3, 2, 1));
+ $this->assertMismatchDescription('item with key 2: was <4>', $matcher, array(1, 2, 4));
+ }
+}
diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Array/IsArrayContainingKeyTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Array/IsArrayContainingKeyTest.php
new file mode 100644
index 00000000..31770d8d
--- /dev/null
+++ b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Array/IsArrayContainingKeyTest.php
@@ -0,0 +1,62 @@
+1);
+
+ $this->assertMatches(hasKey('a'), $array, 'Matches single key');
+ }
+
+ public function testMatchesArrayContainingKey()
+ {
+ $array = array('a'=>1, 'b'=>2, 'c'=>3);
+
+ $this->assertMatches(hasKey('a'), $array, 'Matches a');
+ $this->assertMatches(hasKey('c'), $array, 'Matches c');
+ }
+
+ public function testMatchesArrayContainingKeyWithIntegerKeys()
+ {
+ $array = array(1=>'A', 2=>'B');
+
+ assertThat($array, hasKey(1));
+ }
+
+ public function testMatchesArrayContainingKeyWithNumberKeys()
+ {
+ $array = array(1=>'A', 2=>'B');
+
+ assertThat($array, hasKey(1));
+
+ // very ugly version!
+ assertThat($array, IsArrayContainingKey::hasKeyInArray(2));
+ }
+
+ public function testHasReadableDescription()
+ {
+ $this->assertDescription('array with key "a"', hasKey('a'));
+ }
+
+ public function testDoesNotMatchEmptyArray()
+ {
+ $this->assertMismatchDescription('array was []', hasKey('Foo'), array());
+ }
+
+ public function testDoesNotMatchArrayMissingKey()
+ {
+ $array = array('a'=>1, 'b'=>2, 'c'=>3);
+
+ $this->assertMismatchDescription('array was ["a" => <1>, "b" => <2>, "c" => <3>]', hasKey('d'), $array);
+ }
+}
diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Array/IsArrayContainingKeyValuePairTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Array/IsArrayContainingKeyValuePairTest.php
new file mode 100644
index 00000000..a415f9f7
--- /dev/null
+++ b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Array/IsArrayContainingKeyValuePairTest.php
@@ -0,0 +1,36 @@
+1, 'b'=>2);
+
+ $this->assertMatches(hasKeyValuePair(equalTo('a'), equalTo(1)), $array, 'matcherA');
+ $this->assertMatches(hasKeyValuePair(equalTo('b'), equalTo(2)), $array, 'matcherB');
+ $this->assertMismatchDescription(
+ 'array was ["a" => <1>, "b" => <2>]',
+ hasKeyValuePair(equalTo('c'), equalTo(3)),
+ $array
+ );
+ }
+
+ public function testDoesNotMatchNull()
+ {
+ $this->assertMismatchDescription('was null', hasKeyValuePair(anything(), anything()), null);
+ }
+
+ public function testHasReadableDescription()
+ {
+ $this->assertDescription('array containing ["a" => <2>]', hasKeyValuePair(equalTo('a'), equalTo(2)));
+ }
+}
diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Array/IsArrayContainingTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Array/IsArrayContainingTest.php
new file mode 100644
index 00000000..8d5bd810
--- /dev/null
+++ b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Array/IsArrayContainingTest.php
@@ -0,0 +1,50 @@
+assertMatches(
+ hasItemInArray('a'),
+ array('a', 'b', 'c'),
+ "should matches array that contains 'a'"
+ );
+ }
+
+ public function testDoesNotMatchAnArrayThatDoesntContainAnElementMatchingTheGivenMatcher()
+ {
+ $this->assertDoesNotMatch(
+ hasItemInArray('a'),
+ array('b', 'c'),
+ "should not matches array that doesn't contain 'a'"
+ );
+ $this->assertDoesNotMatch(
+ hasItemInArray('a'),
+ array(),
+ 'should not match empty array'
+ );
+ }
+
+ public function testDoesNotMatchNull()
+ {
+ $this->assertDoesNotMatch(
+ hasItemInArray('a'),
+ null,
+ 'should not match null'
+ );
+ }
+
+ public function testHasAReadableDescription()
+ {
+ $this->assertDescription('an array containing "a"', hasItemInArray('a'));
+ }
+}
diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Array/IsArrayTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Array/IsArrayTest.php
new file mode 100644
index 00000000..e4db53e7
--- /dev/null
+++ b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Array/IsArrayTest.php
@@ -0,0 +1,89 @@
+assertMatches(
+ anArray(array(equalTo('a'), equalTo('b'), equalTo('c'))),
+ array('a', 'b', 'c'),
+ 'should match array with matching elements'
+ );
+ }
+
+ public function testDoesNotMatchAnArrayWhenElementsDoNotMatch()
+ {
+ $this->assertDoesNotMatch(
+ anArray(array(equalTo('a'), equalTo('b'))),
+ array('b', 'c'),
+ 'should not match array with different elements'
+ );
+ }
+
+ public function testDoesNotMatchAnArrayOfDifferentSize()
+ {
+ $this->assertDoesNotMatch(
+ anArray(array(equalTo('a'), equalTo('b'))),
+ array('a', 'b', 'c'),
+ 'should not match larger array'
+ );
+ $this->assertDoesNotMatch(
+ anArray(array(equalTo('a'), equalTo('b'))),
+ array('a'),
+ 'should not match smaller array'
+ );
+ }
+
+ public function testDoesNotMatchNull()
+ {
+ $this->assertDoesNotMatch(
+ anArray(array(equalTo('a'))),
+ null,
+ 'should not match null'
+ );
+ }
+
+ public function testHasAReadableDescription()
+ {
+ $this->assertDescription(
+ '["a", "b"]',
+ anArray(array(equalTo('a'), equalTo('b')))
+ );
+ }
+
+ public function testHasAReadableMismatchDescriptionWhenKeysDontMatch()
+ {
+ $this->assertMismatchDescription(
+ 'array keys were [<1>, <2>]',
+ anArray(array(equalTo('a'), equalTo('b'))),
+ array(1 => 'a', 2 => 'b')
+ );
+ }
+
+ public function testSupportsMatchesAssociativeArrays()
+ {
+ $this->assertMatches(
+ anArray(array('x'=>equalTo('a'), 'y'=>equalTo('b'), 'z'=>equalTo('c'))),
+ array('x'=>'a', 'y'=>'b', 'z'=>'c'),
+ 'should match associative array with matching elements'
+ );
+ }
+
+ public function testDoesNotMatchAnAssociativeArrayWhenKeysDoNotMatch()
+ {
+ $this->assertDoesNotMatch(
+ anArray(array('x'=>equalTo('a'), 'y'=>equalTo('b'))),
+ array('x'=>'b', 'z'=>'c'),
+ 'should not match array with different keys'
+ );
+ }
+}
diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Array/IsArrayWithSizeTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Array/IsArrayWithSizeTest.php
new file mode 100644
index 00000000..8413c896
--- /dev/null
+++ b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Array/IsArrayWithSizeTest.php
@@ -0,0 +1,37 @@
+assertMatches(arrayWithSize(equalTo(3)), array(1, 2, 3), 'correct size');
+ $this->assertDoesNotMatch(arrayWithSize(equalTo(2)), array(1, 2, 3), 'incorrect size');
+ }
+
+ public function testProvidesConvenientShortcutForArrayWithSizeEqualTo()
+ {
+ $this->assertMatches(arrayWithSize(3), array(1, 2, 3), 'correct size');
+ $this->assertDoesNotMatch(arrayWithSize(2), array(1, 2, 3), 'incorrect size');
+ }
+
+ public function testEmptyArray()
+ {
+ $this->assertMatches(emptyArray(), array(), 'correct size');
+ $this->assertDoesNotMatch(emptyArray(), array(1), 'incorrect size');
+ }
+
+ public function testHasAReadableDescription()
+ {
+ $this->assertDescription('an array with size <3>', arrayWithSize(equalTo(3)));
+ $this->assertDescription('an empty array', emptyArray());
+ }
+}
diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/BaseMatcherTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/BaseMatcherTest.php
new file mode 100644
index 00000000..833e2c3e
--- /dev/null
+++ b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/BaseMatcherTest.php
@@ -0,0 +1,23 @@
+appendText('SOME DESCRIPTION');
+ }
+
+ public function testDescribesItselfWithToStringMethod()
+ {
+ $someMatcher = new \Hamcrest\SomeMatcher();
+ $this->assertEquals('SOME DESCRIPTION', (string) $someMatcher);
+ }
+}
diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Collection/IsEmptyTraversableTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Collection/IsEmptyTraversableTest.php
new file mode 100644
index 00000000..2f15fb49
--- /dev/null
+++ b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Collection/IsEmptyTraversableTest.php
@@ -0,0 +1,77 @@
+assertMatches(
+ emptyTraversable(),
+ new \ArrayObject(array()),
+ 'an empty traversable'
+ );
+ }
+
+ public function testEmptyMatcherDoesNotMatchWhenNotEmpty()
+ {
+ $this->assertDoesNotMatch(
+ emptyTraversable(),
+ new \ArrayObject(array(1, 2, 3)),
+ 'a non-empty traversable'
+ );
+ }
+
+ public function testEmptyMatcherDoesNotMatchNull()
+ {
+ $this->assertDoesNotMatch(
+ emptyTraversable(),
+ null,
+ 'should not match null'
+ );
+ }
+
+ public function testEmptyMatcherHasAReadableDescription()
+ {
+ $this->assertDescription('an empty traversable', emptyTraversable());
+ }
+
+ public function testNonEmptyDoesNotMatchNull()
+ {
+ $this->assertDoesNotMatch(
+ nonEmptyTraversable(),
+ null,
+ 'should not match null'
+ );
+ }
+
+ public function testNonEmptyDoesNotMatchWhenEmpty()
+ {
+ $this->assertDoesNotMatch(
+ nonEmptyTraversable(),
+ new \ArrayObject(array()),
+ 'an empty traversable'
+ );
+ }
+
+ public function testNonEmptyMatchesWhenNotEmpty()
+ {
+ $this->assertMatches(
+ nonEmptyTraversable(),
+ new \ArrayObject(array(1, 2, 3)),
+ 'a non-empty traversable'
+ );
+ }
+
+ public function testNonEmptyNonEmptyMatcherHasAReadableDescription()
+ {
+ $this->assertDescription('a non-empty traversable', nonEmptyTraversable());
+ }
+}
diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Collection/IsTraversableWithSizeTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Collection/IsTraversableWithSizeTest.php
new file mode 100644
index 00000000..c1c67a7a
--- /dev/null
+++ b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Collection/IsTraversableWithSizeTest.php
@@ -0,0 +1,57 @@
+assertMatches(
+ traversableWithSize(equalTo(3)),
+ new \ArrayObject(array(1, 2, 3)),
+ 'correct size'
+ );
+ }
+
+ public function testDoesNotMatchWhenSizeIsIncorrect()
+ {
+ $this->assertDoesNotMatch(
+ traversableWithSize(equalTo(2)),
+ new \ArrayObject(array(1, 2, 3)),
+ 'incorrect size'
+ );
+ }
+
+ public function testDoesNotMatchNull()
+ {
+ $this->assertDoesNotMatch(
+ traversableWithSize(3),
+ null,
+ 'should not match null'
+ );
+ }
+
+ public function testProvidesConvenientShortcutForTraversableWithSizeEqualTo()
+ {
+ $this->assertMatches(
+ traversableWithSize(3),
+ new \ArrayObject(array(1, 2, 3)),
+ 'correct size'
+ );
+ }
+
+ public function testHasAReadableDescription()
+ {
+ $this->assertDescription(
+ 'a traversable with size <3>',
+ traversableWithSize(equalTo(3))
+ );
+ }
+}
diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/AllOfTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/AllOfTest.php
new file mode 100644
index 00000000..86b8c277
--- /dev/null
+++ b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/AllOfTest.php
@@ -0,0 +1,56 @@
+assertDescription(
+ '("good" and "bad" and "ugly")',
+ allOf('good', 'bad', 'ugly')
+ );
+ }
+
+ public function testMismatchDescriptionDescribesFirstFailingMatch()
+ {
+ $this->assertMismatchDescription(
+ '"good" was "bad"',
+ allOf('bad', 'good'),
+ 'bad'
+ );
+ }
+}
diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/AnyOfTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/AnyOfTest.php
new file mode 100644
index 00000000..3d62b935
--- /dev/null
+++ b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/AnyOfTest.php
@@ -0,0 +1,79 @@
+assertDescription(
+ '("good" or "bad" or "ugly")',
+ anyOf('good', 'bad', 'ugly')
+ );
+ }
+
+ public function testNoneOfEvaluatesToTheLogicalDisjunctionOfTwoOtherMatchers()
+ {
+ assertThat('good', not(noneOf('bad', 'good')));
+ assertThat('good', not(noneOf('good', 'good')));
+ assertThat('good', not(noneOf('good', 'bad')));
+
+ assertThat('good', noneOf('bad', startsWith('b')));
+ }
+
+ public function testNoneOfEvaluatesToTheLogicalDisjunctionOfManyOtherMatchers()
+ {
+ assertThat('good', not(noneOf('bad', 'good', 'bad', 'bad', 'bad')));
+ assertThat('good', noneOf('bad', 'bad', 'bad', 'bad', 'bad'));
+ }
+
+ public function testNoneOfSupportsMixedTypes()
+ {
+ $combined = noneOf(
+ equalTo(new \Hamcrest\Core\SampleBaseClass('good')),
+ equalTo(new \Hamcrest\Core\SampleBaseClass('ugly')),
+ equalTo(new \Hamcrest\Core\SampleSubClass('good'))
+ );
+
+ assertThat(new \Hamcrest\Core\SampleSubClass('bad'), $combined);
+ }
+
+ public function testNoneOfHasAReadableDescription()
+ {
+ $this->assertDescription(
+ 'not ("good" or "bad" or "ugly")',
+ noneOf('good', 'bad', 'ugly')
+ );
+ }
+}
diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/CombinableMatcherTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/CombinableMatcherTest.php
new file mode 100644
index 00000000..463c7543
--- /dev/null
+++ b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/CombinableMatcherTest.php
@@ -0,0 +1,59 @@
+_either_3_or_4 = \Hamcrest\Core\CombinableMatcher::either(equalTo(3))->orElse(equalTo(4));
+ $this->_not_3_and_not_4 = \Hamcrest\Core\CombinableMatcher::both(not(equalTo(3)))->andAlso(not(equalTo(4)));
+ }
+
+ protected function createMatcher()
+ {
+ return \Hamcrest\Core\CombinableMatcher::either(equalTo('irrelevant'))->orElse(equalTo('ignored'));
+ }
+
+ public function testBothAcceptsAndRejects()
+ {
+ assertThat(2, $this->_not_3_and_not_4);
+ assertThat(3, not($this->_not_3_and_not_4));
+ }
+
+ public function testAcceptsAndRejectsThreeAnds()
+ {
+ $tripleAnd = $this->_not_3_and_not_4->andAlso(equalTo(2));
+ assertThat(2, $tripleAnd);
+ assertThat(3, not($tripleAnd));
+ }
+
+ public function testBothDescribesItself()
+ {
+ $this->assertEquals('(not <3> and not <4>)', (string) $this->_not_3_and_not_4);
+ $this->assertMismatchDescription('was <3>', $this->_not_3_and_not_4, 3);
+ }
+
+ public function testEitherAcceptsAndRejects()
+ {
+ assertThat(3, $this->_either_3_or_4);
+ assertThat(6, not($this->_either_3_or_4));
+ }
+
+ public function testAcceptsAndRejectsThreeOrs()
+ {
+ $orTriple = $this->_either_3_or_4->orElse(greaterThan(10));
+
+ assertThat(11, $orTriple);
+ assertThat(9, not($orTriple));
+ }
+
+ public function testEitherDescribesItself()
+ {
+ $this->assertEquals('(<3> or <4>)', (string) $this->_either_3_or_4);
+ $this->assertMismatchDescription('was <6>', $this->_either_3_or_4, 6);
+ }
+}
diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/DescribedAsTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/DescribedAsTest.php
new file mode 100644
index 00000000..673ab41e
--- /dev/null
+++ b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/DescribedAsTest.php
@@ -0,0 +1,36 @@
+assertDescription('m1 description', $m1);
+ $this->assertDescription('m2 description', $m2);
+ }
+
+ public function testAppendsValuesToDescription()
+ {
+ $m = describedAs('value 1 = %0, value 2 = %1', anything(), 33, 97);
+
+ $this->assertDescription('value 1 = <33>, value 2 = <97>', $m);
+ }
+
+ public function testDelegatesMatchingToAnotherMatcher()
+ {
+ $m1 = describedAs('irrelevant', anything());
+ $m2 = describedAs('irrelevant', not(anything()));
+
+ $this->assertTrue($m1->matches(new \stdClass()));
+ $this->assertFalse($m2->matches('hi'));
+ }
+}
diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/EveryTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/EveryTest.php
new file mode 100644
index 00000000..5eb153c5
--- /dev/null
+++ b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/EveryTest.php
@@ -0,0 +1,30 @@
+assertEquals('every item is a string containing "a"', (string) $each);
+
+ $this->assertMismatchDescription('an item was "BbB"', $each, array('BbB'));
+ }
+}
diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/HasToStringTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/HasToStringTest.php
new file mode 100644
index 00000000..e2e136dc
--- /dev/null
+++ b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/HasToStringTest.php
@@ -0,0 +1,108 @@
+assertMatches(
+ hasToString(equalTo('php')),
+ new \Hamcrest\Core\PhpForm(),
+ 'correct __toString'
+ );
+ $this->assertMatches(
+ hasToString(equalTo('java')),
+ new \Hamcrest\Core\JavaForm(),
+ 'correct toString'
+ );
+ }
+
+ public function testPicksJavaOverPhpToString()
+ {
+ $this->assertMatches(
+ hasToString(equalTo('java')),
+ new \Hamcrest\Core\BothForms(),
+ 'correct toString'
+ );
+ }
+
+ public function testDoesNotMatchWhenToStringDoesNotMatch()
+ {
+ $this->assertDoesNotMatch(
+ hasToString(equalTo('mismatch')),
+ new \Hamcrest\Core\PhpForm(),
+ 'incorrect __toString'
+ );
+ $this->assertDoesNotMatch(
+ hasToString(equalTo('mismatch')),
+ new \Hamcrest\Core\JavaForm(),
+ 'incorrect toString'
+ );
+ $this->assertDoesNotMatch(
+ hasToString(equalTo('mismatch')),
+ new \Hamcrest\Core\BothForms(),
+ 'incorrect __toString'
+ );
+ }
+
+ public function testDoesNotMatchNull()
+ {
+ $this->assertDoesNotMatch(
+ hasToString(equalTo('a')),
+ null,
+ 'should not match null'
+ );
+ }
+
+ public function testProvidesConvenientShortcutForTraversableWithSizeEqualTo()
+ {
+ $this->assertMatches(
+ hasToString(equalTo('php')),
+ new \Hamcrest\Core\PhpForm(),
+ 'correct __toString'
+ );
+ }
+
+ public function testHasAReadableDescription()
+ {
+ $this->assertDescription(
+ 'an object with toString() "php"',
+ hasToString(equalTo('php'))
+ );
+ }
+}
diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/IsAnythingTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/IsAnythingTest.php
new file mode 100644
index 00000000..f68032e5
--- /dev/null
+++ b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/IsAnythingTest.php
@@ -0,0 +1,29 @@
+assertDescription('ANYTHING', anything());
+ }
+
+ public function testCanOverrideDescription()
+ {
+ $description = 'description';
+ $this->assertDescription($description, anything($description));
+ }
+}
diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/IsCollectionContainingTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/IsCollectionContainingTest.php
new file mode 100644
index 00000000..a3929b54
--- /dev/null
+++ b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/IsCollectionContainingTest.php
@@ -0,0 +1,91 @@
+assertMatches(
+ $itemMatcher,
+ array('a', 'b', 'c'),
+ "should match list that contains 'a'"
+ );
+ }
+
+ public function testDoesNotMatchCollectionThatDoesntContainAnElementMatchingTheGivenMatcher()
+ {
+ $matcher1 = hasItem(equalTo('a'));
+ $this->assertDoesNotMatch(
+ $matcher1,
+ array('b', 'c'),
+ "should not match list that doesn't contain 'a'"
+ );
+
+ $matcher2 = hasItem(equalTo('a'));
+ $this->assertDoesNotMatch(
+ $matcher2,
+ array(),
+ 'should not match the empty list'
+ );
+ }
+
+ public function testDoesNotMatchNull()
+ {
+ $this->assertDoesNotMatch(
+ hasItem(equalTo('a')),
+ null,
+ 'should not match null'
+ );
+ }
+
+ public function testHasAReadableDescription()
+ {
+ $this->assertDescription('a collection containing "a"', hasItem(equalTo('a')));
+ }
+
+ public function testMatchesAllItemsInCollection()
+ {
+ $matcher1 = hasItems(equalTo('a'), equalTo('b'), equalTo('c'));
+ $this->assertMatches(
+ $matcher1,
+ array('a', 'b', 'c'),
+ 'should match list containing all items'
+ );
+
+ $matcher2 = hasItems('a', 'b', 'c');
+ $this->assertMatches(
+ $matcher2,
+ array('a', 'b', 'c'),
+ 'should match list containing all items (without matchers)'
+ );
+
+ $matcher3 = hasItems(equalTo('a'), equalTo('b'), equalTo('c'));
+ $this->assertMatches(
+ $matcher3,
+ array('c', 'b', 'a'),
+ 'should match list containing all items in any order'
+ );
+
+ $matcher4 = hasItems(equalTo('a'), equalTo('b'), equalTo('c'));
+ $this->assertMatches(
+ $matcher4,
+ array('e', 'c', 'b', 'a', 'd'),
+ 'should match list containing all items plus others'
+ );
+
+ $matcher5 = hasItems(equalTo('a'), equalTo('b'), equalTo('c'));
+ $this->assertDoesNotMatch(
+ $matcher5,
+ array('e', 'c', 'b', 'd'), // 'a' missing
+ 'should not match list unless it contains all items'
+ );
+ }
+}
diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/IsEqualTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/IsEqualTest.php
new file mode 100644
index 00000000..73e3ff07
--- /dev/null
+++ b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/IsEqualTest.php
@@ -0,0 +1,102 @@
+_arg = $arg;
+ }
+
+ public function __toString()
+ {
+ return $this->_arg;
+ }
+}
+
+class IsEqualTest extends \Hamcrest\AbstractMatcherTest
+{
+
+ protected function createMatcher()
+ {
+ return \Hamcrest\Core\IsEqual::equalTo('irrelevant');
+ }
+
+ public function testComparesObjectsUsingEqualityOperator()
+ {
+ assertThat("hi", equalTo("hi"));
+ assertThat("bye", not(equalTo("hi")));
+
+ assertThat(1, equalTo(1));
+ assertThat(1, not(equalTo(2)));
+
+ assertThat("2", equalTo(2));
+ }
+
+ public function testCanCompareNullValues()
+ {
+ assertThat(null, equalTo(null));
+
+ assertThat(null, not(equalTo('hi')));
+ assertThat('hi', not(equalTo(null)));
+ }
+
+ public function testComparesTheElementsOfAnArray()
+ {
+ $s1 = array('a', 'b');
+ $s2 = array('a', 'b');
+ $s3 = array('c', 'd');
+ $s4 = array('a', 'b', 'c', 'd');
+
+ assertThat($s1, equalTo($s1));
+ assertThat($s2, equalTo($s1));
+ assertThat($s3, not(equalTo($s1)));
+ assertThat($s4, not(equalTo($s1)));
+ }
+
+ public function testComparesTheElementsOfAnArrayOfPrimitiveTypes()
+ {
+ $i1 = array(1, 2);
+ $i2 = array(1, 2);
+ $i3 = array(3, 4);
+ $i4 = array(1, 2, 3, 4);
+
+ assertThat($i1, equalTo($i1));
+ assertThat($i2, equalTo($i1));
+ assertThat($i3, not(equalTo($i1)));
+ assertThat($i4, not(equalTo($i1)));
+ }
+
+ public function testRecursivelyTestsElementsOfArrays()
+ {
+ $i1 = array(array(1, 2), array(3, 4));
+ $i2 = array(array(1, 2), array(3, 4));
+ $i3 = array(array(5, 6), array(7, 8));
+ $i4 = array(array(1, 2, 3, 4), array(3, 4));
+
+ assertThat($i1, equalTo($i1));
+ assertThat($i2, equalTo($i1));
+ assertThat($i3, not(equalTo($i1)));
+ assertThat($i4, not(equalTo($i1)));
+ }
+
+ public function testIncludesTheResultOfCallingToStringOnItsArgumentInTheDescription()
+ {
+ $argumentDescription = 'ARGUMENT DESCRIPTION';
+ $argument = new \Hamcrest\Core\DummyToStringClass($argumentDescription);
+ $this->assertDescription('<' . $argumentDescription . '>', equalTo($argument));
+ }
+
+ public function testReturnsAnObviousDescriptionIfCreatedWithANestedMatcherByMistake()
+ {
+ $innerMatcher = equalTo('NestedMatcher');
+ $this->assertDescription('<' . (string) $innerMatcher . '>', equalTo($innerMatcher));
+ }
+
+ public function testReturnsGoodDescriptionIfCreatedWithNullReference()
+ {
+ $this->assertDescription('null', equalTo(null));
+ }
+}
diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/IsIdenticalTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/IsIdenticalTest.php
new file mode 100644
index 00000000..9cc27946
--- /dev/null
+++ b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/IsIdenticalTest.php
@@ -0,0 +1,30 @@
+assertDescription('"ARG"', identicalTo('ARG'));
+ }
+
+ public function testReturnsReadableDescriptionFromToStringWhenInitialisedWithNull()
+ {
+ $this->assertDescription('null', identicalTo(null));
+ }
+}
diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/IsInstanceOfTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/IsInstanceOfTest.php
new file mode 100644
index 00000000..f74cfdb5
--- /dev/null
+++ b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/IsInstanceOfTest.php
@@ -0,0 +1,51 @@
+_baseClassInstance = new \Hamcrest\Core\SampleBaseClass('good');
+ $this->_subClassInstance = new \Hamcrest\Core\SampleSubClass('good');
+ }
+
+ protected function createMatcher()
+ {
+ return \Hamcrest\Core\IsInstanceOf::anInstanceOf('stdClass');
+ }
+
+ public function testEvaluatesToTrueIfArgumentIsInstanceOfASpecificClass()
+ {
+ assertThat($this->_baseClassInstance, anInstanceOf('Hamcrest\Core\SampleBaseClass'));
+ assertThat($this->_subClassInstance, anInstanceOf('Hamcrest\Core\SampleSubClass'));
+ assertThat(null, not(anInstanceOf('Hamcrest\Core\SampleBaseClass')));
+ assertThat(new \stdClass(), not(anInstanceOf('Hamcrest\Core\SampleBaseClass')));
+ }
+
+ public function testEvaluatesToFalseIfArgumentIsNotAnObject()
+ {
+ assertThat(null, not(anInstanceOf('Hamcrest\Core\SampleBaseClass')));
+ assertThat(false, not(anInstanceOf('Hamcrest\Core\SampleBaseClass')));
+ assertThat(5, not(anInstanceOf('Hamcrest\Core\SampleBaseClass')));
+ assertThat('foo', not(anInstanceOf('Hamcrest\Core\SampleBaseClass')));
+ assertThat(array(1, 2, 3), not(anInstanceOf('Hamcrest\Core\SampleBaseClass')));
+ }
+
+ public function testHasAReadableDescription()
+ {
+ $this->assertDescription('an instance of stdClass', anInstanceOf('stdClass'));
+ }
+
+ public function testDecribesActualClassInMismatchMessage()
+ {
+ $this->assertMismatchDescription(
+ '[Hamcrest\Core\SampleBaseClass] ',
+ anInstanceOf('Hamcrest\Core\SampleSubClass'),
+ $this->_baseClassInstance
+ );
+ }
+}
diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/IsNotTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/IsNotTest.php
new file mode 100644
index 00000000..09d4a652
--- /dev/null
+++ b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/IsNotTest.php
@@ -0,0 +1,31 @@
+assertMatches(not(equalTo('A')), 'B', 'should match');
+ $this->assertDoesNotMatch(not(equalTo('B')), 'B', 'should not match');
+ }
+
+ public function testProvidesConvenientShortcutForNotEqualTo()
+ {
+ $this->assertMatches(not('A'), 'B', 'should match');
+ $this->assertMatches(not('B'), 'A', 'should match');
+ $this->assertDoesNotMatch(not('A'), 'A', 'should not match');
+ $this->assertDoesNotMatch(not('B'), 'B', 'should not match');
+ }
+
+ public function testUsesDescriptionOfNegatedMatcherWithPrefix()
+ {
+ $this->assertDescription('not a value greater than <2>', not(greaterThan(2)));
+ $this->assertDescription('not "A"', not('A'));
+ }
+}
diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/IsNullTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/IsNullTest.php
new file mode 100644
index 00000000..bfa42554
--- /dev/null
+++ b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/IsNullTest.php
@@ -0,0 +1,20 @@
+assertDescription('sameInstance("ARG")', sameInstance('ARG'));
+ }
+
+ public function testReturnsReadableDescriptionFromToStringWhenInitialisedWithNull()
+ {
+ $this->assertDescription('sameInstance(null)', sameInstance(null));
+ }
+}
diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/IsTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/IsTest.php
new file mode 100644
index 00000000..bbd848b9
--- /dev/null
+++ b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/IsTest.php
@@ -0,0 +1,33 @@
+assertMatches(is(equalTo(true)), true, 'should match');
+ $this->assertMatches(is(equalTo(false)), false, 'should match');
+ $this->assertDoesNotMatch(is(equalTo(true)), false, 'should not match');
+ $this->assertDoesNotMatch(is(equalTo(false)), true, 'should not match');
+ }
+
+ public function testGeneratesIsPrefixInDescription()
+ {
+ $this->assertDescription('is ', is(equalTo(true)));
+ }
+
+ public function testProvidesConvenientShortcutForIsEqualTo()
+ {
+ $this->assertMatches(is('A'), 'A', 'should match');
+ $this->assertMatches(is('B'), 'B', 'should match');
+ $this->assertDoesNotMatch(is('A'), 'B', 'should not match');
+ $this->assertDoesNotMatch(is('B'), 'A', 'should not match');
+ $this->assertDescription('is "A"', is('A'));
+ }
+}
diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/IsTypeOfTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/IsTypeOfTest.php
new file mode 100644
index 00000000..3f48dea7
--- /dev/null
+++ b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/IsTypeOfTest.php
@@ -0,0 +1,45 @@
+assertDescription('a double', typeOf('double'));
+ $this->assertDescription('an integer', typeOf('integer'));
+ }
+
+ public function testDecribesActualTypeInMismatchMessage()
+ {
+ $this->assertMismatchDescription('was null', typeOf('boolean'), null);
+ $this->assertMismatchDescription('was an integer <5>', typeOf('float'), 5);
+ }
+}
diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/SampleBaseClass.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/SampleBaseClass.php
new file mode 100644
index 00000000..c953e7cd
--- /dev/null
+++ b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/SampleBaseClass.php
@@ -0,0 +1,18 @@
+_arg = $arg;
+ }
+
+ public function __toString()
+ {
+ return $this->_arg;
+ }
+}
diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/SampleSubClass.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/SampleSubClass.php
new file mode 100644
index 00000000..822f1b64
--- /dev/null
+++ b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/SampleSubClass.php
@@ -0,0 +1,6 @@
+_instanceProperty);
+ }
+
+ protected function createMatcher()
+ {
+ return \Hamcrest\Core\Set::set('property_name');
+ }
+
+ public function testEvaluatesToTrueIfArrayPropertyIsSet()
+ {
+ assertThat(array('foo' => 'bar'), set('foo'));
+ }
+
+ public function testNegatedEvaluatesToFalseIfArrayPropertyIsSet()
+ {
+ assertThat(array('foo' => 'bar'), not(notSet('foo')));
+ }
+
+ public function testEvaluatesToTrueIfClassPropertyIsSet()
+ {
+ self::$_classProperty = 'bar';
+ assertThat('Hamcrest\Core\SetTest', set('_classProperty'));
+ }
+
+ public function testNegatedEvaluatesToFalseIfClassPropertyIsSet()
+ {
+ self::$_classProperty = 'bar';
+ assertThat('Hamcrest\Core\SetTest', not(notSet('_classProperty')));
+ }
+
+ public function testEvaluatesToTrueIfObjectPropertyIsSet()
+ {
+ $this->_instanceProperty = 'bar';
+ assertThat($this, set('_instanceProperty'));
+ }
+
+ public function testNegatedEvaluatesToFalseIfObjectPropertyIsSet()
+ {
+ $this->_instanceProperty = 'bar';
+ assertThat($this, not(notSet('_instanceProperty')));
+ }
+
+ public function testEvaluatesToFalseIfArrayPropertyIsNotSet()
+ {
+ assertThat(array('foo' => 'bar'), not(set('baz')));
+ }
+
+ public function testNegatedEvaluatesToTrueIfArrayPropertyIsNotSet()
+ {
+ assertThat(array('foo' => 'bar'), notSet('baz'));
+ }
+
+ public function testEvaluatesToFalseIfClassPropertyIsNotSet()
+ {
+ assertThat('Hamcrest\Core\SetTest', not(set('_classProperty')));
+ }
+
+ public function testNegatedEvaluatesToTrueIfClassPropertyIsNotSet()
+ {
+ assertThat('Hamcrest\Core\SetTest', notSet('_classProperty'));
+ }
+
+ public function testEvaluatesToFalseIfObjectPropertyIsNotSet()
+ {
+ assertThat($this, not(set('_instanceProperty')));
+ }
+
+ public function testNegatedEvaluatesToTrueIfObjectPropertyIsNotSet()
+ {
+ assertThat($this, notSet('_instanceProperty'));
+ }
+
+ public function testHasAReadableDescription()
+ {
+ $this->assertDescription('set property foo', set('foo'));
+ $this->assertDescription('unset property bar', notSet('bar'));
+ }
+
+ public function testDecribesPropertySettingInMismatchMessage()
+ {
+ $this->assertMismatchDescription(
+ 'was not set',
+ set('bar'),
+ array('foo' => 'bar')
+ );
+ $this->assertMismatchDescription(
+ 'was "bar"',
+ notSet('foo'),
+ array('foo' => 'bar')
+ );
+ self::$_classProperty = 'bar';
+ $this->assertMismatchDescription(
+ 'was "bar"',
+ notSet('_classProperty'),
+ 'Hamcrest\Core\SetTest'
+ );
+ $this->_instanceProperty = 'bar';
+ $this->assertMismatchDescription(
+ 'was "bar"',
+ notSet('_instanceProperty'),
+ $this
+ );
+ }
+}
diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/FeatureMatcherTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/FeatureMatcherTest.php
new file mode 100644
index 00000000..1b023049
--- /dev/null
+++ b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/FeatureMatcherTest.php
@@ -0,0 +1,73 @@
+_result = $result;
+ }
+ public function getResult()
+ {
+ return $this->_result;
+ }
+}
+
+/* Test-specific subclass only */
+class ResultMatcher extends \Hamcrest\FeatureMatcher
+{
+ public function __construct()
+ {
+ parent::__construct(self::TYPE_ANY, null, equalTo('bar'), 'Thingy with result', 'result');
+ }
+ public function featureValueOf($actual)
+ {
+ if ($actual instanceof \Hamcrest\Thingy) {
+ return $actual->getResult();
+ }
+ }
+}
+
+class FeatureMatcherTest extends \Hamcrest\AbstractMatcherTest
+{
+
+ private $_resultMatcher;
+
+ protected function setUp()
+ {
+ $this->_resultMatcher = $this->_resultMatcher();
+ }
+
+ protected function createMatcher()
+ {
+ return $this->_resultMatcher();
+ }
+
+ public function testMatchesPartOfAnObject()
+ {
+ $this->assertMatches($this->_resultMatcher, new \Hamcrest\Thingy('bar'), 'feature');
+ $this->assertDescription('Thingy with result "bar"', $this->_resultMatcher);
+ }
+
+ public function testMismatchesPartOfAnObject()
+ {
+ $this->assertMismatchDescription(
+ 'result was "foo"',
+ $this->_resultMatcher,
+ new \Hamcrest\Thingy('foo')
+ );
+ }
+
+ public function testDoesNotGenerateNoticesForNull()
+ {
+ $this->assertMismatchDescription('result was null', $this->_resultMatcher, null);
+ }
+
+ // -- Creation Methods
+
+ private function _resultMatcher()
+ {
+ return new \Hamcrest\ResultMatcher();
+ }
+}
diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/InvokedMatcherTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/InvokedMatcherTest.php
new file mode 100644
index 00000000..dfa77006
--- /dev/null
+++ b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/InvokedMatcherTest.php
@@ -0,0 +1,31 @@
+matchAgainst = $matchAgainst;
+ }
+
+ public function matches($item)
+ {
+ return $item == $this->matchAgainst;
+ }
+
+}
+
+class InvokedMatcherTest extends TestCase
+{
+ public function testInvokedMatchersCallMatches()
+ {
+ $sampleMatcher = new SampleInvokeMatcher('foo');
+
+ $this->assertTrue($sampleMatcher('foo'));
+ $this->assertFalse($sampleMatcher('bar'));
+ }
+}
diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/MatcherAssertTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/MatcherAssertTest.php
new file mode 100644
index 00000000..dc12fba5
--- /dev/null
+++ b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/MatcherAssertTest.php
@@ -0,0 +1,192 @@
+getMessage());
+ }
+ try {
+ \Hamcrest\MatcherAssert::assertThat(null);
+ self::fail('expected assertion failure');
+ } catch (\Hamcrest\AssertionError $ex) {
+ self::assertEquals('', $ex->getMessage());
+ }
+ try {
+ \Hamcrest\MatcherAssert::assertThat('');
+ self::fail('expected assertion failure');
+ } catch (\Hamcrest\AssertionError $ex) {
+ self::assertEquals('', $ex->getMessage());
+ }
+ try {
+ \Hamcrest\MatcherAssert::assertThat(0);
+ self::fail('expected assertion failure');
+ } catch (\Hamcrest\AssertionError $ex) {
+ self::assertEquals('', $ex->getMessage());
+ }
+ try {
+ \Hamcrest\MatcherAssert::assertThat(0.0);
+ self::fail('expected assertion failure');
+ } catch (\Hamcrest\AssertionError $ex) {
+ self::assertEquals('', $ex->getMessage());
+ }
+ try {
+ \Hamcrest\MatcherAssert::assertThat(array());
+ self::fail('expected assertion failure');
+ } catch (\Hamcrest\AssertionError $ex) {
+ self::assertEquals('', $ex->getMessage());
+ }
+ self::assertEquals(6, \Hamcrest\MatcherAssert::getCount(), 'assertion count');
+ }
+
+ public function testAssertThatWithIdentifierAndTrueArgPasses()
+ {
+ \Hamcrest\MatcherAssert::assertThat('identifier', true);
+ \Hamcrest\MatcherAssert::assertThat('identifier', 'non-empty');
+ \Hamcrest\MatcherAssert::assertThat('identifier', 1);
+ \Hamcrest\MatcherAssert::assertThat('identifier', 3.14159);
+ \Hamcrest\MatcherAssert::assertThat('identifier', array(true));
+ self::assertEquals(5, \Hamcrest\MatcherAssert::getCount(), 'assertion count');
+ }
+
+ public function testAssertThatWithIdentifierAndFalseArgFails()
+ {
+ try {
+ \Hamcrest\MatcherAssert::assertThat('identifier', false);
+ self::fail('expected assertion failure');
+ } catch (\Hamcrest\AssertionError $ex) {
+ self::assertEquals('identifier', $ex->getMessage());
+ }
+ try {
+ \Hamcrest\MatcherAssert::assertThat('identifier', null);
+ self::fail('expected assertion failure');
+ } catch (\Hamcrest\AssertionError $ex) {
+ self::assertEquals('identifier', $ex->getMessage());
+ }
+ try {
+ \Hamcrest\MatcherAssert::assertThat('identifier', '');
+ self::fail('expected assertion failure');
+ } catch (\Hamcrest\AssertionError $ex) {
+ self::assertEquals('identifier', $ex->getMessage());
+ }
+ try {
+ \Hamcrest\MatcherAssert::assertThat('identifier', 0);
+ self::fail('expected assertion failure');
+ } catch (\Hamcrest\AssertionError $ex) {
+ self::assertEquals('identifier', $ex->getMessage());
+ }
+ try {
+ \Hamcrest\MatcherAssert::assertThat('identifier', 0.0);
+ self::fail('expected assertion failure');
+ } catch (\Hamcrest\AssertionError $ex) {
+ self::assertEquals('identifier', $ex->getMessage());
+ }
+ try {
+ \Hamcrest\MatcherAssert::assertThat('identifier', array());
+ self::fail('expected assertion failure');
+ } catch (\Hamcrest\AssertionError $ex) {
+ self::assertEquals('identifier', $ex->getMessage());
+ }
+ self::assertEquals(6, \Hamcrest\MatcherAssert::getCount(), 'assertion count');
+ }
+
+ public function testAssertThatWithActualValueAndMatcherArgsThatMatchPasses()
+ {
+ \Hamcrest\MatcherAssert::assertThat(true, is(true));
+ self::assertEquals(1, \Hamcrest\MatcherAssert::getCount(), 'assertion count');
+ }
+
+ public function testAssertThatWithActualValueAndMatcherArgsThatDontMatchFails()
+ {
+ $expected = 'expected';
+ $actual = 'actual';
+
+ $expectedMessage =
+ 'Expected: "expected"' . PHP_EOL .
+ ' but: was "actual"';
+
+ try {
+ \Hamcrest\MatcherAssert::assertThat($actual, equalTo($expected));
+ self::fail('expected assertion failure');
+ } catch (\Hamcrest\AssertionError $ex) {
+ self::assertEquals($expectedMessage, $ex->getMessage());
+ self::assertEquals(1, \Hamcrest\MatcherAssert::getCount(), 'assertion count');
+ }
+ }
+
+ public function testAssertThatWithIdentifierAndActualValueAndMatcherArgsThatMatchPasses()
+ {
+ \Hamcrest\MatcherAssert::assertThat('identifier', true, is(true));
+ self::assertEquals(1, \Hamcrest\MatcherAssert::getCount(), 'assertion count');
+ }
+
+ public function testAssertThatWithIdentifierAndActualValueAndMatcherArgsThatDontMatchFails()
+ {
+ $expected = 'expected';
+ $actual = 'actual';
+
+ $expectedMessage =
+ 'identifier' . PHP_EOL .
+ 'Expected: "expected"' . PHP_EOL .
+ ' but: was "actual"';
+
+ try {
+ \Hamcrest\MatcherAssert::assertThat('identifier', $actual, equalTo($expected));
+ self::fail('expected assertion failure');
+ } catch (\Hamcrest\AssertionError $ex) {
+ self::assertEquals($expectedMessage, $ex->getMessage());
+ self::assertEquals(1, \Hamcrest\MatcherAssert::getCount(), 'assertion count');
+ }
+ }
+
+ public function testAssertThatWithNoArgsThrowsErrorAndDoesntIncrementCount()
+ {
+ try {
+ \Hamcrest\MatcherAssert::assertThat();
+ self::fail('expected invalid argument exception');
+ } catch (\InvalidArgumentException $ex) {
+ self::assertEquals(0, \Hamcrest\MatcherAssert::getCount(), 'assertion count');
+ }
+ }
+
+ public function testAssertThatWithFourArgsThrowsErrorAndDoesntIncrementCount()
+ {
+ try {
+ \Hamcrest\MatcherAssert::assertThat(1, 2, 3, 4);
+ self::fail('expected invalid argument exception');
+ } catch (\InvalidArgumentException $ex) {
+ self::assertEquals(0, \Hamcrest\MatcherAssert::getCount(), 'assertion count');
+ }
+ }
+}
diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Number/IsCloseToTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Number/IsCloseToTest.php
new file mode 100644
index 00000000..987d5526
--- /dev/null
+++ b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Number/IsCloseToTest.php
@@ -0,0 +1,27 @@
+assertTrue($p->matches(1.0));
+ $this->assertTrue($p->matches(0.5));
+ $this->assertTrue($p->matches(1.5));
+
+ $this->assertDoesNotMatch($p, 2.0, 'too large');
+ $this->assertMismatchDescription('<2F> differed by <0.5F>', $p, 2.0);
+ $this->assertDoesNotMatch($p, 0.0, 'number too small');
+ $this->assertMismatchDescription('<0F> differed by <0.5F>', $p, 0.0);
+ }
+}
diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Number/OrderingComparisonTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Number/OrderingComparisonTest.php
new file mode 100644
index 00000000..a4c94d37
--- /dev/null
+++ b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Number/OrderingComparisonTest.php
@@ -0,0 +1,41 @@
+_text = $text;
+ }
+
+ public function describeTo(\Hamcrest\Description $description)
+ {
+ $description->appendText($this->_text);
+ }
+}
+
+class StringDescriptionTest extends TestCase
+{
+
+ private $_description;
+
+ protected function setUp()
+ {
+ $this->_description = new \Hamcrest\StringDescription();
+ }
+
+ public function testAppendTextAppendsTextInformation()
+ {
+ $this->_description->appendText('foo')->appendText('bar');
+ $this->assertEquals('foobar', (string) $this->_description);
+ }
+
+ public function testAppendValueCanAppendTextTypes()
+ {
+ $this->_description->appendValue('foo');
+ $this->assertEquals('"foo"', (string) $this->_description);
+ }
+
+ public function testSpecialCharactersAreEscapedForStringTypes()
+ {
+ $this->_description->appendValue("foo\\bar\"zip\r\n");
+ $this->assertEquals('"foo\\bar\\"zip\r\n"', (string) $this->_description);
+ }
+
+ public function testIntegerValuesCanBeAppended()
+ {
+ $this->_description->appendValue(42);
+ $this->assertEquals('<42>', (string) $this->_description);
+ }
+
+ public function testFloatValuesCanBeAppended()
+ {
+ $this->_description->appendValue(42.78);
+ $this->assertEquals('<42.78F>', (string) $this->_description);
+ }
+
+ public function testNullValuesCanBeAppended()
+ {
+ $this->_description->appendValue(null);
+ $this->assertEquals('null', (string) $this->_description);
+ }
+
+ public function testArraysCanBeAppended()
+ {
+ $this->_description->appendValue(array('foo', 42.78));
+ $this->assertEquals('["foo", <42.78F>]', (string) $this->_description);
+ }
+
+ public function testObjectsCanBeAppended()
+ {
+ $this->_description->appendValue(new \stdClass());
+ $this->assertEquals('', (string) $this->_description);
+ }
+
+ public function testBooleanValuesCanBeAppended()
+ {
+ $this->_description->appendValue(false);
+ $this->assertEquals('', (string) $this->_description);
+ }
+
+ public function testListsOfvaluesCanBeAppended()
+ {
+ $this->_description->appendValue(array('foo', 42.78));
+ $this->assertEquals('["foo", <42.78F>]', (string) $this->_description);
+ }
+
+ public function testIterableOfvaluesCanBeAppended()
+ {
+ $items = new \ArrayObject(array('foo', 42.78));
+ $this->_description->appendValue($items);
+ $this->assertEquals('["foo", <42.78F>]', (string) $this->_description);
+ }
+
+ public function testIteratorOfvaluesCanBeAppended()
+ {
+ $items = new \ArrayObject(array('foo', 42.78));
+ $this->_description->appendValue($items->getIterator());
+ $this->assertEquals('["foo", <42.78F>]', (string) $this->_description);
+ }
+
+ public function testListsOfvaluesCanBeAppendedManually()
+ {
+ $this->_description->appendValueList('@start@', '@sep@ ', '@end@', array('foo', 42.78));
+ $this->assertEquals('@start@"foo"@sep@ <42.78F>@end@', (string) $this->_description);
+ }
+
+ public function testIterableOfvaluesCanBeAppendedManually()
+ {
+ $items = new \ArrayObject(array('foo', 42.78));
+ $this->_description->appendValueList('@start@', '@sep@ ', '@end@', $items);
+ $this->assertEquals('@start@"foo"@sep@ <42.78F>@end@', (string) $this->_description);
+ }
+
+ public function testIteratorOfvaluesCanBeAppendedManually()
+ {
+ $items = new \ArrayObject(array('foo', 42.78));
+ $this->_description->appendValueList('@start@', '@sep@ ', '@end@', $items->getIterator());
+ $this->assertEquals('@start@"foo"@sep@ <42.78F>@end@', (string) $this->_description);
+ }
+
+ public function testSelfDescribingObjectsCanBeAppended()
+ {
+ $this->_description
+ ->appendDescriptionOf(new \Hamcrest\SampleSelfDescriber('foo'))
+ ->appendDescriptionOf(new \Hamcrest\SampleSelfDescriber('bar'))
+ ;
+ $this->assertEquals('foobar', (string) $this->_description);
+ }
+
+ public function testSelfDescribingObjectsCanBeAppendedAsLists()
+ {
+ $this->_description->appendList('@start@', '@sep@ ', '@end@', array(
+ new \Hamcrest\SampleSelfDescriber('foo'),
+ new \Hamcrest\SampleSelfDescriber('bar')
+ ));
+ $this->assertEquals('@start@foo@sep@ bar@end@', (string) $this->_description);
+ }
+
+ public function testSelfDescribingObjectsCanBeAppendedAsIteratedLists()
+ {
+ $items = new \ArrayObject(array(
+ new \Hamcrest\SampleSelfDescriber('foo'),
+ new \Hamcrest\SampleSelfDescriber('bar')
+ ));
+ $this->_description->appendList('@start@', '@sep@ ', '@end@', $items);
+ $this->assertEquals('@start@foo@sep@ bar@end@', (string) $this->_description);
+ }
+
+ public function testSelfDescribingObjectsCanBeAppendedAsIterators()
+ {
+ $items = new \ArrayObject(array(
+ new \Hamcrest\SampleSelfDescriber('foo'),
+ new \Hamcrest\SampleSelfDescriber('bar')
+ ));
+ $this->_description->appendList('@start@', '@sep@ ', '@end@', $items->getIterator());
+ $this->assertEquals('@start@foo@sep@ bar@end@', (string) $this->_description);
+ }
+}
diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Text/IsEmptyStringTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Text/IsEmptyStringTest.php
new file mode 100644
index 00000000..8d5c56be
--- /dev/null
+++ b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Text/IsEmptyStringTest.php
@@ -0,0 +1,86 @@
+assertDoesNotMatch(emptyString(), null, 'null');
+ }
+
+ public function testEmptyDoesNotMatchZero()
+ {
+ $this->assertDoesNotMatch(emptyString(), 0, 'zero');
+ }
+
+ public function testEmptyDoesNotMatchFalse()
+ {
+ $this->assertDoesNotMatch(emptyString(), false, 'false');
+ }
+
+ public function testEmptyDoesNotMatchEmptyArray()
+ {
+ $this->assertDoesNotMatch(emptyString(), array(), 'empty array');
+ }
+
+ public function testEmptyMatchesEmptyString()
+ {
+ $this->assertMatches(emptyString(), '', 'empty string');
+ }
+
+ public function testEmptyDoesNotMatchNonEmptyString()
+ {
+ $this->assertDoesNotMatch(emptyString(), 'foo', 'non-empty string');
+ }
+
+ public function testEmptyHasAReadableDescription()
+ {
+ $this->assertDescription('an empty string', emptyString());
+ }
+
+ public function testEmptyOrNullMatchesNull()
+ {
+ $this->assertMatches(nullOrEmptyString(), null, 'null');
+ }
+
+ public function testEmptyOrNullMatchesEmptyString()
+ {
+ $this->assertMatches(nullOrEmptyString(), '', 'empty string');
+ }
+
+ public function testEmptyOrNullDoesNotMatchNonEmptyString()
+ {
+ $this->assertDoesNotMatch(nullOrEmptyString(), 'foo', 'non-empty string');
+ }
+
+ public function testEmptyOrNullHasAReadableDescription()
+ {
+ $this->assertDescription('(null or an empty string)', nullOrEmptyString());
+ }
+
+ public function testNonEmptyDoesNotMatchNull()
+ {
+ $this->assertDoesNotMatch(nonEmptyString(), null, 'null');
+ }
+
+ public function testNonEmptyDoesNotMatchEmptyString()
+ {
+ $this->assertDoesNotMatch(nonEmptyString(), '', 'empty string');
+ }
+
+ public function testNonEmptyMatchesNonEmptyString()
+ {
+ $this->assertMatches(nonEmptyString(), 'foo', 'non-empty string');
+ }
+
+ public function testNonEmptyHasAReadableDescription()
+ {
+ $this->assertDescription('a non-empty string', nonEmptyString());
+ }
+}
diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Text/IsEqualIgnoringCaseTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Text/IsEqualIgnoringCaseTest.php
new file mode 100644
index 00000000..0539fd5c
--- /dev/null
+++ b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Text/IsEqualIgnoringCaseTest.php
@@ -0,0 +1,40 @@
+assertDescription(
+ 'equalToIgnoringCase("heLLo")',
+ equalToIgnoringCase('heLLo')
+ );
+ }
+}
diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Text/IsEqualIgnoringWhiteSpaceTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Text/IsEqualIgnoringWhiteSpaceTest.php
new file mode 100644
index 00000000..27ad338b
--- /dev/null
+++ b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Text/IsEqualIgnoringWhiteSpaceTest.php
@@ -0,0 +1,51 @@
+_matcher = \Hamcrest\Text\IsEqualIgnoringWhiteSpace::equalToIgnoringWhiteSpace(
+ "Hello World how\n are we? "
+ );
+ }
+
+ protected function createMatcher()
+ {
+ return $this->_matcher;
+ }
+
+ public function testPassesIfWordsAreSameButWhitespaceDiffers()
+ {
+ assertThat('Hello World how are we?', $this->_matcher);
+ assertThat(" Hello \rWorld \t how are\nwe?", $this->_matcher);
+ }
+
+ public function testFailsIfTextOtherThanWhitespaceDiffers()
+ {
+ assertThat('Hello PLANET how are we?', not($this->_matcher));
+ assertThat('Hello World how are we', not($this->_matcher));
+ }
+
+ public function testFailsIfWhitespaceIsAddedOrRemovedInMidWord()
+ {
+ assertThat('HelloWorld how are we?', not($this->_matcher));
+ assertThat('Hello Wo rld how are we?', not($this->_matcher));
+ }
+
+ public function testFailsIfMatchingAgainstNull()
+ {
+ assertThat(null, not($this->_matcher));
+ }
+
+ public function testHasAReadableDescription()
+ {
+ $this->assertDescription(
+ "equalToIgnoringWhiteSpace(\"Hello World how\\n are we? \")",
+ $this->_matcher
+ );
+ }
+}
diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Text/MatchesPatternTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Text/MatchesPatternTest.php
new file mode 100644
index 00000000..4891598f
--- /dev/null
+++ b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Text/MatchesPatternTest.php
@@ -0,0 +1,30 @@
+assertDescription('a string matching "pattern"', matchesPattern('pattern'));
+ }
+}
diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Text/StringContainsIgnoringCaseTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Text/StringContainsIgnoringCaseTest.php
new file mode 100644
index 00000000..73023007
--- /dev/null
+++ b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Text/StringContainsIgnoringCaseTest.php
@@ -0,0 +1,80 @@
+_stringContains = \Hamcrest\Text\StringContainsIgnoringCase::containsStringIgnoringCase(
+ strtolower(self::EXCERPT)
+ );
+ }
+
+ protected function createMatcher()
+ {
+ return $this->_stringContains;
+ }
+
+ public function testEvaluatesToTrueIfArgumentContainsSpecifiedSubstring()
+ {
+ $this->assertTrue(
+ $this->_stringContains->matches(self::EXCERPT . 'END'),
+ 'should be true if excerpt at beginning'
+ );
+ $this->assertTrue(
+ $this->_stringContains->matches('START' . self::EXCERPT),
+ 'should be true if excerpt at end'
+ );
+ $this->assertTrue(
+ $this->_stringContains->matches('START' . self::EXCERPT . 'END'),
+ 'should be true if excerpt in middle'
+ );
+ $this->assertTrue(
+ $this->_stringContains->matches(self::EXCERPT . self::EXCERPT),
+ 'should be true if excerpt is repeated'
+ );
+
+ $this->assertFalse(
+ $this->_stringContains->matches('Something else'),
+ 'should not be true if excerpt is not in string'
+ );
+ $this->assertFalse(
+ $this->_stringContains->matches(substr(self::EXCERPT, 1)),
+ 'should not be true if part of excerpt is in string'
+ );
+ }
+
+ public function testEvaluatesToTrueIfArgumentIsEqualToSubstring()
+ {
+ $this->assertTrue(
+ $this->_stringContains->matches(self::EXCERPT),
+ 'should be true if excerpt is entire string'
+ );
+ }
+
+ public function testEvaluatesToTrueIfArgumentContainsExactSubstring()
+ {
+ $this->assertTrue(
+ $this->_stringContains->matches(strtolower(self::EXCERPT)),
+ 'should be false if excerpt is entire string ignoring case'
+ );
+ $this->assertTrue(
+ $this->_stringContains->matches('START' . strtolower(self::EXCERPT) . 'END'),
+ 'should be false if excerpt is contained in string ignoring case'
+ );
+ }
+
+ public function testHasAReadableDescription()
+ {
+ $this->assertDescription(
+ 'a string containing in any case "'
+ . strtolower(self::EXCERPT) . '"',
+ $this->_stringContains
+ );
+ }
+}
diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Text/StringContainsInOrderTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Text/StringContainsInOrderTest.php
new file mode 100644
index 00000000..4c465b29
--- /dev/null
+++ b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Text/StringContainsInOrderTest.php
@@ -0,0 +1,42 @@
+_m = \Hamcrest\Text\StringContainsInOrder::stringContainsInOrder(array('a', 'b', 'c'));
+ }
+
+ protected function createMatcher()
+ {
+ return $this->_m;
+ }
+
+ public function testMatchesOnlyIfStringContainsGivenSubstringsInTheSameOrder()
+ {
+ $this->assertMatches($this->_m, 'abc', 'substrings in order');
+ $this->assertMatches($this->_m, '1a2b3c4', 'substrings separated');
+
+ $this->assertDoesNotMatch($this->_m, 'cab', 'substrings out of order');
+ $this->assertDoesNotMatch($this->_m, 'xyz', 'no substrings in string');
+ $this->assertDoesNotMatch($this->_m, 'ac', 'substring missing');
+ $this->assertDoesNotMatch($this->_m, '', 'empty string');
+ }
+
+ public function testAcceptsVariableArguments()
+ {
+ $this->assertMatches(stringContainsInOrder('a', 'b', 'c'), 'abc', 'substrings as variable arguments');
+ }
+
+ public function testHasAReadableDescription()
+ {
+ $this->assertDescription(
+ 'a string containing "a", "b", "c" in order',
+ $this->_m
+ );
+ }
+}
diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Text/StringContainsTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Text/StringContainsTest.php
new file mode 100644
index 00000000..bf4afa3c
--- /dev/null
+++ b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Text/StringContainsTest.php
@@ -0,0 +1,86 @@
+_stringContains = \Hamcrest\Text\StringContains::containsString(self::EXCERPT);
+ }
+
+ protected function createMatcher()
+ {
+ return $this->_stringContains;
+ }
+
+ public function testEvaluatesToTrueIfArgumentContainsSubstring()
+ {
+ $this->assertTrue(
+ $this->_stringContains->matches(self::EXCERPT . 'END'),
+ 'should be true if excerpt at beginning'
+ );
+ $this->assertTrue(
+ $this->_stringContains->matches('START' . self::EXCERPT),
+ 'should be true if excerpt at end'
+ );
+ $this->assertTrue(
+ $this->_stringContains->matches('START' . self::EXCERPT . 'END'),
+ 'should be true if excerpt in middle'
+ );
+ $this->assertTrue(
+ $this->_stringContains->matches(self::EXCERPT . self::EXCERPT),
+ 'should be true if excerpt is repeated'
+ );
+
+ $this->assertFalse(
+ $this->_stringContains->matches('Something else'),
+ 'should not be true if excerpt is not in string'
+ );
+ $this->assertFalse(
+ $this->_stringContains->matches(substr(self::EXCERPT, 1)),
+ 'should not be true if part of excerpt is in string'
+ );
+ }
+
+ public function testEvaluatesToTrueIfArgumentIsEqualToSubstring()
+ {
+ $this->assertTrue(
+ $this->_stringContains->matches(self::EXCERPT),
+ 'should be true if excerpt is entire string'
+ );
+ }
+
+ public function testEvaluatesToFalseIfArgumentContainsSubstringIgnoringCase()
+ {
+ $this->assertFalse(
+ $this->_stringContains->matches(strtolower(self::EXCERPT)),
+ 'should be false if excerpt is entire string ignoring case'
+ );
+ $this->assertFalse(
+ $this->_stringContains->matches('START' . strtolower(self::EXCERPT) . 'END'),
+ 'should be false if excerpt is contained in string ignoring case'
+ );
+ }
+
+ public function testIgnoringCaseReturnsCorrectMatcher()
+ {
+ $this->assertTrue(
+ $this->_stringContains->ignoringCase()->matches('EXceRpT'),
+ 'should be true if excerpt is entire string ignoring case'
+ );
+ }
+
+ public function testHasAReadableDescription()
+ {
+ $this->assertDescription(
+ 'a string containing "'
+ . self::EXCERPT . '"',
+ $this->_stringContains
+ );
+ }
+}
diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Text/StringEndsWithTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Text/StringEndsWithTest.php
new file mode 100644
index 00000000..9a30f952
--- /dev/null
+++ b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Text/StringEndsWithTest.php
@@ -0,0 +1,62 @@
+_stringEndsWith = \Hamcrest\Text\StringEndsWith::endsWith(self::EXCERPT);
+ }
+
+ protected function createMatcher()
+ {
+ return $this->_stringEndsWith;
+ }
+
+ public function testEvaluatesToTrueIfArgumentContainsSpecifiedSubstring()
+ {
+ $this->assertFalse(
+ $this->_stringEndsWith->matches(self::EXCERPT . 'END'),
+ 'should be false if excerpt at beginning'
+ );
+ $this->assertTrue(
+ $this->_stringEndsWith->matches('START' . self::EXCERPT),
+ 'should be true if excerpt at end'
+ );
+ $this->assertFalse(
+ $this->_stringEndsWith->matches('START' . self::EXCERPT . 'END'),
+ 'should be false if excerpt in middle'
+ );
+ $this->assertTrue(
+ $this->_stringEndsWith->matches(self::EXCERPT . self::EXCERPT),
+ 'should be true if excerpt is at end and repeated'
+ );
+
+ $this->assertFalse(
+ $this->_stringEndsWith->matches('Something else'),
+ 'should be false if excerpt is not in string'
+ );
+ $this->assertFalse(
+ $this->_stringEndsWith->matches(substr(self::EXCERPT, 0, strlen(self::EXCERPT) - 2)),
+ 'should be false if part of excerpt is at end of string'
+ );
+ }
+
+ public function testEvaluatesToTrueIfArgumentIsEqualToSubstring()
+ {
+ $this->assertTrue(
+ $this->_stringEndsWith->matches(self::EXCERPT),
+ 'should be true if excerpt is entire string'
+ );
+ }
+
+ public function testHasAReadableDescription()
+ {
+ $this->assertDescription('a string ending with "EXCERPT"', $this->_stringEndsWith);
+ }
+}
diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Text/StringStartsWithTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Text/StringStartsWithTest.php
new file mode 100644
index 00000000..3be201f1
--- /dev/null
+++ b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Text/StringStartsWithTest.php
@@ -0,0 +1,62 @@
+_stringStartsWith = \Hamcrest\Text\StringStartsWith::startsWith(self::EXCERPT);
+ }
+
+ protected function createMatcher()
+ {
+ return $this->_stringStartsWith;
+ }
+
+ public function testEvaluatesToTrueIfArgumentContainsSpecifiedSubstring()
+ {
+ $this->assertTrue(
+ $this->_stringStartsWith->matches(self::EXCERPT . 'END'),
+ 'should be true if excerpt at beginning'
+ );
+ $this->assertFalse(
+ $this->_stringStartsWith->matches('START' . self::EXCERPT),
+ 'should be false if excerpt at end'
+ );
+ $this->assertFalse(
+ $this->_stringStartsWith->matches('START' . self::EXCERPT . 'END'),
+ 'should be false if excerpt in middle'
+ );
+ $this->assertTrue(
+ $this->_stringStartsWith->matches(self::EXCERPT . self::EXCERPT),
+ 'should be true if excerpt is at beginning and repeated'
+ );
+
+ $this->assertFalse(
+ $this->_stringStartsWith->matches('Something else'),
+ 'should be false if excerpt is not in string'
+ );
+ $this->assertFalse(
+ $this->_stringStartsWith->matches(substr(self::EXCERPT, 1)),
+ 'should be false if part of excerpt is at start of string'
+ );
+ }
+
+ public function testEvaluatesToTrueIfArgumentIsEqualToSubstring()
+ {
+ $this->assertTrue(
+ $this->_stringStartsWith->matches(self::EXCERPT),
+ 'should be true if excerpt is entire string'
+ );
+ }
+
+ public function testHasAReadableDescription()
+ {
+ $this->assertDescription('a string starting with "EXCERPT"', $this->_stringStartsWith);
+ }
+}
diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Type/IsArrayTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Type/IsArrayTest.php
new file mode 100644
index 00000000..d13c24d2
--- /dev/null
+++ b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Type/IsArrayTest.php
@@ -0,0 +1,35 @@
+assertDescription('an array', arrayValue());
+ }
+
+ public function testDecribesActualTypeInMismatchMessage()
+ {
+ $this->assertMismatchDescription('was null', arrayValue(), null);
+ $this->assertMismatchDescription('was a string "foo"', arrayValue(), 'foo');
+ }
+}
diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Type/IsBooleanTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Type/IsBooleanTest.php
new file mode 100644
index 00000000..24309fc0
--- /dev/null
+++ b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Type/IsBooleanTest.php
@@ -0,0 +1,35 @@
+assertDescription('a boolean', booleanValue());
+ }
+
+ public function testDecribesActualTypeInMismatchMessage()
+ {
+ $this->assertMismatchDescription('was null', booleanValue(), null);
+ $this->assertMismatchDescription('was a string "foo"', booleanValue(), 'foo');
+ }
+}
diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Type/IsCallableTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Type/IsCallableTest.php
new file mode 100644
index 00000000..5098e21b
--- /dev/null
+++ b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Type/IsCallableTest.php
@@ -0,0 +1,103 @@
+=')) {
+ $this->markTestSkipped('Closures require php 5.3');
+ }
+ eval('assertThat(function () {}, callableValue());');
+ }
+
+ public function testEvaluatesToTrueIfArgumentImplementsInvoke()
+ {
+ if (!version_compare(PHP_VERSION, '5.3', '>=')) {
+ $this->markTestSkipped('Magic method __invoke() requires php 5.3');
+ }
+ assertThat($this, callableValue());
+ }
+
+ public function testEvaluatesToFalseIfArgumentIsInvalidFunctionName()
+ {
+ if (function_exists('not_a_Hamcrest_function')) {
+ $this->markTestSkipped('Function "not_a_Hamcrest_function" must not exist');
+ }
+
+ assertThat('not_a_Hamcrest_function', not(callableValue()));
+ }
+
+ public function testEvaluatesToFalseIfArgumentIsInvalidStaticMethodCallback()
+ {
+ assertThat(
+ array('Hamcrest\Type\IsCallableTest', 'noMethod'),
+ not(callableValue())
+ );
+ }
+
+ public function testEvaluatesToFalseIfArgumentIsInvalidInstanceMethodCallback()
+ {
+ assertThat(array($this, 'noMethod'), not(callableValue()));
+ }
+
+ public function testEvaluatesToFalseIfArgumentDoesntImplementInvoke()
+ {
+ assertThat(new \stdClass(), not(callableValue()));
+ }
+
+ public function testEvaluatesToFalseIfArgumentDoesntMatchType()
+ {
+ assertThat(false, not(callableValue()));
+ assertThat(5.2, not(callableValue()));
+ }
+
+ public function testHasAReadableDescription()
+ {
+ $this->assertDescription('a callable', callableValue());
+ }
+
+ public function testDecribesActualTypeInMismatchMessage()
+ {
+ $this->assertMismatchDescription(
+ 'was a string "invalid-function"',
+ callableValue(),
+ 'invalid-function'
+ );
+ }
+}
diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Type/IsDoubleTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Type/IsDoubleTest.php
new file mode 100644
index 00000000..85c2a963
--- /dev/null
+++ b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Type/IsDoubleTest.php
@@ -0,0 +1,35 @@
+assertDescription('a double', doubleValue());
+ }
+
+ public function testDecribesActualTypeInMismatchMessage()
+ {
+ $this->assertMismatchDescription('was null', doubleValue(), null);
+ $this->assertMismatchDescription('was a string "foo"', doubleValue(), 'foo');
+ }
+}
diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Type/IsIntegerTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Type/IsIntegerTest.php
new file mode 100644
index 00000000..ce5a51a9
--- /dev/null
+++ b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Type/IsIntegerTest.php
@@ -0,0 +1,36 @@
+assertDescription('an integer', integerValue());
+ }
+
+ public function testDecribesActualTypeInMismatchMessage()
+ {
+ $this->assertMismatchDescription('was null', integerValue(), null);
+ $this->assertMismatchDescription('was a string "foo"', integerValue(), 'foo');
+ }
+}
diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Type/IsNumericTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Type/IsNumericTest.php
new file mode 100644
index 00000000..1fd83efe
--- /dev/null
+++ b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Type/IsNumericTest.php
@@ -0,0 +1,53 @@
+assertDescription('a number', numericValue());
+ }
+
+ public function testDecribesActualTypeInMismatchMessage()
+ {
+ $this->assertMismatchDescription('was null', numericValue(), null);
+ $this->assertMismatchDescription('was a string "foo"', numericValue(), 'foo');
+ }
+}
diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Type/IsObjectTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Type/IsObjectTest.php
new file mode 100644
index 00000000..a3b617c2
--- /dev/null
+++ b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Type/IsObjectTest.php
@@ -0,0 +1,34 @@
+assertDescription('an object', objectValue());
+ }
+
+ public function testDecribesActualTypeInMismatchMessage()
+ {
+ $this->assertMismatchDescription('was null', objectValue(), null);
+ $this->assertMismatchDescription('was a string "foo"', objectValue(), 'foo');
+ }
+}
diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Type/IsResourceTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Type/IsResourceTest.php
new file mode 100644
index 00000000..d6ea5348
--- /dev/null
+++ b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Type/IsResourceTest.php
@@ -0,0 +1,34 @@
+assertDescription('a resource', resourceValue());
+ }
+
+ public function testDecribesActualTypeInMismatchMessage()
+ {
+ $this->assertMismatchDescription('was null', resourceValue(), null);
+ $this->assertMismatchDescription('was a string "foo"', resourceValue(), 'foo');
+ }
+}
diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Type/IsScalarTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Type/IsScalarTest.php
new file mode 100644
index 00000000..72a188d6
--- /dev/null
+++ b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Type/IsScalarTest.php
@@ -0,0 +1,39 @@
+assertDescription('a scalar', scalarValue());
+ }
+
+ public function testDecribesActualTypeInMismatchMessage()
+ {
+ $this->assertMismatchDescription('was null', scalarValue(), null);
+ $this->assertMismatchDescription('was an array ["foo"]', scalarValue(), array('foo'));
+ }
+}
diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Type/IsStringTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Type/IsStringTest.php
new file mode 100644
index 00000000..557d5913
--- /dev/null
+++ b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Type/IsStringTest.php
@@ -0,0 +1,35 @@
+assertDescription('a string', stringValue());
+ }
+
+ public function testDecribesActualTypeInMismatchMessage()
+ {
+ $this->assertMismatchDescription('was null', stringValue(), null);
+ $this->assertMismatchDescription('was a double <5.2F>', stringValue(), 5.2);
+ }
+}
diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/UtilTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/UtilTest.php
new file mode 100644
index 00000000..7248978c
--- /dev/null
+++ b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/UtilTest.php
@@ -0,0 +1,82 @@
+assertSame($matcher, $newMatcher);
+ }
+
+ public function testWrapValueWithIsEqualWrapsPrimitive()
+ {
+ $matcher = \Hamcrest\Util::wrapValueWithIsEqual('foo');
+ $this->assertInstanceOf('Hamcrest\Core\IsEqual', $matcher);
+ $this->assertTrue($matcher->matches('foo'));
+ }
+
+ public function testCheckAllAreMatchersAcceptsMatchers()
+ {
+ \Hamcrest\Util::checkAllAreMatchers(array(
+ new \Hamcrest\Text\MatchesPattern('/fo+/'),
+ new \Hamcrest\Core\IsEqual('foo'),
+ ));
+ }
+
+ /**
+ * @expectedException InvalidArgumentException
+ */
+ public function testCheckAllAreMatchersFailsForPrimitive()
+ {
+ \Hamcrest\Util::checkAllAreMatchers(array(
+ new \Hamcrest\Text\MatchesPattern('/fo+/'),
+ 'foo',
+ ));
+ }
+
+ private function callAndAssertCreateMatcherArray($items)
+ {
+ $matchers = \Hamcrest\Util::createMatcherArray($items);
+ $this->assertInternalType('array', $matchers);
+ $this->assertSameSize($items, $matchers);
+ foreach ($matchers as $matcher) {
+ $this->assertInstanceOf('\Hamcrest\Matcher', $matcher);
+ }
+
+ return $matchers;
+ }
+
+ public function testCreateMatcherArrayLeavesMatchersUntouched()
+ {
+ $matcher = new \Hamcrest\Text\MatchesPattern('/fo+/');
+ $items = array($matcher);
+ $matchers = $this->callAndAssertCreateMatcherArray($items);
+ $this->assertSame($matcher, $matchers[0]);
+ }
+
+ public function testCreateMatcherArrayWrapsPrimitiveWithIsEqualMatcher()
+ {
+ $matchers = $this->callAndAssertCreateMatcherArray(array('foo'));
+ $this->assertInstanceOf('Hamcrest\Core\IsEqual', $matchers[0]);
+ $this->assertTrue($matchers[0]->matches('foo'));
+ }
+
+ public function testCreateMatcherArrayDoesntModifyOriginalArray()
+ {
+ $items = array('foo');
+ $this->callAndAssertCreateMatcherArray($items);
+ $this->assertSame('foo', $items[0]);
+ }
+
+ public function testCreateMatcherArrayUnwrapsSingleArrayElement()
+ {
+ $matchers = $this->callAndAssertCreateMatcherArray(array(array('foo')));
+ $this->assertInstanceOf('Hamcrest\Core\IsEqual', $matchers[0]);
+ $this->assertTrue($matchers[0]->matches('foo'));
+ }
+}
diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Xml/HasXPathTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Xml/HasXPathTest.php
new file mode 100644
index 00000000..67748871
--- /dev/null
+++ b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Xml/HasXPathTest.php
@@ -0,0 +1,198 @@
+
+
+
+ alice
+ Alice Frankel
+ admin
+
+
+ bob
+ Bob Frankel
+ user
+
+
+ charlie
+ Charlie Chan
+ user
+
+
+XML;
+ self::$doc = new \DOMDocument();
+ self::$doc->loadXML(self::$xml);
+
+ self::$html = <<
+
+ Home Page
+
+
+ Heading
+ Some text
+
+
+HTML;
+ }
+
+ protected function createMatcher()
+ {
+ return \Hamcrest\Xml\HasXPath::hasXPath('/users/user');
+ }
+
+ public function testMatchesWhenXPathIsFound()
+ {
+ assertThat('one match', self::$doc, hasXPath('user[id = "bob"]'));
+ assertThat('two matches', self::$doc, hasXPath('user[role = "user"]'));
+ }
+
+ public function testDoesNotMatchWhenXPathIsNotFound()
+ {
+ assertThat(
+ 'no match',
+ self::$doc,
+ not(hasXPath('user[contains(id, "frank")]'))
+ );
+ }
+
+ public function testMatchesWhenExpressionWithoutMatcherEvaluatesToTrue()
+ {
+ assertThat(
+ 'one match',
+ self::$doc,
+ hasXPath('count(user[id = "bob"])')
+ );
+ }
+
+ public function testDoesNotMatchWhenExpressionWithoutMatcherEvaluatesToFalse()
+ {
+ assertThat(
+ 'no matches',
+ self::$doc,
+ not(hasXPath('count(user[id = "frank"])'))
+ );
+ }
+
+ public function testMatchesWhenExpressionIsEqual()
+ {
+ assertThat(
+ 'one match',
+ self::$doc,
+ hasXPath('count(user[id = "bob"])', 1)
+ );
+ assertThat(
+ 'two matches',
+ self::$doc,
+ hasXPath('count(user[role = "user"])', 2)
+ );
+ }
+
+ public function testDoesNotMatchWhenExpressionIsNotEqual()
+ {
+ assertThat(
+ 'no match',
+ self::$doc,
+ not(hasXPath('count(user[id = "frank"])', 2))
+ );
+ assertThat(
+ 'one match',
+ self::$doc,
+ not(hasXPath('count(user[role = "admin"])', 2))
+ );
+ }
+
+ public function testMatchesWhenContentMatches()
+ {
+ assertThat(
+ 'one match',
+ self::$doc,
+ hasXPath('user/name', containsString('ice'))
+ );
+ assertThat(
+ 'two matches',
+ self::$doc,
+ hasXPath('user/role', equalTo('user'))
+ );
+ }
+
+ public function testDoesNotMatchWhenContentDoesNotMatch()
+ {
+ assertThat(
+ 'no match',
+ self::$doc,
+ not(hasXPath('user/name', containsString('Bobby')))
+ );
+ assertThat(
+ 'no matches',
+ self::$doc,
+ not(hasXPath('user/role', equalTo('owner')))
+ );
+ }
+
+ public function testProvidesConvenientShortcutForHasXPathEqualTo()
+ {
+ assertThat('matches', self::$doc, hasXPath('count(user)', 3));
+ assertThat('matches', self::$doc, hasXPath('user[2]/id', 'bob'));
+ }
+
+ public function testProvidesConvenientShortcutForHasXPathCountEqualTo()
+ {
+ assertThat('matches', self::$doc, hasXPath('user[id = "charlie"]', 1));
+ }
+
+ public function testMatchesAcceptsXmlString()
+ {
+ assertThat('accepts XML string', self::$xml, hasXPath('user'));
+ }
+
+ public function testMatchesAcceptsHtmlString()
+ {
+ assertThat('accepts HTML string', self::$html, hasXPath('body/h1', 'Heading'));
+ }
+
+ public function testHasAReadableDescription()
+ {
+ $this->assertDescription(
+ 'XML or HTML document with XPath "/users/user"',
+ hasXPath('/users/user')
+ );
+ $this->assertDescription(
+ 'XML or HTML document with XPath "count(/users/user)" <2>',
+ hasXPath('/users/user', 2)
+ );
+ $this->assertDescription(
+ 'XML or HTML document with XPath "/users/user/name"'
+ . ' a string starting with "Alice"',
+ hasXPath('/users/user/name', startsWith('Alice'))
+ );
+ }
+
+ public function testHasAReadableMismatchDescription()
+ {
+ $this->assertMismatchDescription(
+ 'XPath returned no results',
+ hasXPath('/users/name'),
+ self::$doc
+ );
+ $this->assertMismatchDescription(
+ 'XPath expression result was <3F>',
+ hasXPath('/users/user', 2),
+ self::$doc
+ );
+ $this->assertMismatchDescription(
+ 'XPath returned ["alice", "bob", "charlie"]',
+ hasXPath('/users/user/id', 'Frank'),
+ self::$doc
+ );
+ }
+}
diff --git a/vendor/hamcrest/hamcrest-php/tests/bootstrap.php b/vendor/hamcrest/hamcrest-php/tests/bootstrap.php
new file mode 100644
index 00000000..bc4958d1
--- /dev/null
+++ b/vendor/hamcrest/hamcrest-php/tests/bootstrap.php
@@ -0,0 +1,11 @@
+
+
+
+ .
+
+
+
+
+
+ ../hamcrest
+
+
+
diff --git a/vendor/mockery/mockery/.phpstorm.meta.php b/vendor/mockery/mockery/.phpstorm.meta.php
new file mode 100644
index 00000000..bb7acee5
--- /dev/null
+++ b/vendor/mockery/mockery/.phpstorm.meta.php
@@ -0,0 +1,11 @@
+ "@"]));
+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
new file mode 100644
index 00000000..937460e9
--- /dev/null
+++ b/vendor/mockery/mockery/CHANGELOG.md
@@ -0,0 +1,217 @@
+# Change Log
+
+## 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
+
+## 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
+
+## 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
+
+## 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
+
+## 1.3.4 (2021-02-24)
+
+* 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)
+
+## 1.4.1 (2020-07-09)
+
+* 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)
+
+## 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)
+
+## 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)
+
+## 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)
+
+## 1.3.1 (2019-12-26)
+
+* 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)
+
+## 1.2.4 (2019-09-30)
+
+* 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)
+
+## 1.2.2 (2019-02-13)
+
+* 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)
+
+## 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)
+
+## 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)
+
+## 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
+ 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
+ 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`
+ 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
+
+## 0.9.3 (2014-12-22)
+
+* 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,
+ 5.6.
+* 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
+ `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
+ 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
diff --git a/vendor/mockery/mockery/CONTRIBUTING.md b/vendor/mockery/mockery/CONTRIBUTING.md
new file mode 100644
index 00000000..b714f3f4
--- /dev/null
+++ b/vendor/mockery/mockery/CONTRIBUTING.md
@@ -0,0 +1,88 @@
+# Contributing
+
+
+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
+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
+someone will jump on it straight away, but putting it out there to see if anyone
+else is interested is a good idea.
+
+Likewise, if a feature you would like is already listed in
+the issue tracker, add a :+1: so that other contributors know it's a feature
+that would help others.
+
+
+## Contributing code and documentation
+
+We loosely follow the
+[PSR-1](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-1-basic-coding-standard.md)
+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
+* 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
+ 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
+
+
+Any code you contribute must be licensed under the [BSD 3-Clause
+License](http://opensource.org/licenses/BSD-3-Clause).
+
+
+## Target Branch
+
+Mockery may have several active branches at any one time and roughly follows a
+[Git Branching Model](https://igor.io/2013/10/21/git-branching-model.html).
+Generally, if you're developing a new feature, you want to be targeting the
+master branch, if it's a bug fix, you want to be targeting a release branch,
+e.g. 0.8.
+
+
+## Testing Mockery
+
+To run the unit tests for Mockery, clone the git repository, download Composer using
+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
+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!
+
+
+## Debugging Mockery
+
+Mockery and its code generation can be difficult to debug. A good start is to
+use the `RequireLoader`, which will dump the code generated by mockery to a file
+before requiring it, rather than using eval. This will help with stack traces,
+and you will be able to open the mock class in your editor.
+
+``` php
+
+// tests/bootstrap.php
+
+Mockery::setLoader(new Mockery\Loader\RequireLoader(sys_get_temp_dir()));
+
+```
diff --git a/vendor/mockery/mockery/LICENSE b/vendor/mockery/mockery/LICENSE
new file mode 100644
index 00000000..2e127a65
--- /dev/null
+++ b/vendor/mockery/mockery/LICENSE
@@ -0,0 +1,27 @@
+Copyright (c) 2010, 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:
+
+ * 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.
+
+ * The name of Pádraic Brady may not be used to endorse or promote
+ products derived from this software without specific prior written
+ permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/vendor/mockery/mockery/README.md b/vendor/mockery/mockery/README.md
new file mode 100644
index 00000000..55771dfb
--- /dev/null
+++ b/vendor/mockery/mockery/README.md
@@ -0,0 +1,291 @@
+Mockery
+=======
+
+[![Build Status](https://github.com/mockery/mockery/actions/workflows/tests.yml/badge.svg)](https://github.com/mockery/mockery/actions)
+[![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)
+
+Mockery is a simple yet flexible PHP mock object framework for use in unit testing
+with PHPUnit, PHPSpec or any other testing framework. Its core goal is to offer a
+test double framework with a succinct API capable of clearly defining all possible
+object operations and interactions using a human readable Domain Specific Language
+(DSL). Designed as a drop in alternative to PHPUnit's phpunit-mock-objects library,
+Mockery is easy to integrate with PHPUnit and can operate alongside
+phpunit-mock-objects without the World ending.
+
+Mockery is released under a New BSD License.
+
+## Installation
+
+To install Mockery, run the command below and you will get the latest
+version
+
+```sh
+composer require --dev mockery/mockery
+```
+
+## Documentation
+
+In older versions, this README file was the documentation for Mockery. Over time
+we have improved this, and have created an extensive documentation for you. Please
+use this README file as a starting point for Mockery, but do read the documentation
+to learn how to use Mockery.
+
+The current version can be seen at [docs.mockery.io](http://docs.mockery.io).
+
+## PHPUnit Integration
+
+Mockery ships with some helpers if you are using PHPUnit. You can extend the
+[`Mockery\Adapter\Phpunit\MockeryTestCase`](library/Mockery/Adapter/Phpunit/MockeryTestCase.php)
+class instead of `PHPUnit\Framework\TestCase`, or if you are already using a
+custom base class for your tests, take a look at the traits available in the
+[`Mockery\Adapter\Phpunit`](library/Mockery/Adapter/Phpunit) namespace.
+
+## Test Doubles
+
+Test doubles (often called mocks) simulate the behaviour of real objects. They are
+commonly utilised to offer test isolation, to stand in for objects which do not
+yet exist, or to allow for the exploratory design of class APIs without
+requiring actual implementation up front.
+
+The benefits of a test double framework are to allow for the flexible generation
+and configuration of test doubles. They allow the setting of expected method calls
+and/or return values using a flexible API which is capable of capturing every
+possible real object behaviour in way that is stated as close as possible to a
+natural language description. Use the `Mockery::mock` method to create a test
+double.
+
+``` php
+$double = Mockery::mock();
+```
+
+If you need Mockery to create a test double to satisfy a particular type hint,
+you can pass the type to the `mock` method.
+
+``` php
+class Book {}
+
+interface BookRepository {
+ function find($id): Book;
+ function findAll(): array;
+ function add(Book $book): void;
+}
+
+$double = Mockery::mock(BookRepository::class);
+```
+
+A detailed explanation of creating and working with test doubles is given in the
+documentation, [Creating test doubles](http://docs.mockery.io/en/latest/reference/creating_test_doubles.html)
+section.
+
+## Method Stubs 🎫
+
+A method stub is a mechanism for having your test double return canned responses
+to certain method calls. With stubs, you don't care how many times, if at all,
+the method is called. Stubs are used to provide indirect input to the system
+under test.
+
+``` php
+$double->allows()->find(123)->andReturns(new Book());
+
+$book = $double->find(123);
+```
+
+If you have used Mockery before, you might see something new in the example
+above — we created a method stub using `allows`, instead of the "old"
+`shouldReceive` syntax. This is a new feature of Mockery v1, but fear not,
+the trusty ol' `shouldReceive` is still here.
+
+For new users of Mockery, the above example can also be written as:
+
+``` php
+$double->shouldReceive('find')->with(123)->andReturn(new Book());
+$book = $double->find(123);
+```
+
+If your stub doesn't require specific arguments, you can also use this shortcut
+for setting up multiple calls at once:
+
+``` php
+$double->allows([
+ "findAll" => [new Book(), new Book()],
+]);
+```
+
+or
+
+``` php
+$double->shouldReceive('findAll')
+ ->andReturn([new Book(), new Book()]);
+```
+
+You can also use this shortcut, which creates a double and sets up some stubs in
+one call:
+
+``` php
+$double = Mockery::mock(BookRepository::class, [
+ "findAll" => [new Book(), new Book()],
+]);
+```
+
+## Method Call Expectations 📲
+
+A Method call expectation is a mechanism to allow you to verify that a
+particular method has been called. You can specify the parameters and you can
+also specify how many times you expect it to be called. Method call expectations
+are used to verify indirect output of the system under test.
+
+``` php
+$book = new Book();
+
+$double = Mockery::mock(BookRepository::class);
+$double->expects()->add($book);
+```
+
+During the test, Mockery accept calls to the `add` method as prescribed.
+After you have finished exercising the system under test, you need to
+tell Mockery to check that the method was called as expected, using the
+`Mockery::close` method. One way to do that is to add it to your `tearDown`
+method in PHPUnit.
+
+``` php
+
+public function tearDown()
+{
+ Mockery::close();
+}
+```
+
+The `expects()` method automatically sets up an expectation that the method call
+(and matching parameters) is called **once and once only**. You can choose to change
+this if you are expecting more calls.
+
+``` php
+$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.
+
+For new users of Mockery, the above example can also be written as:
+
+``` php
+$double->shouldReceive('find')
+ ->with(123)
+ ->once()
+ ->andReturn(new Book());
+$book = $double->find(123);
+```
+
+A detailed explanation of declaring expectations on method calls, please
+read the documentation, the [Expectation declarations](http://docs.mockery.io/en/latest/reference/expectations.html)
+section. After that, you can also learn about the new `allows` and `expects` methods
+in the [Alternative shouldReceive syntax](http://docs.mockery.io/en/latest/reference/alternative_should_receive_syntax.html)
+section.
+
+It is worth mentioning that one way of setting up expectations is no better or worse
+than the other. Under the hood, `allows` and `expects` are doing the same thing as
+`shouldReceive`, at times in "less words", and as such it comes to a personal preference
+of the programmer which way to use.
+
+## Test Spies 🕵️
+
+By default, all test doubles created with the `Mockery::mock` method will only
+accept calls that they have been configured to `allow` or `expect` (or in other words,
+calls that they `shouldReceive`). Sometimes we don't necessarily care about all of the
+calls that are going to be made to an object. To facilitate this, we can tell Mockery
+to ignore any calls it has not been told to expect or allow. To do so, we can tell a
+test double `shouldIgnoreMissing`, or we can create the double using the `Mocker::spy`
+shortcut.
+
+``` php
+// $double = Mockery::mock()->shouldIgnoreMissing();
+$double = Mockery::spy();
+
+$double->foo(); // null
+$double->bar(); // null
+```
+
+Further to this, sometimes we want to have the object accept any call during the test execution
+and then verify the calls afterwards. For these purposes, we need our test
+double to act as a Spy. All mockery test doubles record the calls that are made
+to them for verification afterwards by default:
+
+``` php
+$double->baz(123);
+
+$double->shouldHaveReceived()->baz(123); // null
+$double->shouldHaveReceived()->baz(12345); // Uncaught Exception Mockery\Exception\InvalidCountException...
+```
+
+Please refer to the [Spies](http://docs.mockery.io/en/latest/reference/spies.html) section
+of the documentation to learn more about the spies.
+
+## Utilities 🔌
+
+### Global Helpers
+
+Mockery ships with a handful of global helper methods, you just need to ask
+Mockery to declare them.
+
+``` php
+Mockery::globalHelpers();
+
+$mock = mock(Some::class);
+$spy = spy(Some::class);
+
+$spy->shouldHaveReceived()
+ ->foo(anyArgs());
+```
+
+All of the global helpers are wrapped in a `!function_exists` call to avoid
+conflicts. So if you already have a global function called `spy`, Mockery will
+silently skip the declaring its own `spy` function.
+
+### Testing Traits
+
+As Mockery ships with code generation capabilities, it was trivial to add
+functionality allowing users to create objects on the fly that use particular
+traits. Any abstract methods defined by the trait will be created and can have
+expectations or stubs configured like normal Test Doubles.
+
+``` php
+trait Foo {
+ function foo() {
+ return $this->doFoo();
+ }
+
+ abstract function doFoo();
+}
+
+$double = Mockery::mock(Foo::class);
+$double->allows()->doFoo()->andReturns(123);
+$double->foo(); // int(123)
+```
+
+## Versioning
+
+The Mockery team attempts to adhere to [Semantic Versioning](http://semver.org),
+however, some of Mockery's internals are considered private and will be open to
+change at any time. Just because a class isn't final, or a method isn't marked
+private, does not mean it constitutes part of the API we guarantee under the
+versioning scheme.
+
+### Alternative Runtimes
+
+Mockery 1.3 was the last version to support HHVM 3 and PHP 5. There is no support for HHVM 4+.
+
+## A new home for Mockery
+
+⚠️️ Update your remotes! Mockery has transferred to a new location. While it was once
+at `padraic/mockery`, it is now at `mockery/mockery`. While your
+existing repositories will redirect transparently for any operations, take some
+time to transition to the new URL.
+```sh
+$ git remote set-url upstream https://github.com/mockery/mockery.git
+```
+Replace `upstream` with the name of the remote you use locally; `upstream` is commonly
+used but you may be using something else. Run `git remote -v` to see what you're actually
+using.
diff --git a/vendor/mockery/mockery/composer.json b/vendor/mockery/mockery/composer.json
new file mode 100644
index 00000000..43caba8c
--- /dev/null
+++ b/vendor/mockery/mockery/composer.json
@@ -0,0 +1,62 @@
+{
+ "name": "mockery/mockery",
+ "description": "Mockery is a simple yet flexible PHP mock object framework",
+ "scripts": {
+ "docs": "phpdoc -d library -t docs/api"
+ },
+ "keywords": [
+ "bdd",
+ "library",
+ "mock",
+ "mock objects",
+ "mockery",
+ "stub",
+ "tdd",
+ "test",
+ "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"
+ },
+ {
+ "name": "Dave Marshall",
+ "email": "dave.marshall@atstsolutions.co.uk",
+ "homepage": "http://davedevelopment.co.uk"
+ }
+ ],
+ "require": {
+ "php": "^7.3 || ^8.0",
+ "lib-pcre": ">=7.0",
+ "hamcrest/hamcrest-php": "^2.0.1"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "^8.5 || ^9.3"
+ },
+ "conflict": {
+ "phpunit/phpunit": "<8.0"
+ },
+ "autoload": {
+ "psr-0": {
+ "Mockery": "library/"
+ }
+ },
+ "autoload-dev": {
+ "psr-4": {
+ "test\\": "tests/"
+ }
+ },
+ "config": {
+ "preferred-install": "dist"
+ },
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.4.x-dev"
+ }
+ }
+}
diff --git a/vendor/mockery/mockery/docs/README.md b/vendor/mockery/mockery/docs/README.md
new file mode 100644
index 00000000..63ca69db
--- /dev/null
+++ b/vendor/mockery/mockery/docs/README.md
@@ -0,0 +1,4 @@
+mockery-docs
+============
+
+Document for the PHP Mockery framework on readthedocs.org
\ No newline at end of file
diff --git a/vendor/mockery/mockery/docs/conf.py b/vendor/mockery/mockery/docs/conf.py
new file mode 100644
index 00000000..901f0405
--- /dev/null
+++ b/vendor/mockery/mockery/docs/conf.py
@@ -0,0 +1,267 @@
+# -*- coding: utf-8 -*-
+#
+# Mockery Docs documentation build configuration file, created by
+# sphinx-quickstart on Mon Mar 3 14:04:26 2014.
+#
+# This file is execfile()d with the current directory set to its
+# containing dir.
+#
+# Note that not all possible configuration values are present in this
+# autogenerated file.
+#
+# All configuration values have a default; values that are commented out
+# serve to show the default.
+
+import sys
+import os
+
+# If extensions (or modules to document with autodoc) are in another directory,
+# add these directories to sys.path here. If the directory is relative to the
+# documentation root, use os.path.abspath to make it absolute, like shown here.
+#sys.path.insert(0, os.path.abspath('.'))
+
+# -- General configuration ------------------------------------------------
+
+# If your documentation needs a minimal Sphinx version, state it here.
+#needs_sphinx = '1.0'
+
+# Add any Sphinx extension module names here, as strings. They can be
+# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
+# ones.
+extensions = [
+ 'sphinx.ext.todo',
+]
+
+# Add any paths that contain templates here, relative to this directory.
+templates_path = ['_templates']
+
+# The suffix of source filenames.
+source_suffix = '.rst'
+
+# The encoding of source files.
+#source_encoding = 'utf-8-sig'
+
+# The master toctree document.
+master_doc = 'index'
+
+# General information about the project.
+project = u'Mockery Docs'
+copyright = u'Pádraic Brady, Dave Marshall and contributors'
+
+# The version info for the project you're documenting, acts as replacement for
+# |version| and |release|, also used in various other places throughout the
+# built documents.
+#
+# The short X.Y version.
+version = '1.0'
+# The full version, including alpha/beta/rc tags.
+release = '1.0-alpha'
+
+# The language for content autogenerated by Sphinx. Refer to documentation
+# for a list of supported languages.
+#language = None
+
+# There are two options for replacing |today|: either, you set today to some
+# non-false value, then it is used:
+#today = ''
+# Else, today_fmt is used as the format for a strftime call.
+#today_fmt = '%B %d, %Y'
+
+# List of patterns, relative to source directory, that match files and
+# directories to ignore when looking for source files.
+exclude_patterns = ['_build']
+
+# The reST default role (used for this markup: `text`) to use for all
+# documents.
+#default_role = None
+
+# If true, '()' will be appended to :func: etc. cross-reference text.
+#add_function_parentheses = True
+
+# If true, the current module name will be prepended to all description
+# unit titles (such as .. function::).
+#add_module_names = True
+
+# If true, sectionauthor and moduleauthor directives will be shown in the
+# output. They are ignored by default.
+#show_authors = False
+
+# The name of the Pygments (syntax highlighting) style to use.
+pygments_style = 'sphinx'
+
+# A list of ignored prefixes for module index sorting.
+#modindex_common_prefix = []
+
+# If true, keep warnings as "system message" paragraphs in the built documents.
+#keep_warnings = False
+
+
+# -- Options for HTML output ----------------------------------------------
+
+# The theme to use for HTML and HTML Help pages. See the documentation for
+# a list of builtin themes.
+html_theme = 'default'
+
+# 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
+# documentation.
+#html_theme_options = {}
+
+# Add any paths that contain custom themes here, relative to this directory.
+#html_theme_path = []
+
+# The name of an image file (within the static path) to use as favicon of the
+# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
+# pixels large.
+#html_favicon = None
+
+# Add any paths that contain custom static files (such as style sheets) here,
+# relative to this directory. They are copied after the builtin static files,
+# so a file named "default.css" will overwrite the builtin "default.css".
+html_static_path = ['_static']
+
+# Add any extra paths that contain custom files (such as robots.txt or
+# .htaccess) here, relative to this directory. These files are copied
+# directly to the root of the documentation.
+#html_extra_path = []
+
+# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
+# using the given strftime format.
+#html_last_updated_fmt = '%b %d, %Y'
+
+# If true, SmartyPants will be used to convert quotes and dashes to
+# typographically correct entities.
+#html_use_smartypants = True
+
+# Custom sidebar templates, maps document names to template names.
+#html_sidebars = {}
+
+# Additional templates that should be rendered to pages, maps page names to
+# template names.
+#html_additional_pages = {}
+
+# If false, no module index is generated.
+#html_domain_indices = True
+
+# If false, no index is generated.
+#html_use_index = True
+
+# If true, the index is split into individual pages for each letter.
+#html_split_index = False
+
+# If true, links to the reST sources are added to the pages.
+#html_show_sourcelink = True
+
+# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
+#html_show_sphinx = True
+
+# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
+#html_show_copyright = True
+
+# If true, an OpenSearch description file will be output, and all pages will
+# contain a tag referring to it. The value of this option must be the
+# base URL from which the finished HTML is served.
+#html_use_opensearch = ''
+
+# This is the file name suffix for HTML files (e.g. ".xhtml").
+#html_file_suffix = None
+
+# Output file base name for HTML help builder.
+htmlhelp_basename = 'MockeryDocsdoc'
+
+
+# -- Options for LaTeX output ---------------------------------------------
+
+latex_elements = {
+# The paper size ('letterpaper' or 'a4paper').
+#'papersize': 'letterpaper',
+
+# The font size ('10pt', '11pt' or '12pt').
+#'pointsize': '10pt',
+
+# Additional stuff for the LaTeX preamble.
+#'preamble': '',
+}
+
+# Grouping the document tree into LaTeX files. List of tuples
+# (source start file, target name, title,
+# author, documentclass [howto, manual, or own class]).
+latex_documents = [
+ ('index', 'MockeryDocs.tex', u'Mockery Docs Documentation',
+ u'Pádraic Brady, Dave Marshall, Wouter, Graham Campbell', 'manual'),
+]
+
+# The name of an image file (relative to this directory) to place at the top of
+# the title page.
+#latex_logo = None
+
+# For "manual" documents, if this is true, then toplevel headings are parts,
+# not chapters.
+#latex_use_parts = False
+
+# If true, show page references after internal links.
+#latex_show_pagerefs = False
+
+# If true, show URL addresses after external links.
+#latex_show_urls = False
+
+# Documents to append as an appendix to all manuals.
+#latex_appendices = []
+
+# If false, no module index is generated.
+#latex_domain_indices = True
+
+
+# -- Options for manual page output ---------------------------------------
+
+# One entry per manual page. List of tuples
+# (source start file, name, description, authors, manual section).
+man_pages = [
+ ('index', 'mockerydocs', u'Mockery Docs Documentation',
+ [u'Pádraic Brady, Dave Marshall, Wouter, Graham Campbell'], 1)
+]
+
+# If true, show URL addresses after external links.
+#man_show_urls = False
+
+
+# -- Options for Texinfo output -------------------------------------------
+
+# Grouping the document tree into Texinfo files. List of tuples
+# (source start file, target name, title, author,
+# dir menu entry, description, category)
+texinfo_documents = [
+ ('index', 'MockeryDocs', u'Mockery Docs Documentation',
+ u'Pádraic Brady, Dave Marshall, Wouter, Graham Campbell', 'MockeryDocs', 'One line description of project.',
+ 'Miscellaneous'),
+]
+
+# Documents to append as an appendix to all manuals.
+#texinfo_appendices = []
+
+# If false, no module index is generated.
+#texinfo_domain_indices = True
+
+# How to display URL addresses: 'footnote', 'no', or 'inline'.
+#texinfo_show_urls = 'footnote'
+
+# If true, do not generate a @detailmenu in the "Top" node's menu.
+#texinfo_no_detailmenu = False
+
+
+#on_rtd is whether we are on readthedocs.org, this line of code grabbed from docs.readthedocs.org
+on_rtd = os.environ.get('READTHEDOCS', None) == 'True'
+
+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()
+
+# load PhpLexer
+from sphinx.highlighting import lexers
+from pygments.lexers.web import PhpLexer
+
+# enable highlighting for PHP code not between by default
+lexers['php'] = PhpLexer(startinline=True)
+lexers['php-annotations'] = PhpLexer(startinline=True)
diff --git a/vendor/mockery/mockery/docs/cookbook/big_parent_class.rst b/vendor/mockery/mockery/docs/cookbook/big_parent_class.rst
new file mode 100644
index 00000000..a27d5327
--- /dev/null
+++ b/vendor/mockery/mockery/docs/cookbook/big_parent_class.rst
@@ -0,0 +1,52 @@
+.. index::
+ single: Cookbook; Big Parent Class
+
+Big Parent Class
+================
+
+In some application code, especially older legacy code, we can come across some
+classes that extend a "big parent class" - a parent class that knows and does
+too much:
+
+.. code-block:: php
+
+ class BigParentClass
+ {
+ public function doesEverything()
+ {
+ // sets up database connections
+ // writes to log files
+ }
+ }
+
+ class ChildClass extends BigParentClass
+ {
+ public function doesOneThing()
+ {
+ // but calls on BigParentClass methods
+ $result = $this->doesEverything();
+ // does something with $result
+ return $result;
+ }
+ }
+
+We want to test our ``ChildClass`` and its ``doesOneThing`` method, but the
+problem is that it calls on ``BigParentClass::doesEverything()``. One way to
+handle this would be to mock out **all** of the dependencies ``BigParentClass``
+has and needs, and then finally actually test our ``doesOneThing`` method. It's
+an awful lot of work to do that.
+
+What we can do, is to do something... unconventional. We can create a runtime
+partial test double of the ``ChildClass`` itself and mock only the parent's
+``doesEverything()`` method:
+
+.. code-block:: php
+
+ $childClass = \Mockery::mock('ChildClass')->makePartial();
+ $childClass->shouldReceive('doesEverything')
+ ->andReturn('some result from parent');
+
+ $childClass->doesOneThing(); // string("some result from parent");
+
+With this approach we mock out only the ``doesEverything()`` method, and all the
+unmocked methods are called on the actual ``ChildClass`` instance.
diff --git a/vendor/mockery/mockery/docs/cookbook/class_constants.rst b/vendor/mockery/mockery/docs/cookbook/class_constants.rst
new file mode 100644
index 00000000..0b925692
--- /dev/null
+++ b/vendor/mockery/mockery/docs/cookbook/class_constants.rst
@@ -0,0 +1,183 @@
+.. index::
+ single: Cookbook; Class Constants
+
+Class Constants
+===============
+
+When creating a test double for a class, Mockery does not create stubs out of
+any class constants defined in the class we are mocking. Sometimes though, the
+non-existence of these class constants, setup of the test, and the application
+code itself, it can lead to undesired behavior, and even a PHP error:
+``PHP Fatal error: Uncaught Error: Undefined class constant 'FOO' in ...``
+
+While supporting class constants in Mockery would be possible, it does require
+an awful lot of work, for a small number of use cases.
+
+Named Mocks
+-----------
+
+We can, however, deal with these constants in a way supported by Mockery - by
+using :ref:`creating-test-doubles-named-mocks`.
+
+A named mock is a test double that has a name of the class we want to mock, but
+under it is a stubbed out class that mimics the real class with canned responses.
+
+Lets look at the following made up, but not impossible scenario:
+
+.. code-block:: php
+
+ class Fetcher
+ {
+ const SUCCESS = 0;
+ const FAILURE = 1;
+
+ public static function fetch()
+ {
+ // Fetcher gets something for us from somewhere...
+ return self::SUCCESS;
+ }
+ }
+
+ class MyClass
+ {
+ public function doFetching()
+ {
+ $response = Fetcher::fetch();
+
+ if ($response == Fetcher::SUCCESS) {
+ echo "Thanks!" . PHP_EOL;
+ } else {
+ echo "Try again!" . PHP_EOL;
+ }
+ }
+ }
+
+Our ``MyClass`` calls a ``Fetcher`` that fetches some resource from somewhere -
+maybe it downloads a file from a remote web service. Our ``MyClass`` prints out
+a response message depending on the response from the ``Fetcher::fetch()`` call.
+
+When testing ``MyClass`` we don't really want ``Fetcher`` to go and download
+random stuff from the internet every time we run our test suite. So we mock it
+out:
+
+.. code-block:: php
+
+ // Using alias: because fetch is called statically!
+ \Mockery::mock('alias:Fetcher')
+ ->shouldReceive('fetch')
+ ->andReturn(0);
+
+ $myClass = new MyClass();
+ $myClass->doFetching();
+
+If we run this, our test will error out with a nasty
+``PHP Fatal error: Uncaught Error: Undefined class constant 'SUCCESS' in ..``.
+
+Here's how a ``namedMock()`` can help us in a situation like this.
+
+We create a stub for the ``Fetcher`` class, stubbing out the class constants,
+and then use ``namedMock()`` to create a mock named ``Fetcher`` based on our
+stub:
+
+.. code-block:: php
+
+ class FetcherStub
+ {
+ const SUCCESS = 0;
+ const FAILURE = 1;
+ }
+
+ \Mockery::namedMock('Fetcher', 'FetcherStub')
+ ->shouldReceive('fetch')
+ ->andReturn(0);
+
+ $myClass = new MyClass();
+ $myClass->doFetching();
+
+This works because under the hood, Mockery creates a class called ``Fetcher``
+that extends ``FetcherStub``.
+
+The same approach will work even if ``Fetcher::fetch()`` is not a static
+dependency:
+
+.. code-block:: php
+
+ class Fetcher
+ {
+ const SUCCESS = 0;
+ const FAILURE = 1;
+
+ public function fetch()
+ {
+ // Fetcher gets something for us from somewhere...
+ return self::SUCCESS;
+ }
+ }
+
+ class MyClass
+ {
+ public function doFetching($fetcher)
+ {
+ $response = $fetcher->fetch();
+
+ if ($response == Fetcher::SUCCESS) {
+ echo "Thanks!" . PHP_EOL;
+ } else {
+ echo "Try again!" . PHP_EOL;
+ }
+ }
+ }
+
+And the test will have something like this:
+
+.. code-block:: php
+
+ class FetcherStub
+ {
+ const SUCCESS = 0;
+ const FAILURE = 1;
+ }
+
+ $mock = \Mockery::mock('Fetcher', 'FetcherStub')
+ $mock->shouldReceive('fetch')
+ ->andReturn(0);
+
+ $myClass = new MyClass();
+ $myClass->doFetching($mock);
+
+
+Constants Map
+-------------
+
+Another way of mocking class constants can be with the use of the constants map configuration.
+
+Given a class with constants:
+
+.. code-block:: php
+
+ class Fetcher
+ {
+ const SUCCESS = 0;
+ const FAILURE = 1;
+
+ public function fetch()
+ {
+ // Fetcher gets something for us from somewhere...
+ return self::SUCCESS;
+ }
+ }
+
+It can be mocked with:
+
+.. code-block:: php
+
+ \Mockery::getConfiguration()->setConstantsMap([
+ 'Fetcher' => [
+ 'SUCCESS' => 'success',
+ 'FAILURE' => 'fail',
+ ]
+ ]);
+
+ $mock = \Mockery::mock('Fetcher');
+ var_dump($mock::SUCCESS); // (string) 'success'
+ var_dump($mock::FAILURE); // (string) 'fail'
diff --git a/vendor/mockery/mockery/docs/cookbook/default_expectations.rst b/vendor/mockery/mockery/docs/cookbook/default_expectations.rst
new file mode 100644
index 00000000..2c6fcae2
--- /dev/null
+++ b/vendor/mockery/mockery/docs/cookbook/default_expectations.rst
@@ -0,0 +1,17 @@
+.. index::
+ single: Cookbook; Default Mock Expectations
+
+Default Mock Expectations
+=========================
+
+Often in unit testing, we end up with sets of tests which use the same object
+dependency over and over again. Rather than mocking this class/object within
+every single unit test (requiring a mountain of duplicate code), we can
+instead define reusable default mocks within the test case's ``setup()``
+method. This even works where unit tests use varying expectations on the same
+or similar mock object.
+
+How this works, is that you can define mocks with default expectations. Then,
+in a later unit test, you can add or fine-tune expectations for that specific
+test. Any expectation can be set as a default using the ``byDefault()``
+declaration.
diff --git a/vendor/mockery/mockery/docs/cookbook/detecting_mock_objects.rst b/vendor/mockery/mockery/docs/cookbook/detecting_mock_objects.rst
new file mode 100644
index 00000000..0210c692
--- /dev/null
+++ b/vendor/mockery/mockery/docs/cookbook/detecting_mock_objects.rst
@@ -0,0 +1,13 @@
+.. index::
+ single: Cookbook; Detecting Mock Objects
+
+Detecting Mock Objects
+======================
+
+Users may find it useful to check whether a given object is a real object or a
+simulated Mock Object. All Mockery mocks implement the
+``\Mockery\MockInterface`` interface which can be used in a type check.
+
+.. code-block:: php
+
+ assert($mightBeMocked instanceof \Mockery\MockInterface);
diff --git a/vendor/mockery/mockery/docs/cookbook/index.rst b/vendor/mockery/mockery/docs/cookbook/index.rst
new file mode 100644
index 00000000..034e39de
--- /dev/null
+++ b/vendor/mockery/mockery/docs/cookbook/index.rst
@@ -0,0 +1,16 @@
+Cookbook
+========
+
+.. toctree::
+ :hidden:
+
+ default_expectations
+ detecting_mock_objects
+ not_calling_the_constructor
+ mocking_hard_dependencies
+ class_constants
+ big_parent_class
+ mockery_on
+ mocking_class_within_class
+
+.. include:: map.rst.inc
diff --git a/vendor/mockery/mockery/docs/cookbook/map.rst.inc b/vendor/mockery/mockery/docs/cookbook/map.rst.inc
new file mode 100644
index 00000000..c9dd99ef
--- /dev/null
+++ b/vendor/mockery/mockery/docs/cookbook/map.rst.inc
@@ -0,0 +1,7 @@
+* :doc:`/cookbook/default_expectations`
+* :doc:`/cookbook/detecting_mock_objects`
+* :doc:`/cookbook/not_calling_the_constructor`
+* :doc:`/cookbook/mocking_hard_dependencies`
+* :doc:`/cookbook/class_constants`
+* :doc:`/cookbook/big_parent_class`
+* :doc:`/cookbook/mockery_on`
diff --git a/vendor/mockery/mockery/docs/cookbook/mockery_on.rst b/vendor/mockery/mockery/docs/cookbook/mockery_on.rst
new file mode 100644
index 00000000..631f1241
--- /dev/null
+++ b/vendor/mockery/mockery/docs/cookbook/mockery_on.rst
@@ -0,0 +1,85 @@
+.. index::
+ single: Cookbook; Complex Argument Matching With Mockery::on
+
+Complex Argument Matching With Mockery::on
+==========================================
+
+When we need to do a more complex argument matching for an expected method call,
+the ``\Mockery::on()`` matcher comes in really handy. It accepts a closure as an
+argument and that closure in turn receives the argument passed in to the method,
+when called. If the closure returns ``true``, Mockery will consider that the
+argument has passed the expectation. If the closure returns ``false``, or a
+"falsey" value, the expectation will not pass.
+
+The ``\Mockery::on()`` matcher can be used in various scenarios — validating
+an array argument based on multiple keys and values, complex string matching...
+
+Say, for example, we have the following code. It doesn't do much; publishes a
+post by setting the ``published`` flag in the database to ``1`` and sets the
+``published_at`` to the current date and time:
+
+.. code-block:: php
+
+ model = $model;
+ }
+
+ public function publishPost($id)
+ {
+ $saveData = [
+ 'post_id' => $id,
+ 'published' => 1,
+ 'published_at' => gmdate('Y-m-d H:i:s'),
+ ];
+ $this->model->save($saveData);
+ }
+ }
+
+In a test we would mock the model and set some expectations on the call of the
+``save()`` method:
+
+.. code-block:: php
+
+ shouldReceive('save')
+ ->once()
+ ->with(\Mockery::on(function ($argument) use ($postId) {
+ $postIdIsSet = isset($argument['post_id']) && $argument['post_id'] === $postId;
+ $publishedFlagIsSet = isset($argument['published']) && $argument['published'] === 1;
+ $publishedAtIsSet = isset($argument['published_at']);
+
+ return $postIdIsSet && $publishedFlagIsSet && $publishedAtIsSet;
+ }));
+
+ $service = new \Service\Post($modelMock);
+ $service->publishPost($postId);
+
+ \Mockery::close();
+
+The important part of the example is inside the closure we pass to the
+``\Mockery::on()`` matcher. The ``$argument`` is actually the ``$saveData`` argument
+the ``save()`` method gets when it is called. We check for a couple of things in
+this argument:
+
+* the post ID is set, and is same as the post ID we passed in to the
+ ``publishPost()`` method,
+* the ``published`` flag is set, and is ``1``, and
+* the ``published_at`` key is present.
+
+If any of these requirements is not satisfied, the closure will return ``false``,
+the method call expectation will not be met, and Mockery will throw a
+``NoMatchingExpectationException``.
+
+.. note::
+
+ This cookbook entry is an adaption of the blog post titled
+ `"Complex argument matching in Mockery" `_,
+ published by Robert Basic on his blog.
diff --git a/vendor/mockery/mockery/docs/cookbook/mocking_class_within_class.rst b/vendor/mockery/mockery/docs/cookbook/mocking_class_within_class.rst
new file mode 100644
index 00000000..51f030b9
--- /dev/null
+++ b/vendor/mockery/mockery/docs/cookbook/mocking_class_within_class.rst
@@ -0,0 +1,146 @@
+.. index::
+ single: Cookbook; Mocking class within class
+
+.. _mocking-class-within-class:
+
+Mocking class within class
+==========================
+
+Imagine a case where you need to create an instance of a class and use it
+within the same method:
+
+.. code-block:: php
+
+ // Point.php
+ setPoint($x1, $y1);
+
+ $b = new Point();
+ $b->setPoint($x2, $y1);
+
+ $c = new Point();
+ $c->setPoint($x2, $y2);
+
+ $d = new Point();
+ $d->setPoint($x1, $y2);
+
+ $this->draw([$a, $b, $c, $d]);
+ }
+
+ public function draw($points) {
+ echo "Do something with the points";
+ }
+ }
+
+And that you want to test that a logic in ``Rectangle->create()`` calls
+properly each used thing - in this case calls ``Point->setPoint()``, but
+``Rectangle->draw()`` does some graphical stuff that you want to avoid calling.
+
+You set the mocks for ``App\Point`` and ``App\Rectangle``:
+
+.. code-block:: php
+
+ shouldReceive("setPoint")->andThrow(Exception::class);
+
+ $rect = Mockery::mock("App\Rectangle")->makePartial();
+ $rect->shouldReceive("draw");
+
+ $rect->create(0, 0, 100, 100); // does not throw exception
+ Mockery::close();
+ }
+ }
+
+and the test does not work. Why? The mocking relies on the class not being
+present yet, but the class is autoloaded therefore the mock alone for
+``App\Point`` is useless which you can see with ``echo`` being executed.
+
+Mocks however work for the first class in the order of loading i.e.
+``App\Rectangle``, which loads the ``App\Point`` class. In more complex example
+that would be a single point that initiates the whole loading (``use Class``)
+such as::
+
+ A // main loading initiator
+ |- B // another loading initiator
+ | |-E
+ | +-G
+ |
+ |- C // another loading initiator
+ | +-F
+ |
+ +- D
+
+That basically means that the loading prevents mocking and for each such
+a loading initiator there needs to be implemented a workaround.
+Overloading is one approach, however it pollutes the global state. In this case
+we try to completely avoid the global state pollution with custom
+``new Class()`` behavior per loading initiator and that can be mocked easily
+in few critical places.
+
+That being said, although we can't stop loading, we can return mocks. Let's
+look at ``Rectangle->create()`` method:
+
+.. code-block:: php
+
+ class Rectangle {
+ public function newPoint() {
+ return new Point();
+ }
+
+ public function create($x1, $y1, $x2, $y2) {
+ $a = $this->newPoint();
+ $a->setPoint($x1, $y1);
+ ...
+ }
+ ...
+ }
+
+We create a custom function to encapsulate ``new`` keyword that would otherwise
+just use the autoloaded class ``App\Point`` and in our test we mock that function
+so that it returns our mock:
+
+.. code-block:: php
+
+ shouldReceive("setPoint")->andThrow(Exception::class);
+
+ $rect = Mockery::mock("App\Rectangle")->makePartial();
+ $rect->shouldReceive("draw");
+
+ // pass the App\Point mock into App\Rectangle as an alternative
+ // to using new App\Point() in-place.
+ $rect->shouldReceive("newPoint")->andReturn($point);
+
+ $this->expectException(Exception::class);
+ $rect->create(0, 0, 100, 100);
+ Mockery::close();
+ }
+ }
+
+If we run this test now, it should pass. For more complex cases we'd find
+the next loader in the program flow and proceed with wrapping and passing
+mock instances with predefined behavior into already existing classes.
diff --git a/vendor/mockery/mockery/docs/cookbook/mocking_hard_dependencies.rst b/vendor/mockery/mockery/docs/cookbook/mocking_hard_dependencies.rst
new file mode 100644
index 00000000..3391d7b3
--- /dev/null
+++ b/vendor/mockery/mockery/docs/cookbook/mocking_hard_dependencies.rst
@@ -0,0 +1,137 @@
+.. index::
+ single: Cookbook; Mocking Hard Dependencies
+
+Mocking Hard Dependencies (new Keyword)
+=======================================
+
+One prerequisite to mock hard dependencies is that the code we are trying to test uses autoloading.
+
+Let's take the following code for an example:
+
+.. code-block:: php
+
+ sendSomething($param);
+ return $externalService->getSomething();
+ }
+ }
+
+The way we can test this without doing any changes to the code itself is by creating :doc:`instance mocks ` by using the ``overload`` prefix.
+
+.. code-block:: php
+
+ shouldReceive('sendSomething')
+ ->once()
+ ->with($param);
+ $externalMock->shouldReceive('getSomething')
+ ->once()
+ ->andReturn('Tested!');
+
+ $service = new \App\Service();
+
+ $result = $service->callExternalService($param);
+
+ $this->assertSame('Tested!', $result);
+ }
+ }
+
+If we run this test now, it should pass. Mockery does its job and our ``App\Service`` will use the mocked external service instead of the real one.
+
+The problem with this is when we want to, for example, test the ``App\Service\External`` itself, or if we use that class somewhere else in our tests.
+
+When Mockery overloads a class, because of how PHP works with files, that overloaded class file must not be included otherwise Mockery will throw a "class already exists" exception. This is where autoloading kicks in and makes our job a lot easier.
+
+To make this possible, we'll tell PHPUnit to run the tests that have overloaded classes in separate processes and to not preserve global state. That way we'll avoid having the overloaded class included more than once. Of course this has its downsides as these tests will run slower.
+
+Our test example from above now becomes:
+
+.. code-block:: php
+
+ shouldReceive('sendSomething')
+ ->once()
+ ->with($param);
+ $externalMock->shouldReceive('getSomething')
+ ->once()
+ ->andReturn('Tested!');
+
+ $service = new \App\Service();
+
+ $result = $service->callExternalService($param);
+
+ $this->assertSame('Tested!', $result);
+ }
+ }
+
+
+
+Testing the constructor arguments of hard Dependencies
+------------------------------------------------------
+
+Sometimes we might want to ensure that the hard dependency is instantiated with
+particular arguments. With overloaded mocks, we can set up expectations on the
+constructor.
+
+.. code-block:: php
+
+ allows('sendSomething');
+ $externalMock->shouldReceive('__construct')
+ ->once()
+ ->with(5);
+
+ $service = new \App\Service();
+ $result = $service->callExternalService($param);
+ }
+ }
+
+
+.. note::
+ For more straightforward and single-process tests oriented way check
+ :ref:`mocking-class-within-class`.
+
+.. note::
+
+ This cookbook entry is an adaption of the blog post titled
+ `"Mocking hard dependencies with Mockery" `_,
+ published by Robert Basic on his blog.
diff --git a/vendor/mockery/mockery/docs/cookbook/not_calling_the_constructor.rst b/vendor/mockery/mockery/docs/cookbook/not_calling_the_constructor.rst
new file mode 100644
index 00000000..b8157ae3
--- /dev/null
+++ b/vendor/mockery/mockery/docs/cookbook/not_calling_the_constructor.rst
@@ -0,0 +1,63 @@
+.. index::
+ single: Cookbook; Not Calling the Original Constructor
+
+Not Calling the Original Constructor
+====================================
+
+When creating generated partial test doubles, Mockery mocks out only the method
+which we specifically told it to. This means that the original constructor of
+the class we are mocking will be called.
+
+In some cases this is not a desired behavior, as the constructor might issue
+calls to other methods, or other object collaborators, and as such, can create
+undesired side-effects in the application's environment when running the tests.
+
+If this happens, we need to use runtime partial test doubles, as they don't
+call the original constructor.
+
+.. code-block:: php
+
+ class MyClass
+ {
+ public function __construct()
+ {
+ echo "Original constructor called." . PHP_EOL;
+ // Other side-effects can happen...
+ }
+ }
+
+ // This will print "Original constructor called."
+ $mock = \Mockery::mock('MyClass[foo]');
+
+A better approach is to use runtime partial doubles:
+
+.. code-block:: php
+
+ class MyClass
+ {
+ public function __construct()
+ {
+ echo "Original constructor called." . PHP_EOL;
+ // Other side-effects can happen...
+ }
+ }
+
+ // This will not print anything
+ $mock = \Mockery::mock('MyClass')->makePartial();
+ $mock->shouldReceive('foo');
+
+This is one of the reason why we don't recommend using generated partial test
+doubles, but if possible, always use the runtime partials.
+
+Read more about :ref:`creating-test-doubles-partial-test-doubles`.
+
+.. note::
+
+ The way generated partial test doubles work, is a BC break. If you use a
+ really old version of Mockery, it might behave in a way that the constructor
+ is not being called for these generated partials. In the case if you upgrade
+ to a more recent version of Mockery, you'll probably have to change your
+ tests to use runtime partials, instead of generated ones.
+
+ This change was introduced in early 2013, so it is highly unlikely that you
+ are using a Mockery from before that, so this should not be an issue.
diff --git a/vendor/mockery/mockery/docs/getting_started/index.rst b/vendor/mockery/mockery/docs/getting_started/index.rst
new file mode 100644
index 00000000..434755c8
--- /dev/null
+++ b/vendor/mockery/mockery/docs/getting_started/index.rst
@@ -0,0 +1,12 @@
+Getting Started
+===============
+
+.. toctree::
+ :hidden:
+
+ installation
+ upgrading
+ simple_example
+ quick_reference
+
+.. include:: map.rst.inc
diff --git a/vendor/mockery/mockery/docs/getting_started/installation.rst b/vendor/mockery/mockery/docs/getting_started/installation.rst
new file mode 100644
index 00000000..f578adc9
--- /dev/null
+++ b/vendor/mockery/mockery/docs/getting_started/installation.rst
@@ -0,0 +1,49 @@
+.. index::
+ single: Installation
+
+Installation
+============
+
+Mockery can be installed using Composer or by cloning it from its GitHub
+repository. These two options are outlined below.
+
+Composer
+--------
+
+You can read more about Composer on `getcomposer.org `_.
+To install Mockery using Composer, first install Composer for your project
+using the instructions on the `Composer download page `_.
+You can then define your development dependency on Mockery using the suggested
+parameters below. While every effort is made to keep the master branch stable,
+you may prefer to use the current stable version tag instead (use the
+``@stable`` tag).
+
+.. code-block:: json
+
+ {
+ "require-dev": {
+ "mockery/mockery": "dev-master"
+ }
+ }
+
+To install, you then may call:
+
+.. code-block:: bash
+
+ php composer.phar update
+
+This will install Mockery as a development dependency, meaning it won't be
+installed when using ``php composer.phar update --no-dev`` in production.
+
+Other way to install is directly from composer command line, as below.
+
+.. code-block:: bash
+
+ php composer.phar require --dev mockery/mockery
+
+Git
+---
+
+The Git repository hosts the development version in its master branch. You can
+install this using Composer by referencing ``dev-master`` as your preferred
+version in your project's ``composer.json`` file as the earlier example shows.
diff --git a/vendor/mockery/mockery/docs/getting_started/map.rst.inc b/vendor/mockery/mockery/docs/getting_started/map.rst.inc
new file mode 100644
index 00000000..1055945b
--- /dev/null
+++ b/vendor/mockery/mockery/docs/getting_started/map.rst.inc
@@ -0,0 +1,4 @@
+* :doc:`/getting_started/installation`
+* :doc:`/getting_started/upgrading`
+* :doc:`/getting_started/simple_example`
+* :doc:`/getting_started/quick_reference`
diff --git a/vendor/mockery/mockery/docs/getting_started/quick_reference.rst b/vendor/mockery/mockery/docs/getting_started/quick_reference.rst
new file mode 100644
index 00000000..e729a850
--- /dev/null
+++ b/vendor/mockery/mockery/docs/getting_started/quick_reference.rst
@@ -0,0 +1,200 @@
+.. index::
+ single: Quick Reference
+
+Quick Reference
+===============
+
+The purpose of this page is to give a quick and short overview of some of the
+most common Mockery features.
+
+Do read the :doc:`../reference/index` to learn about all the Mockery features.
+
+Integrate Mockery with PHPUnit, either by extending the ``MockeryTestCase``:
+
+.. code-block:: php
+
+ use \Mockery\Adapter\Phpunit\MockeryTestCase;
+
+ class MyTest extends MockeryTestCase
+ {
+ }
+
+or by using the ``MockeryPHPUnitIntegration`` trait:
+
+.. code-block:: php
+
+ use \PHPUnit\Framework\TestCase;
+ use \Mockery\Adapter\Phpunit\MockeryPHPUnitIntegration;
+
+ class MyTest extends TestCase
+ {
+ use MockeryPHPUnitIntegration;
+ }
+
+Creating a test double:
+
+.. code-block:: php
+
+ $testDouble = \Mockery::mock('MyClass');
+
+Creating a test double that implements a certain interface:
+
+.. code-block:: php
+
+ $testDouble = \Mockery::mock('MyClass, MyInterface');
+
+Expecting a method to be called on a test double:
+
+.. code-block:: php
+
+ $testDouble = \Mockery::mock('MyClass');
+ $testDouble->shouldReceive('foo');
+
+Expecting a method to **not** be called on a test double:
+
+.. code-block:: php
+
+ $testDouble = \Mockery::mock('MyClass');
+ $testDouble->shouldNotReceive('foo');
+
+Expecting a method to be called on a test double, once, with a certain argument,
+and to return a value:
+
+.. code-block:: php
+
+ $mock = \Mockery::mock('MyClass');
+ $mock->shouldReceive('foo')
+ ->once()
+ ->with($arg)
+ ->andReturn($returnValue);
+
+Expecting a method to be called on a test double and to return a different value
+for each successive call:
+
+.. code-block:: php
+
+ $mock = \Mockery::mock('MyClass');
+ $mock->shouldReceive('foo')
+ ->andReturn(1, 2, 3);
+
+ $mock->foo(); // int(1);
+ $mock->foo(); // int(2);
+ $mock->foo(); // int(3);
+ $mock->foo(); // int(3);
+
+Creating a runtime partial test double:
+
+.. code-block:: php
+
+ $mock = \Mockery::mock('MyClass')->makePartial();
+
+Creating a spy:
+
+.. code-block:: php
+
+ $spy = \Mockery::spy('MyClass');
+
+Expecting that a spy should have received a method call:
+
+.. code-block:: php
+
+ $spy = \Mockery::spy('MyClass');
+
+ $spy->foo();
+
+ $spy->shouldHaveReceived()->foo();
+
+Not so simple examples
+^^^^^^^^^^^^^^^^^^^^^^
+
+Creating a mock object to return a sequence of values from a set of method
+calls:
+
+.. code-block:: php
+
+ use \Mockery\Adapter\Phpunit\MockeryTestCase;
+
+ class SimpleTest extends MockeryTestCase
+ {
+ public function testSimpleMock()
+ {
+ $mock = \Mockery::mock(array('pi' => 3.1416, 'e' => 2.71));
+ $this->assertEquals(3.1416, $mock->pi());
+ $this->assertEquals(2.71, $mock->e());
+ }
+ }
+
+Creating a mock object which returns a self-chaining Undefined object for a
+method call:
+
+.. code-block:: php
+
+ use \Mockery\Adapter\Phpunit\MockeryTestCase;
+
+ class UndefinedTest extends MockeryTestCase
+ {
+ public function testUndefinedValues()
+ {
+ $mock = \Mockery::mock('mymock');
+ $mock->shouldReceive('divideBy')->with(0)->andReturnUndefined();
+ $this->assertTrue($mock->divideBy(0) instanceof \Mockery\Undefined);
+ }
+ }
+
+Creating a mock object with multiple query calls and a single update call:
+
+.. code-block:: php
+
+ use \Mockery\Adapter\Phpunit\MockeryTestCase;
+
+ class DbTest extends MockeryTestCase
+ {
+ public function testDbAdapter()
+ {
+ $mock = \Mockery::mock('db');
+ $mock->shouldReceive('query')->andReturn(1, 2, 3);
+ $mock->shouldReceive('update')->with(5)->andReturn(NULL)->once();
+
+ // ... test code here using the mock
+ }
+ }
+
+Expecting all queries to be executed before any updates:
+
+.. code-block:: php
+
+ use \Mockery\Adapter\Phpunit\MockeryTestCase;
+
+ class DbTest extends MockeryTestCase
+ {
+ public function testQueryAndUpdateOrder()
+ {
+ $mock = \Mockery::mock('db');
+ $mock->shouldReceive('query')->andReturn(1, 2, 3)->ordered();
+ $mock->shouldReceive('update')->andReturn(NULL)->once()->ordered();
+
+ // ... test code here using the mock
+ }
+ }
+
+Creating a mock object where all queries occur after startup, but before finish,
+and where queries are expected with several different params:
+
+.. code-block:: php
+
+ use \Mockery\Adapter\Phpunit\MockeryTestCase;
+
+ class DbTest extends MockeryTestCase
+ {
+ public function testOrderedQueries()
+ {
+ $db = \Mockery::mock('db');
+ $db->shouldReceive('startup')->once()->ordered();
+ $db->shouldReceive('query')->with('CPWR')->andReturn(12.3)->once()->ordered('queries');
+ $db->shouldReceive('query')->with('MSFT')->andReturn(10.0)->once()->ordered('queries');
+ $db->shouldReceive('query')->with(\Mockery::pattern("/^....$/"))->andReturn(3.3)->atLeast()->once()->ordered('queries');
+ $db->shouldReceive('finish')->once()->ordered();
+
+ // ... test code here using the mock
+ }
+ }
diff --git a/vendor/mockery/mockery/docs/getting_started/simple_example.rst b/vendor/mockery/mockery/docs/getting_started/simple_example.rst
new file mode 100644
index 00000000..32ee2691
--- /dev/null
+++ b/vendor/mockery/mockery/docs/getting_started/simple_example.rst
@@ -0,0 +1,70 @@
+.. index::
+ single: Getting Started; Simple Example
+
+Simple Example
+==============
+
+Imagine we have a ``Temperature`` class which samples the temperature of a
+locale before reporting an average temperature. The data could come from a web
+service or any other data source, but we do not have such a class at present.
+We can, however, assume some basic interactions with such a class based on its
+interaction with the ``Temperature`` class:
+
+.. code-block:: php
+
+ class Temperature
+ {
+ private $service;
+
+ public function __construct($service)
+ {
+ $this->service = $service;
+ }
+
+ public function average()
+ {
+ $total = 0;
+ for ($i=0; $i<3; $i++) {
+ $total += $this->service->readTemp();
+ }
+ return $total/3;
+ }
+ }
+
+Even without an actual service class, we can see how we expect it to operate.
+When writing a test for the ``Temperature`` class, we can now substitute a
+mock object for the real service which allows us to test the behaviour of the
+``Temperature`` class without actually needing a concrete service instance.
+
+.. code-block:: php
+
+ use \Mockery;
+
+ class TemperatureTest extends \PHPUnit\Framework\TestCase
+ {
+ public function tearDown()
+ {
+ Mockery::close();
+ }
+
+ public function testGetsAverageTemperatureFromThreeServiceReadings()
+ {
+ $service = Mockery::mock('service');
+ $service->shouldReceive('readTemp')
+ ->times(3)
+ ->andReturn(10, 12, 14);
+
+ $temperature = new Temperature($service);
+
+ $this->assertEquals(12, $temperature->average());
+ }
+ }
+
+We create a mock object which our ``Temperature`` class will use and set some
+expectations for that mock — that it should receive three calls to the ``readTemp``
+method, and these calls will return 10, 12, and 14 as results.
+
+.. note::
+
+ PHPUnit integration can remove the need for a ``tearDown()`` method. See
+ ":doc:`/reference/phpunit_integration`" for more information.
diff --git a/vendor/mockery/mockery/docs/getting_started/upgrading.rst b/vendor/mockery/mockery/docs/getting_started/upgrading.rst
new file mode 100644
index 00000000..7201e597
--- /dev/null
+++ b/vendor/mockery/mockery/docs/getting_started/upgrading.rst
@@ -0,0 +1,82 @@
+.. index::
+ single: Upgrading
+
+Upgrading
+=========
+
+Upgrading to 1.0.0
+------------------
+
+Minimum PHP version
++++++++++++++++++++
+
+As of Mockery 1.0.0 the minimum PHP version required is 5.6.
+
+Using Mockery with PHPUnit
+++++++++++++++++++++++++++
+
+In the "old days", 0.9.x and older, the way Mockery was integrated with PHPUnit was
+through a PHPUnit listener. That listener would in turn call the ``\Mockery::close()``
+method for us.
+
+As of 1.0.0, PHPUnit test cases where we want to use Mockery, should either use the
+``\Mockery\Adapter\Phpunit\MockeryPHPUnitIntegration`` trait, or extend the
+``\Mockery\Adapter\Phpunit\MockeryTestCase`` test case. This will in turn call the
+``\Mockery::close()`` method for us.
+
+Read the documentation for a detailed overview of ":doc:`/reference/phpunit_integration`".
+
+``\Mockery\Matcher\MustBe`` is deprecated
++++++++++++++++++++++++++++++++++++++++++
+
+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
+MustBe matcher.
+
+``allows`` and ``expects``
+++++++++++++++++++++++++++
+
+As of 1.0.0, Mockery has two new methods to set up expectations: ``allows`` and ``expects``.
+This means that these methods names are now "reserved" for Mockery, or in other words
+classes you want to mock with Mockery, can't have methods called ``allows`` or ``expects``.
+
+Read more in the documentation about this ":doc:`/reference/alternative_should_receive_syntax`".
+
+No more implicit regex matching for string arguments
+++++++++++++++++++++++++++++++++++++++++++++++++++++
+
+When setting up string arguments in method expectations, Mockery 0.9.x and older, would try
+to match arguments using a regular expression in a "last attempt" scenario.
+
+As of 1.0.0, Mockery will no longer attempt to do this regex matching, but will only try
+first the identical operator ``===``, and failing that, the equals operator ``==``.
+
+If you want to match an argument using regular expressions, please use the new
+``\Mockery\Matcher\Pattern`` matcher. Read more in the documentation about this
+pattern matcher in the ":doc:`/reference/argument_validation`" section.
+
+``andThrow`` ``\Throwable``
++++++++++++++++++++++++++++
+
+As of 1.0.0, the ``andThrow`` can now throw any ``\Throwable``.
+
+Upgrading to 0.9
+----------------
+
+The generator was completely rewritten, so any code with a deep integration to
+mockery will need evaluating.
+
+Upgrading to 0.8
+----------------
+
+Since the release of 0.8.0 the following behaviours were altered:
+
+1. The ``shouldIgnoreMissing()`` behaviour optionally applied to mock objects
+ returned an instance of ``\Mockery\Undefined`` when methods called did not
+ match a known expectation. Since 0.8.0, this behaviour was switched to
+ returning ``null`` instead. You can restore the 0.7.2 behaviour by using the
+ following:
+
+ .. code-block:: php
+
+ $mock = \Mockery::mock('stdClass')->shouldIgnoreMissing()->asUndefined();
diff --git a/vendor/mockery/mockery/docs/index.rst b/vendor/mockery/mockery/docs/index.rst
new file mode 100644
index 00000000..f8cbbd32
--- /dev/null
+++ b/vendor/mockery/mockery/docs/index.rst
@@ -0,0 +1,76 @@
+Mockery
+=======
+
+Mockery is a simple yet flexible PHP mock object framework for use in unit
+testing with PHPUnit, PHPSpec or any other testing framework. Its core goal is
+to offer a test double framework with a succinct API capable of clearly
+defining all possible object operations and interactions using a human
+readable Domain Specific Language (DSL). Designed as a drop in alternative to
+PHPUnit's phpunit-mock-objects library, Mockery is easy to integrate with
+PHPUnit and can operate alongside phpunit-mock-objects without the World
+ending.
+
+Mock Objects
+------------
+
+In unit tests, mock objects simulate the behaviour of real objects. They are
+commonly utilised to offer test isolation, to stand in for objects which do
+not yet exist, or to allow for the exploratory design of class APIs without
+requiring actual implementation up front.
+
+The benefits of a mock object framework are to allow for the flexible
+generation of such mock objects (and stubs). They allow the setting of
+expected method calls and return values using a flexible API which is capable
+of capturing every possible real object behaviour in way that is stated as
+close as possible to a natural language description.
+
+Getting Started
+---------------
+
+Ready to dive into the Mockery framework? Then you can get started by reading
+the "Getting Started" section!
+
+.. toctree::
+ :hidden:
+
+ getting_started/index
+
+.. include:: getting_started/map.rst.inc
+
+Reference
+---------
+
+The reference contains a complete overview of all features of the Mockery
+framework.
+
+.. toctree::
+ :hidden:
+
+ reference/index
+
+.. include:: reference/map.rst.inc
+
+Mockery
+-------
+
+Learn about Mockery's configuration, reserved method names, exceptions...
+
+.. toctree::
+ :hidden:
+
+ mockery/index
+
+.. include:: mockery/map.rst.inc
+
+Cookbook
+--------
+
+Want to learn some easy tips and tricks? Take a look at the cookbook articles!
+
+.. toctree::
+ :hidden:
+
+ cookbook/index
+
+.. include:: cookbook/map.rst.inc
+
diff --git a/vendor/mockery/mockery/docs/mockery/configuration.rst b/vendor/mockery/mockery/docs/mockery/configuration.rst
new file mode 100644
index 00000000..00713367
--- /dev/null
+++ b/vendor/mockery/mockery/docs/mockery/configuration.rst
@@ -0,0 +1,94 @@
+.. index::
+ single: Mockery; Configuration
+
+Mockery Global Configuration
+============================
+
+To allow for a degree of fine-tuning, Mockery utilises a singleton
+configuration object to store a small subset of core behaviours. The three
+currently present include:
+
+* Option to allow/disallow the mocking of methods which do not actually exist
+ fulfilled (i.e. unused)
+* Setter/Getter for added a parameter map for internal PHP class methods
+ (``Reflection`` cannot detect these automatically)
+* Option to drive if quick definitions should define a stub or a mock with
+ an 'at least once' expectation.
+
+By default, the first behaviour is enabled. Of course, there are
+situations where this can lead to unintended consequences. The mocking of
+non-existent methods may allow mocks based on real classes/objects to fall out
+of sync with the actual implementations, especially when some degree of
+integration testing (testing of object wiring) is not being performed.
+
+You may allow or disallow this behaviour (whether for whole test suites or
+just select tests) by using the following call:
+
+.. code-block:: php
+
+ \Mockery::getConfiguration()->allowMockingNonExistentMethods(bool);
+
+Passing a true allows the behaviour, false disallows it. It takes effect
+immediately until switched back. If the behaviour is detected when not allowed,
+it will result in an Exception being thrown at that point. Note that disallowing
+this behaviour should be carefully considered since it necessarily removes at
+least some of Mockery's flexibility.
+
+The other two methods are:
+
+.. code-block:: php
+
+ \Mockery::getConfiguration()->setInternalClassMethodParamMap($class, $method, array $paramMap)
+ \Mockery::getConfiguration()->getInternalClassMethodParamMap($class, $method)
+
+These are used to define parameters (i.e. the signature string of each) for the
+methods of internal PHP classes (e.g. SPL, or PECL extension classes like
+ext/mongo's MongoCollection. Reflection cannot analyse the parameters of internal
+classes. Most of the time, you never need to do this. It's mainly needed where an
+internal class method uses pass-by-reference for a parameter - you MUST in such
+cases ensure the parameter signature includes the ``&`` symbol correctly as Mockery
+won't correctly add it automatically for internal classes. Note that internal class
+parameter overriding is not available in PHP 8. This is because incompatible
+signatures have been reclassified as fatal errors.
+
+Finally there is the possibility to change what a quick definition produces.
+By default quick definitions create stubs but you can change this behaviour
+by asking Mockery to use 'at least once' expectations.
+
+.. code-block:: php
+
+ \Mockery::getConfiguration()->getQuickDefinitions()->shouldBeCalledAtLeastOnce(bool)
+
+Passing a true allows the behaviour, false disallows it. It takes effect
+immediately until switched back. By doing so you can avoid the proliferating of
+quick definitions that accumulate overtime in your code since the test would
+fail in case the 'at least once' expectation is not fulfilled.
+
+Disabling reflection caching
+----------------------------
+
+Mockery heavily uses `"reflection" `_
+to do it's job. To speed up things, Mockery caches internally the information it
+gathers via reflection. In some cases, this caching can cause problems.
+
+The **only** known situation when this occurs is when PHPUnit's ``--static-backup`` option
+is used. If you use ``--static-backup`` and you get an error that looks like the
+following:
+
+.. code-block:: php
+
+ Error: Internal error: Failed to retrieve the reflection object
+
+We suggest turning off the reflection cache as so:
+
+.. code-block:: php
+
+ \Mockery::getConfiguration()->disableReflectionCache();
+
+Turning it back on can be done like so:
+
+.. code-block:: php
+
+ \Mockery::getConfiguration()->enableReflectionCache();
+
+In no other situation should you be required turn this reflection cache off.
diff --git a/vendor/mockery/mockery/docs/mockery/exceptions.rst b/vendor/mockery/mockery/docs/mockery/exceptions.rst
new file mode 100644
index 00000000..623b158e
--- /dev/null
+++ b/vendor/mockery/mockery/docs/mockery/exceptions.rst
@@ -0,0 +1,65 @@
+.. index::
+ single: Mockery; Exceptions
+
+Mockery Exceptions
+==================
+
+Mockery throws three types of exceptions when it cannot verify a mock object.
+
+#. ``\Mockery\Exception\InvalidCountException``
+#. ``\Mockery\Exception\InvalidOrderException``
+#. ``\Mockery\Exception\NoMatchingExpectationException``
+
+You can capture any of these exceptions in a try...catch block to query them
+for specific information which is also passed along in the exception message
+but is provided separately from getters should they be useful when logging or
+reformatting output.
+
+\Mockery\Exception\InvalidCountException
+----------------------------------------
+
+The exception class is used when a method is called too many (or too few)
+times and offers the following methods:
+
+* ``getMock()`` - return actual mock object
+* ``getMockName()`` - return the name of the mock object
+* ``getMethodName()`` - return the name of the method the failing expectation
+ is attached to
+* ``getExpectedCount()`` - return expected calls
+* ``getExpectedCountComparative()`` - returns a string, e.g. ``<=`` used to
+ compare to actual count
+* ``getActualCount()`` - return actual calls made with given argument
+ constraints
+
+\Mockery\Exception\InvalidOrderException
+----------------------------------------
+
+The exception class is used when a method is called outside the expected order
+set using the ``ordered()`` and ``globally()`` expectation modifiers. It
+offers the following methods:
+
+* ``getMock()`` - return actual mock object
+* ``getMockName()`` - return the name of the mock object
+* ``getMethodName()`` - return the name of the method the failing expectation
+ is attached to
+* ``getExpectedOrder()`` - returns an integer represented the expected index
+ for which this call was expected
+* ``getActualOrder()`` - return the actual index at which this method call
+ occurred.
+
+\Mockery\Exception\NoMatchingExpectationException
+-------------------------------------------------
+
+The exception class is used when a method call does not match any known
+expectation. All expectations are uniquely identified in a mock object by the
+method name and the list of expected arguments. You can disable this exception
+and opt for returning NULL from all unexpected method calls by using the
+earlier mentioned shouldIgnoreMissing() behaviour modifier. This exception
+class offers the following methods:
+
+* ``getMock()`` - return actual mock object
+* ``getMockName()`` - return the name of the mock object
+* ``getMethodName()`` - return the name of the method the failing expectation
+ is attached to
+* ``getActualArguments()`` - return actual arguments used to search for a
+ matching expectation
diff --git a/vendor/mockery/mockery/docs/mockery/gotchas.rst b/vendor/mockery/mockery/docs/mockery/gotchas.rst
new file mode 100644
index 00000000..92c566dd
--- /dev/null
+++ b/vendor/mockery/mockery/docs/mockery/gotchas.rst
@@ -0,0 +1,44 @@
+.. index::
+ single: Mockery; Gotchas
+
+Gotchas!
+========
+
+Mocking objects in PHP has its limitations and gotchas. Some functionality
+can't be mocked or can't be mocked YET! If you locate such a circumstance,
+please please (pretty please with sugar on top) create a new issue on GitHub
+so it can be documented and resolved where possible. Here is a list to note:
+
+1. Classes containing public ``__wakeup()`` methods can be mocked but the
+ mocked ``__wakeup()`` method will perform no actions and cannot have
+ expectations set for it. This is necessary since Mockery must serialize and
+ unserialize objects to avoid some ``__construct()`` insanity and attempting
+ to mock a ``__wakeup()`` method as normal leads to a
+ ``BadMethodCallException`` being thrown.
+
+2. Mockery has two scenarios where real classes are replaced: Instance mocks
+ and alias mocks. Both will generate PHP fatal errors if the real class is
+ loaded, usually via a require or include statement. Only use these two mock
+ types where autoloading is in place and where classes are not explicitly
+ loaded on a per-file basis using ``require()``, ``require_once()``, etc.
+
+3. Internal PHP classes are not entirely capable of being fully analysed using
+ ``Reflection``. For example, ``Reflection`` cannot reveal details of
+ expected parameters to the methods of such internal classes. As a result,
+ there will be problems where a method parameter is defined to accept a
+ value by reference (Mockery cannot detect this condition and will assume a
+ pass by value on scalars and arrays). If references as internal class
+ method parameters are needed, you should use the
+ ``\Mockery\Configuration::setInternalClassMethodParamMap()`` method.
+ Note, however that internal class parameter overriding is not available in
+ PHP 8 since incompatible signatures have been reclassified as fatal errors.
+
+4. Creating a mock implementing a certain interface with incorrect case in the
+ interface name, and then creating a second mock implementing the same
+ interface, but this time with the correct case, will have undefined behavior
+ due to PHP's ``class_exists`` and related functions being case insensitive.
+ Using the ``::class`` keyword in PHP can help you avoid these mistakes.
+
+The gotchas noted above are largely down to PHP's architecture and are assumed
+to be unavoidable. But - if you figure out a solution (or a better one than
+what may exist), let us know!
diff --git a/vendor/mockery/mockery/docs/mockery/index.rst b/vendor/mockery/mockery/docs/mockery/index.rst
new file mode 100644
index 00000000..b698d6cb
--- /dev/null
+++ b/vendor/mockery/mockery/docs/mockery/index.rst
@@ -0,0 +1,12 @@
+Mockery
+=======
+
+.. toctree::
+ :hidden:
+
+ configuration
+ exceptions
+ reserved_method_names
+ gotchas
+
+.. include:: map.rst.inc
diff --git a/vendor/mockery/mockery/docs/mockery/map.rst.inc b/vendor/mockery/mockery/docs/mockery/map.rst.inc
new file mode 100644
index 00000000..46ffa975
--- /dev/null
+++ b/vendor/mockery/mockery/docs/mockery/map.rst.inc
@@ -0,0 +1,4 @@
+* :doc:`/mockery/configuration`
+* :doc:`/mockery/exceptions`
+* :doc:`/mockery/reserved_method_names`
+* :doc:`/mockery/gotchas`
diff --git a/vendor/mockery/mockery/docs/mockery/reserved_method_names.rst b/vendor/mockery/mockery/docs/mockery/reserved_method_names.rst
new file mode 100644
index 00000000..5ad58d40
--- /dev/null
+++ b/vendor/mockery/mockery/docs/mockery/reserved_method_names.rst
@@ -0,0 +1,33 @@
+.. index::
+ single: Reserved Method Names
+
+Reserved Method Names
+=====================
+
+As you may have noticed, Mockery uses a number of methods called directly on
+all mock objects, for example ``shouldReceive()``. Such methods are necessary
+in order to setup expectations on the given mock, and so they cannot be
+implemented on the classes or objects being mocked without creating a method
+name collision (reported as a PHP fatal error). The methods reserved by
+Mockery are:
+
+* ``shouldReceive()``
+* ``shouldNotReceive()``
+* ``allows()``
+* ``expects()``
+* ``shouldAllowMockingMethod()``
+* ``shouldIgnoreMissing()``
+* ``asUndefined()``
+* ``shouldAllowMockingProtectedMethods()``
+* ``makePartial()``
+* ``byDefault()``
+* ``shouldHaveReceived()``
+* ``shouldHaveBeenCalled()``
+* ``shouldNotHaveReceived()``
+* ``shouldNotHaveBeenCalled()``
+
+
+In addition, all mocks utilise a set of added methods and protected properties
+which cannot exist on the class or object being mocked. These are far less
+likely to cause collisions. All properties are prefixed with ``_mockery`` and
+all method names with ``mockery_``.
diff --git a/vendor/mockery/mockery/docs/reference/alternative_should_receive_syntax.rst b/vendor/mockery/mockery/docs/reference/alternative_should_receive_syntax.rst
new file mode 100644
index 00000000..78c1e83c
--- /dev/null
+++ b/vendor/mockery/mockery/docs/reference/alternative_should_receive_syntax.rst
@@ -0,0 +1,91 @@
+.. index::
+ single: Alternative shouldReceive Syntax
+
+Alternative shouldReceive Syntax
+================================
+
+As of Mockery 1.0.0, we support calling methods as we would call any PHP method,
+and not as string arguments to Mockery ``should*`` methods.
+
+The two Mockery methods that enable this are ``allows()`` and ``expects()``.
+
+Allows
+------
+
+We use ``allows()`` when we create stubs for methods that return a predefined
+return value, but for these method stubs we don't care how many times, or if at
+all, were they called.
+
+.. code-block:: php
+
+ $mock = \Mockery::mock('MyClass');
+ $mock->allows([
+ 'name_of_method_1' => 'return value',
+ 'name_of_method_2' => 'return value',
+ ]);
+
+This is equivalent with the following ``shouldReceive`` syntax:
+
+.. code-block:: php
+
+ $mock = \Mockery::mock('MyClass');
+ $mock->shouldReceive([
+ 'name_of_method_1' => 'return value',
+ 'name_of_method_2' => 'return value',
+ ]);
+
+Note that with this format, we also tell Mockery that we don't care about the
+arguments to the stubbed methods.
+
+If we do care about the arguments, we would do it like so:
+
+.. code-block:: php
+
+ $mock = \Mockery::mock('MyClass');
+ $mock->allows()
+ ->name_of_method_1($arg1)
+ ->andReturn('return value');
+
+This is equivalent with the following ``shouldReceive`` syntax:
+
+.. code-block:: php
+
+ $mock = \Mockery::mock('MyClass');
+ $mock->shouldReceive('name_of_method_1')
+ ->with($arg1)
+ ->andReturn('return value');
+
+Expects
+-------
+
+We use ``expects()`` when we want to verify that a particular method was called:
+
+.. code-block:: php
+
+ $mock = \Mockery::mock('MyClass');
+ $mock->expects()
+ ->name_of_method_1($arg1)
+ ->andReturn('return value');
+
+This is equivalent with the following ``shouldReceive`` syntax:
+
+.. code-block:: php
+
+ $mock = \Mockery::mock('MyClass');
+ $mock->shouldReceive('name_of_method_1')
+ ->once()
+ ->with($arg1)
+ ->andReturn('return value');
+
+By default ``expects()`` sets up an expectation that the method should be called
+once and once only. If we expect more than one call to the method, we can change
+that expectation:
+
+.. code-block:: php
+
+ $mock = \Mockery::mock('MyClass');
+ $mock->expects()
+ ->name_of_method_1($arg1)
+ ->twice()
+ ->andReturn('return value');
+
diff --git a/vendor/mockery/mockery/docs/reference/argument_validation.rst b/vendor/mockery/mockery/docs/reference/argument_validation.rst
new file mode 100644
index 00000000..9351ce40
--- /dev/null
+++ b/vendor/mockery/mockery/docs/reference/argument_validation.rst
@@ -0,0 +1,338 @@
+.. index::
+ single: Argument Validation
+
+Argument Validation
+===================
+
+The arguments passed to the ``with()`` declaration when setting up an
+expectation determine the criteria for matching method calls to expectations.
+Thus, we can setup up many expectations for a single method, each
+differentiated by the expected arguments. Such argument matching is done on a
+"best fit" basis. This ensures explicit matches take precedence over
+generalised matches.
+
+An explicit match is merely where the expected argument and the actual
+argument are easily equated (i.e. using ``===`` or ``==``). More generalised
+matches are possible using regular expressions, class hinting and the
+available generic matchers. The purpose of generalised matchers is to allow
+arguments be defined in non-explicit terms, e.g. ``Mockery::any()`` passed to
+``with()`` will match **any** argument in that position.
+
+Mockery's generic matchers do not cover all possibilities but offers optional
+support for the Hamcrest library of matchers. Hamcrest is a PHP port of the
+similarly named Java library (which has been ported also to Python, Erlang,
+etc). By using Hamcrest, Mockery does not need to duplicate Hamcrest's already
+impressive utility which itself promotes a natural English DSL.
+
+The examples below show Mockery matchers and their Hamcrest equivalent, if there
+is one. Hamcrest uses functions (no namespacing).
+
+.. note::
+
+ If you don't wish to use the global Hamcrest functions, they are all exposed
+ through the ``\Hamcrest\Matchers`` class as well, as static methods. Thus,
+ ``identicalTo($arg)`` is the same as ``\Hamcrest\Matchers::identicalTo($arg)``
+
+The most common matcher is the ``with()`` matcher:
+
+.. code-block:: php
+
+ $mock = \Mockery::mock('MyClass');
+ $mock->shouldReceive('foo')
+ ->with(1):
+
+It tells mockery that it should receive a call to the ``foo`` method with the
+integer ``1`` as an argument. In cases like this, Mockery first tries to match
+the arguments using ``===`` (identical) comparison operator. If the argument is
+a primitive, and if it fails the identical comparison, Mockery does a fallback
+to the ``==`` (equals) comparison operator.
+
+When matching objects as arguments, Mockery only does the strict ``===``
+comparison, which means only the same ``$object`` will match:
+
+.. code-block:: php
+
+ $object = new stdClass();
+ $mock = \Mockery::mock('MyClass');
+ $mock->shouldReceive("foo")
+ ->with($object);
+
+ // Hamcrest equivalent
+ $mock->shouldReceive("foo")
+ ->with(identicalTo($object));
+
+A different instance of ``stdClass`` will **not** match.
+
+.. note::
+
+ The ``Mockery\Matcher\MustBe`` matcher has been deprecated.
+
+If we need a loose comparison of objects, we can do that using Hamcrest's
+``equalTo`` matcher:
+
+.. code-block:: php
+
+ $mock->shouldReceive("foo")
+ ->with(equalTo(new stdClass));
+
+In cases when we don't care about the type, or the value of an argument, just
+that any argument is present, we use ``any()``:
+
+.. code-block:: php
+
+ $mock = \Mockery::mock('MyClass');
+ $mock->shouldReceive("foo")
+ ->with(\Mockery::any());
+
+ // Hamcrest equivalent
+ $mock->shouldReceive("foo")
+ ->with(anything())
+
+Anything and everything passed in this argument slot is passed unconstrained.
+
+Validating Types and Resources
+------------------------------
+
+The ``type()`` matcher accepts any string which can be attached to ``is_`` to
+form a valid type check.
+
+To match any PHP resource, we could do the following:
+
+.. code-block:: php
+
+ $mock = \Mockery::mock('MyClass');
+ $mock->shouldReceive("foo")
+ ->with(\Mockery::type('resource'));
+
+ // Hamcrest equivalents
+ $mock->shouldReceive("foo")
+ ->with(resourceValue());
+ $mock->shouldReceive("foo")
+ ->with(typeOf('resource'));
+
+It will return a ``true`` from an ``is_resource()`` call, if the provided
+argument to the method is a PHP resource. For example, ``\Mockery::type('float')``
+or Hamcrest's ``floatValue()`` and ``typeOf('float')`` checks use ``is_float()``,
+and ``\Mockery::type('callable')`` or Hamcrest's ``callable()`` uses
+``is_callable()``.
+
+The ``type()`` matcher also accepts a class or interface name to be used in an
+``instanceof`` evaluation of the actual argument. Hamcrest uses ``anInstanceOf()``.
+
+A full list of the type checkers is available at
+`php.net `_ or browse Hamcrest's function
+list in
+`the Hamcrest code `_.
+
+.. _argument-validation-complex-argument-validation:
+
+Complex Argument Validation
+---------------------------
+
+If we want to perform a complex argument validation, the ``on()`` matcher is
+invaluable. It accepts a closure (anonymous function) to which the actual
+argument will be passed.
+
+.. code-block:: php
+
+ $mock = \Mockery::mock('MyClass');
+ $mock->shouldReceive("foo")
+ ->with(\Mockery::on(closure));
+
+If the closure evaluates to (i.e. returns) boolean ``true`` then the argument is
+assumed to have matched the expectation.
+
+.. code-block:: php
+
+ $mock = \Mockery::mock('MyClass');
+
+ $mock->shouldReceive('foo')
+ ->with(\Mockery::on(function ($argument) {
+ if ($argument % 2 == 0) {
+ return true;
+ }
+ return false;
+ }));
+
+ $mock->foo(4); // matches the expectation
+ $mock->foo(3); // throws a NoMatchingExpectationException
+
+.. note::
+
+ There is no Hamcrest version of the ``on()`` matcher.
+
+We can also perform argument validation by passing a closure to ``withArgs()``
+method. The closure will receive all arguments passed in the call to the expected
+method and if it evaluates (i.e. returns) to boolean ``true``, then the list of
+arguments is assumed to have matched the expectation:
+
+.. code-block:: php
+
+ $mock = \Mockery::mock('MyClass');
+ $mock->shouldReceive("foo")
+ ->withArgs(closure);
+
+The closure can also handle optional parameters, so if an optional parameter is
+missing in the call to the expected method, it doesn't necessary means that the
+list of arguments doesn't match the expectation.
+
+.. code-block:: php
+
+ $closure = function ($odd, $even, $sum = null) {
+ $result = ($odd % 2 != 0) && ($even % 2 == 0);
+ if (!is_null($sum)) {
+ return $result && ($odd + $even == $sum);
+ }
+ return $result;
+ };
+
+ $mock = \Mockery::mock('MyClass');
+ $mock->shouldReceive('foo')->withArgs($closure);
+
+ $mock->foo(1, 2); // It matches the expectation: the optional argument is not needed
+ $mock->foo(1, 2, 3); // It also matches the expectation: the optional argument pass the validation
+ $mock->foo(1, 2, 4); // It doesn't match the expectation: the optional doesn't pass the validation
+
+.. note::
+
+ In previous versions, Mockery's ``with()`` would attempt to do a pattern
+ matching against the arguments, attempting to use the argument as a
+ regular expression. Over time this proved to be not such a great idea, so
+ we removed this functionality, and have introduced ``Mockery::pattern()``
+ instead.
+
+If we would like to match an argument against a regular expression, we can use
+the ``\Mockery::pattern()``:
+
+.. code-block:: php
+
+ $mock = \Mockery::mock('MyClass');
+ $mock->shouldReceive('foo')
+ ->with(\Mockery::pattern('/^foo/'));
+
+ // Hamcrest equivalent
+ $mock->shouldReceive('foo')
+ ->with(matchesPattern('/^foo/'));
+
+The ``ducktype()`` matcher is an alternative to matching by class type:
+
+.. code-block:: php
+
+ $mock = \Mockery::mock('MyClass');
+ $mock->shouldReceive('foo')
+ ->with(\Mockery::ducktype('foo', 'bar'));
+
+It matches any argument which is an object containing the provided list of
+methods to call.
+
+.. note::
+
+ There is no Hamcrest version of the ``ducktype()`` matcher.
+
+Capturing Arguments
+-------------------
+
+If we want to perform multiple validations on a single argument, the ``capture``
+matcher provides a streamlined alternative to using the ``on()`` matcher.
+It accepts a variable which the actual argument will be assigned.
+
+.. code-block:: php
+
+ $mock = \Mockery::mock('MyClass');
+ $mock->shouldReceive("foo")
+ ->with(\Mockery::capture($bar));
+
+This will assign *any* argument passed to ``foo`` to the local ``$bar`` variable to
+then perform additional validation using assertions.
+
+.. note::
+
+ The ``capture`` matcher always evaluates to ``true``. As such, we should always
+ perform additional argument validation.
+
+Additional Argument Matchers
+----------------------------
+
+The ``not()`` matcher matches any argument which is not equal or identical to
+the matcher's parameter:
+
+.. code-block:: php
+
+ $mock = \Mockery::mock('MyClass');
+ $mock->shouldReceive('foo')
+ ->with(\Mockery::not(2));
+
+ // Hamcrest equivalent
+ $mock->shouldReceive('foo')
+ ->with(not(2));
+
+``anyOf()`` matches any argument which equals any one of the given parameters:
+
+.. code-block:: php
+
+ $mock = \Mockery::mock('MyClass');
+ $mock->shouldReceive('foo')
+ ->with(\Mockery::anyOf(1, 2));
+
+ // Hamcrest equivalent
+ $mock->shouldReceive('foo')
+ ->with(anyOf(1,2));
+
+``notAnyOf()`` matches any argument which is not equal or identical to any of
+the given parameters:
+
+.. code-block:: php
+
+ $mock = \Mockery::mock('MyClass');
+ $mock->shouldReceive('foo')
+ ->with(\Mockery::notAnyOf(1, 2));
+
+.. note::
+
+ There is no Hamcrest version of the ``notAnyOf()`` matcher.
+
+``subset()`` matches any argument which is any array containing the given array
+subset:
+
+.. code-block:: php
+
+ $mock = \Mockery::mock('MyClass');
+ $mock->shouldReceive('foo')
+ ->with(\Mockery::subset(array(0 => 'foo')));
+
+This enforces both key naming and values, i.e. both the key and value of each
+actual element is compared.
+
+.. note::
+
+ There is no Hamcrest version of this functionality, though Hamcrest can check
+ a single entry using ``hasEntry()`` or ``hasKeyValuePair()``.
+
+``contains()`` matches any argument which is an array containing the listed
+values:
+
+.. code-block:: php
+
+ $mock = \Mockery::mock('MyClass');
+ $mock->shouldReceive('foo')
+ ->with(\Mockery::contains(value1, value2));
+
+The naming of keys is ignored.
+
+``hasKey()`` matches any argument which is an array containing the given key
+name:
+
+.. code-block:: php
+
+ $mock = \Mockery::mock('MyClass');
+ $mock->shouldReceive('foo')
+ ->with(\Mockery::hasKey(key));
+
+``hasValue()`` matches any argument which is an array containing the given
+value:
+
+.. code-block:: php
+
+ $mock = \Mockery::mock('MyClass');
+ $mock->shouldReceive('foo')
+ ->with(\Mockery::hasValue(value));
diff --git a/vendor/mockery/mockery/docs/reference/creating_test_doubles.rst b/vendor/mockery/mockery/docs/reference/creating_test_doubles.rst
new file mode 100644
index 00000000..6f8f8c3f
--- /dev/null
+++ b/vendor/mockery/mockery/docs/reference/creating_test_doubles.rst
@@ -0,0 +1,435 @@
+.. index::
+ single: Reference; Creating Test Doubles
+
+Creating Test Doubles
+=====================
+
+Mockery's main goal is to help us create test doubles. It can create stubs,
+mocks, and spies.
+
+Stubs and mocks are created the same. The difference between the two is that a
+stub only returns a preset result when called, while a mock needs to have
+expectations set on the method calls it expects to receive.
+
+Spies are a type of test doubles that keep track of the calls they received, and
+allow us to inspect these calls after the fact.
+
+When creating a test double object, we can pass in an identifier as a name for
+our test double. If we pass it no identifier, the test double name will be
+unknown. Furthermore, the identifier does not have to be a class name. It is a
+good practice, and our recommendation, to always name the test doubles with the
+same name as the underlying class we are creating test doubles for.
+
+If the identifier we use for our test double is a name of an existing class,
+the test double will inherit the type of the class (via inheritance), i.e. the
+mock object will pass type hints or ``instanceof`` evaluations for the existing
+class. This is useful when a test double must be of a specific type, to satisfy
+the expectations our code has.
+
+Stubs and mocks
+---------------
+
+Stubs and mocks are created by calling the ``\Mockery::mock()`` method. The
+following example shows how to create a stub, or a mock, object named "foo":
+
+.. code-block:: php
+
+ $mock = \Mockery::mock('foo');
+
+The mock object created like this is the loosest form of mocks possible, and is
+an instance of ``\Mockery\MockInterface``.
+
+.. note::
+
+ All test doubles created with Mockery are an instance of
+ ``\Mockery\MockInterface``, regardless are they a stub, mock or a spy.
+
+To create a stub or a mock object with no name, we can call the ``mock()``
+method with no parameters:
+
+.. code-block:: php
+
+ $mock = \Mockery::mock();
+
+As we stated earlier, we don't recommend creating stub or mock objects without
+a name.
+
+Classes, abstracts, interfaces
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+The recommended way to create a stub or a mock object is by using a name of
+an existing class we want to create a test double of:
+
+.. code-block:: php
+
+ $mock = \Mockery::mock('MyClass');
+
+This stub or mock object will have the type of ``MyClass``, through inheritance.
+
+Stub or mock objects can be based on any concrete class, abstract class or even
+an interface. The primary purpose is to ensure the mock object inherits a
+specific type for type hinting.
+
+.. code-block:: php
+
+ $mock = \Mockery::mock('MyInterface');
+
+This stub or mock object will implement the ``MyInterface`` interface.
+
+.. note::
+
+ Classes marked final, or classes that have methods marked final cannot be
+ mocked fully. Mockery supports creating partial mocks for these cases.
+ Partial mocks will be explained later in the documentation.
+
+Mockery also supports creating stub or mock objects based on a single existing
+class, which must implement one or more interfaces. We can do this by providing
+a comma-separated list of the class and interfaces as the first argument to the
+``\Mockery::mock()`` method:
+
+.. code-block:: php
+
+ $mock = \Mockery::mock('MyClass, MyInterface, OtherInterface');
+
+This stub or mock object will now be of type ``MyClass`` and implement the
+``MyInterface`` and ``OtherInterface`` interfaces.
+
+.. note::
+
+ The class name doesn't need to be the first member of the list but it's a
+ friendly convention to use for readability.
+
+We can tell a mock to implement the desired interfaces by passing the list of
+interfaces as the second argument:
+
+.. code-block:: php
+
+ $mock = \Mockery::mock('MyClass', 'MyInterface, OtherInterface');
+
+For all intents and purposes, this is the same as the previous example.
+
+Spies
+-----
+
+The third type of test doubles Mockery supports are spies. The main difference
+between spies and mock objects is that with spies we verify the calls made
+against our test double after the calls were made. We would use a spy when we
+don't necessarily care about all of the calls that are going to be made to an
+object.
+
+A spy will return ``null`` for all method calls it receives. It is not possible
+to tell a spy what will be the return value of a method call. If we do that, then
+we would deal with a mock object, and not with a spy.
+
+We create a spy by calling the ``\Mockery::spy()`` method:
+
+.. code-block:: php
+
+ $spy = \Mockery::spy('MyClass');
+
+Just as with stubs or mocks, we can tell Mockery to base a spy on any concrete
+or abstract class, or to implement any number of interfaces:
+
+.. code-block:: php
+
+ $spy = \Mockery::spy('MyClass, MyInterface, OtherInterface');
+
+This spy will now be of type ``MyClass`` and implement the ``MyInterface`` and
+``OtherInterface`` interfaces.
+
+.. note::
+
+ The ``\Mockery::spy()`` method call is actually a shorthand for calling
+ ``\Mockery::mock()->shouldIgnoreMissing()``. The ``shouldIgnoreMissing``
+ method is a "behaviour modifier". We'll discuss them a bit later.
+
+Mocks vs. Spies
+---------------
+
+Let's try and illustrate the difference between mocks and spies with the
+following example:
+
+.. code-block:: php
+
+ $mock = \Mockery::mock('MyClass');
+ $spy = \Mockery::spy('MyClass');
+
+ $mock->shouldReceive('foo')->andReturn(42);
+
+ $mockResult = $mock->foo();
+ $spyResult = $spy->foo();
+
+ $spy->shouldHaveReceived()->foo();
+
+ var_dump($mockResult); // int(42)
+ var_dump($spyResult); // null
+
+As we can see from this example, with a mock object we set the call expectations
+before the call itself, and we get the return result we expect it to return.
+With a spy object on the other hand, we verify the call has happened after the
+fact. The return result of a method call against a spy is always ``null``.
+
+We also have a dedicated chapter to :doc:`spies` only.
+
+.. _creating-test-doubles-partial-test-doubles:
+
+Partial Test Doubles
+--------------------
+
+Partial doubles are useful when we want to stub out, set expectations for, or
+spy on *some* methods of a class, but run the actual code for other methods.
+
+We differentiate between three types of partial test doubles:
+
+ * runtime partial test doubles,
+ * generated partial test doubles, and
+ * proxied partial test doubles.
+
+Runtime partial test doubles
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+What we call a runtime partial, involves creating a test double and then telling
+it to make itself partial. Any method calls that the double hasn't been told to
+allow or expect, will act as they would on a normal instance of the object.
+
+.. code-block:: php
+
+ class Foo {
+ function foo() { return 123; }
+ function bar() { return $this->foo(); }
+ }
+
+ $foo = mock(Foo::class)->makePartial();
+ $foo->foo(); // int(123);
+
+We can then tell the test double to allow or expect calls as with any other
+Mockery double.
+
+.. code-block:: php
+
+ $foo->shouldReceive('foo')->andReturn(456);
+ $foo->bar(); // int(456)
+
+See the cookbook entry on :doc:`../cookbook/big_parent_class` for an example
+usage of runtime partial test doubles.
+
+Generated partial test doubles
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+The second type of partial double we can create is what we call a generated
+partial. With generated partials, we specifically tell Mockery which methods
+we want to be able to allow or expect calls to. All other methods will run the
+actual code *directly*, so stubs and expectations on these methods will not
+work.
+
+.. code-block:: php
+
+ class Foo {
+ function foo() { return 123; }
+ function bar() { return $this->foo(); }
+ }
+
+ $foo = mock("Foo[foo]");
+
+ $foo->foo(); // error, no expectation set
+
+ $foo->shouldReceive('foo')->andReturn(456);
+ $foo->foo(); // int(456)
+
+ // setting an expectation for this has no effect
+ $foo->shouldReceive('bar')->andReturn(999);
+ $foo->bar(); // int(456)
+
+It's also possible to specify explicitly which methods to run directly using
+the `!method` syntax:
+
+.. code-block:: php
+
+ class Foo {
+ function foo() { return 123; }
+ function bar() { return $this->foo(); }
+ }
+
+ $foo = mock("Foo[!foo]");
+
+ $foo->foo(); // int(123)
+
+ $foo->bar(); // error, no expectation set
+
+.. note::
+
+ Even though we support generated partial test doubles, we do not recommend
+ using them.
+
+ One of the reasons why is because a generated partial will call the original
+ constructor of the mocked class. This can have unwanted side-effects during
+ testing application code.
+
+ See :doc:`../cookbook/not_calling_the_constructor` for more details.
+
+Proxied partial test doubles
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+A proxied partial mock is a partial of last resort. We may encounter a class
+which is simply not capable of being mocked because it has been marked as
+final. Similarly, we may find a class with methods marked as final. In such a
+scenario, we cannot simply extend the class and override methods to mock - we
+need to get creative.
+
+.. code-block:: php
+
+ $mock = \Mockery::mock(new MyClass);
+
+Yes, the new mock is a Proxy. It intercepts calls and reroutes them to the
+proxied object (which we construct and pass in) for methods which are not
+subject to any expectations. Indirectly, this allows us to mock methods
+marked final since the Proxy is not subject to those limitations. The tradeoff
+should be obvious - a proxied partial will fail any typehint checks for the
+class being mocked since it cannot extend that class.
+
+.. _creating-test-doubles-aliasing:
+
+Aliasing
+--------
+
+Prefixing the valid name of a class (which is NOT currently loaded) with
+"alias:" will generate an "alias mock". Alias mocks create a class alias with
+the given classname to stdClass and are generally used to enable the mocking
+of public static methods. Expectations set on the new mock object which refer
+to static methods will be used by all static calls to this class.
+
+.. code-block:: php
+
+ $mock = \Mockery::mock('alias:MyClass');
+
+
+.. note::
+
+ Even though aliasing classes is supported, we do not recommend it.
+
+Overloading
+-----------
+
+Prefixing the valid name of a class (which is NOT currently loaded) with
+"overload:" will generate an alias mock (as with "alias:") except that created
+new instances of that class will import any expectations set on the origin
+mock (``$mock``). The origin mock is never verified since it's used an
+expectation store for new instances. For this purpose we use the term "instance
+mock" to differentiate it from the simpler "alias mock".
+
+In other words, an instance mock will "intercept" when a new instance of the
+mocked class is created, then the mock will be used instead. This is useful
+especially when mocking hard dependencies which will be discussed later.
+
+.. code-block:: php
+
+ $mock = \Mockery::mock('overload:MyClass');
+
+.. note::
+
+ Using alias/instance mocks across more than one test will generate a fatal
+ error since we can't have two classes of the same name. To avoid this,
+ run each test of this kind in a separate PHP process (which is supported
+ out of the box by both PHPUnit and PHPT).
+
+
+.. _creating-test-doubles-named-mocks:
+
+Named Mocks
+-----------
+
+The ``namedMock()`` method will generate a class called by the first argument,
+so in this example ``MyClassName``. The rest of the arguments are treated in the
+same way as the ``mock`` method:
+
+.. code-block:: php
+
+ $mock = \Mockery::namedMock('MyClassName', 'DateTime');
+
+This example would create a class called ``MyClassName`` that extends
+``DateTime``.
+
+Named mocks are quite an edge case, but they can be useful when code depends
+on the ``__CLASS__`` magic constant, or when we need two derivatives of an
+abstract type, that are actually different classes.
+
+See the cookbook entry on :doc:`../cookbook/class_constants` for an example
+usage of named mocks.
+
+.. note::
+
+ We can only create a named mock once, any subsequent calls to
+ ``namedMock``, with different arguments are likely to cause exceptions.
+
+.. _creating-test-doubles-constructor-arguments:
+
+Constructor Arguments
+---------------------
+
+Sometimes the mocked class has required constructor arguments. We can pass these
+to Mockery as an indexed array, as the 2nd argument:
+
+.. code-block:: php
+
+ $mock = \Mockery::mock('MyClass', [$constructorArg1, $constructorArg2]);
+
+or if we need the ``MyClass`` to implement an interface as well, as the 3rd
+argument:
+
+.. code-block:: php
+
+ $mock = \Mockery::mock('MyClass', 'MyInterface', [$constructorArg1, $constructorArg2]);
+
+Mockery now knows to pass in ``$constructorArg1`` and ``$constructorArg2`` as
+arguments to the constructor.
+
+.. _creating-test-doubles-behavior-modifiers:
+
+Behavior Modifiers
+------------------
+
+When creating a mock object, we may wish to use some commonly preferred
+behaviours that are not the default in Mockery.
+
+The use of the ``shouldIgnoreMissing()`` behaviour modifier will label this
+mock object as a Passive Mock:
+
+.. code-block:: php
+
+ \Mockery::mock('MyClass')->shouldIgnoreMissing();
+
+In such a mock object, calls to methods which are not covered by expectations
+will return ``null`` instead of the usual error about there being no expectation
+matching the call.
+
+On PHP >= 7.0.0, methods with missing expectations that have a return type
+will return either a mock of the object (if return type is a class) or a
+"falsy" primitive value, e.g. empty string, empty array, zero for ints and
+floats, false for bools, or empty closures.
+
+On PHP >= 7.1.0, methods with missing expectations and nullable return type
+will return null.
+
+We can optionally prefer to return an object of type ``\Mockery\Undefined``
+(i.e. a ``null`` object) (which was the 0.7.2 behaviour) by using an
+additional modifier:
+
+.. code-block:: php
+
+ \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
+logic check.
+
+We have encountered the ``makePartial()`` method before, as it is the method we
+use to create runtime partial test doubles:
+
+.. code-block:: php
+
+ \Mockery::mock('MyClass')->makePartial();
+
+This form of mock object will defer all methods not subject to an expectation to
+the parent class of the mock, i.e. ``MyClass``. Whereas the previous
+``shouldIgnoreMissing()`` returned ``null``, this behaviour simply calls the
+parent's matching method.
diff --git a/vendor/mockery/mockery/docs/reference/demeter_chains.rst b/vendor/mockery/mockery/docs/reference/demeter_chains.rst
new file mode 100644
index 00000000..1dad5eff
--- /dev/null
+++ b/vendor/mockery/mockery/docs/reference/demeter_chains.rst
@@ -0,0 +1,38 @@
+.. index::
+ single: Mocking; Demeter Chains
+
+Mocking Demeter Chains And Fluent Interfaces
+============================================
+
+Both of these terms refer to the growing practice of invoking statements
+similar to:
+
+.. code-block:: php
+
+ $object->foo()->bar()->zebra()->alpha()->selfDestruct();
+
+The long chain of method calls isn't necessarily a bad thing, assuming they
+each link back to a local object the calling class knows. As a fun example,
+Mockery's long chains (after the first ``shouldReceive()`` method) all call to
+the same instance of ``\Mockery\Expectation``. However, sometimes this is not
+the case and the chain is constantly crossing object boundaries.
+
+In either case, mocking such a chain can be a horrible task. To make it easier
+Mockery supports demeter chain mocking. Essentially, we shortcut through the
+chain and return a defined value from the final call. For example, let's
+assume ``selfDestruct()`` returns the string "Ten!" to $object (an instance of
+``CaptainsConsole``). Here's how we could mock it.
+
+.. code-block:: php
+
+ $mock = \Mockery::mock('CaptainsConsole');
+ $mock->shouldReceive('foo->bar->zebra->alpha->selfDestruct')->andReturn('Ten!');
+
+The above expectation can follow any previously seen format or expectation,
+except that the method name is simply the string of all expected chain calls
+separated by ``->``. Mockery will automatically setup the chain of expected
+calls with its final return values, regardless of whatever intermediary object
+might be used in the real implementation.
+
+Arguments to all members of the chain (except the final call) are ignored in
+this process.
diff --git a/vendor/mockery/mockery/docs/reference/expectations.rst b/vendor/mockery/mockery/docs/reference/expectations.rst
new file mode 100644
index 00000000..608aaef1
--- /dev/null
+++ b/vendor/mockery/mockery/docs/reference/expectations.rst
@@ -0,0 +1,533 @@
+.. index::
+ single: Expectations
+
+Expectation Declarations
+========================
+
+.. note::
+
+ In order for our expectations to work we MUST call ``Mockery::close()``,
+ preferably in a callback method such as ``tearDown`` or ``_after``
+ (depending on whether or not we're integrating Mockery with another
+ framework). This static call cleans up the Mockery container used by the
+ current test, and run any verification tasks needed for our expectations.
+
+Once we have created a mock object, we'll often want to start defining how
+exactly it should behave (and how it should be called). This is where the
+Mockery expectation declarations take over.
+
+Declaring Method Call Expectations
+----------------------------------
+
+To tell our test double to expect a call for a method with a given name, we use
+the ``shouldReceive`` method:
+
+.. code-block:: php
+
+ $mock = \Mockery::mock('MyClass');
+ $mock->shouldReceive('name_of_method');
+
+This is the starting expectation upon which all other expectations and
+constraints are appended.
+
+We can declare more than one method call to be expected:
+
+.. code-block:: php
+
+ $mock = \Mockery::mock('MyClass');
+ $mock->shouldReceive('name_of_method_1', 'name_of_method_2');
+
+All of these will adopt any chained expectations or constraints.
+
+It is possible to declare the expectations for the method calls, along with
+their return values:
+
+.. code-block:: php
+
+ $mock = \Mockery::mock('MyClass');
+ $mock->shouldReceive([
+ 'name_of_method_1' => 'return value 1',
+ 'name_of_method_2' => 'return value 2',
+ ]);
+
+There's also a shorthand way of setting up method call expectations and their
+return values:
+
+.. code-block:: php
+
+ $mock = \Mockery::mock('MyClass', ['name_of_method_1' => 'return value 1', 'name_of_method_2' => 'return value 2']);
+
+All of these will adopt any additional chained expectations or constraints.
+
+We can declare that a test double should not expect a call to the given method
+name:
+
+.. code-block:: php
+
+ $mock = \Mockery::mock('MyClass');
+ $mock->shouldNotReceive('name_of_method');
+
+This method is a convenience method for calling ``shouldReceive()->never()``.
+
+Declaring Method Argument Expectations
+--------------------------------------
+
+For every method we declare expectation for, we can add constraints that the
+defined expectations apply only to the method calls that match the expected
+argument list:
+
+.. code-block:: php
+
+ $mock = \Mockery::mock('MyClass');
+ $mock->shouldReceive('name_of_method')
+ ->with($arg1, $arg2, ...);
+ // or
+ $mock->shouldReceive('name_of_method')
+ ->withArgs([$arg1, $arg2, ...]);
+
+We can add a lot more flexibility to argument matching using the built in
+matcher classes (see later). For example, ``\Mockery::any()`` matches any
+argument passed to that position in the ``with()`` parameter list. Mockery also
+allows Hamcrest library matchers - for example, the Hamcrest function
+``anything()`` is equivalent to ``\Mockery::any()``.
+
+It's important to note that this means all expectations attached only apply to
+the given method when it is called with these exact arguments:
+
+.. code-block:: php
+
+ $mock = \Mockery::mock('MyClass');
+
+ $mock->shouldReceive('foo')->with('Hello');
+
+ $mock->foo('Goodbye'); // throws a NoMatchingExpectationException
+
+This allows for setting up differing expectations based on the arguments
+provided to expected calls.
+
+Argument matching with closures
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+Instead of providing a built-in matcher for each argument, we can provide a
+closure that matches all passed arguments at once:
+
+.. code-block:: php
+
+ $mock = \Mockery::mock('MyClass');
+ $mock->shouldReceive('name_of_method')
+ ->withArgs(closure);
+
+The given closure receives all the arguments passed in the call to the expected
+method. In this way, this expectation only applies to method calls where passed
+arguments make the closure evaluate to true:
+
+.. code-block:: php
+
+ $mock = \Mockery::mock('MyClass');
+
+ $mock->shouldReceive('foo')->withArgs(function ($arg) {
+ if ($arg % 2 == 0) {
+ return true;
+ }
+ return false;
+ });
+
+ $mock->foo(4); // matches the expectation
+ $mock->foo(3); // throws a NoMatchingExpectationException
+
+Argument matching with some of given values
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+We can provide expected arguments that match passed arguments when mocked method
+is called.
+
+.. code-block:: php
+
+ $mock = \Mockery::mock('MyClass');
+ $mock->shouldReceive('name_of_method')
+ ->withSomeOfArgs(arg1, arg2, arg3, ...);
+
+The given expected arguments order doesn't matter.
+Check if expected values are included or not, but type should be matched:
+
+.. code-block:: php
+
+ $mock = \Mockery::mock('MyClass');
+ $mock->shouldReceive('foo')
+ ->withSomeOfArgs(1, 2);
+
+ $mock->foo(1, 2, 3); // matches the expectation
+ $mock->foo(3, 2, 1); // matches the expectation (passed order doesn't matter)
+ $mock->foo('1', '2'); // throws a NoMatchingExpectationException (type should be matched)
+ $mock->foo(3); // throws a NoMatchingExpectationException
+
+Any, or no arguments
+^^^^^^^^^^^^^^^^^^^^
+
+We can declare that the expectation matches a method call regardless of what
+arguments are passed:
+
+.. code-block:: php
+
+ $mock = \Mockery::mock('MyClass');
+ $mock->shouldReceive('name_of_method')
+ ->withAnyArgs();
+
+This is set by default unless otherwise specified.
+
+We can declare that the expectation matches method calls with zero arguments:
+
+.. code-block:: php
+
+ $mock = \Mockery::mock('MyClass');
+ $mock->shouldReceive('name_of_method')
+ ->withNoArgs();
+
+Declaring Return Value Expectations
+-----------------------------------
+
+For mock objects, we can tell Mockery what return values to return from the
+expected method calls.
+
+For that we can use the ``andReturn()`` method:
+
+.. code-block:: php
+
+ $mock = \Mockery::mock('MyClass');
+ $mock->shouldReceive('name_of_method')
+ ->andReturn($value);
+
+This sets a value to be returned from the expected method call.
+
+It is possible to set up expectation for multiple return values. By providing
+a sequence of return values, we tell Mockery what value to return on every
+subsequent call to the method:
+
+.. code-block:: php
+
+ $mock = \Mockery::mock('MyClass');
+ $mock->shouldReceive('name_of_method')
+ ->andReturn($value1, $value2, ...)
+
+The first call will return ``$value1`` and the second call will return ``$value2``.
+
+If we call the method more times than the number of return values we declared,
+Mockery will return the final value for any subsequent method call:
+
+.. code-block:: php
+
+ $mock = \Mockery::mock('MyClass');
+
+ $mock->shouldReceive('foo')->andReturn(1, 2, 3);
+
+ $mock->foo(); // int(1)
+ $mock->foo(); // int(2)
+ $mock->foo(); // int(3)
+ $mock->foo(); // int(3)
+
+The same can be achieved using the alternative syntax:
+
+.. code-block:: php
+
+ $mock = \Mockery::mock('MyClass');
+ $mock->shouldReceive('name_of_method')
+ ->andReturnValues([$value1, $value2, ...])
+
+It accepts a simple array instead of a list of parameters. The order of return
+is determined by the numerical index of the given array with the last array
+member being returned on all calls once previous return values are exhausted.
+
+The following two options are primarily for communication with test readers:
+
+.. code-block:: php
+
+ $mock = \Mockery::mock('MyClass');
+ $mock->shouldReceive('name_of_method')
+ ->andReturnNull();
+ // or
+ $mock->shouldReceive('name_of_method')
+ ->andReturn([null]);
+
+They mark the mock object method call as returning ``null`` or nothing.
+
+Sometimes we want to calculate the return results of the method calls, based on
+the arguments passed to the method. We can do that with the ``andReturnUsing()``
+method which accepts one or more closure:
+
+.. code-block:: php
+
+ $mock = \Mockery::mock('MyClass');
+ $mock->shouldReceive('name_of_method')
+ ->andReturnUsing(closure, ...);
+
+Closures can be queued by passing them as extra parameters as for ``andReturn()``.
+
+Occasionally, it can be useful to echo back one of the arguments that a method
+is called with. In this case we can use the ``andReturnArg()`` method; the
+argument to be returned is specified by its index in the arguments list:
+
+.. code-block:: php
+
+ $mock = \Mockery::mock('MyClass');
+ $mock->shouldReceive('name_of_method')
+ ->andReturnArg(1);
+
+This returns the second argument (index #1) from the list of arguments when the
+method is called.
+
+.. note::
+
+ We cannot currently mix ``andReturnUsing()`` or ``andReturnArg`` with
+ ``andReturn()``.
+
+If we are mocking fluid interfaces, the following method will be helpful:
+
+.. code-block:: php
+
+ $mock = \Mockery::mock('MyClass');
+ $mock->shouldReceive('name_of_method')
+ ->andReturnSelf();
+
+It sets the return value to the mocked class name.
+
+Throwing Exceptions
+-------------------
+
+We can tell the method of mock objects to throw exceptions:
+
+.. code-block:: php
+
+ $mock = \Mockery::mock('MyClass');
+ $mock->shouldReceive('name_of_method')
+ ->andThrow(new Exception);
+
+It will throw the given ``Exception`` object when called.
+
+Rather than an object, we can pass in the ``Exception`` class, message and/or code to
+use when throwing an ``Exception`` from the mocked method:
+
+.. code-block:: php
+
+ $mock = \Mockery::mock('MyClass');
+ $mock->shouldReceive('name_of_method')
+ ->andThrow('exception_name', 'message', 123456789);
+
+.. _expectations-setting-public-properties:
+
+Setting Public Properties
+-------------------------
+
+Used with an expectation so that when a matching method is called, we can cause
+a mock object's public property to be set to a specified value, by using
+``andSet()`` or ``set()``:
+
+.. code-block:: php
+
+ $mock = \Mockery::mock('MyClass');
+ $mock->shouldReceive('name_of_method')
+ ->andSet($property, $value);
+ // or
+ $mock->shouldReceive('name_of_method')
+ ->set($property, $value);
+
+In cases where we want to call the real method of the class that was mocked and
+return its result, the ``passthru()`` method tells the expectation to bypass
+a return queue:
+
+.. code-block:: php
+
+ passthru()
+
+It allows expectation matching and call count validation to be applied against
+real methods while still calling the real class method with the expected
+arguments.
+
+Declaring Call Count Expectations
+---------------------------------
+
+Besides setting expectations on the arguments of the method calls, and the
+return values of those same calls, we can set expectations on how many times
+should any method be called.
+
+When a call count expectation is not met, a
+``\Mockery\Expectation\InvalidCountException`` will be thrown.
+
+.. note::
+
+ It is absolutely required to call ``\Mockery::close()`` at the end of our
+ tests, for example in the ``tearDown()`` method of PHPUnit. Otherwise
+ Mockery will not verify the calls made against our mock objects.
+
+We can declare that the expected method may be called zero or more times:
+
+.. code-block:: php
+
+ $mock = \Mockery::mock('MyClass');
+ $mock->shouldReceive('name_of_method')
+ ->zeroOrMoreTimes();
+
+This is the default for all methods unless otherwise set.
+
+To tell Mockery to expect an exact number of calls to a method, we can use the
+following:
+
+.. code-block:: php
+
+ $mock = \Mockery::mock('MyClass');
+ $mock->shouldReceive('name_of_method')
+ ->times($n);
+
+where ``$n`` is the number of times the method should be called.
+
+A couple of most common cases got their shorthand methods.
+
+To declare that the expected method must be called one time only:
+
+.. code-block:: php
+
+ $mock = \Mockery::mock('MyClass');
+ $mock->shouldReceive('name_of_method')
+ ->once();
+
+To declare that the expected method must be called two times:
+
+.. code-block:: php
+
+ $mock = \Mockery::mock('MyClass');
+ $mock->shouldReceive('name_of_method')
+ ->twice();
+
+To declare that the expected method must never be called:
+
+.. code-block:: php
+
+ $mock = \Mockery::mock('MyClass');
+ $mock->shouldReceive('name_of_method')
+ ->never();
+
+Call count modifiers
+^^^^^^^^^^^^^^^^^^^^
+
+The call count expectations can have modifiers set.
+
+If we want to tell Mockery the minimum number of times a method should be called,
+we use ``atLeast()``:
+
+.. code-block:: php
+
+ $mock = \Mockery::mock('MyClass');
+ $mock->shouldReceive('name_of_method')
+ ->atLeast()
+ ->times(3);
+
+``atLeast()->times(3)`` means the call must be called at least three times
+(given matching method args) but never less than three times.
+
+Similarly, we can tell Mockery the maximum number of times a method should be
+called, using ``atMost()``:
+
+.. code-block:: php
+
+ $mock = \Mockery::mock('MyClass');
+ $mock->shouldReceive('name_of_method')
+ ->atMost()
+ ->times(3);
+
+``atMost()->times(3)`` means the call must be called no more than three times.
+If the method gets no calls at all, the expectation will still be met.
+
+We can also set a range of call counts, using ``between()``:
+
+.. code-block:: php
+
+ $mock = \Mockery::mock('MyClass');
+ $mock->shouldReceive('name_of_method')
+ ->between($min, $max);
+
+This is actually identical to using ``atLeast()->times($min)->atMost()->times($max)``
+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
+---------------------------------
+
+Declares that this method is expected to be called in a specific order in
+relation to similarly marked methods.
+
+.. code-block:: php
+
+ ordered()
+
+The order is dictated by the order in which this modifier is actually used when
+setting up mocks.
+
+Declares the method as belonging to an order group (which can be named or
+numbered). Methods within a group can be called in any order, but the ordered
+calls from outside the group are ordered in relation to the group:
+
+.. code-block:: php
+
+ ordered(group)
+
+We can set up so that method1 is called before group1 which is in turn called
+before method2.
+
+When called prior to ``ordered()`` or ``ordered(group)``, it declares this
+ordering to apply across all mock objects (not just the current mock):
+
+.. code-block:: php
+
+ globally()
+
+This allows for dictating order expectations across multiple mocks.
+
+The ``byDefault()`` marks an expectation as a default. Default expectations are
+applied unless a non-default expectation is created:
+
+.. code-block:: php
+
+ byDefault()
+
+These later expectations immediately replace the previously defined default.
+This is useful so we can setup default mocks in our unit test ``setup()`` and
+later tweak them in specific tests as needed.
+
+Returns the current mock object from an expectation chain:
+
+.. code-block:: php
+
+ getMock()
+
+Useful where we prefer to keep mock setups as a single statement, e.g.:
+
+.. code-block:: php
+
+ $mock = \Mockery::mock('foo')->shouldReceive('foo')->andReturn(1)->getMock();
diff --git a/vendor/mockery/mockery/docs/reference/final_methods_classes.rst b/vendor/mockery/mockery/docs/reference/final_methods_classes.rst
new file mode 100644
index 00000000..dd0fa5ba
--- /dev/null
+++ b/vendor/mockery/mockery/docs/reference/final_methods_classes.rst
@@ -0,0 +1,29 @@
+.. index::
+ single: Mocking; Final Classes/Methods
+
+Dealing with Final Classes/Methods
+==================================
+
+One of the primary restrictions of mock objects in PHP, is that mocking
+classes or methods marked final is hard. The final keyword prevents methods so
+marked from being replaced in subclasses (subclassing is how mock objects can
+inherit the type of the class or object being mocked).
+
+The simplest solution is to implement an interface in your final class and
+typehint against / mock this.
+
+However this may not be possible in some third party libraries.
+Mockery does allow creating "proxy mocks" from classes marked final, or from
+classes with methods marked final. This offers all the usual mock object
+goodness but the resulting mock will not inherit the class type of the object
+being mocked, i.e. it will not pass any instanceof comparison. Methods marked
+as final will be proxied to the original method, i.e., final methods can't be
+mocked.
+
+We can create a proxy mock by passing the instantiated object we wish to
+mock into ``\Mockery::mock()``, i.e. Mockery will then generate a Proxy to the
+real object and selectively intercept method calls for the purposes of setting
+and meeting expectations.
+
+See the :ref:`creating-test-doubles-partial-test-doubles` chapter, the subsection
+about proxied partial test doubles.
diff --git a/vendor/mockery/mockery/docs/reference/index.rst b/vendor/mockery/mockery/docs/reference/index.rst
new file mode 100644
index 00000000..1e5bf048
--- /dev/null
+++ b/vendor/mockery/mockery/docs/reference/index.rst
@@ -0,0 +1,22 @@
+Reference
+=========
+
+.. toctree::
+ :hidden:
+
+ creating_test_doubles
+ expectations
+ argument_validation
+ alternative_should_receive_syntax
+ spies
+ partial_mocks
+ protected_methods
+ public_properties
+ public_static_properties
+ pass_by_reference_behaviours
+ demeter_chains
+ final_methods_classes
+ magic_methods
+ phpunit_integration
+
+.. include:: map.rst.inc
diff --git a/vendor/mockery/mockery/docs/reference/instance_mocking.rst b/vendor/mockery/mockery/docs/reference/instance_mocking.rst
new file mode 100644
index 00000000..9d1aa283
--- /dev/null
+++ b/vendor/mockery/mockery/docs/reference/instance_mocking.rst
@@ -0,0 +1,22 @@
+.. index::
+ single: Mocking; Instance
+
+Instance Mocking
+================
+
+Instance mocking means that a statement like:
+
+.. code-block:: php
+
+ $obj = new \MyNamespace\Foo;
+
+...will actually generate a mock object. This is done by replacing the real
+class with an instance mock (similar to an alias mock), as with mocking public
+methods. The alias will import its expectations from the original mock of
+that type (note that the original is never verified and should be ignored
+after its expectations are setup). This lets you intercept instantiation where
+you can't simply inject a replacement object.
+
+As before, this does not prevent a require statement from including the real
+class and triggering a fatal PHP error. It's intended for use where
+autoloading is the primary class loading mechanism.
diff --git a/vendor/mockery/mockery/docs/reference/magic_methods.rst b/vendor/mockery/mockery/docs/reference/magic_methods.rst
new file mode 100644
index 00000000..39591cff
--- /dev/null
+++ b/vendor/mockery/mockery/docs/reference/magic_methods.rst
@@ -0,0 +1,16 @@
+.. index::
+ single: Mocking; Magic Methods
+
+PHP Magic Methods
+=================
+
+PHP magic methods which are prefixed with a double underscore, e.g.
+``__set()``, pose a particular problem in mocking and unit testing in general.
+It is strongly recommended that unit tests and mock objects do not directly
+refer to magic methods. Instead, refer only to the virtual methods and
+properties these magic methods simulate.
+
+Following this piece of advice will ensure we are testing the real API of
+classes and also ensures there is no conflict should Mockery override these
+magic methods, which it will inevitably do in order to support its role in
+intercepting method calls and properties.
diff --git a/vendor/mockery/mockery/docs/reference/map.rst.inc b/vendor/mockery/mockery/docs/reference/map.rst.inc
new file mode 100644
index 00000000..883bc3ca
--- /dev/null
+++ b/vendor/mockery/mockery/docs/reference/map.rst.inc
@@ -0,0 +1,14 @@
+* :doc:`/reference/creating_test_doubles`
+* :doc:`/reference/expectations`
+* :doc:`/reference/argument_validation`
+* :doc:`/reference/alternative_should_receive_syntax`
+* :doc:`/reference/spies`
+* :doc:`/reference/partial_mocks`
+* :doc:`/reference/protected_methods`
+* :doc:`/reference/public_properties`
+* :doc:`/reference/public_static_properties`
+* :doc:`/reference/pass_by_reference_behaviours`
+* :doc:`/reference/demeter_chains`
+* :doc:`/reference/final_methods_classes`
+* :doc:`/reference/magic_methods`
+* :doc:`/reference/phpunit_integration`
diff --git a/vendor/mockery/mockery/docs/reference/partial_mocks.rst b/vendor/mockery/mockery/docs/reference/partial_mocks.rst
new file mode 100644
index 00000000..457eb8de
--- /dev/null
+++ b/vendor/mockery/mockery/docs/reference/partial_mocks.rst
@@ -0,0 +1,108 @@
+.. index::
+ single: Mocking; Partial Mocks
+
+Creating Partial Mocks
+======================
+
+Partial mocks are useful when we only need to mock several methods of an
+object leaving the remainder free to respond to calls normally (i.e. as
+implemented). Mockery implements three distinct strategies for creating
+partials. Each has specific advantages and disadvantages so which strategy we
+use will depend on our own preferences and the source code in need of
+mocking.
+
+We have previously talked a bit about :ref:`creating-test-doubles-partial-test-doubles`,
+but we'd like to expand on the subject a bit here.
+
+#. Runtime partial test doubles
+#. Generated partial test doubles
+#. Proxied Partial Mock
+
+Runtime partial test doubles
+----------------------------
+
+A runtime partial test double, also known as a passive partial mock, is a kind
+of a default state of being for a mocked object.
+
+.. code-block:: php
+
+ $mock = \Mockery::mock('MyClass')->makePartial();
+
+With a runtime partial, we assume that all methods will simply defer to the
+parent class (``MyClass``) original methods unless a method call matches a
+known expectation. If we have no matching expectation for a specific method
+call, that call is deferred to the class being mocked. Since the division
+between mocked and unmocked calls depends entirely on the expectations we
+define, there is no need to define which methods to mock in advance.
+
+See the cookbook entry on :doc:`../cookbook/big_parent_class` for an example
+usage of runtime partial test doubles.
+
+Generated Partial Test Doubles
+------------------------------
+
+A generated partial test double, also known as a traditional partial mock,
+defines ahead of time which methods of a class are to be mocked and which are
+to be left unmocked (i.e. callable as normal). The syntax for creating
+traditional mocks is:
+
+.. code-block:: php
+
+ $mock = \Mockery::mock('MyClass[foo,bar]');
+
+In the above example, the ``foo()`` and ``bar()`` methods of MyClass will be
+mocked but no other MyClass methods are touched. We will need to define
+expectations for the ``foo()`` and ``bar()`` methods to dictate their mocked
+behaviour.
+
+Don't forget that we can pass in constructor arguments since unmocked methods
+may rely on those!
+
+.. code-block:: php
+
+ $mock = \Mockery::mock('MyNamespace\MyClass[foo]', array($arg1, $arg2));
+
+See the :ref:`creating-test-doubles-constructor-arguments` section to read up
+on them.
+
+.. note::
+
+ Even though we support generated partial test doubles, we do not recommend
+ using them.
+
+Proxied Partial Mock
+--------------------
+
+A proxied partial mock is a partial of last resort. We may encounter a class
+which is simply not capable of being mocked because it has been marked as
+final. Similarly, we may find a class with methods marked as final. In such a
+scenario, we cannot simply extend the class and override methods to mock - we
+need to get creative.
+
+.. code-block:: php
+
+ $mock = \Mockery::mock(new MyClass);
+
+Yes, the new mock is a Proxy. It intercepts calls and reroutes them to the
+proxied object (which we construct and pass in) for methods which are not
+subject to any expectations. Indirectly, this allows us to mock methods
+marked final since the Proxy is not subject to those limitations. The tradeoff
+should be obvious - a proxied partial will fail any typehint checks for the
+class being mocked since it cannot extend that class.
+
+Special Internal Cases
+----------------------
+
+All mock objects, with the exception of Proxied Partials, allows us to make
+any expectation call to the underlying real class method using the ``passthru()``
+expectation call. This will return values from the real call and bypass any
+mocked return queue (which can simply be omitted obviously).
+
+There is a fourth kind of partial mock reserved for internal use. This is
+automatically generated when we attempt to mock a class containing methods
+marked final. Since we cannot override such methods, they are simply left
+unmocked. Typically, we don't need to worry about this but if we really
+really must mock a final method, the only possible means is through a Proxied
+Partial Mock. SplFileInfo, for example, is a common class subject to this form
+of automatic internal partial since it contains public final methods used
+internally.
diff --git a/vendor/mockery/mockery/docs/reference/pass_by_reference_behaviours.rst b/vendor/mockery/mockery/docs/reference/pass_by_reference_behaviours.rst
new file mode 100644
index 00000000..5e2e457f
--- /dev/null
+++ b/vendor/mockery/mockery/docs/reference/pass_by_reference_behaviours.rst
@@ -0,0 +1,130 @@
+.. index::
+ single: Pass-By-Reference Method Parameter Behaviour
+
+Preserving Pass-By-Reference Method Parameter Behaviour
+=======================================================
+
+PHP Class method may accept parameters by reference. In this case, changes
+made to the parameter (a reference to the original variable passed to the
+method) are reflected in the original variable. An example:
+
+.. code-block:: php
+
+ class Foo
+ {
+
+ public function bar(&$a)
+ {
+ $a++;
+ }
+
+ }
+
+ $baz = 1;
+ $foo = new Foo;
+ $foo->bar($baz);
+
+ echo $baz; // will echo the integer 2
+
+In the example above, the variable ``$baz`` is passed by reference to
+``Foo::bar()`` (notice the ``&`` symbol in front of the parameter?). Any
+change ``bar()`` makes to the parameter reference is reflected in the original
+variable, ``$baz``.
+
+Mockery handles references correctly for all methods where it can analyse
+the parameter (using ``Reflection``) to see if it is passed by reference. To
+mock how a reference is manipulated by the class method, we can use a closure
+argument matcher to manipulate it, i.e. ``\Mockery::on()`` - see the
+:ref:`argument-validation-complex-argument-validation` chapter.
+
+There is an exception for internal PHP classes where Mockery cannot analyse
+method parameters using ``Reflection`` (a limitation in PHP). To work around
+this, we can explicitly declare method parameters for an internal class using
+``\Mockery\Configuration::setInternalClassMethodParamMap()``.
+
+Here's an example using ``MongoCollection::insert()``. ``MongoCollection`` is
+an internal class offered by the mongo extension from PECL. Its ``insert()``
+method accepts an array of data as the first parameter, and an optional
+options array as the second parameter. The original data array is updated
+(i.e. when a ``insert()`` pass-by-reference parameter) to include a new
+``_id`` field. We can mock this behaviour using a configured parameter map (to
+tell Mockery to expect a pass by reference parameter) and a ``Closure``
+attached to the expected method parameter to be updated.
+
+Here's a PHPUnit unit test verifying that this pass-by-reference behaviour is
+preserved:
+
+.. code-block:: php
+
+ public function testCanOverrideExpectedParametersOfInternalPHPClassesToPreserveRefs()
+ {
+ \Mockery::getConfiguration()->setInternalClassMethodParamMap(
+ 'MongoCollection',
+ 'insert',
+ array('&$data', '$options = array()')
+ );
+ $m = \Mockery::mock('MongoCollection');
+ $m->shouldReceive('insert')->with(
+ \Mockery::on(function(&$data) {
+ if (!is_array($data)) return false;
+ $data['_id'] = 123;
+ return true;
+ }),
+ \Mockery::any()
+ );
+
+ $data = array('a'=>1,'b'=>2);
+ $m->insert($data);
+
+ $this->assertTrue(isset($data['_id']));
+ $this->assertEquals(123, $data['_id']);
+
+ \Mockery::resetContainer();
+ }
+
+Protected Methods
+-----------------
+
+When dealing with protected methods, and trying to preserve pass by reference
+behavior for them, a different approach is required.
+
+.. code-block:: php
+
+ class Model
+ {
+ public function test(&$data)
+ {
+ return $this->doTest($data);
+ }
+
+ protected function doTest(&$data)
+ {
+ $data['something'] = 'wrong';
+ return $this;
+ }
+ }
+
+ class Test extends \PHPUnit\Framework\TestCase
+ {
+ public function testModel()
+ {
+ $mock = \Mockery::mock('Model[test]')->shouldAllowMockingProtectedMethods();
+
+ $mock->shouldReceive('test')
+ ->with(\Mockery::on(function(&$data) {
+ $data['something'] = 'wrong';
+ return true;
+ }));
+
+ $data = array('foo' => 'bar');
+
+ $mock->test($data);
+ $this->assertTrue(isset($data['something']));
+ $this->assertEquals('wrong', $data['something']);
+ }
+ }
+
+This is quite an edge case, so we need to change the original code a little bit,
+by creating a public method that will call our protected method, and then mock
+that, instead of the protected method. This new public method will act as a
+proxy to our protected method.
diff --git a/vendor/mockery/mockery/docs/reference/phpunit_integration.rst b/vendor/mockery/mockery/docs/reference/phpunit_integration.rst
new file mode 100644
index 00000000..669a8ca9
--- /dev/null
+++ b/vendor/mockery/mockery/docs/reference/phpunit_integration.rst
@@ -0,0 +1,145 @@
+.. index::
+ single: PHPUnit Integration
+
+PHPUnit Integration
+===================
+
+Mockery was designed as a simple-to-use *standalone* mock object framework, so
+its need for integration with any testing framework is entirely optional. To
+integrate Mockery, we need to define a ``tearDown()`` method for our tests
+containing the following (we may use a shorter ``\Mockery`` namespace
+alias):
+
+.. code-block:: php
+
+ public function tearDown() {
+ \Mockery::close();
+ }
+
+This static call cleans up the Mockery container used by the current test, and
+run any verification tasks needed for our expectations.
+
+For some added brevity when it comes to using Mockery, we can also explicitly
+use the Mockery namespace with a shorter alias. For example:
+
+.. code-block:: php
+
+ use \Mockery as m;
+
+ class SimpleTest extends \PHPUnit\Framework\TestCase
+ {
+ public function testSimpleMock() {
+ $mock = m::mock('simplemock');
+ $mock->shouldReceive('foo')->with(5, m::any())->once()->andReturn(10);
+
+ $this->assertEquals(10, $mock->foo(5));
+ }
+
+ public function tearDown() {
+ m::close();
+ }
+ }
+
+Mockery ships with an autoloader so we don't need to litter our tests with
+``require_once()`` calls. To use it, ensure Mockery is on our
+``include_path`` and add the following to our test suite's ``Bootstrap.php``
+or ``TestHelper.php`` file:
+
+.. code-block:: php
+
+ require_once 'Mockery/Loader.php';
+ require_once 'Hamcrest/Hamcrest.php';
+
+ $loader = new \Mockery\Loader;
+ $loader->register();
+
+If we are using Composer, we can simplify this to including the Composer
+generated autoloader file:
+
+.. code-block:: php
+
+ require __DIR__ . '/../vendor/autoload.php'; // assuming vendor is one directory up
+
+.. caution::
+
+ Prior to Hamcrest 1.0.0, the ``Hamcrest.php`` file name had a small "h"
+ (i.e. ``hamcrest.php``). If upgrading Hamcrest to 1.0.0 remember to check
+ the file name is updated for all your projects.)
+
+To integrate Mockery into PHPUnit and avoid having to call the close method
+and have Mockery remove itself from code coverage reports, have your test case
+extends the ``\Mockery\Adapter\Phpunit\MockeryTestCase``:
+
+.. code-block:: php
+
+ class MyTest extends \Mockery\Adapter\Phpunit\MockeryTestCase
+ {
+
+ }
+
+An alternative is to use the supplied trait:
+
+.. code-block:: php
+
+ class MyTest extends \PHPUnit\Framework\TestCase
+ {
+ use \Mockery\Adapter\Phpunit\MockeryPHPUnitIntegration;
+ }
+
+Extending ``MockeryTestCase`` or using the ``MockeryPHPUnitIntegration``
+trait is **the recommended way** of integrating Mockery with PHPUnit,
+since Mockery 1.0.0.
+
+PHPUnit listener
+----------------
+
+Before the 1.0.0 release, Mockery provided a PHPUnit listener that would
+call ``Mockery::close()`` for us at the end of a test. This has changed
+significantly since the 1.0.0 version.
+
+Now, Mockery provides a PHPUnit listener that makes tests fail if
+``Mockery::close()`` has not been called. It can help identify tests where
+we've forgotten to include the trait or extend the ``MockeryTestCase``.
+
+If we are using PHPUnit's XML configuration approach, we can include the
+following to load the ``TestListener``:
+
+.. code-block:: xml
+
+
+
+
+
+Make sure Composer's or Mockery's autoloader is present in the bootstrap file
+or we will need to also define a "file" attribute pointing to the file of the
+``TestListener`` class.
+
+If we are creating the test suite programmatically we may add the listener
+like this:
+
+.. code-block:: php
+
+ // Create the suite.
+ $suite = new PHPUnit\Framework\TestSuite();
+
+ // Create the listener and add it to the suite.
+ $result = new PHPUnit\Framework\TestResult();
+ $result->addListener(new \Mockery\Adapter\Phpunit\TestListener());
+
+ // Run the tests.
+ $suite->run($result);
+
+.. caution::
+
+ PHPUnit provides a functionality that allows
+ `tests to run in a separated process `_,
+ to ensure better isolation. Mockery verifies the mocks expectations using the
+ ``Mockery::close()`` method, and provides a PHPUnit listener, that automatically
+ calls this method for us after every test.
+
+ However, this listener is not called in the right process when using
+ PHPUnit's process isolation, resulting in expectations that might not be
+ respected, but without raising any ``Mockery\Exception``. To avoid this,
+ we cannot rely on the supplied Mockery PHPUnit ``TestListener``, and we need
+ to explicitly call ``Mockery::close``. The easiest solution to include this
+ call in the ``tearDown()`` method, as explained previously.
diff --git a/vendor/mockery/mockery/docs/reference/protected_methods.rst b/vendor/mockery/mockery/docs/reference/protected_methods.rst
new file mode 100644
index 00000000..ec4a5bad
--- /dev/null
+++ b/vendor/mockery/mockery/docs/reference/protected_methods.rst
@@ -0,0 +1,26 @@
+.. index::
+ single: Mocking; Protected Methods
+
+Mocking Protected Methods
+=========================
+
+By default, Mockery does not allow mocking protected methods. We do not recommend
+mocking protected methods, but there are cases when there is no other solution.
+
+For those cases we have the ``shouldAllowMockingProtectedMethods()`` method. It
+instructs Mockery to specifically allow mocking of protected methods, for that
+one class only:
+
+.. code-block:: php
+
+ class MyClass
+ {
+ protected function foo()
+ {
+ }
+ }
+
+ $mock = \Mockery::mock('MyClass')
+ ->shouldAllowMockingProtectedMethods();
+ $mock->shouldReceive('foo');
+
diff --git a/vendor/mockery/mockery/docs/reference/public_properties.rst b/vendor/mockery/mockery/docs/reference/public_properties.rst
new file mode 100644
index 00000000..31656683
--- /dev/null
+++ b/vendor/mockery/mockery/docs/reference/public_properties.rst
@@ -0,0 +1,20 @@
+.. index::
+ single: Mocking; Public Properties
+
+Mocking Public Properties
+=========================
+
+Mockery allows us to mock properties in several ways. One way is that we can set
+a public property and its value on any mock object. The second is that we can
+use the expectation methods ``set()`` and ``andSet()`` to set property values if
+that expectation is ever met.
+
+You can read more about :ref:`expectations-setting-public-properties`.
+
+.. note::
+
+ In general, Mockery does not support mocking any magic methods since these
+ are generally not considered a public API (and besides it is a bit difficult
+ to differentiate them when you badly need them for mocking!). So please mock
+ virtual properties (those relying on ``__get()`` and ``__set()``) as if they
+ were actually declared on the class.
diff --git a/vendor/mockery/mockery/docs/reference/public_static_properties.rst b/vendor/mockery/mockery/docs/reference/public_static_properties.rst
new file mode 100644
index 00000000..2396efc7
--- /dev/null
+++ b/vendor/mockery/mockery/docs/reference/public_static_properties.rst
@@ -0,0 +1,15 @@
+.. index::
+ single: Mocking; Public Static Methods
+
+Mocking Public Static Methods
+=============================
+
+Static methods are not called on real objects, so normal mock objects can't
+mock them. Mockery supports class aliased mocks, mocks representing a class
+name which would normally be loaded (via autoloading or a require statement)
+in the system under test. These aliases block that loading (unless via a
+require statement - so please use autoloading!) and allow Mockery to intercept
+static method calls and add expectations for them.
+
+See the :ref:`creating-test-doubles-aliasing` section for more information on
+creating aliased mocks, for the purpose of mocking public static methods.
diff --git a/vendor/mockery/mockery/docs/reference/spies.rst b/vendor/mockery/mockery/docs/reference/spies.rst
new file mode 100644
index 00000000..9a699cbf
--- /dev/null
+++ b/vendor/mockery/mockery/docs/reference/spies.rst
@@ -0,0 +1,154 @@
+.. index::
+ single: Reference; Spies
+
+Spies
+=====
+
+Spies are a type of test doubles, but they differ from stubs or mocks in that,
+that the spies record any interaction between the spy and the System Under Test
+(SUT), and allow us to make assertions against those interactions after the fact.
+
+Creating a spy means we don't have to set up expectations for every method call
+the double might receive during the test, some of which may not be relevant to
+the current test. A spy allows us to make assertions about the calls we care
+about for this test only, reducing the chances of over-specification and making
+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:
+
+.. code-block:: php
+
+ // arrange
+ $mock = \Mockery::mock('MyDependency');
+ $sut = new MyClass($mock);
+
+ // expect
+ $mock->shouldReceive('foo')
+ ->once()
+ ->with('bar');
+
+ // act
+ $sut->callFoo();
+
+ // assert
+ \Mockery::close();
+
+Spies allow us to skip the expect part and move the assertion to after we have
+acted on the SUT, usually making our tests more readable:
+
+.. code-block:: php
+
+ // arrange
+ $spy = \Mockery::spy('MyDependency');
+ $sut = new MyClass($spy);
+
+ // act
+ $sut->callFoo();
+
+ // assert
+ $spy->shouldHaveReceived()
+ ->foo()
+ ->with('bar');
+
+On the other hand, spies are far less restrictive than mocks, meaning tests are
+usually less precise, as they let us get away with more. This is usually a
+good thing, they should only be as precise as they need to be, but while spies
+make our tests more intent-revealing, they do tend to reveal less about the
+design of the SUT. If we're having to setup lots of expectations for a mock,
+in lots of different tests, our tests are trying to tell us something - the SUT
+is doing too much and probably should be refactored. We don't get this with
+spies, they simply ignore the calls that aren't relevant to them.
+
+Another downside to using spies is debugging. When a mock receives a call that
+it wasn't expecting, it immediately throws an exception (failing fast), giving
+us a nice stack trace or possibly even invoking our debugger. With spies, we're
+simply asserting calls were made after the fact, so if the wrong calls were made,
+we don't have quite the same just in time context we have with the mocks.
+
+Finally, if we need to define a return value for our test double, we can't do
+that with a spy, only with a mock object.
+
+.. note::
+
+ This documentation page is an adaption of the blog post titled
+ `"Mockery Spies" `_,
+ published by Dave Marshall on his blog. Dave is the original author of spies
+ in Mockery.
+
+Spies Reference
+---------------
+
+To verify that a method was called on a spy, we use the ``shouldHaveReceived()``
+method:
+
+.. code-block:: php
+
+ $spy->shouldHaveReceived('foo');
+
+To verify that a method was **not** called on a spy, we use the
+``shouldNotHaveReceived()`` method:
+
+.. code-block:: php
+
+ $spy->shouldNotHaveReceived('foo');
+
+We can also do argument matching with spies:
+
+.. code-block:: php
+
+ $spy->shouldHaveReceived('foo')
+ ->with('bar');
+
+Argument matching is also possible by passing in an array of arguments to
+match:
+
+.. code-block:: php
+
+ $spy->shouldHaveReceived('foo', ['bar']);
+
+Although when verifying a method was not called, the argument matching can only
+be done by supplying the array of arguments as the 2nd argument to the
+``shouldNotHaveReceived()`` method:
+
+.. code-block:: php
+
+ $spy->shouldNotHaveReceived('foo', ['bar']);
+
+This is due to Mockery's internals.
+
+Finally, when expecting calls that should have been received, we can also verify
+the number of calls:
+
+.. code-block:: php
+
+ $spy->shouldHaveReceived('foo')
+ ->with('bar')
+ ->twice();
+
+Alternative shouldReceive syntax
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+As of Mockery 1.0.0, we support calling methods as we would call any PHP method,
+and not as string arguments to Mockery ``should*`` methods.
+
+In cases of spies, this only applies to the ``shouldHaveReceived()`` method:
+
+.. code-block:: php
+
+ $spy->shouldHaveReceived()
+ ->foo('bar');
+
+We can set expectation on number of calls as well:
+
+.. code-block:: php
+
+ $spy->shouldHaveReceived()
+ ->foo('bar')
+ ->twice();
+
+Unfortunately, due to limitations we can't support the same syntax for the
+``shouldNotHaveReceived()`` method.
diff --git a/vendor/mockery/mockery/library/Mockery.php b/vendor/mockery/mockery/library/Mockery.php
new file mode 100644
index 00000000..95abd1b9
--- /dev/null
+++ b/vendor/mockery/mockery/library/Mockery.php
@@ -0,0 +1,983 @@
+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();
+ }
+
+ /**
+ * Static shortcut to closing up and verifying all mocks in the global
+ * container, and resetting the container static variable to null.
+ *
+ * @return void
+ */
+ public static function close()
+ {
+ foreach (self::$_filesToCleanUp as $fileName) {
+ @unlink($fileName);
+ }
+ self::$_filesToCleanUp = [];
+
+ if (is_null(self::$_container)) {
+ return;
+ }
+
+ $container = self::$_container;
+ self::$_container = null;
+
+ $container->mockery_teardown();
+ $container->mockery_close();
+ }
+
+ /**
+ * Static fetching of a mock associated with a name or explicit class poser.
+ *
+ * @param string $name
+ *
+ * @return \Mockery\Mock
+ */
+ public static function fetchMock($name)
+ {
+ return self::getContainer()->fetchMock($name);
+ }
+
+ /**
+ * Lazy loader and getter for
+ * the container property.
+ *
+ * @return Mockery\Container
+ */
+ public static function getContainer()
+ {
+ if (is_null(self::$_container)) {
+ self::$_container = new Mockery\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.
+ *
+ * @return CachingGenerator
+ */
+ public static function getDefaultGenerator()
+ {
+ 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.
+ *
+ * @return EvalLoader
+ */
+ public static function getDefaultLoader()
+ {
+ return new EvalLoader();
+ }
+
+ /**
+ * Set the container.
+ *
+ * @param \Mockery\Container $container
+ *
+ * @return \Mockery\Container
+ */
+ public static function setContainer(Mockery\Container $container)
+ {
+ return self::$_container = $container;
+ }
+
+ /**
+ * Reset the container to null.
+ *
+ * @return void
+ */
+ public static function resetContainer()
+ {
+ self::$_container = null;
+ }
+
+ /**
+ * Return instance of ANY matcher.
+ *
+ * @return \Mockery\Matcher\Any
+ */
+ public static function any()
+ {
+ return new \Mockery\Matcher\Any();
+ }
+
+ /**
+ * Return instance of AndAnyOtherArgs matcher.
+ *
+ * An alternative name to `andAnyOtherArgs` so
+ * the API stays closer to `any` as well.
+ *
+ * @return \Mockery\Matcher\AndAnyOtherArgs
+ */
+ public static function andAnyOthers()
+ {
+ return new \Mockery\Matcher\AndAnyOtherArgs();
+ }
+
+ /**
+ * Return instance of AndAnyOtherArgs matcher.
+ *
+ * @return \Mockery\Matcher\AndAnyOtherArgs
+ */
+ public static function andAnyOtherArgs()
+ {
+ return new \Mockery\Matcher\AndAnyOtherArgs();
+ }
+
+ /**
+ * Return instance of TYPE matcher.
+ *
+ * @param mixed $expected
+ *
+ * @return \Mockery\Matcher\Type
+ */
+ public static function type($expected)
+ {
+ return new \Mockery\Matcher\Type($expected);
+ }
+
+ /**
+ * Return instance of DUCKTYPE matcher.
+ *
+ * @param array ...$args
+ *
+ * @return \Mockery\Matcher\Ducktype
+ */
+ public static function ducktype(...$args)
+ {
+ return new \Mockery\Matcher\Ducktype($args);
+ }
+
+ /**
+ * Return instance of SUBSET matcher.
+ *
+ * @param array $part
+ * @param bool $strict - (Optional) True for strict comparison, false for loose
+ *
+ * @return \Mockery\Matcher\Subset
+ */
+ public static function subset(array $part, $strict = true)
+ {
+ return new \Mockery\Matcher\Subset($part, $strict);
+ }
+
+ /**
+ * Return instance of CONTAINS matcher.
+ *
+ * @param mixed $args
+ *
+ * @return \Mockery\Matcher\Contains
+ */
+ public static function contains(...$args)
+ {
+ return new \Mockery\Matcher\Contains($args);
+ }
+
+ /**
+ * Return instance of HASKEY matcher.
+ *
+ * @param mixed $key
+ *
+ * @return \Mockery\Matcher\HasKey
+ */
+ public static function hasKey($key)
+ {
+ return new \Mockery\Matcher\HasKey($key);
+ }
+
+ /**
+ * Return instance of HASVALUE matcher.
+ *
+ * @param mixed $val
+ *
+ * @return \Mockery\Matcher\HasValue
+ */
+ public static function hasValue($val)
+ {
+ return new \Mockery\Matcher\HasValue($val);
+ }
+
+ /**
+ * 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;
+ };
+
+ return new \Mockery\Matcher\Closure($closure);
+ }
+
+ /**
+ * Return instance of CLOSURE matcher.
+ *
+ * @param mixed $closure
+ *
+ * @return \Mockery\Matcher\Closure
+ */
+ public static function on($closure)
+ {
+ return new \Mockery\Matcher\Closure($closure);
+ }
+
+ /**
+ * Return instance of MUSTBE matcher.
+ *
+ * @param mixed $expected
+ *
+ * @return \Mockery\Matcher\MustBe
+ */
+ public static function mustBe($expected)
+ {
+ return new \Mockery\Matcher\MustBe($expected);
+ }
+
+ /**
+ * Return instance of NOT matcher.
+ *
+ * @param mixed $expected
+ *
+ * @return \Mockery\Matcher\Not
+ */
+ public static function not($expected)
+ {
+ return new \Mockery\Matcher\Not($expected);
+ }
+
+ /**
+ * Return instance of ANYOF matcher.
+ *
+ * @param array ...$args
+ *
+ * @return \Mockery\Matcher\AnyOf
+ */
+ public static function anyOf(...$args)
+ {
+ return new \Mockery\Matcher\AnyOf($args);
+ }
+
+ /**
+ * 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();
+ }
+
+ return self::$_config;
+ }
+
+ /**
+ * Utility method to format method name and arguments into a string.
+ *
+ * @param string $method
+ * @param array $arguments
+ *
+ * @return string
+ */
+ public static function formatArgs($method, array $arguments = null)
+ {
+ if (is_null($arguments)) {
+ return $method . '()';
+ }
+
+ $formattedArguments = array();
+ foreach ($arguments as $argument) {
+ $formattedArguments[] = self::formatArgument($argument);
+ }
+
+ return $method . '(' . implode(', ', $formattedArguments) . ')';
+ }
+
+ /**
+ * Gets the string representation
+ * of any passed argument.
+ *
+ * @param mixed $argument
+ * @param int $depth
+ *
+ * @return mixed
+ */
+ private static function formatArgument($argument, $depth = 0)
+ {
+ if ($argument instanceof MatcherAbstract) {
+ return (string) $argument;
+ }
+
+ if (is_object($argument)) {
+ return 'object(' . get_class($argument) . ')';
+ }
+
+ 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 . "'";
+ }
+
+ /**
+ * Utility function to format objects to printable arrays.
+ *
+ * @param array $objects
+ *
+ * @return string
+ */
+ public static function formatObjects(array $objects = null)
+ {
+ static $formatting;
+
+ if ($formatting) {
+ return '[Recursion]';
+ }
+
+ if (is_null($objects)) {
+ return '';
+ }
+
+ $objects = array_filter($objects, 'is_object');
+ if (empty($objects)) {
+ return '';
+ }
+
+ $formatting = true;
+ $parts = array();
+
+ foreach ($objects as $object) {
+ $parts[get_class($object)] = self::objectToArray($object);
+ }
+
+ $formatting = false;
+
+ return 'Objects: ( ' . var_export($parts, true) . ')';
+ }
+
+ /**
+ * Utility function to turn public properties and public get* and is* method values into an array.
+ *
+ * @param object $object
+ * @param int $nesting
+ *
+ * @return array
+ */
+ private static function objectToArray($object, $nesting = 3)
+ {
+ if ($nesting == 0) {
+ return array('...');
+ }
+
+ $defaultFormatter = function ($object, $nesting) {
+ return array('properties' => 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;
+ }
+
+ /**
+ * Returns all public instance properties.
+ *
+ * @param mixed $object
+ * @param int $nesting
+ *
+ * @return array
+ */
+ private static function extractInstancePublicProperties($object, $nesting)
+ {
+ $reflection = new \ReflectionClass(get_class($object));
+ $properties = $reflection->getProperties(\ReflectionProperty::IS_PUBLIC);
+ $cleanedProperties = array();
+
+ foreach ($properties as $publicProperty) {
+ if (!$publicProperty->isStatic()) {
+ $name = $publicProperty->getName();
+ try {
+ $cleanedProperties[$name] = self::cleanupNesting($object->$name, $nesting);
+ } catch (\Exception $exception) {
+ $cleanedProperties[$name] = $exception->getMessage();
+ }
+ }
+ }
+
+ return $cleanedProperties;
+ }
+
+ /**
+ * Utility method used for recursively generating
+ * an object or array representation.
+ *
+ * @param mixed $argument
+ * @param int $nesting
+ *
+ * @return mixed
+ */
+ private static function cleanupNesting($argument, $nesting)
+ {
+ if (is_object($argument)) {
+ $object = self::objectToArray($argument, $nesting - 1);
+ $object['class'] = get_class($argument);
+
+ return $object;
+ }
+
+ if (is_array($argument)) {
+ return self::cleanupArray($argument, $nesting - 1);
+ }
+
+ 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 '...';
+ }
+
+ 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);
+ } else {
+ $demeterMockKey = $container->getKeyOfDemeterMockFor($method, $parent);
+ if ($demeterMockKey) {
+ $mock = self::getExistingDemeterMock($container, $demeterMockKey);
+ }
+ }
+
+ $parent .= '->' . $method;
+
+ $nextExp = function ($n) use ($mock) {
+ return $mock->shouldReceive($n);
+ };
+ }
+
+ return $expectations;
+ }
+
+ /**
+ * 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
+ */
+ private static function getNewDemeterMock(
+ Mockery\Container $container,
+ $parent,
+ $method,
+ Mockery\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)) {
+ $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);
+
+ return $mock;
+ }
+ }
+
+ $mock = $container->mock($newMockName);
+ $exp->andReturn($mock);
+
+ 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 = "addMockeryExpectationsToAssertionCount();
+ $this->checkMockeryExceptions();
+ $this->closeMockery();
+
+ 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
+ */
+ protected function purgeMockeryContainer()
+ {
+ if ($this->mockeryOpen) {
+ // post conditions wasn't called, so test probably failed
+ Mockery::close();
+ }
+ }
+}
diff --git a/vendor/mockery/mockery/library/Mockery/Adapter/Phpunit/MockeryPHPUnitIntegrationAssertPostConditions.php b/vendor/mockery/mockery/library/Mockery/Adapter/Phpunit/MockeryPHPUnitIntegrationAssertPostConditions.php
new file mode 100644
index 00000000..68fc89ef
--- /dev/null
+++ b/vendor/mockery/mockery/library/Mockery/Adapter/Phpunit/MockeryPHPUnitIntegrationAssertPostConditions.php
@@ -0,0 +1,31 @@
+mockeryAssertPostConditions();
+ }
+}
diff --git a/vendor/mockery/mockery/library/Mockery/Adapter/Phpunit/MockeryTestCase.php b/vendor/mockery/mockery/library/Mockery/Adapter/Phpunit/MockeryTestCase.php
new file mode 100644
index 00000000..f18ce2cf
--- /dev/null
+++ b/vendor/mockery/mockery/library/Mockery/Adapter/Phpunit/MockeryTestCase.php
@@ -0,0 +1,35 @@
+mockeryTestSetUp();
+ }
+
+ protected function tearDown(): void
+ {
+ $this->mockeryTestTearDown();
+ parent::tearDown();
+ }
+}
diff --git a/vendor/mockery/mockery/library/Mockery/Adapter/Phpunit/TestListener.php b/vendor/mockery/mockery/library/Mockery/Adapter/Phpunit/TestListener.php
new file mode 100644
index 00000000..effb8e48
--- /dev/null
+++ b/vendor/mockery/mockery/library/Mockery/Adapter/Phpunit/TestListener.php
@@ -0,0 +1,48 @@
+trait = new TestListenerTrait();
+ }
+
+ public function endTest(Test $test, float $time): void
+ {
+ $this->trait->endTest($test, $time);
+ }
+
+ public function startTestSuite(TestSuite $suite): void
+ {
+ $this->trait->startTestSuite();
+ }
+}
diff --git a/vendor/mockery/mockery/library/Mockery/Adapter/Phpunit/TestListenerTrait.php b/vendor/mockery/mockery/library/Mockery/Adapter/Phpunit/TestListenerTrait.php
new file mode 100644
index 00000000..7b5bfe92
--- /dev/null
+++ b/vendor/mockery/mockery/library/Mockery/Adapter/Phpunit/TestListenerTrait.php
@@ -0,0 +1,87 @@
+getStatus() !== BaseTestRunner::STATUS_PASSED) {
+ // If the test didn't pass there is no guarantee that
+ // verifyMockObjects and assertPostConditions have been called.
+ // And even if it did, the point here is to prevent false
+ // negatives, not to make failing tests fail for more reasons.
+ return;
+ }
+
+ try {
+ // The self() call is used as a sentinel. Anything that throws if
+ // the container is closed already will do.
+ \Mockery::self();
+ } catch (\LogicException $_) {
+ return;
+ }
+
+ $e = new ExpectationFailedException(
+ \sprintf(
+ "Mockery's expectations have not been verified. Make sure that \Mockery::close() is called at the end of the test. Consider using %s\MockeryPHPUnitIntegration or extending %s\MockeryTestCase.",
+ __NAMESPACE__,
+ __NAMESPACE__
+ )
+ );
+
+ /** @var \PHPUnit\Framework\TestResult $result */
+ $result = $test->getTestResultObject();
+
+ if ($result !== null) {
+ $result->addFailure($test, $e, $time);
+ }
+ }
+
+ public function startTestSuite()
+ {
+ if (method_exists(Blacklist::class, 'addDirectory')) {
+ (new BlackList())->getBlacklistedDirectories();
+ Blacklist::addDirectory(\dirname((new \ReflectionClass(\Mockery::class))->getFileName()));
+ } else {
+ Blacklist::$blacklistedClassNames[\Mockery::class] = 1;
+ }
+ }
+}
diff --git a/vendor/mockery/mockery/library/Mockery/ClosureWrapper.php b/vendor/mockery/mockery/library/Mockery/ClosureWrapper.php
new file mode 100644
index 00000000..35ca16db
--- /dev/null
+++ b/vendor/mockery/mockery/library/Mockery/ClosureWrapper.php
@@ -0,0 +1,42 @@
+closure = $closure;
+ }
+
+ public function __invoke()
+ {
+ return call_user_func_array($this->closure, func_get_args());
+ }
+}
diff --git a/vendor/mockery/mockery/library/Mockery/CompositeExpectation.php b/vendor/mockery/mockery/library/Mockery/CompositeExpectation.php
new file mode 100644
index 00000000..52314322
--- /dev/null
+++ b/vendor/mockery/mockery/library/Mockery/CompositeExpectation.php
@@ -0,0 +1,154 @@
+_expectations[] = $expectation;
+ }
+
+ /**
+ * @param mixed ...$args
+ */
+ public function andReturn(...$args)
+ {
+ return $this->__call(__FUNCTION__, $args);
+ }
+
+ /**
+ * 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);
+ }
+
+ /**
+ * Intercept any expectation calls and direct against all expectations
+ *
+ * @param string $method
+ * @param array $args
+ * @return self
+ */
+ public function __call($method, array $args)
+ {
+ foreach ($this->_expectations as $expectation) {
+ call_user_func_array(array($expectation, $method), $args);
+ }
+ return $this;
+ }
+
+ /**
+ * Return order number of the first expectation
+ *
+ * @return int
+ */
+ public function getOrderNumber()
+ {
+ reset($this->_expectations);
+ $first = current($this->_expectations);
+ 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
+ */
+ public function mock()
+ {
+ return $this->getMock();
+ }
+
+ /**
+ * 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
+ */
+ public function shouldNotReceive(...$args)
+ {
+ reset($this->_expectations);
+ $first = current($this->_expectations);
+ return call_user_func_array(array($first->getMock(), 'shouldNotReceive'), $args);
+ }
+
+ /**
+ * Return the string summary of this composite expectation
+ *
+ * @return string
+ */
+ public function __toString()
+ {
+ $return = '[';
+ $parts = array();
+ foreach ($this->_expectations as $exp) {
+ $parts[] = (string) $exp;
+ }
+ $return .= implode(', ', $parts) . ']';
+ return $return;
+ }
+}
diff --git a/vendor/mockery/mockery/library/Mockery/Configuration.php b/vendor/mockery/mockery/library/Mockery/Configuration.php
new file mode 100644
index 00000000..bce05f3c
--- /dev/null
+++ b/vendor/mockery/mockery/library/Mockery/Configuration.php
@@ -0,0 +1,283 @@
+_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
+ *
+ * @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);
+
+ $this->_allowMockingMethodsUnnecessarily = (bool) $flag;
+ }
+
+ /**
+ * 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;
+ }
+
+ /**
+ * 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;
+ }
+
+ /**
+ * Disable reflection caching
+ *
+ * It should be always enabled, except when using
+ * PHPUnit's --static-backup option.
+ *
+ * @see https://github.com/mockery/mockery/issues/268
+ */
+ public function disableReflectionCache()
+ {
+ $this->_reflectionCacheEnabled = false;
+ }
+
+ /**
+ * Enable reflection caching
+ *
+ * It should be always enabled, except when using
+ * PHPUnit's --static-backup option.
+ *
+ * @see https://github.com/mockery/mockery/issues/268
+ */
+ public function enableReflectionCache()
+ {
+ $this->_reflectionCacheEnabled = true;
+ }
+
+ /**
+ * Is reflection cache enabled?
+ */
+ public function reflectionCacheEnabled()
+ {
+ return $this->_reflectionCacheEnabled;
+ }
+
+ 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
new file mode 100644
index 00000000..196dc996
--- /dev/null
+++ b/vendor/mockery/mockery/library/Mockery/Container.php
@@ -0,0 +1,535 @@
+_generator = $generator ?: \Mockery::getDefaultGenerator();
+ $this->_loader = $loader ?: \Mockery::getDefaultLoader();
+ }
+
+ /**
+ * Generates a new mock object for this container
+ *
+ * I apologies in advance for this. A God Method just fits the API which
+ * doesn't require differentiating between classes, interfaces, abstracts,
+ * 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
+ *
+ * @return Mock
+ * @throws Exception\RuntimeException
+ */
+ public function mock(...$args)
+ {
+ $expectationClosure = null;
+ $quickdefs = array();
+ $constructorArgs = null;
+ $blocks = array();
+ $class = null;
+
+ if (count($args) > 1) {
+ $finalArg = end($args);
+ reset($args);
+ if (is_callable($finalArg) && is_object($finalArg)) {
+ $expectationClosure = array_pop($args);
+ }
+ }
+
+ $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());
+
+ while (count($args) > 0) {
+ $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, ']')) {
+ $interfaces = explode(',', str_replace(' ', '', $type));
+ $builder->addTargets($interfaces);
+ } elseif (substr($type, 0, 6) == 'alias:') {
+ $type = str_replace('alias:', '', $type);
+ $builder->addTarget('stdClass');
+ $builder->setName($type);
+ } elseif (substr($type, 0, 9) == 'overload:') {
+ $type = str_replace('overload:', '', $type);
+ $builder->setInstanceMock(true);
+ $builder->addTarget('stdClass');
+ $builder->setName($type);
+ } elseif (substr($type, strlen($type)-1, 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], ']'))));
+ $builder->addTarget($class);
+ 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);
+ }
+ break; // unions are "sum" types and not "intersections", and so we must only process the first part
+ }
+ } elseif (is_object($arg)) {
+ $builder->addTarget($arg);
+ } elseif (is_array($arg)) {
+ if (!empty($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;
+ }
+ } else {
+ throw new \Mockery\Exception(
+ 'Unable to parse arguments sent to '
+ . get_class($this) . '::mock()'
+ );
+ }
+ }
+
+ $builder->addBlackListedMethods($blocks);
+
+ if (!is_null($constructorArgs)) {
+ $builder->addBlackListedMethod("__construct"); // we need to pass through
+ } else {
+ $builder->setMockOriginalDestructor(true);
+ }
+
+ if (!empty($partialMethods) && $constructorArgs === null) {
+ $constructorArgs = array();
+ }
+
+ $config = $builder->getMockConfiguration();
+
+ $this->checkForNamedMockClashes($config);
+
+ $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");
+ }
+ }
+
+ $this->getLoader()->load($def);
+
+ $mock = $this->_getInstance($def->getClassName(), $constructorArgs);
+ $mock->mockery_init($this, $config->getTargetObject(), $config->isInstanceMock());
+
+ if (!empty($quickdefs)) {
+ if (\Mockery::getConfiguration()->getQuickDefinitions()->shouldBeCalledAtLeastOnce()) {
+ $mock->shouldReceive($quickdefs)->atLeast()->once();
+ } else {
+ $mock->shouldReceive($quickdefs)->byDefault();
+ }
+ }
+ if (!empty($expectationClosure)) {
+ $expectationClosure($mock);
+ }
+ $this->rememberMock($mock);
+ return $mock;
+ }
+
+ public function instanceMock()
+ {
+ }
+
+ public function getLoader()
+ {
+ return $this->_loader;
+ }
+
+ public function getGenerator()
+ {
+ return $this->_generator;
+ }
+
+ /**
+ * @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
+ *
+ * @throws \Exception
+ * @return void
+ */
+ public function mockery_teardown()
+ {
+ 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;
+ }
+
+ /**
+ * Reset the container to its original state
+ *
+ * @return void
+ */
+ public function mockery_close()
+ {
+ 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;
+ }
+
+ /**
+ * Get current ordered number
+ *
+ * @return int
+ */
+ public function mockery_getCurrentOrder()
+ {
+ 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
+ *
+ * @return int
+ */
+ public function mockery_getExpectationCount()
+ {
+ $count = 0;
+ foreach ($this->_mocks as $mock) {
+ $count += $mock->mockery_getExpectationCount();
+ }
+ return $count;
+ }
+
+ /**
+ * Store a mock and set its container reference
+ *
+ * @param \Mockery\Mock $mock
+ * @return \Mockery\LegacyMockInterface|\Mockery\MockInterface
+ */
+ public function rememberMock(\Mockery\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;
+ }
+ return $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.
+ *
+ * @return \Mockery\Mock
+ */
+ public function self()
+ {
+ $mocks = array_values($this->_mocks);
+ $index = count($mocks) - 1;
+ return $mocks[$index];
+ }
+
+ /**
+ * Return a specific remembered mock according to the array index it
+ * was stored to in this container instance
+ *
+ * @return \Mockery\Mock
+ */
+ 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);
+ }
+
+ try {
+ $instantiator = new Instantiator();
+ $instance = $instantiator->instantiate($mockName);
+ } catch (\Exception $ex) {
+ $internalMockName = $mockName . '_Internal';
+
+ if (!class_exists($internalMockName)) {
+ eval("class $internalMockName extends $mockName {" .
+ 'public function __construct() {}' .
+ '}');
+ }
+
+ $instance = new $internalMockName();
+ }
+
+ return $instance;
+ }
+
+ protected function checkForNamedMockClashes($config)
+ {
+ $name = $config->getName();
+
+ if (!$name) {
+ 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"
+ );
+ }
+ }
+
+ $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
new file mode 100644
index 00000000..f6ac130e
--- /dev/null
+++ b/vendor/mockery/mockery/library/Mockery/CountValidator/AtLeast.php
@@ -0,0 +1,62 @@
+_limit > $n) {
+ $exception = new Mockery\Exception\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('>=')
+ ->setExpectedCount($this->_limit)
+ ->setActualCount($n);
+ throw $exception;
+ }
+ }
+}
diff --git a/vendor/mockery/mockery/library/Mockery/CountValidator/AtMost.php b/vendor/mockery/mockery/library/Mockery/CountValidator/AtMost.php
new file mode 100644
index 00000000..4d23e28d
--- /dev/null
+++ b/vendor/mockery/mockery/library/Mockery/CountValidator/AtMost.php
@@ -0,0 +1,51 @@
+_limit < $n) {
+ $exception = new Mockery\Exception\InvalidCountException(
+ 'Method ' . (string) $this->_expectation
+ . ' from ' . $this->_expectation->getMock()->mockery_getName()
+ . ' should be called' . PHP_EOL
+ . ' at most ' . $this->_limit . ' times but called ' . $n
+ . ' times.'
+ );
+ $exception->setMock($this->_expectation->getMock())
+ ->setMethodName((string) $this->_expectation)
+ ->setExpectedCountComparative('<=')
+ ->setExpectedCount($this->_limit)
+ ->setActualCount($n);
+ throw $exception;
+ }
+ }
+}
diff --git a/vendor/mockery/mockery/library/Mockery/CountValidator/CountValidatorAbstract.php b/vendor/mockery/mockery/library/Mockery/CountValidator/CountValidatorAbstract.php
new file mode 100644
index 00000000..ae3b0bfe
--- /dev/null
+++ b/vendor/mockery/mockery/library/Mockery/CountValidator/CountValidatorAbstract.php
@@ -0,0 +1,69 @@
+_expectation = $expectation;
+ $this->_limit = $limit;
+ }
+
+ /**
+ * Checks if the validator can accept an additional nth call
+ *
+ * @param int $n
+ * @return bool
+ */
+ public function isEligible($n)
+ {
+ 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
new file mode 100644
index 00000000..504f080d
--- /dev/null
+++ b/vendor/mockery/mockery/library/Mockery/CountValidator/Exact.php
@@ -0,0 +1,54 @@
+_limit !== $n) {
+ $because = $this->_expectation->getExceptionMessage();
+
+ $exception = new Mockery\Exception\InvalidCountException(
+ 'Method ' . (string) $this->_expectation
+ . ' from ' . $this->_expectation->getMock()->mockery_getName()
+ . ' should be called' . PHP_EOL
+ . ' exactly ' . $this->_limit . ' times but called ' . $n
+ . ' times.'
+ . ($because ? ' Because ' . $this->_expectation->getExceptionMessage() : '')
+ );
+ $exception->setMock($this->_expectation->getMock())
+ ->setMethodName((string) $this->_expectation)
+ ->setExpectedCountComparative('=')
+ ->setExpectedCount($this->_limit)
+ ->setActualCount($n);
+ throw $exception;
+ }
+ }
+}
diff --git a/vendor/mockery/mockery/library/Mockery/CountValidator/Exception.php b/vendor/mockery/mockery/library/Mockery/CountValidator/Exception.php
new file mode 100644
index 00000000..b43aad3e
--- /dev/null
+++ b/vendor/mockery/mockery/library/Mockery/CountValidator/Exception.php
@@ -0,0 +1,25 @@
+dismissed = true;
+
+ // we sometimes stack them
+ if ($this->getPrevious() && $this->getPrevious() instanceof BadMethodCallException) {
+ $this->getPrevious()->dismiss();
+ }
+ }
+
+ 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
new file mode 100644
index 00000000..ccf5c76f
--- /dev/null
+++ b/vendor/mockery/mockery/library/Mockery/Exception/InvalidArgumentException.php
@@ -0,0 +1,25 @@
+mockObject = $mock;
+ return $this;
+ }
+
+ public function setMethodName($name)
+ {
+ $this->method = $name;
+ return $this;
+ }
+
+ public function setActualCount($count)
+ {
+ $this->actual = $count;
+ return $this;
+ }
+
+ public function setExpectedCount($count)
+ {
+ $this->expected = $count;
+ return $this;
+ }
+
+ public function setExpectedCountComparative($comp)
+ {
+ if (!in_array($comp, array('=', '>', '<', '>=', '<='))) {
+ throw new RuntimeException(
+ 'Illegal comparative for expected call counts set: ' . $comp
+ );
+ }
+ $this->expectedComparative = $comp;
+ return $this;
+ }
+
+ public function getMock()
+ {
+ return $this->mockObject;
+ }
+
+ public function getMethodName()
+ {
+ 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;
+ }
+}
diff --git a/vendor/mockery/mockery/library/Mockery/Exception/InvalidOrderException.php b/vendor/mockery/mockery/library/Mockery/Exception/InvalidOrderException.php
new file mode 100644
index 00000000..50b8049e
--- /dev/null
+++ b/vendor/mockery/mockery/library/Mockery/Exception/InvalidOrderException.php
@@ -0,0 +1,83 @@
+mockObject = $mock;
+ return $this;
+ }
+
+ public function setMethodName($name)
+ {
+ $this->method = $name;
+ return $this;
+ }
+
+ public function setActualOrder($count)
+ {
+ $this->actual = $count;
+ return $this;
+ }
+
+ public function setExpectedOrder($count)
+ {
+ $this->expected = $count;
+ return $this;
+ }
+
+ public function getMock()
+ {
+ return $this->mockObject;
+ }
+
+ public function getMethodName()
+ {
+ return $this->method;
+ }
+
+ public function getActualOrder()
+ {
+ return $this->actual;
+ }
+
+ public function getExpectedOrder()
+ {
+ return $this->expected;
+ }
+
+ public function getMockName()
+ {
+ return $this->getMock()->mockery_getName();
+ }
+}
diff --git a/vendor/mockery/mockery/library/Mockery/Exception/NoMatchingExpectationException.php b/vendor/mockery/mockery/library/Mockery/Exception/NoMatchingExpectationException.php
new file mode 100644
index 00000000..fe5f3515
--- /dev/null
+++ b/vendor/mockery/mockery/library/Mockery/Exception/NoMatchingExpectationException.php
@@ -0,0 +1,70 @@
+mockObject = $mock;
+ return $this;
+ }
+
+ public function setMethodName($name)
+ {
+ $this->method = $name;
+ return $this;
+ }
+
+ public function setActualArguments($count)
+ {
+ $this->actual = $count;
+ return $this;
+ }
+
+ public function getMock()
+ {
+ return $this->mockObject;
+ }
+
+ public function getMethodName()
+ {
+ return $this->method;
+ }
+
+ public function getActualArguments()
+ {
+ return $this->actual;
+ }
+
+ public function getMockName()
+ {
+ return $this->getMock()->mockery_getName();
+ }
+}
diff --git a/vendor/mockery/mockery/library/Mockery/Exception/RuntimeException.php b/vendor/mockery/mockery/library/Mockery/Exception/RuntimeException.php
new file mode 100644
index 00000000..4b2f53c2
--- /dev/null
+++ b/vendor/mockery/mockery/library/Mockery/Exception/RuntimeException.php
@@ -0,0 +1,25 @@
+_mock = $mock;
+ $this->_name = $name;
+ $this->withAnyArgs();
+ }
+
+ /**
+ * 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;
+ });
+ }
+
+ /**
+ * Set a return value, or sequential queue of return values
+ *
+ * @param mixed ...$args
+ * @return self
+ */
+ public function andReturn(...$args)
+ {
+ $this->_returnQueue = $args;
+ return $this;
+ }
+
+ /**
+ * 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 mock, like a fluent interface
+ *
+ * @return self
+ */
+ public function andReturnSelf()
+ {
+ return $this->andReturn($this->_mock);
+ }
+
+ /**
+ * Set a sequential queue of return values with an array
+ *
+ * @param array $values
+ * @return self
+ */
+ public function andReturnValues(array $values)
+ {
+ 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 a self-returning black hole object.
+ *
+ * @return self
+ */
+ public function andReturnUndefined()
+ {
+ $this->andReturn(new \Mockery\Undefined());
+ return $this;
+ }
+
+ /**
+ * Return null. This is merely a language construct for Mock describing.
+ *
+ * @return self
+ */
+ public function andReturnNull()
+ {
+ 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);
+ }
+
+ /**
+ * Register values to be set to a public property each time this expectation occurs
+ *
+ * @param string $name
+ * @param array ...$values
+ * @return self
+ */
+ public function andSet($name, ...$values)
+ {
+ $this->_setQueue[$name] = $values;
+ return $this;
+ }
+
+ /**
+ * 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;
+ }
+ },
+ ];
+
+ 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 call_user_func_array(array($this, 'andSet'), func_get_args());
+ }
+
+ /**
+ * Indicates this expectation should occur zero or more times
+ *
+ * @return self
+ */
+ public function zeroOrMoreTimes()
+ {
+ $this->atLeast()->never();
+ }
+
+ /**
+ * Indicates the number of times this expectation should occur
+ *
+ * @param int $limit
+ * @throws \InvalidArgumentException
+ * @return self
+ */
+ public function times($limit = null)
+ {
+ 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);
+
+ if ('Mockery\CountValidator\Exact' !== $this->_countValidatorClass) {
+ $this->_countValidatorClass = 'Mockery\CountValidator\Exact';
+ unset($this->_countValidators[$this->_countValidatorClass]);
+ }
+
+ return $this;
+ }
+
+ /**
+ * Indicates that this expectation is never expected to be called
+ *
+ * @return self
+ */
+ public function never()
+ {
+ return $this->times(0);
+ }
+
+ /**
+ * Indicates that this expectation is expected exactly once
+ *
+ * @return self
+ */
+ public function once()
+ {
+ return $this->times(1);
+ }
+
+ /**
+ * Indicates that this expectation is expected exactly twice
+ *
+ * @return self
+ */
+ public function twice()
+ {
+ return $this->times(2);
+ }
+
+ /**
+ * Sets next count validator to the AtLeast instance
+ *
+ * @return self
+ */
+ public function atLeast()
+ {
+ $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);
+ }
+ $this->_globally = false;
+ return $this;
+ }
+
+ /**
+ * Indicates call order should apply globally
+ *
+ * @return self
+ */
+ public function globally()
+ {
+ $this->_globally = true;
+ return $this;
+ }
+
+ /**
+ * 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);
+ }
+ return $result;
+ }
+
+ /**
+ * Return order number
+ *
+ * @return int
+ */
+ public function getOrderNumber()
+ {
+ return $this->_orderNumber;
+ }
+
+ /**
+ * Mark this expectation as being a default
+ *
+ * @return self
+ */
+ public function byDefault()
+ {
+ $director = $this->_mock->mockery_getExpectationsFor($this->_name);
+ if (!empty($director)) {
+ $director->makeExpectationDefault($this);
+ }
+ 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.
+ *
+ * @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;
+ }
+
+ /**
+ * 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
new file mode 100644
index 00000000..efb0b70b
--- /dev/null
+++ b/vendor/mockery/mockery/library/Mockery/ExpectationDirector.php
@@ -0,0 +1,226 @@
+_name = $name;
+ $this->_mock = $mock;
+ }
+
+ /**
+ * Add a new expectation to the director
+ *
+ * @param \Mockery\Expectation $expectation
+ */
+ public function addExpectation(\Mockery\Expectation $expectation)
+ {
+ $this->_expectations[] = $expectation;
+ }
+
+ /**
+ * 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;
+ }
+ 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();
+ }
+ }
+ }
+
+ /**
+ * 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)) {
+ $expectation = $this->_findExpectationIn($this->_expectations, $args);
+ }
+
+ if ($expectation === null && !empty($this->_defaults)) {
+ $expectation = $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
+ */
+ public function getDefaultExpectations()
+ {
+ return $this->_defaults;
+ }
+
+ /**
+ * Return the number of expectations assigned to this director.
+ *
+ * @return int
+ */
+ public function getExpectationCount()
+ {
+ $count = 0;
+ /** @var Expectation $expectations */
+ $expectations = $this->getExpectations() ?: $this->getDefaultExpectations();
+ foreach ($expectations as $expectation) {
+ if ($expectation->isCallCountConstrained()) {
+ $count++;
+ }
+ }
+ return $count;
+ }
+}
diff --git a/vendor/mockery/mockery/library/Mockery/ExpectationInterface.php b/vendor/mockery/mockery/library/Mockery/ExpectationInterface.php
new file mode 100644
index 00000000..f1295ad3
--- /dev/null
+++ b/vendor/mockery/mockery/library/Mockery/ExpectationInterface.php
@@ -0,0 +1,46 @@
+once();
+ }
+}
diff --git a/vendor/mockery/mockery/library/Mockery/Generator/CachingGenerator.php b/vendor/mockery/mockery/library/Mockery/Generator/CachingGenerator.php
new file mode 100644
index 00000000..6497e885
--- /dev/null
+++ b/vendor/mockery/mockery/library/Mockery/Generator/CachingGenerator.php
@@ -0,0 +1,45 @@
+generator = $generator;
+ }
+
+ public function generate(MockConfiguration $config)
+ {
+ $hash = $config->getHash();
+ if (isset($this->cache[$hash])) {
+ return $this->cache[$hash];
+ }
+
+ $definition = $this->generator->generate($config);
+ $this->cache[$hash] = $definition;
+
+ return $definition;
+ }
+}
diff --git a/vendor/mockery/mockery/library/Mockery/Generator/DefinedTargetClass.php b/vendor/mockery/mockery/library/Mockery/Generator/DefinedTargetClass.php
new file mode 100644
index 00000000..7463f1d1
--- /dev/null
+++ b/vendor/mockery/mockery/library/Mockery/Generator/DefinedTargetClass.php
@@ -0,0 +1,110 @@
+rfc = $rfc;
+ $this->name = $alias === null ? $rfc->getName() : $alias;
+ }
+
+ public static function factory($name, $alias = null)
+ {
+ return new self(new \ReflectionClass($name), $alias);
+ }
+
+ 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();
+ }
+
+ public function getNamespaceName()
+ {
+ return $this->rfc->getNamespaceName();
+ }
+
+ public function inNamespace()
+ {
+ return $this->rfc->inNamespace();
+ }
+
+ public function getShortName()
+ {
+ return $this->rfc->getShortName();
+ }
+
+ public function implementsInterface($interface)
+ {
+ return $this->rfc->implementsInterface($interface);
+ }
+
+ public function hasInternalAncestor()
+ {
+ if ($this->rfc->isInternal()) {
+ return true;
+ }
+
+ $child = $this->rfc;
+ while ($parent = $child->getParentClass()) {
+ if ($parent->isInternal()) {
+ return true;
+ }
+ $child = $parent;
+ }
+
+ return false;
+ }
+}
diff --git a/vendor/mockery/mockery/library/Mockery/Generator/Generator.php b/vendor/mockery/mockery/library/Mockery/Generator/Generator.php
new file mode 100644
index 00000000..459a93cc
--- /dev/null
+++ b/vendor/mockery/mockery/library/Mockery/Generator/Generator.php
@@ -0,0 +1,27 @@
+method = $method;
+ }
+
+ public function __call($method, $args)
+ {
+ return call_user_func_array(array($this->method, $method), $args);
+ }
+
+ /**
+ * @return Parameter[]
+ */
+ public function getParameters()
+ {
+ return array_map(function (\ReflectionParameter $parameter) {
+ return new Parameter($parameter);
+ }, $this->method->getParameters());
+ }
+
+ /**
+ * @return string|null
+ */
+ public function getReturnType()
+ {
+ return Reflector::getReturnType($this->method);
+ }
+}
diff --git a/vendor/mockery/mockery/library/Mockery/Generator/MockConfiguration.php b/vendor/mockery/mockery/library/Mockery/Generator/MockConfiguration.php
new file mode 100644
index 00000000..05903e5b
--- /dev/null
+++ b/vendor/mockery/mockery/library/Mockery/Generator/MockConfiguration.php
@@ -0,0 +1,556 @@
+addTargets($targets);
+ $this->blackListedMethods = $blackListedMethods;
+ $this->whiteListedMethods = $whiteListedMethods;
+ $this->name = $name;
+ $this->instanceMock = $instanceMock;
+ $this->parameterOverrides = $parameterOverrides;
+ $this->mockOriginalDestructor = $mockOriginalDestructor;
+ $this->constantsMap = $constantsMap;
+ }
+
+ /**
+ * Attempt to create a hash of the configuration, in order to allow caching
+ *
+ * @TODO workout if this will work
+ *
+ * @return string
+ */
+ 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
+ );
+
+ 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
+ */
+ public function getMethodsToMock()
+ {
+ $methods = $this->getAllMethods();
+
+ foreach ($methods as $key => $method) {
+ if ($method->isFinal()) {
+ unset($methods[$key]);
+ }
+ }
+
+ /**
+ * 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);
+ });
+
+ return $methods;
+ }
+
+ /**
+ * 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);
+ });
+ }
+
+ /**
+ * Internal objects can not be instantiated with newInstanceArgs and if
+ * they implement Serializable, unserialize will have to be called. As
+ * 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";
+ });
+ }
+
+ return array_values($methods);
+ }
+
+ /**
+ * 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
+ */
+ public function requiresCallTypeHintRemoval()
+ {
+ foreach ($this->getAllMethods() as $method) {
+ if ("__call" === $method->getName()) {
+ $params = $method->getParameters();
+ return !$params[1]->isArray();
+ }
+ }
+
+ return false;
+ }
+
+ /**
+ * 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
+ */
+ public function requiresCallStaticTypeHintRemoval()
+ {
+ foreach ($this->getAllMethods() as $method) {
+ if ("__callStatic" === $method->getName()) {
+ $params = $method->getParameters();
+ return !$params[1]->isArray();
+ }
+ }
+
+ return false;
+ }
+
+ public function rename($className)
+ {
+ $targets = array();
+
+ if ($this->targetClassName) {
+ $targets[] = $this->targetClassName;
+ }
+
+ if ($this->targetInterfaceNames) {
+ $targets = array_merge($targets, $this->targetInterfaceNames);
+ }
+
+ if ($this->targetTraitNames) {
+ $targets = array_merge($targets, $this->targetTraitNames);
+ }
+
+ if ($this->targetObject) {
+ $targets[] = $this->targetObject;
+ }
+
+ return new self(
+ $targets,
+ $this->blackListedMethods,
+ $this->whiteListedMethods,
+ $className,
+ $this->instanceMock,
+ $this->parameterOverrides,
+ $this->mockOriginalDestructor,
+ $this->constantsMap
+ );
+ }
+
+ protected function addTarget($target)
+ {
+ if (is_object($target)) {
+ $this->setTargetObject($target);
+ $this->setTargetClassName(get_class($target));
+ return $this;
+ }
+
+ if ($target[0] !== "\\") {
+ $target = "\\" . $target;
+ }
+
+ if (class_exists($target)) {
+ $this->setTargetClassName($target);
+ return $this;
+ }
+
+ if (interface_exists($target)) {
+ $this->addTargetInterfaceName($target);
+ return $this;
+ }
+
+ if (trait_exists($target)) {
+ $this->addTargetTraitName($target);
+ return $this;
+ }
+
+ /**
+ * Default is to set as class, or interface if class already set
+ *
+ * Don't like this condition, can't remember what the default
+ * targetClass is for
+ */
+ if ($this->getTargetClassName()) {
+ $this->addTargetInterfaceName($target);
+ return $this;
+ }
+
+ $this->setTargetClassName($target);
+ }
+
+ protected function addTargets($interfaces)
+ {
+ foreach ($interfaces as $interface) {
+ $this->addTarget($interface);
+ }
+ }
+
+ public function getTargetClassName()
+ {
+ 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;
+ }
+
+ /**
+ * Generate a suitable name based on the config
+ */
+ 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) {
+ return $this->allMethods;
+ }
+
+ $classes = $this->getTargetInterfaces();
+
+ if ($this->getTargetClass()) {
+ $classes[] = $this->getTargetClass();
+ }
+
+ $methods = array();
+ foreach ($classes as $class) {
+ $methods = array_merge($methods, $class->getMethods());
+ }
+
+ foreach ($this->getTargetTraits() as $trait) {
+ foreach ($trait->getMethods() as $method) {
+ if ($method->isAbstract()) {
+ $methods[] = $method;
+ }
+ }
+ }
+
+ $names = array();
+ $methods = array_filter($methods, function ($method) use (&$names) {
+ if (in_array($method->getName(), $names)) {
+ return false;
+ }
+
+ $names[] = $method->getName();
+ return true;
+ });
+
+ return $this->allMethods = $methods;
+ }
+
+ /**
+ * 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.
+ */
+ protected function addTargetInterfaceName($targetInterface)
+ {
+ $this->targetInterfaceNames[] = $targetInterface;
+ }
+
+ protected function addTargetTraitName($targetTraitName)
+ {
+ $this->targetTraitNames[] = $targetTraitName;
+ }
+
+ 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
new file mode 100644
index 00000000..273b1d8b
--- /dev/null
+++ b/vendor/mockery/mockery/library/Mockery/Generator/MockConfigurationBuilder.php
@@ -0,0 +1,174 @@
+blackListedMethods = array_diff($this->blackListedMethods, $this->php7SemiReservedKeywords);
+ }
+
+ public function addTarget($target)
+ {
+ $this->targets[] = $target;
+
+ return $this;
+ }
+
+ public function addTargets($targets)
+ {
+ foreach ($targets as $target) {
+ $this->addTarget($target);
+ }
+
+ 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;
+ }
+
+ public function addWhiteListedMethod($whiteListedMethod)
+ {
+ $this->whiteListedMethods[] = $whiteListedMethod;
+ return $this;
+ }
+
+ 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;
+ }
+
+ public function getMockConfiguration()
+ {
+ return new MockConfiguration(
+ $this->targets,
+ $this->blackListedMethods,
+ $this->whiteListedMethods,
+ $this->name,
+ $this->instanceMock,
+ $this->parameterOverrides,
+ $this->mockOriginalDestructor,
+ $this->constantsMap
+ );
+ }
+}
diff --git a/vendor/mockery/mockery/library/Mockery/Generator/MockDefinition.php b/vendor/mockery/mockery/library/Mockery/Generator/MockDefinition.php
new file mode 100644
index 00000000..fd6a9fa2
--- /dev/null
+++ b/vendor/mockery/mockery/library/Mockery/Generator/MockDefinition.php
@@ -0,0 +1,51 @@
+getName()) {
+ throw new \InvalidArgumentException("MockConfiguration must contain a name");
+ }
+ $this->config = $config;
+ $this->code = $code;
+ }
+
+ public function getConfig()
+ {
+ return $this->config;
+ }
+
+ public function getClassName()
+ {
+ return $this->config->getName();
+ }
+
+ public function getCode()
+ {
+ return $this->code;
+ }
+}
diff --git a/vendor/mockery/mockery/library/Mockery/Generator/MockNameBuilder.php b/vendor/mockery/mockery/library/Mockery/Generator/MockNameBuilder.php
new file mode 100644
index 00000000..204308ab
--- /dev/null
+++ b/vendor/mockery/mockery/library/Mockery/Generator/MockNameBuilder.php
@@ -0,0 +1,46 @@
+parts[] = $part;
+
+ return $this;
+ }
+
+ public function build()
+ {
+ $parts = ['Mockery', static::$mockCounter++];
+
+ foreach ($this->parts as $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
new file mode 100644
index 00000000..70095336
--- /dev/null
+++ b/vendor/mockery/mockery/library/Mockery/Generator/Parameter.php
@@ -0,0 +1,117 @@
+rfp = $rfp;
+ }
+
+ public function __call($method, array $args)
+ {
+ return call_user_func_array(array($this->rfp, $method), $args);
+ }
+
+ /**
+ * Get the reflection class for the parameter type, if it exists.
+ *
+ * This will be null if there was no type, or it was a scalar or a union.
+ *
+ * @return \ReflectionClass|null
+ *
+ * @deprecated since 1.3.3 and will be removed in 2.0.
+ */
+ public function getClass()
+ {
+ $typeHint = Reflector::getTypeHint($this->rfp, true);
+
+ return \class_exists($typeHint) ? DefinedTargetClass::factory($typeHint, false) : null;
+ }
+
+ /**
+ * Get the string representation for the paramater type.
+ *
+ * @return string|null
+ */
+ public function getTypeHint()
+ {
+ return Reflector::getTypeHint($this->rfp);
+ }
+
+ /**
+ * Get the string representation for the paramater type.
+ *
+ * @return string
+ *
+ * @deprecated since 1.3.2 and will be removed in 2.0. Use getTypeHint() instead.
+ */
+ public function getTypeHintAsString()
+ {
+ 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.
+ *
+ * @return bool
+ */
+ public function isArray()
+ {
+ return Reflector::isArray($this->rfp);
+ }
+
+ /**
+ * Determine if the parameter is variadic.
+ *
+ * @return bool
+ */
+ public function isVariadic()
+ {
+ return $this->rfp->isVariadic();
+ }
+}
diff --git a/vendor/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/AvoidMethodClashPass.php b/vendor/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/AvoidMethodClashPass.php
new file mode 100644
index 00000000..45312573
--- /dev/null
+++ b/vendor/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/AvoidMethodClashPass.php
@@ -0,0 +1,49 @@
+getName();
+ }, $config->getMethodsToMock());
+
+ foreach (["allows", "expects"] as $method) {
+ if (in_array($method, $names)) {
+ $code = preg_replace(
+ "#// start method {$method}.*// end method {$method}#ms",
+ "",
+ $code
+ );
+
+ $code = str_replace(" implements MockInterface", " implements LegacyMockInterface", $code);
+ }
+ }
+
+ return $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
new file mode 100644
index 00000000..fd00264c
--- /dev/null
+++ b/vendor/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/CallTypeHintPass.php
@@ -0,0 +1,47 @@
+requiresCallTypeHintRemoval()) {
+ $code = str_replace(
+ 'public function __call($method, array $args)',
+ 'public function __call($method, $args)',
+ $code
+ );
+ }
+
+ if ($config->requiresCallStaticTypeHintRemoval()) {
+ $code = str_replace(
+ 'public static function __callStatic($method, array $args)',
+ 'public static function __callStatic($method, $args)',
+ $code
+ );
+ }
+
+ return $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
new file mode 100644
index 00000000..b5a31098
--- /dev/null
+++ b/vendor/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/ClassNamePass.php
@@ -0,0 +1,49 @@
+getNamespaceName();
+
+ $namespace = ltrim($namespace, "\\");
+
+ $className = $config->getShortName();
+
+ $code = str_replace(
+ 'namespace Mockery;',
+ $namespace ? 'namespace ' . $namespace . ';' : '',
+ $code
+ );
+
+ $code = str_replace(
+ 'class Mock',
+ 'class ' . $className,
+ $code
+ );
+
+ return $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
new file mode 100644
index 00000000..1debcbb1
--- /dev/null
+++ b/vendor/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/ClassPass.php
@@ -0,0 +1,53 @@
+getTargetClass();
+
+ if (!$target) {
+ return $code;
+ }
+
+ if ($target->isFinal()) {
+ return $code;
+ }
+
+ $className = ltrim($target->getName(), "\\");
+
+ if (!class_exists($className)) {
+ \Mockery::declareClass($className);
+ }
+
+ $code = 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
new file mode 100644
index 00000000..df5dd8ce
--- /dev/null
+++ b/vendor/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/ConstantsPass.php
@@ -0,0 +1,33 @@
+getConstantsMap();
+ if (empty($cm)) {
+ return $code;
+ }
+
+ if (!isset($cm[$config->getName()])) {
+ return $code;
+ }
+
+ $cm = $cm[$config->getName()];
+
+ $constantsCode = '';
+ foreach ($cm 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";
+
+ return $code;
+ }
+}
diff --git a/vendor/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/InstanceMockPass.php b/vendor/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/InstanceMockPass.php
new file mode 100644
index 00000000..62791475
--- /dev/null
+++ b/vendor/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/InstanceMockPass.php
@@ -0,0 +1,83 @@
+_mockery_ignoreVerification = false;
+ \$associatedRealObject = \Mockery::fetchMock(__CLASS__);
+
+ foreach (get_object_vars(\$this) as \$attr => \$val) {
+ if (\$attr !== "_mockery_ignoreVerification" && \$attr !== "_mockery_expectations") {
+ \$this->\$attr = \$associatedRealObject->\$attr;
+ }
+ }
+
+ \$directors = \$associatedRealObject->mockery_getExpectations();
+ foreach (\$directors as \$method=>\$director) {
+ // get the director method needed
+ \$existingDirector = \$this->mockery_getExpectationsFor(\$method);
+ if (!\$existingDirector) {
+ \$existingDirector = new \Mockery\ExpectationDirector(\$method, \$this);
+ \$this->mockery_setExpectationsFor(\$method, \$existingDirector);
+ }
+ \$expectations = \$director->getExpectations();
+ foreach (\$expectations as \$expectation) {
+ \$clonedExpectation = clone \$expectation;
+ \$existingDirector->addExpectation(\$clonedExpectation);
+ }
+ \$defaultExpectations = \$director->getDefaultExpectations();
+ foreach (array_reverse(\$defaultExpectations) as \$expectation) {
+ \$clonedExpectation = clone \$expectation;
+ \$existingDirector->addExpectation(\$clonedExpectation);
+ \$existingDirector->makeExpectationDefault(\$clonedExpectation);
+ }
+ }
+ \Mockery::getContainer()->rememberMock(\$this);
+
+ \$this->_mockery_constructorCalled(func_get_args());
+ }
+MOCK;
+
+ public function apply($code, MockConfiguration $config)
+ {
+ if ($config->isInstanceMock()) {
+ $code = $this->appendToClass($code, static::INSTANCE_MOCK_CODE);
+ }
+
+ return $code;
+ }
+
+ protected function appendToClass($class, $code)
+ {
+ $lastBrace = strrpos($class, "}");
+ $class = substr($class, 0, $lastBrace) . $code . "\n }\n";
+ return $class;
+ }
+}
diff --git a/vendor/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/InterfacePass.php b/vendor/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/InterfacePass.php
new file mode 100644
index 00000000..982956e5
--- /dev/null
+++ b/vendor/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/InterfacePass.php
@@ -0,0 +1,48 @@
+getTargetInterfaces() as $i) {
+ $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(), "\\");
+ }, "");
+
+ $code = str_replace(
+ "implements MockInterface",
+ "implements MockInterface" . $interfaces,
+ $code
+ );
+
+ return $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
new file mode 100644
index 00000000..ddcdb0b7
--- /dev/null
+++ b/vendor/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/MagicMethodTypeHintsPass.php
@@ -0,0 +1,212 @@
+getMagicMethods($config->getTargetClass());
+ foreach ($config->getTargetInterfaces() as $interface) {
+ $magicMethods = array_merge($magicMethods, $this->getMagicMethods($interface));
+ }
+
+ foreach ($magicMethods as $method) {
+ $code = $this->applyMagicTypeHints($code, $method);
+ }
+
+ return $code;
+ }
+
+ /**
+ * Returns the magic methods within the
+ * passed DefinedTargetClass.
+ *
+ * @param TargetClassInterface $class
+ * @return array
+ */
+ public function getMagicMethods(
+ TargetClassInterface $class = null
+ ) {
+ if (is_null($class)) {
+ return array();
+ }
+ return array_filter($class->getMethods(), function (Method $method) {
+ return in_array($method->getName(), $this->mockMagicMethods);
+ });
+ }
+
+ /**
+ * 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
+ );
+ $code = preg_replace(
+ $this->getDeclarationRegex($method->getName()),
+ $this->getMethodDeclaration($method, $namedParameters),
+ $code
+ );
+ }
+ return $code;
+ }
+
+ /**
+ * Checks if the method is declared within code.
+ *
+ * @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 int $code
+ * @param Method $method
+ * @return array
+ */
+ private function getOriginalParameters($code, Method $method)
+ {
+ $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;
+ }
+
+ /**
+ * Gets the declaration code, as a string, for the passed method.
+ *
+ * @param Method $method
+ * @param array $namedParameters
+ * @return string
+ */
+ 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();
+ $declaration .= '$' . $name;
+ $declaration .= ',';
+ }
+ $declaration = rtrim($declaration, ',');
+ $declaration .= ') ';
+
+ $returnType = $method->getReturnType();
+ if ($returnType !== null) {
+ $declaration .= sprintf(': %s', $returnType);
+ }
+
+ return $declaration;
+ }
+
+ protected function renderTypeHint(Parameter $param)
+ {
+ $typeHint = $param->getTypeHint();
+
+ return $typeHint === null ? '' : sprintf('%s ', $typeHint);
+ }
+
+ /**
+ * Returns a regex string used to match the
+ * declaration of some method.
+ *
+ * @param string $methodName
+ * @return string
+ */
+ private function getDeclarationRegex($methodName)
+ {
+ return "/public\s+(?:static\s+)?function\s+$methodName\s*\(.*\)\s*(?=\{)/i";
+ }
+}
diff --git a/vendor/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/MethodDefinitionPass.php b/vendor/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/MethodDefinitionPass.php
new file mode 100644
index 00000000..b0b743df
--- /dev/null
+++ b/vendor/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/MethodDefinitionPass.php
@@ -0,0 +1,167 @@
+getMethodsToMock() as $method) {
+ if ($method->isPublic()) {
+ $methodDef = 'public';
+ } elseif ($method->isProtected()) {
+ $methodDef = 'protected';
+ } else {
+ $methodDef = 'private';
+ }
+
+ if ($method->isStatic()) {
+ $methodDef .= ' static';
+ }
+
+ $methodDef .= ' function ';
+ $methodDef .= $method->returnsReference() ? ' & ' : '';
+ $methodDef .= $method->getName();
+ $methodDef .= $this->renderParams($method, $config);
+ $methodDef .= $this->renderReturnType($method);
+ $methodDef .= $this->renderMethodBody($method, $config);
+
+ $code = $this->appendToClass($code, $methodDef);
+ }
+
+ return $code;
+ }
+
+ protected function renderParams(Method $method, $config)
+ {
+ $class = $method->getDeclaringClass();
+ if ($class->isInternal()) {
+ $overrides = $config->getParameterOverrides();
+
+ if (isset($overrides[strtolower($class->getName())][$method->getName()])) {
+ return '(' . implode(',', $overrides[strtolower($class->getName())][$method->getName()]) . ')';
+ }
+ }
+
+ $methodParams = array();
+ $params = $method->getParameters();
+ foreach ($params as $param) {
+ $paramDef = $this->renderTypeHint($param);
+ $paramDef .= $param->isPassedByReference() ? '&' : '';
+ $paramDef .= $param->isVariadic() ? '...' : '';
+ $paramDef .= '$' . $param->getName();
+
+ if (!$param->isVariadic()) {
+ if (false !== $param->isDefaultValueAvailable()) {
+ $defaultValue = $param->getDefaultValue();
+ $paramDef .= ' = ' . (is_object($defaultValue) ? get_class($defaultValue) : var_export($defaultValue, true));
+ } elseif ($param->isOptional()) {
+ $paramDef .= ' = null';
+ }
+ }
+
+ $methodParams[] = $paramDef;
+ }
+ return '(' . implode(', ', $methodParams) . ')';
+ }
+
+ protected function renderReturnType(Method $method)
+ {
+ $type = $method->getReturnType();
+
+ 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();
+
+ return $typeHint === null ? '' : sprintf('%s ', $typeHint);
+ }
+
+ private function renderMethodBody($method, $config)
+ {
+ $invoke = $method->isStatic() ? 'static::_mockery_handleStaticMethodCall' : '$this->_mockery_handleMethodCall';
+ $body = <<getDeclaringClass();
+ $class_name = strtolower($class->getName());
+ $overrides = $config->getParameterOverrides();
+ if (isset($overrides[$class_name][$method->getName()])) {
+ $params = array_values($overrides[$class_name][$method->getName()]);
+ $paramCount = count($params);
+ for ($i = 0; $i < $paramCount; ++$i) {
+ $param = $params[$i];
+ if (strpos($param, '&') !== false) {
+ $body .= << $i) {
+ \$argv[$i] = {$param};
+}
+
+BODY;
+ }
+ }
+ } else {
+ $params = array_values($method->getParameters());
+ $paramCount = count($params);
+ for ($i = 0; $i < $paramCount; ++$i) {
+ $param = $params[$i];
+ if (!$param->isPassedByReference()) {
+ continue;
+ }
+ $body .= << $i) {
+ \$argv[$i] =& \${$param->getName()};
+}
+
+BODY;
+ }
+ }
+
+ $body .= "\$ret = {$invoke}(__FUNCTION__, \$argv);\n";
+
+ if (! in_array($method->getReturnType(), ['never','void'], true)) {
+ $body .= "return \$ret;\n";
+ }
+
+ $body .= "}\n";
+ return $body;
+ }
+}
diff --git a/vendor/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/Pass.php b/vendor/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/Pass.php
new file mode 100644
index 00000000..f7b72c9f
--- /dev/null
+++ b/vendor/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/Pass.php
@@ -0,0 +1,28 @@
+ '/public function __wakeup\(\)\s+\{.*?\}/sm',
+ '__toString' => '/public function __toString\(\)\s+(:\s+string)?\s*\{.*?\}/sm',
+ );
+
+ public function apply($code, MockConfiguration $config)
+ {
+ $target = $config->getTargetClass();
+
+ if (!$target) {
+ return $code;
+ }
+
+ foreach ($target->getMethods() as $method) {
+ if ($method->isFinal() && isset($this->methods[$method->getName()])) {
+ $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
new file mode 100644
index 00000000..ed5a4206
--- /dev/null
+++ b/vendor/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/RemoveDestructorPass.php
@@ -0,0 +1,45 @@
+
+ */
+
+namespace Mockery\Generator\StringManipulation\Pass;
+
+use Mockery\Generator\MockConfiguration;
+
+/**
+ * Remove mock's empty destructor if we tend to use original class destructor
+ */
+class RemoveDestructorPass
+{
+ public function apply($code, MockConfiguration $config)
+ {
+ $target = $config->getTargetClass();
+
+ if (!$target) {
+ return $code;
+ }
+
+ if (!$config->isMockOriginalDestructor()) {
+ $code = 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
new file mode 100644
index 00000000..0abefe26
--- /dev/null
+++ b/vendor/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/RemoveUnserializeForInternalSerializableClassesPass.php
@@ -0,0 +1,59 @@
+getTargetClass();
+
+ if (!$target) {
+ return $code;
+ }
+
+ 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;
+ }
+
+ protected function appendToClass($class, $code)
+ {
+ $lastBrace = strrpos($class, "}");
+ $class = substr($class, 0, $lastBrace) . $code . "\n }\n";
+ return $class;
+ }
+}
diff --git a/vendor/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/TraitPass.php b/vendor/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/TraitPass.php
new file mode 100644
index 00000000..f6db5d74
--- /dev/null
+++ b/vendor/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/TraitPass.php
@@ -0,0 +1,47 @@
+getTargetTraits();
+
+ if (empty($traits)) {
+ return $code;
+ }
+
+ $useStatements = array_map(function ($trait) {
+ return "use \\\\" . ltrim($trait->getName(), "\\") . ";";
+ }, $traits);
+
+ $code = preg_replace(
+ '/^{$/m',
+ "{\n " . implode("\n ", $useStatements) . "\n",
+ $code
+ );
+
+ return $code;
+ }
+}
diff --git a/vendor/mockery/mockery/library/Mockery/Generator/StringManipulationGenerator.php b/vendor/mockery/mockery/library/Mockery/Generator/StringManipulationGenerator.php
new file mode 100644
index 00000000..4bc415f6
--- /dev/null
+++ b/vendor/mockery/mockery/library/Mockery/Generator/StringManipulationGenerator.php
@@ -0,0 +1,89 @@
+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
new file mode 100644
index 00000000..77244124
--- /dev/null
+++ b/vendor/mockery/mockery/library/Mockery/Generator/TargetClassInterface.php
@@ -0,0 +1,107 @@
+name = $name;
+ }
+
+ public static function factory($name)
+ {
+ return new self($name);
+ }
+
+ 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();
+ }
+
+ public function getNamespaceName()
+ {
+ $parts = explode("\\", ltrim($this->getName(), "\\"));
+ array_pop($parts);
+ return implode("\\", $parts);
+ }
+
+ public function inNamespace()
+ {
+ return $this->getNamespaceName() !== '';
+ }
+
+ public function getShortName()
+ {
+ $parts = explode("\\", $this->getName());
+ return array_pop($parts);
+ }
+
+ public function implementsInterface($interface)
+ {
+ return false;
+ }
+
+ public function hasInternalAncestor()
+ {
+ return false;
+ }
+
+ public function __toString()
+ {
+ return $this->name;
+ }
+}
diff --git a/vendor/mockery/mockery/library/Mockery/HigherOrderMessage.php b/vendor/mockery/mockery/library/Mockery/HigherOrderMessage.php
new file mode 100644
index 00000000..1c13c898
--- /dev/null
+++ b/vendor/mockery/mockery/library/Mockery/HigherOrderMessage.php
@@ -0,0 +1,49 @@
+mock = $mock;
+ $this->method = $method;
+ }
+
+ /**
+ * @return \Mockery\Expectation
+ */
+ public function __call($method, $args)
+ {
+ if ($this->method === 'shouldNotHaveReceived') {
+ return $this->mock->{$this->method}($method, $args);
+ }
+
+ $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
new file mode 100644
index 00000000..0eafff7f
--- /dev/null
+++ b/vendor/mockery/mockery/library/Mockery/Instantiator.php
@@ -0,0 +1,162 @@
+.
+ */
+
+namespace Mockery;
+
+use Closure;
+use ReflectionClass;
+use UnexpectedValueException;
+use InvalidArgumentException;
+
+/**
+ * This is a trimmed down version of https://github.com/doctrine/instantiator,
+ * basically without the caching
+ *
+ * @author Marco Pivetta
+ */
+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.
+ *
+ * @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
+ *
+ * @throws InvalidArgumentException
+ */
+ private function getReflectionClass($className)
+ {
+ 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;
+ }
+
+ /**
+ * @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) {
+ $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(),
+ $file,
+ $line
+ );
+
+ $error = new UnexpectedValueException($msg, 0, new \Exception($message, $code));
+ });
+
+ try {
+ unserialize($serializedString);
+ } 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);
+ }
+
+ restore_error_handler();
+
+ if ($error) {
+ throw $error;
+ }
+ }
+
+ /**
+ * @param ReflectionClass $reflectionClass
+ *
+ * @return bool
+ */
+ private function isInstantiableViaReflection(ReflectionClass $reflectionClass)
+ {
+ return ! ($reflectionClass->isInternal() && $reflectionClass->isFinal());
+ }
+
+ /**
+ * Verifies whether the given class is to be considered internal
+ *
+ * @param ReflectionClass $reflectionClass
+ *
+ * @return bool
+ */
+ private function hasInternalAncestors(ReflectionClass $reflectionClass)
+ {
+ do {
+ if ($reflectionClass->isInternal()) {
+ return true;
+ }
+ } while ($reflectionClass = $reflectionClass->getParentClass());
+
+ return false;
+ }
+}
diff --git a/vendor/mockery/mockery/library/Mockery/LegacyMockInterface.php b/vendor/mockery/mockery/library/Mockery/LegacyMockInterface.php
new file mode 100644
index 00000000..ae0cc2a7
--- /dev/null
+++ b/vendor/mockery/mockery/library/Mockery/LegacyMockInterface.php
@@ -0,0 +1,240 @@
+getClassName(), false)) {
+ return;
+ }
+
+ eval("?>" . $definition->getCode());
+ }
+}
diff --git a/vendor/mockery/mockery/library/Mockery/Loader/Loader.php b/vendor/mockery/mockery/library/Mockery/Loader/Loader.php
new file mode 100644
index 00000000..170ffb6e
--- /dev/null
+++ b/vendor/mockery/mockery/library/Mockery/Loader/Loader.php
@@ -0,0 +1,28 @@
+path = realpath($path) ?: sys_get_temp_dir();
+ }
+
+ 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());
+
+ require $tmpfname;
+ }
+}
diff --git a/vendor/mockery/mockery/library/Mockery/Matcher/AndAnyOtherArgs.php b/vendor/mockery/mockery/library/Mockery/Matcher/AndAnyOtherArgs.php
new file mode 100644
index 00000000..e3c3b943
--- /dev/null
+++ b/vendor/mockery/mockery/library/Mockery/Matcher/AndAnyOtherArgs.php
@@ -0,0 +1,45 @@
+';
+ }
+}
diff --git a/vendor/mockery/mockery/library/Mockery/Matcher/Any.php b/vendor/mockery/mockery/library/Mockery/Matcher/Any.php
new file mode 100644
index 00000000..1ff440b1
--- /dev/null
+++ b/vendor/mockery/mockery/library/Mockery/Matcher/Any.php
@@ -0,0 +1,45 @@
+';
+ }
+}
diff --git a/vendor/mockery/mockery/library/Mockery/Matcher/AnyArgs.php b/vendor/mockery/mockery/library/Mockery/Matcher/AnyArgs.php
new file mode 100644
index 00000000..9663a76d
--- /dev/null
+++ b/vendor/mockery/mockery/library/Mockery/Matcher/AnyArgs.php
@@ -0,0 +1,40 @@
+';
+ }
+}
diff --git a/vendor/mockery/mockery/library/Mockery/Matcher/AnyOf.php b/vendor/mockery/mockery/library/Mockery/Matcher/AnyOf.php
new file mode 100644
index 00000000..bcce4b74
--- /dev/null
+++ b/vendor/mockery/mockery/library/Mockery/Matcher/AnyOf.php
@@ -0,0 +1,46 @@
+_expected, true);
+ }
+
+ /**
+ * Return a string representation of this Matcher
+ *
+ * @return string
+ */
+ public function __toString()
+ {
+ return '';
+ }
+}
diff --git a/vendor/mockery/mockery/library/Mockery/Matcher/ArgumentListMatcher.php b/vendor/mockery/mockery/library/Mockery/Matcher/ArgumentListMatcher.php
new file mode 100644
index 00000000..04408f56
--- /dev/null
+++ b/vendor/mockery/mockery/library/Mockery/Matcher/ArgumentListMatcher.php
@@ -0,0 +1,25 @@
+_expected;
+ $result = $closure($actual);
+ return $result === true;
+ }
+
+ /**
+ * Return a string representation of this Matcher
+ *
+ * @return string
+ */
+ public function __toString()
+ {
+ return '';
+ }
+}
diff --git a/vendor/mockery/mockery/library/Mockery/Matcher/Contains.php b/vendor/mockery/mockery/library/Mockery/Matcher/Contains.php
new file mode 100644
index 00000000..79afb73a
--- /dev/null
+++ b/vendor/mockery/mockery/library/Mockery/Matcher/Contains.php
@@ -0,0 +1,64 @@
+_expected as $exp) {
+ $match = false;
+ foreach ($values as $val) {
+ if ($exp === $val || $exp == $val) {
+ $match = true;
+ 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
new file mode 100644
index 00000000..291f4220
--- /dev/null
+++ b/vendor/mockery/mockery/library/Mockery/Matcher/Ducktype.php
@@ -0,0 +1,53 @@
+_expected as $method) {
+ if (!method_exists($actual, $method)) {
+ return false;
+ }
+ }
+ return true;
+ }
+
+ /**
+ * Return a string representation of this Matcher
+ *
+ * @return string
+ */
+ public function __toString()
+ {
+ return '_expected) . ']>';
+ }
+}
diff --git a/vendor/mockery/mockery/library/Mockery/Matcher/HasKey.php b/vendor/mockery/mockery/library/Mockery/Matcher/HasKey.php
new file mode 100644
index 00000000..fa983eaf
--- /dev/null
+++ b/vendor/mockery/mockery/library/Mockery/Matcher/HasKey.php
@@ -0,0 +1,45 @@
+_expected, $actual);
+ }
+
+ /**
+ * Return a string representation of this Matcher
+ *
+ * @return string
+ */
+ public function __toString()
+ {
+ return "_expected]>";
+ }
+}
diff --git a/vendor/mockery/mockery/library/Mockery/Matcher/HasValue.php b/vendor/mockery/mockery/library/Mockery/Matcher/HasValue.php
new file mode 100644
index 00000000..8ca6afd1
--- /dev/null
+++ b/vendor/mockery/mockery/library/Mockery/Matcher/HasValue.php
@@ -0,0 +1,46 @@
+_expected, $actual);
+ }
+
+ /**
+ * Return a string representation of this Matcher
+ *
+ * @return string
+ */
+ public function __toString()
+ {
+ $return = '_expected . ']>';
+ return $return;
+ }
+}
diff --git a/vendor/mockery/mockery/library/Mockery/Matcher/MatcherAbstract.php b/vendor/mockery/mockery/library/Mockery/Matcher/MatcherAbstract.php
new file mode 100644
index 00000000..3233079e
--- /dev/null
+++ b/vendor/mockery/mockery/library/Mockery/Matcher/MatcherAbstract.php
@@ -0,0 +1,58 @@
+_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
new file mode 100644
index 00000000..63dbff0e
--- /dev/null
+++ b/vendor/mockery/mockery/library/Mockery/Matcher/MultiArgumentClosure.php
@@ -0,0 +1,48 @@
+_expected;
+ return true === call_user_func_array($closure, $actual);
+ }
+
+ /**
+ * Return a string representation of this Matcher
+ *
+ * @return string
+ */
+ public function __toString()
+ {
+ return '';
+ }
+}
diff --git a/vendor/mockery/mockery/library/Mockery/Matcher/MustBe.php b/vendor/mockery/mockery/library/Mockery/Matcher/MustBe.php
new file mode 100644
index 00000000..27b5ec56
--- /dev/null
+++ b/vendor/mockery/mockery/library/Mockery/Matcher/MustBe.php
@@ -0,0 +1,52 @@
+_expected === $actual;
+ }
+
+ return $this->_expected == $actual;
+ }
+
+ /**
+ * Return a string representation of this Matcher
+ *
+ * @return string
+ */
+ public function __toString()
+ {
+ return '';
+ }
+}
diff --git a/vendor/mockery/mockery/library/Mockery/Matcher/NoArgs.php b/vendor/mockery/mockery/library/Mockery/Matcher/NoArgs.php
new file mode 100644
index 00000000..5e9e4189
--- /dev/null
+++ b/vendor/mockery/mockery/library/Mockery/Matcher/NoArgs.php
@@ -0,0 +1,40 @@
+';
+ }
+}
diff --git a/vendor/mockery/mockery/library/Mockery/Matcher/Not.php b/vendor/mockery/mockery/library/Mockery/Matcher/Not.php
new file mode 100644
index 00000000..756ccaa5
--- /dev/null
+++ b/vendor/mockery/mockery/library/Mockery/Matcher/Not.php
@@ -0,0 +1,46 @@
+_expected;
+ }
+
+ /**
+ * Return a string representation of this Matcher
+ *
+ * @return string
+ */
+ public function __toString()
+ {
+ return '';
+ }
+}
diff --git a/vendor/mockery/mockery/library/Mockery/Matcher/NotAnyOf.php b/vendor/mockery/mockery/library/Mockery/Matcher/NotAnyOf.php
new file mode 100644
index 00000000..cd827015
--- /dev/null
+++ b/vendor/mockery/mockery/library/Mockery/Matcher/NotAnyOf.php
@@ -0,0 +1,51 @@
+_expected as $exp) {
+ if ($actual === $exp || $actual == $exp) {
+ return false;
+ }
+ }
+ return true;
+ }
+
+ /**
+ * Return a string representation of this Matcher
+ *
+ * @return string
+ */
+ public function __toString()
+ {
+ return '';
+ }
+}
diff --git a/vendor/mockery/mockery/library/Mockery/Matcher/Pattern.php b/vendor/mockery/mockery/library/Mockery/Matcher/Pattern.php
new file mode 100644
index 00000000..362c366f
--- /dev/null
+++ b/vendor/mockery/mockery/library/Mockery/Matcher/Pattern.php
@@ -0,0 +1,45 @@
+_expected, (string) $actual) >= 1;
+ }
+
+ /**
+ * Return a string representation of this Matcher
+ *
+ * @return string
+ */
+ public function __toString()
+ {
+ return '';
+ }
+}
diff --git a/vendor/mockery/mockery/library/Mockery/Matcher/Subset.php b/vendor/mockery/mockery/library/Mockery/Matcher/Subset.php
new file mode 100644
index 00000000..5e706c81
--- /dev/null
+++ b/vendor/mockery/mockery/library/Mockery/Matcher/Subset.php
@@ -0,0 +1,92 @@
+expected = $expected;
+ $this->strict = $strict;
+ }
+
+ /**
+ * @param array $expected Expected subset of data
+ *
+ * @return Subset
+ */
+ public static function strict(array $expected)
+ {
+ return new static($expected, true);
+ }
+
+ /**
+ * @param array $expected Expected subset of data
+ *
+ * @return Subset
+ */
+ public static function loose(array $expected)
+ {
+ return new static($expected, false);
+ }
+
+ /**
+ * Check if the actual value matches the expected.
+ *
+ * @param mixed $actual
+ * @return bool
+ */
+ public function match(&$actual)
+ {
+ if (!is_array($actual)) {
+ return false;
+ }
+
+ if ($this->strict) {
+ return $actual === array_replace_recursive($actual, $this->expected);
+ }
+
+ return $actual == array_replace_recursive($actual, $this->expected);
+ }
+
+ /**
+ * Return a string representation of this Matcher
+ *
+ * @return string
+ */
+ public function __toString()
+ {
+ $return = 'expected as $k=>$v) {
+ $elements[] = $k . '=' . (string) $v;
+ }
+ $return .= implode(', ', $elements) . ']>';
+ return $return;
+ }
+}
diff --git a/vendor/mockery/mockery/library/Mockery/Matcher/Type.php b/vendor/mockery/mockery/library/Mockery/Matcher/Type.php
new file mode 100644
index 00000000..d81ce834
--- /dev/null
+++ b/vendor/mockery/mockery/library/Mockery/Matcher/Type.php
@@ -0,0 +1,56 @@
+_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
+ *
+ * @return string
+ */
+ public function __toString()
+ {
+ return '<' . ucfirst($this->_expected) . '>';
+ }
+}
diff --git a/vendor/mockery/mockery/library/Mockery/MethodCall.php b/vendor/mockery/mockery/library/Mockery/MethodCall.php
new file mode 100644
index 00000000..db68fd81
--- /dev/null
+++ b/vendor/mockery/mockery/library/Mockery/MethodCall.php
@@ -0,0 +1,43 @@
+method = $method;
+ $this->args = $args;
+ }
+
+ public function getMethod()
+ {
+ return $this->method;
+ }
+
+ public function getArgs()
+ {
+ return $this->args;
+ }
+}
diff --git a/vendor/mockery/mockery/library/Mockery/Mock.php b/vendor/mockery/mockery/library/Mockery/Mock.php
new file mode 100644
index 00000000..c9000838
--- /dev/null
+++ b/vendor/mockery/mockery/library/Mockery/Mock.php
@@ -0,0 +1,977 @@
+_mockery_container = $container;
+ if (!is_null($partialObject)) {
+ $this->_mockery_partial = $partialObject;
+ }
+
+ if (!\Mockery::getConfiguration()->mockingNonExistentMethodsAllowed()) {
+ foreach ($this->mockery_getMethods() as $method) {
+ if ($method->isPublic()) {
+ $this->_mockery_mockableMethods[] = $method->getName();
+ }
+ }
+ }
+
+ $this->_mockery_instanceMock = $instanceMock;
+ }
+
+ /**
+ * Set expected method calls
+ *
+ * @param string ...$methodNames one or many methods that are expected to be called in this mock
+ *
+ * @return \Mockery\ExpectationInterface|\Mockery\Expectation|\Mockery\HigherOrderMessage
+ */
+ public function shouldReceive(...$methodNames)
+ {
+ if (count($methodNames) === 0) {
+ return new HigherOrderMessage($this, "shouldReceive");
+ }
+
+ foreach ($methodNames as $method) {
+ if ("" == $method) {
+ throw new \InvalidArgumentException("Received empty method name");
+ }
+ }
+
+ $self = $this;
+ $allowMockingProtectedMethods = $this->_mockery_allowMockingProtectedMethods;
+
+ $lastExpectation = \Mockery::parseShouldReturnArgs(
+ $this,
+ $methodNames,
+ 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");
+ }
+ 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.");
+ }
+ }
+
+ $director = $self->mockery_getExpectationsFor($method);
+ if (!$director) {
+ $director = new \Mockery\ExpectationDirector($method, $self);
+ $self->mockery_setExpectationsFor($method, $director);
+ }
+ $expectation = new \Mockery\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
+ */
+ public function allows($something = [])
+ {
+ if (is_string($something)) {
+ return $this->shouldReceive($something);
+ }
+
+ if (empty($something)) {
+ return $this->shouldReceive();
+ }
+
+ foreach ($something as $method => $returnValue) {
+ $this->shouldReceive($method)->andReturn($returnValue);
+ }
+
+ return $this;
+ }
+ // end method allows
+
+ // start method expects
+ /**
+ /**
+ * @param mixed $something String method name (optional)
+ * @return \Mockery\ExpectationInterface|\Mockery\Expectation|ExpectsHigherOrderMessage
+ */
+ public function expects($something = null)
+ {
+ if (is_string($something)) {
+ return $this->shouldReceive($something)->once();
+ }
+
+ return new ExpectsHigherOrderMessage($this);
+ }
+ // 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
+ */
+ public function shouldNotReceive(...$methodNames)
+ {
+ if (count($methodNames) === 0) {
+ return new HigherOrderMessage($this, "shouldNotReceive");
+ }
+
+ $expectation = call_user_func_array(array($this, 'shouldReceive'), $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
+ */
+ public function shouldAllowMockingMethod($method)
+ {
+ $this->_mockery_mockableMethods[] = $method;
+ return $this;
+ }
+
+ /**
+ * 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
+ */
+ public function shouldIgnoreMissing($returnValue = null, $recursive = false)
+ {
+ $this->_mockery_ignoreMissing = true;
+ $this->_mockery_ignoreMissingRecursive = $recursive;
+ $this->_mockery_defaultReturnValue = $returnValue;
+ return $this;
+ }
+
+ public function asUndefined()
+ {
+ $this->_mockery_ignoreMissing = true;
+ $this->_mockery_defaultReturnValue = new \Mockery\Undefined();
+ return $this;
+ }
+
+ /**
+ * @return Mock
+ */
+ public function shouldAllowMockingProtectedMethods()
+ {
+ if (!\Mockery::getConfiguration()->mockingNonExistentMethodsAllowed()) {
+ foreach ($this->mockery_getMethods() as $method) {
+ if ($method->isProtected()) {
+ $this->_mockery_mockableMethods[] = $method->getName();
+ }
+ }
+ }
+
+ $this->_mockery_allowMockingProtectedMethods = true;
+ return $this;
+ }
+
+
+ /**
+ * Set mock to defer unexpected methods to it's parent
+ *
+ * This is particularly useless for this class, as it doesn't have a parent,
+ * but included for completeness
+ *
+ * @deprecated 2.0.0 Please use makePartial() instead
+ *
+ * @return Mock
+ */
+ public function shouldDeferMissing()
+ {
+ return $this->makePartial();
+ }
+
+ /**
+ * Set mock to defer unexpected methods to it's parent
+ *
+ * It was an alias for shouldDeferMissing(), which will be removed
+ * in 2.0.0.
+ *
+ * @return Mock
+ */
+ public function makePartial()
+ {
+ $this->_mockery_deferMissing = true;
+ return $this;
+ }
+
+ /**
+ * In the event shouldReceive() accepting one or more methods/returns,
+ * this method will switch them from normal expectations to default
+ * expectations
+ *
+ * @return self
+ */
+ public function byDefault()
+ {
+ foreach ($this->_mockery_expectations as $director) {
+ $exps = $director->getExpectations();
+ foreach ($exps as $exp) {
+ $exp->byDefault();
+ }
+ }
+ return $this;
+ }
+
+ /**
+ * Capture calls to this mock
+ */
+ public function __call($method, array $args)
+ {
+ return $this->_mockery_handleMethodCall($method, $args);
+ }
+
+ public static function __callStatic($method, array $args)
+ {
+ return self::_mockery_handleStaticMethodCall($method, $args);
+ }
+
+ /**
+ * Forward calls to this magic method to the __call method
+ */
+ public function __toString()
+ {
+ return $this->__call('__toString', array());
+ }
+
+ /**
+ * Iterate across all expectation directors and validate each
+ *
+ * @throws \Mockery\CountValidator\Exception
+ * @return void
+ */
+ public function mockery_verify()
+ {
+ if ($this->_mockery_verified) {
+ return;
+ }
+ if (isset($this->_mockery_ignoreVerification)
+ && $this->_mockery_ignoreVerification == true) {
+ return;
+ }
+ $this->_mockery_verified = true;
+ foreach ($this->_mockery_expectations as $director) {
+ $director->verify();
+ }
+ }
+
+ /**
+ * Gets a list of exceptions thrown by this mock
+ *
+ * @return array
+ */
+ public function mockery_thrownExceptions()
+ {
+ return $this->_mockery_thrownExceptions;
+ }
+
+ /**
+ * Tear down tasks for this mock
+ *
+ * @return void
+ */
+ public function mockery_teardown()
+ {
+ }
+
+ /**
+ * Fetch the next available allocation order number
+ *
+ * @return int
+ */
+ public function mockery_allocateOrder()
+ {
+ $this->_mockery_allocatedOrder += 1;
+ return $this->_mockery_allocatedOrder;
+ }
+
+ /**
+ * Set ordering for a group
+ *
+ * @param mixed $group
+ * @param int $order
+ */
+ public function mockery_setGroup($group, $order)
+ {
+ $this->_mockery_groups[$group] = $order;
+ }
+
+ /**
+ * Fetch array of ordered groups
+ *
+ * @return array
+ */
+ public function mockery_getGroups()
+ {
+ return $this->_mockery_groups;
+ }
+
+ /**
+ * Set current ordered number
+ *
+ * @param int $order
+ */
+ public function mockery_setCurrentOrder($order)
+ {
+ $this->_mockery_currentOrder = $order;
+ return $this->_mockery_currentOrder;
+ }
+
+ /**
+ * Get current ordered number
+ *
+ * @return int
+ */
+ public function mockery_getCurrentOrder()
+ {
+ return $this->_mockery_currentOrder;
+ }
+
+ /**
+ * Validate the current mock's ordering
+ *
+ * @param string $method
+ * @param int $order
+ * @throws \Mockery\Exception
+ * @return void
+ */
+ public function mockery_validateOrder($method, $order)
+ {
+ if ($order < $this->_mockery_currentOrder) {
+ $exception = new \Mockery\Exception\InvalidOrderException(
+ 'Method ' . __CLASS__ . '::' . $method . '()'
+ . ' called out of order: expected order '
+ . $order . ', was ' . $this->_mockery_currentOrder
+ );
+ $exception->setMock($this)
+ ->setMethodName($method)
+ ->setExpectedOrder($order)
+ ->setActualOrder($this->_mockery_currentOrder);
+ throw $exception;
+ }
+ $this->mockery_setCurrentOrder($order);
+ }
+
+ /**
+ * Gets the count of expectations for this mock
+ *
+ * @return int
+ */
+ public function mockery_getExpectationCount()
+ {
+ $count = $this->_mockery_expectations_count;
+ foreach ($this->_mockery_expectations as $director) {
+ $count += $director->getExpectationCount();
+ }
+ return $count;
+ }
+
+ /**
+ * Return the expectations director for the given method
+ *
+ * @var string $method
+ * @return \Mockery\ExpectationDirector|null
+ */
+ public function mockery_setExpectationsFor($method, \Mockery\ExpectationDirector $director)
+ {
+ $this->_mockery_expectations[$method] = $director;
+ }
+
+ /**
+ * Return the expectations director for the given method
+ *
+ * @var string $method
+ * @return \Mockery\ExpectationDirector|null
+ */
+ public function mockery_getExpectationsFor($method)
+ {
+ if (isset($this->_mockery_expectations[$method])) {
+ return $this->_mockery_expectations[$method];
+ }
+ }
+
+ /**
+ * Find an expectation matching the given method and arguments
+ *
+ * @var string $method
+ * @var array $args
+ * @return \Mockery\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);
+ }
+
+ /**
+ * Return the container for this mock
+ *
+ * @return \Mockery\Container
+ */
+ public function mockery_getContainer()
+ {
+ return $this->_mockery_container;
+ }
+
+ /**
+ * Return the name for this mock
+ *
+ * @return string
+ */
+ public function mockery_getName()
+ {
+ return __CLASS__;
+ }
+
+ /**
+ * @return array
+ */
+ public function mockery_getMockableProperties()
+ {
+ return $this->_mockery_mockableProperties;
+ }
+
+ public function __isset($name)
+ {
+ if (false === stripos($name, '_mockery_') && get_parent_class($this) && method_exists(get_parent_class($this), '__isset')) {
+ return call_user_func(get_parent_class($this) . '::__isset', $name);
+ }
+
+ return false;
+ }
+
+ public function mockery_getExpectations()
+ {
+ return $this->_mockery_expectations;
+ }
+
+ /**
+ * Calls a parent class method and returns the result. Used in a passthru
+ * expectation where a real return value is required while still taking
+ * advantage of expectation matching and call count verification.
+ *
+ * @param string $name
+ * @param array $args
+ * @return mixed
+ */
+ 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(get_parent_class($this) . '::__call', $name, $args);
+ }
+ return call_user_func_array(get_parent_class($this) . '::' . $name, $args);
+ }
+
+ /**
+ * @return string[]
+ */
+ public function mockery_getMockableMethods()
+ {
+ return $this->_mockery_mockableMethods;
+ }
+
+ /**
+ * @return bool
+ */
+ public function mockery_isAnonymous()
+ {
+ $rfc = new \ReflectionClass($this);
+
+ // PHP 8 has Stringable interface
+ $interfaces = array_filter($rfc->getInterfaces(), function ($i) {
+ return $i->getName() !== 'Stringable';
+ });
+
+ return false === $rfc->getParentClass() && 2 === count($interfaces);
+ }
+
+ public function mockery_isInstance()
+ {
+ return $this->_mockery_instanceMock;
+ }
+
+ public function __wakeup()
+ {
+ /**
+ * This does not add __wakeup method support. It's a blind method and any
+ * expected __wakeup work will NOT be performed. It merely cuts off
+ * annoying errors where a __wakeup exists but is not essential when
+ * mocking
+ */
+ }
+
+ public function __destruct()
+ {
+ /**
+ * Overrides real class destructor in case if class was created without original constructor
+ */
+ }
+
+ public function mockery_getMethod($name)
+ {
+ foreach ($this->mockery_getMethods() as $method) {
+ if ($method->getName() == $name) {
+ return $method;
+ }
+ }
+
+ return null;
+ }
+
+ /**
+ * @param string $name Method name.
+ *
+ * @return mixed Generated return value based on the declared return value of the named method.
+ */
+ public function mockery_returnValueForMethod($name)
+ {
+ $rm = $this->mockery_getMethod($name);
+
+ if ($rm === null) {
+ return null;
+ }
+
+ $returnType = Reflector::getSimplestReturnType($rm);
+
+ switch ($returnType) {
+ case null: return null;
+ case 'string': return '';
+ case 'int': return 0;
+ case 'float': return 0.0;
+ case 'bool': return false;
+
+ case 'array':
+ case 'iterable':
+ return [];
+
+ case 'callable':
+ case '\Closure':
+ return function () {
+ };
+
+ case '\Traversable':
+ case '\Generator':
+ $generator = function () { yield; };
+ return $generator();
+
+ case 'void':
+ return null;
+
+ case 'static':
+ return $this;
+
+ case 'object':
+ $mock = \Mockery::mock();
+ if ($this->_mockery_ignoreMissingRecursive) {
+ $mock->shouldIgnoreMissing($this->_mockery_defaultReturnValue, true);
+ }
+ return $mock;
+
+ default:
+ $mock = \Mockery::mock($returnType);
+ if ($this->_mockery_ignoreMissingRecursive) {
+ $mock->shouldIgnoreMissing($this->_mockery_defaultReturnValue, true);
+ }
+ return $mock;
+ }
+ }
+
+ public function shouldHaveReceived($method = null, $args = null)
+ {
+ if ($method === null) {
+ return new HigherOrderMessage($this, "shouldHaveReceived");
+ }
+
+ $expectation = new \Mockery\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->verify();
+ return $director;
+ }
+
+ public function shouldHaveBeenCalled()
+ {
+ return $this->shouldHaveReceived("__invoke");
+ }
+
+ public function shouldNotHaveReceived($method = null, $args = null)
+ {
+ if ($method === null) {
+ return new HigherOrderMessage($this, "shouldNotHaveReceived");
+ }
+
+ $expectation = new \Mockery\VerificationExpectation($this, $method);
+ if (null !== $args) {
+ $expectation->withArgs($args);
+ }
+ $expectation->never();
+ $director = new \Mockery\VerificationDirector($this->_mockery_getReceivedMethodCalls(), $expectation);
+ $this->_mockery_expectations_count++;
+ $director->verify();
+ return null;
+ }
+
+ public function shouldNotHaveBeenCalled(array $args = null)
+ {
+ return $this->shouldNotHaveReceived("__invoke", $args);
+ }
+
+ protected static function _mockery_handleStaticMethodCall($method, array $args)
+ {
+ $associatedRealObject = \Mockery::fetchMock(__CLASS__);
+ try {
+ return $associatedRealObject->__call($method, $args);
+ } catch (BadMethodCallException $e) {
+ throw new BadMethodCallException(
+ 'Static method ' . $associatedRealObject->mockery_getName() . '::' . $method
+ . '() does not exist on this mock object',
+ 0,
+ $e
+ );
+ }
+ }
+
+ protected function _mockery_getReceivedMethodCalls()
+ {
+ return $this->_mockery_receivedMethodCalls ?: $this->_mockery_receivedMethodCalls = new \Mockery\ReceivedMethodCalls();
+ }
+
+ /**
+ * Called when an instance Mock was created and its constructor is getting called
+ *
+ * @see \Mockery\Generator\StringManipulation\Pass\InstanceMockPass
+ * @param array $args
+ */
+ protected function _mockery_constructorCalled(array $args)
+ {
+ if (!isset($this->_mockery_expectations['__construct']) /* _mockery_handleMethodCall runs the other checks */) {
+ return;
+ }
+ $this->_mockery_handleMethodCall('__construct', $args);
+ }
+
+ protected function _mockery_findExpectedMethodHandler($method)
+ {
+ if (isset($this->_mockery_expectations[$method])) {
+ return $this->_mockery_expectations[$method];
+ }
+
+ $lowerCasedMockeryExpectations = array_change_key_case($this->_mockery_expectations, CASE_LOWER);
+ $lowerCasedMethod = strtolower($method);
+
+ if (isset($lowerCasedMockeryExpectations[$lowerCasedMethod])) {
+ return $lowerCasedMockeryExpectations[$lowerCasedMethod];
+ }
+
+ return null;
+ }
+
+ protected function _mockery_handleMethodCall($method, array $args)
+ {
+ $this->_mockery_getReceivedMethodCalls()->push(new \Mockery\MethodCall($method, $args));
+
+ $rm = $this->mockery_getMethod($method);
+ if ($rm && $rm->isProtected() && !$this->_mockery_allowMockingProtectedMethods) {
+ if ($rm->isAbstract()) {
+ return;
+ }
+
+ try {
+ $prototype = $rm->getPrototype();
+ if ($prototype->isAbstract()) {
+ return;
+ }
+ } catch (\ReflectionException $re) {
+ // noop - there is no hasPrototype method
+ }
+
+ return call_user_func_array(get_parent_class($this) . '::' . $method, $args);
+ }
+
+ $handler = $this->_mockery_findExpectedMethodHandler($method);
+
+ if ($handler !== null && !$this->_mockery_disableExpectationMatching) {
+ try {
+ return $handler->call($args);
+ } catch (\Mockery\Exception\NoMatchingExpectationException $e) {
+ if (!$this->_mockery_ignoreMissing && !$this->_mockery_deferMissing) {
+ throw $e;
+ }
+ }
+ }
+
+ 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(get_parent_class($this) . '::' . $method)
+ && (!$this->hasMethodOverloadingInParentClass() || (get_parent_class($this) && method_exists(get_parent_class($this), $method)))) {
+ return call_user_func_array(get_parent_class($this) . '::' . $method, $args);
+ } elseif ($this->_mockery_deferMissing && get_parent_class($this) && method_exists(get_parent_class($this), '__call')) {
+ return call_user_func(get_parent_class($this) . '::__call', $method, $args);
+ } elseif ($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(get_parent_class($this) . '::' . $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;
+ }
+ }
+
+ $message = 'Method ' . __CLASS__ . '::' . $method .
+ '() does not exist on this mock object';
+
+ if (!is_null($rm)) {
+ $message = 'Received ' . __CLASS__ .
+ '::' . $method . '(), but no expectations were specified';
+ }
+
+ $bmce = new BadMethodCallException($message);
+ $this->_mockery_thrownExceptions[] = $bmce;
+ throw $bmce;
+ }
+
+ /**
+ * Uses reflection to get the list of all
+ * methods within the current mock object
+ *
+ * @return array
+ */
+ protected function mockery_getMethods()
+ {
+ if (static::$_mockery_methods && \Mockery::getConfiguration()->reflectionCacheEnabled()) {
+ return static::$_mockery_methods;
+ }
+
+ if (isset($this->_mockery_partial)) {
+ $reflected = new \ReflectionObject($this->_mockery_partial);
+ } else {
+ $reflected = new \ReflectionClass($this);
+ }
+
+ return static::$_mockery_methods = $reflected->getMethods();
+ }
+
+ private function hasMethodOverloadingInParentClass()
+ {
+ // if there's __call any name would be callable
+ return is_callable(get_parent_class($this) . '::aFunctionNameThatNoOneWouldEverUseInRealLife12345');
+ }
+
+ /**
+ * @return array
+ */
+ private function getNonPublicMethods()
+ {
+ return array_map(
+ function ($method) {
+ return $method->getName();
+ },
+ array_filter($this->mockery_getMethods(), function ($method) {
+ return !$method->isPublic();
+ })
+ );
+ }
+}
diff --git a/vendor/mockery/mockery/library/Mockery/MockInterface.php b/vendor/mockery/mockery/library/Mockery/MockInterface.php
new file mode 100644
index 00000000..7c1774b4
--- /dev/null
+++ b/vendor/mockery/mockery/library/Mockery/MockInterface.php
@@ -0,0 +1,38 @@
+ return
+ * @return self|\Mockery\ExpectationInterface|\Mockery\Expectation|\Mockery\HigherOrderMessage
+ */
+ public function allows($something = []);
+
+ /**
+ * @param mixed $something String method name (optional)
+ * @return \Mockery\ExpectationInterface|\Mockery\Expectation|\Mockery\ExpectsHigherOrderMessage
+ */
+ public function expects($something = null);
+}
diff --git a/vendor/mockery/mockery/library/Mockery/QuickDefinitionsConfiguration.php b/vendor/mockery/mockery/library/Mockery/QuickDefinitionsConfiguration.php
new file mode 100644
index 00000000..b0eea662
--- /dev/null
+++ b/vendor/mockery/mockery/library/Mockery/QuickDefinitionsConfiguration.php
@@ -0,0 +1,56 @@
+_quickDefinitionsApplicationMode = $newValue
+ ? self::QUICK_DEFINITIONS_MODE_MOCK_AT_LEAST_ONCE
+ : self::QUICK_DEFINITIONS_MODE_DEFAULT_EXPECTATION;
+ }
+
+ return $this->_quickDefinitionsApplicationMode === self::QUICK_DEFINITIONS_MODE_MOCK_AT_LEAST_ONCE;
+ }
+}
diff --git a/vendor/mockery/mockery/library/Mockery/ReceivedMethodCalls.php b/vendor/mockery/mockery/library/Mockery/ReceivedMethodCalls.php
new file mode 100644
index 00000000..8ed81f10
--- /dev/null
+++ b/vendor/mockery/mockery/library/Mockery/ReceivedMethodCalls.php
@@ -0,0 +1,48 @@
+methodCalls[] = $methodCall;
+ }
+
+ public function verify(Expectation $expectation)
+ {
+ foreach ($this->methodCalls as $methodCall) {
+ if ($methodCall->getMethod() !== $expectation->getName()) {
+ continue;
+ }
+
+ if (!$expectation->matchArgs($methodCall->getArgs())) {
+ continue;
+ }
+
+ $expectation->verifyCall($methodCall->getArgs());
+ }
+
+ $expectation->verify();
+ }
+}
diff --git a/vendor/mockery/mockery/library/Mockery/Reflector.php b/vendor/mockery/mockery/library/Mockery/Reflector.php
new file mode 100644
index 00000000..4e8c6e1f
--- /dev/null
+++ b/vendor/mockery/mockery/library/Mockery/Reflector.php
@@ -0,0 +1,224 @@
+getType();
+
+ return $type instanceof \ReflectionNamedType && $type->getName();
+ }
+
+ /**
+ * Compute the string representation for the paramater type.
+ *
+ * @param \ReflectionParameter $param
+ * @param bool $withoutNullable
+ *
+ * @return string|null
+ */
+ public static function getTypeHint(\ReflectionParameter $param, $withoutNullable = false)
+ {
+ if (!$param->hasType()) {
+ return null;
+ }
+
+ $type = $param->getType();
+ $declaringClass = $param->getDeclaringClass();
+ $typeHint = self::typeToString($type, $declaringClass);
+
+ return (!$withoutNullable && $type->allowsNull()) ? self::formatNullableType($typeHint) : $typeHint;
+ }
+
+ /**
+ * Compute the string representation for the return type.
+ *
+ * @param \ReflectionParameter $param
+ * @param bool $withoutNullable
+ *
+ * @return string|null
+ */
+ public static function getReturnType(\ReflectionMethod $method, $withoutNullable = false)
+ {
+ $type = $method->getReturnType();
+
+ if (is_null($type) && method_exists($method, 'getTentativeReturnType')) {
+ $type = $method->getTentativeReturnType();
+ }
+
+ if (is_null($type)) {
+ return null;
+ }
+
+ $typeHint = self::typeToString($type, $method->getDeclaringClass());
+
+ return (!$withoutNullable && $type->allowsNull()) ? self::formatNullableType($typeHint) : $typeHint;
+ }
+
+ /**
+ * Compute the string representation for the simplest return type.
+ *
+ * @param \ReflectionParameter $param
+ *
+ * @return string|null
+ */
+ public static function getSimplestReturnType(\ReflectionMethod $method)
+ {
+ $type = $method->getReturnType();
+
+ if (is_null($type) && method_exists($method, 'getTentativeReturnType')) {
+ $type = $method->getTentativeReturnType();
+ }
+
+ if (is_null($type) || $type->allowsNull()) {
+ return null;
+ }
+
+ $typeInformation = self::getTypeInformation($type, $method->getDeclaringClass());
+
+ // return the first primitive type hint
+ foreach ($typeInformation as $info) {
+ if ($info['isPrimitive']) {
+ return $info['typeHint'];
+ }
+ }
+
+ // if no primitive type, return the first type
+ foreach ($typeInformation as $info) {
+ return $info['typeHint'];
+ }
+
+ return null;
+ }
+
+ /**
+ * Get the string representation of the given type.
+ *
+ * @param \ReflectionType $type
+ * @param string $declaringClass
+ *
+ * @return string|null
+ */
+ private static function typeToString(\ReflectionType $type, \ReflectionClass $declaringClass)
+ {
+ return \implode('|', \array_map(function (array $typeInformation) {
+ return $typeInformation['typeHint'];
+ }, self::getTypeInformation($type, $declaringClass)));
+ }
+
+ /**
+ * Get the string representation of the given type.
+ *
+ * @param \ReflectionType $type
+ * @param \ReflectionClass $declaringClass
+ *
+ * @return list
+ */
+ private static function getTypeInformation(\ReflectionType $type, \ReflectionClass $declaringClass)
+ {
+ // 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) {
+ foreach (self::getTypeInformation($innterType, $declaringClass) as $info) {
+ if ($info['typeHint'] === 'null' && $info['isPrimitive']) {
+ continue;
+ }
+
+ $types[] = $info;
+ }
+ }
+
+ return $types;
+ }
+
+ // $type must be an instance of \ReflectionNamedType
+ $typeHint = $type->getName();
+
+ // builtins can be returned as is
+ if ($type->isBuiltin()) {
+ return [
+ [
+ 'typeHint' => $typeHint,
+ 'isPrimitive' => in_array($typeHint, ['array', 'bool', 'int', 'float', 'null', 'object', 'string']),
+ ],
+ ];
+ }
+
+ // 'static' can be returned as is
+ if ($typeHint === 'static') {
+ return [
+ [
+ 'typeHint' => $typeHint,
+ 'isPrimitive' => false,
+ ],
+ ];
+ }
+
+ // '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 [
+ [
+ 'typeHint' => sprintf('\\%s', $typeHint),
+ 'isPrimitive' => false,
+ ],
+ ];
+ }
+
+ /**
+ * 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
new file mode 100644
index 00000000..53b05e9c
--- /dev/null
+++ b/vendor/mockery/mockery/library/Mockery/Undefined.php
@@ -0,0 +1,46 @@
+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());
+ }
+
+ public function atLeast()
+ {
+ return $this->cloneWithoutCountValidatorsApplyAndVerify("atLeast", array());
+ }
+
+ public function atMost()
+ {
+ return $this->cloneWithoutCountValidatorsApplyAndVerify("atMost", array());
+ }
+
+ public function between($minimum, $maximum)
+ {
+ return $this->cloneWithoutCountValidatorsApplyAndVerify("between", array($minimum, $maximum));
+ }
+
+ protected function cloneWithoutCountValidatorsApplyAndVerify($method, $args)
+ {
+ $expectation = clone $this->expectation;
+ $expectation->clearCountValidators();
+ call_user_func_array(array($expectation, $method), $args);
+ $director = new VerificationDirector($this->receivedMethodCalls, $expectation);
+ $director->verify();
+ return $director;
+ }
+
+ 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;
+ }
+}
diff --git a/vendor/mockery/mockery/library/Mockery/VerificationExpectation.php b/vendor/mockery/mockery/library/Mockery/VerificationExpectation.php
new file mode 100644
index 00000000..3844a090
--- /dev/null
+++ b/vendor/mockery/mockery/library/Mockery/VerificationExpectation.php
@@ -0,0 +1,35 @@
+_countValidators = array();
+ }
+
+ public function __clone()
+ {
+ parent::__clone();
+ $this->_actualCount = 0;
+ }
+}
diff --git a/vendor/mockery/mockery/library/helpers.php b/vendor/mockery/mockery/library/helpers.php
new file mode 100644
index 00000000..0756a328
--- /dev/null
+++ b/vendor/mockery/mockery/library/helpers.php
@@ -0,0 +1,65 @@
+copy($myObject);
+```
+
+
+## Why?
+
+- How do you create copies of your objects?
+
+```php
+$myCopy = clone $myObject;
+```
+
+- How do you create **deep** copies of your objects (i.e. copying also all the objects referenced in the properties)?
+
+You use [`__clone()`](http://www.php.net/manual/en/language.oop5.cloning.php#object.clone) and implement the behavior
+yourself.
+
+- But how do you handle **cycles** in the association graph?
+
+Now you're in for a big mess :(
+
+![association graph](doc/graph.png)
+
+
+### Using simply `clone`
+
+![Using clone](doc/clone.png)
+
+
+### Overriding `__clone()`
+
+![Overriding __clone](doc/deep-clone.png)
+
+
+### With `DeepCopy`
+
+![With DeepCopy](doc/deep-copy.png)
+
+
+## How it works
+
+DeepCopy recursively traverses all the object's properties and clones them. To avoid cloning the same object twice it
+keeps a hash map of all instances and thus preserves the object graph.
+
+To use it:
+
+```php
+use function DeepCopy\deep_copy;
+
+$copy = deep_copy($var);
+```
+
+Alternatively, you can create your own `DeepCopy` instance to configure it differently for example:
+
+```php
+use DeepCopy\DeepCopy;
+
+$copier = new DeepCopy(true);
+
+$copy = $copier->copy($var);
+```
+
+You may want to roll your own deep copy function:
+
+```php
+namespace Acme;
+
+use DeepCopy\DeepCopy;
+
+function deep_copy($var)
+{
+ static $copier = null;
+
+ if (null === $copier) {
+ $copier = new DeepCopy(true);
+ }
+
+ return $copier->copy($var);
+}
+```
+
+
+## Going further
+
+You can add filters to customize the copy process.
+
+The method to add a filter is `DeepCopy\DeepCopy::addFilter($filter, $matcher)`,
+with `$filter` implementing `DeepCopy\Filter\Filter`
+and `$matcher` implementing `DeepCopy\Matcher\Matcher`.
+
+We provide some generic filters and matchers.
+
+
+### Matchers
+
+ - `DeepCopy\Matcher` applies on a object attribute.
+ - `DeepCopy\TypeMatcher` applies on any element found in graph, including array elements.
+
+
+#### Property name
+
+The `PropertyNameMatcher` will match a property by its name:
+
+```php
+use DeepCopy\Matcher\PropertyNameMatcher;
+
+// Will apply a filter to any property of any objects named "id"
+$matcher = new PropertyNameMatcher('id');
+```
+
+
+#### Specific property
+
+The `PropertyMatcher` will match a specific property of a specific class:
+
+```php
+use DeepCopy\Matcher\PropertyMatcher;
+
+// Will apply a filter to the property "id" of any objects of the class "MyClass"
+$matcher = new PropertyMatcher('MyClass', 'id');
+```
+
+
+#### Type
+
+The `TypeMatcher` will match any element by its type (instance of a class or any value that could be parameter of
+[gettype()](http://php.net/manual/en/function.gettype.php) function):
+
+```php
+use DeepCopy\TypeMatcher\TypeMatcher;
+
+// Will apply a filter to any object that is an instance of Doctrine\Common\Collections\Collection
+$matcher = new TypeMatcher('Doctrine\Common\Collections\Collection');
+```
+
+
+### Filters
+
+- `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`
+
+
+#### `SetNullFilter` (filter)
+
+Let's say for example that you are copying a database record (or a Doctrine entity), so you want the copy not to have
+any ID:
+
+```php
+use DeepCopy\DeepCopy;
+use DeepCopy\Filter\SetNullFilter;
+use DeepCopy\Matcher\PropertyNameMatcher;
+
+$object = MyClass::load(123);
+echo $object->id; // 123
+
+$copier = new DeepCopy();
+$copier->addFilter(new SetNullFilter(), new PropertyNameMatcher('id'));
+
+$copy = $copier->copy($object);
+
+echo $copy->id; // null
+```
+
+
+#### `KeepFilter` (filter)
+
+If you want a property to remain untouched (for example, an association to an object):
+
+```php
+use DeepCopy\DeepCopy;
+use DeepCopy\Filter\KeepFilter;
+use DeepCopy\Matcher\PropertyMatcher;
+
+$copier = new DeepCopy();
+$copier->addFilter(new KeepFilter(), new PropertyMatcher('MyClass', 'category'));
+
+$copy = $copier->copy($object);
+// $copy->category has not been touched
+```
+
+
+#### `DoctrineCollectionFilter` (filter)
+
+If you use Doctrine and want to copy an entity, you will need to use the `DoctrineCollectionFilter`:
+
+```php
+use DeepCopy\DeepCopy;
+use DeepCopy\Filter\Doctrine\DoctrineCollectionFilter;
+use DeepCopy\Matcher\PropertyTypeMatcher;
+
+$copier = new DeepCopy();
+$copier->addFilter(new DoctrineCollectionFilter(), new PropertyTypeMatcher('Doctrine\Common\Collections\Collection'));
+
+$copy = $copier->copy($object);
+```
+
+
+#### `DoctrineEmptyCollectionFilter` (filter)
+
+If you use Doctrine and want to copy an entity who contains a `Collection` that you want to be reset, you can use the
+`DoctrineEmptyCollectionFilter`
+
+```php
+use DeepCopy\DeepCopy;
+use DeepCopy\Filter\Doctrine\DoctrineEmptyCollectionFilter;
+use DeepCopy\Matcher\PropertyMatcher;
+
+$copier = new DeepCopy();
+$copier->addFilter(new DoctrineEmptyCollectionFilter(), new PropertyMatcher('MyClass', 'myProperty'));
+
+$copy = $copier->copy($object);
+
+// $copy->myProperty will return an empty collection
+```
+
+
+#### `DoctrineProxyFilter` (filter)
+
+If you use Doctrine and use cloning on lazy loaded entities, you might encounter errors mentioning missing fields on a
+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!**
+
+```php
+use DeepCopy\DeepCopy;
+use DeepCopy\Filter\Doctrine\DoctrineProxyFilter;
+use DeepCopy\Matcher\Doctrine\DoctrineProxyMatcher;
+
+$copier = new DeepCopy();
+$copier->addFilter(new DoctrineProxyFilter(), new DoctrineProxyMatcher());
+
+$copy = $copier->copy($object);
+
+// $copy should now contain a clone of all entities, including those that were not yet fully loaded.
+```
+
+
+#### `ReplaceFilter` (type filter)
+
+1. If you want to replace the value of a property:
+
+```php
+use DeepCopy\DeepCopy;
+use DeepCopy\Filter\ReplaceFilter;
+use DeepCopy\Matcher\PropertyMatcher;
+
+$copier = new DeepCopy();
+$callback = function ($currentValue) {
+ return $currentValue . ' (copy)'
+};
+$copier->addFilter(new ReplaceFilter($callback), new PropertyMatcher('MyClass', 'title'));
+
+$copy = $copier->copy($object);
+
+// $copy->title will contain the data returned by the callback, e.g. 'The title (copy)'
+```
+
+2. If you want to replace whole element:
+
+```php
+use DeepCopy\DeepCopy;
+use DeepCopy\TypeFilter\ReplaceFilter;
+use DeepCopy\TypeMatcher\TypeMatcher;
+
+$copier = new DeepCopy();
+$callback = function (MyClass $myClass) {
+ return get_class($myClass);
+};
+$copier->addTypeFilter(new ReplaceFilter($callback), new TypeMatcher('MyClass'));
+
+$copy = $copier->copy([new MyClass, 'some string', new MyClass]);
+
+// $copy will contain ['MyClass', 'some string', 'MyClass']
+```
+
+
+The `$callback` parameter of the `ReplaceFilter` constructor accepts any PHP callable.
+
+
+#### `ShallowCopyFilter` (type filter)
+
+Stop *DeepCopy* from recursively copying element, using standard `clone` instead:
+
+```php
+use DeepCopy\DeepCopy;
+use DeepCopy\TypeFilter\ShallowCopyFilter;
+use DeepCopy\TypeMatcher\TypeMatcher;
+use Mockery as m;
+
+$this->deepCopy = new DeepCopy();
+$this->deepCopy->addTypeFilter(
+ new ShallowCopyFilter,
+ new TypeMatcher(m\MockInterface::class)
+);
+
+$myServiceWithMocks = new MyService(m::mock(MyDependency1::class), m::mock(MyDependency2::class));
+// All mocks will be just cloned, not deep copied
+```
+
+
+## Edge cases
+
+The following structures cannot be deep-copied with PHP Reflection. As a result they are shallow cloned and filters are
+not applied. There is two ways for you to handle them:
+
+- Implement your own `__clone()` method
+- Use a filter with a type matcher
+
+
+## Contributing
+
+DeepCopy is distributed under the MIT license.
+
+
+### Tests
+
+Running the tests is simple:
+
+```php
+vendor/bin/phpunit
+```
+
+### Support
+
+Get professional support via [the Tidelift Subscription](https://tidelift.com/subscription/pkg/packagist-myclabs-deep-copy?utm_source=packagist-myclabs-deep-copy&utm_medium=referral&utm_campaign=readme).
diff --git a/vendor/myclabs/deep-copy/composer.json b/vendor/myclabs/deep-copy/composer.json
new file mode 100644
index 00000000..66fb34a5
--- /dev/null
+++ b/vendor/myclabs/deep-copy/composer.json
@@ -0,0 +1,42 @@
+{
+ "name": "myclabs/deep-copy",
+ "description": "Create deep copies (clones) of your objects",
+ "license": "MIT",
+ "type": "library",
+ "keywords": [
+ "clone",
+ "copy",
+ "duplicate",
+ "object",
+ "object graph"
+ ],
+ "require": {
+ "php": "^7.1 || ^8.0"
+ },
+ "require-dev": {
+ "doctrine/collections": "^1.6.8",
+ "doctrine/common": "^2.13.3 || ^3.2.2",
+ "phpunit/phpunit": "^7.5.20 || ^8.5.23 || ^9.5.13"
+ },
+ "conflict": {
+ "doctrine/collections": "<1.6.8",
+ "doctrine/common": "<2.13.3 || >=3,<3.2.2"
+ },
+ "autoload": {
+ "psr-4": {
+ "DeepCopy\\": "src/DeepCopy/"
+ },
+ "files": [
+ "src/DeepCopy/deep_copy.php"
+ ]
+ },
+ "autoload-dev": {
+ "psr-4": {
+ "DeepCopy\\": "fixtures/",
+ "DeepCopyTest\\": "tests/DeepCopyTest/"
+ }
+ },
+ "config": {
+ "sort-packages": true
+ }
+}
diff --git a/vendor/myclabs/deep-copy/src/DeepCopy/DeepCopy.php b/vendor/myclabs/deep-copy/src/DeepCopy/DeepCopy.php
new file mode 100644
index 00000000..5e68c64e
--- /dev/null
+++ b/vendor/myclabs/deep-copy/src/DeepCopy/DeepCopy.php
@@ -0,0 +1,303 @@
+ Filter, 'matcher' => Matcher] pairs.
+ */
+ private $filters = [];
+
+ /**
+ * Type Filters to apply.
+ *
+ * @var array Array of ['filter' => Filter, 'matcher' => Matcher] pairs.
+ */
+ private $typeFilters = [];
+
+ /**
+ * @var bool
+ */
+ private $skipUncloneable = false;
+
+ /**
+ * @var bool
+ */
+ private $useCloneMethod;
+
+ /**
+ * @param bool $useCloneMethod If set to true, when an object implements the __clone() function, it will be used
+ * instead of the regular deep cloning.
+ */
+ public function __construct($useCloneMethod = false)
+ {
+ $this->useCloneMethod = $useCloneMethod;
+
+ $this->addTypeFilter(new ArrayObjectFilter($this), new TypeMatcher(ArrayObject::class));
+ $this->addTypeFilter(new DateIntervalFilter(), new TypeMatcher(DateInterval::class));
+ $this->addTypeFilter(new SplDoublyLinkedListFilter($this), new TypeMatcher(SplDoublyLinkedList::class));
+ }
+
+ /**
+ * If enabled, will not throw an exception when coming across an uncloneable property.
+ *
+ * @param $skipUncloneable
+ *
+ * @return $this
+ */
+ public function skipUncloneable($skipUncloneable = true)
+ {
+ $this->skipUncloneable = $skipUncloneable;
+
+ return $this;
+ }
+
+ /**
+ * Deep copies the given object.
+ *
+ * @param mixed $object
+ *
+ * @return mixed
+ */
+ public function copy($object)
+ {
+ $this->hashMap = [];
+
+ return $this->recursiveCopy($object);
+ }
+
+ public function addFilter(Filter $filter, Matcher $matcher)
+ {
+ $this->filters[] = [
+ 'matcher' => $matcher,
+ 'filter' => $filter,
+ ];
+ }
+
+ public function prependFilter(Filter $filter, Matcher $matcher)
+ {
+ array_unshift($this->filters, [
+ 'matcher' => $matcher,
+ 'filter' => $filter,
+ ]);
+ }
+
+ public function addTypeFilter(TypeFilter $filter, TypeMatcher $matcher)
+ {
+ $this->typeFilters[] = [
+ 'matcher' => $matcher,
+ 'filter' => $filter,
+ ];
+ }
+
+ private function recursiveCopy($var)
+ {
+ // Matches Type Filter
+ if ($filter = $this->getFirstMatchedTypeFilter($this->typeFilters, $var)) {
+ return $filter->apply($var);
+ }
+
+ // Resource
+ if (is_resource($var)) {
+ return $var;
+ }
+
+ // Array
+ if (is_array($var)) {
+ return $this->copyArray($var);
+ }
+
+ // Scalar
+ if (! is_object($var)) {
+ return $var;
+ }
+
+ // Enum
+ if (PHP_VERSION_ID >= 80100 && enum_exists(get_class($var))) {
+ return $var;
+ }
+
+ // Object
+ return $this->copyObject($var);
+ }
+
+ /**
+ * Copy an array
+ * @param array $array
+ * @return array
+ */
+ private function copyArray(array $array)
+ {
+ foreach ($array as $key => $value) {
+ $array[$key] = $this->recursiveCopy($value);
+ }
+
+ return $array;
+ }
+
+ /**
+ * Copies an object.
+ *
+ * @param object $object
+ *
+ * @throws CloneException
+ *
+ * @return object
+ */
+ private function copyObject($object)
+ {
+ $objectHash = spl_object_hash($object);
+
+ if (isset($this->hashMap[$objectHash])) {
+ return $this->hashMap[$objectHash];
+ }
+
+ $reflectedObject = new ReflectionObject($object);
+ $isCloneable = $reflectedObject->isCloneable();
+
+ if (false === $isCloneable) {
+ if ($this->skipUncloneable) {
+ $this->hashMap[$objectHash] = $object;
+
+ return $object;
+ }
+
+ throw new CloneException(
+ sprintf(
+ 'The class "%s" is not cloneable.',
+ $reflectedObject->getName()
+ )
+ );
+ }
+
+ $newObject = clone $object;
+ $this->hashMap[$objectHash] = $newObject;
+
+ if ($this->useCloneMethod && $reflectedObject->hasMethod('__clone')) {
+ return $newObject;
+ }
+
+ if ($newObject instanceof DateTimeInterface || $newObject instanceof DateTimeZone) {
+ return $newObject;
+ }
+
+ foreach (ReflectionHelper::getProperties($reflectedObject) as $property) {
+ $this->copyObjectProperty($newObject, $property);
+ }
+
+ return $newObject;
+ }
+
+ private function copyObjectProperty($object, ReflectionProperty $property)
+ {
+ // Ignore static properties
+ if ($property->isStatic()) {
+ return;
+ }
+
+ // Apply the filters
+ foreach ($this->filters as $item) {
+ /** @var Matcher $matcher */
+ $matcher = $item['matcher'];
+ /** @var Filter $filter */
+ $filter = $item['filter'];
+
+ if ($matcher->matches($object, $property->getName())) {
+ $filter->apply(
+ $object,
+ $property->getName(),
+ function ($object) {
+ return $this->recursiveCopy($object);
+ }
+ );
+
+ // If a filter matches, we stop processing this property
+ return;
+ }
+ }
+
+ $property->setAccessible(true);
+
+ // Ignore uninitialized properties (for PHP >7.4)
+ if (method_exists($property, 'isInitialized') && !$property->isInitialized($object)) {
+ return;
+ }
+
+ $propertyValue = $property->getValue($object);
+
+ // Copy the property
+ $property->setValue($object, $this->recursiveCopy($propertyValue));
+ }
+
+ /**
+ * Returns first filter that matches variable, `null` if no such filter found.
+ *
+ * @param array $filterRecords Associative array with 2 members: 'filter' with value of type {@see TypeFilter} and
+ * 'matcher' with value of type {@see TypeMatcher}
+ * @param mixed $var
+ *
+ * @return TypeFilter|null
+ */
+ private function getFirstMatchedTypeFilter(array $filterRecords, $var)
+ {
+ $matched = $this->first(
+ $filterRecords,
+ function (array $record) use ($var) {
+ /* @var TypeMatcher $matcher */
+ $matcher = $record['matcher'];
+
+ return $matcher->matches($var);
+ }
+ );
+
+ return isset($matched) ? $matched['filter'] : null;
+ }
+
+ /**
+ * Returns first element that matches predicate, `null` if no such element found.
+ *
+ * @param array $elements Array of ['filter' => Filter, 'matcher' => Matcher] pairs.
+ * @param callable $predicate Predicate arguments are: element.
+ *
+ * @return array|null Associative array with 2 members: 'filter' with value of type {@see TypeFilter} and 'matcher'
+ * with value of type {@see TypeMatcher} or `null`.
+ */
+ private function first(array $elements, callable $predicate)
+ {
+ foreach ($elements as $element) {
+ if (call_user_func($predicate, $element)) {
+ return $element;
+ }
+ }
+
+ return null;
+ }
+}
diff --git a/vendor/myclabs/deep-copy/src/DeepCopy/Exception/CloneException.php b/vendor/myclabs/deep-copy/src/DeepCopy/Exception/CloneException.php
new file mode 100644
index 00000000..c046706a
--- /dev/null
+++ b/vendor/myclabs/deep-copy/src/DeepCopy/Exception/CloneException.php
@@ -0,0 +1,9 @@
+setAccessible(true);
+ $oldCollection = $reflectionProperty->getValue($object);
+
+ $newCollection = $oldCollection->map(
+ function ($item) use ($objectCopier) {
+ return $objectCopier($item);
+ }
+ );
+
+ $reflectionProperty->setValue($object, $newCollection);
+ }
+}
diff --git a/vendor/myclabs/deep-copy/src/DeepCopy/Filter/Doctrine/DoctrineEmptyCollectionFilter.php b/vendor/myclabs/deep-copy/src/DeepCopy/Filter/Doctrine/DoctrineEmptyCollectionFilter.php
new file mode 100644
index 00000000..7b33fd54
--- /dev/null
+++ b/vendor/myclabs/deep-copy/src/DeepCopy/Filter/Doctrine/DoctrineEmptyCollectionFilter.php
@@ -0,0 +1,28 @@
+setAccessible(true);
+
+ $reflectionProperty->setValue($object, new ArrayCollection());
+ }
+}
\ No newline at end of file
diff --git a/vendor/myclabs/deep-copy/src/DeepCopy/Filter/Doctrine/DoctrineProxyFilter.php b/vendor/myclabs/deep-copy/src/DeepCopy/Filter/Doctrine/DoctrineProxyFilter.php
new file mode 100644
index 00000000..8bee8f76
--- /dev/null
+++ b/vendor/myclabs/deep-copy/src/DeepCopy/Filter/Doctrine/DoctrineProxyFilter.php
@@ -0,0 +1,22 @@
+__load();
+ }
+}
diff --git a/vendor/myclabs/deep-copy/src/DeepCopy/Filter/Filter.php b/vendor/myclabs/deep-copy/src/DeepCopy/Filter/Filter.php
new file mode 100644
index 00000000..85ba18ce
--- /dev/null
+++ b/vendor/myclabs/deep-copy/src/DeepCopy/Filter/Filter.php
@@ -0,0 +1,18 @@
+callback = $callable;
+ }
+
+ /**
+ * Replaces the object property by the result of the callback called with the object property.
+ *
+ * {@inheritdoc}
+ */
+ public function apply($object, $property, $objectCopier)
+ {
+ $reflectionProperty = ReflectionHelper::getProperty($object, $property);
+ $reflectionProperty->setAccessible(true);
+
+ $value = call_user_func($this->callback, $reflectionProperty->getValue($object));
+
+ $reflectionProperty->setValue($object, $value);
+ }
+}
diff --git a/vendor/myclabs/deep-copy/src/DeepCopy/Filter/SetNullFilter.php b/vendor/myclabs/deep-copy/src/DeepCopy/Filter/SetNullFilter.php
new file mode 100644
index 00000000..bea86b88
--- /dev/null
+++ b/vendor/myclabs/deep-copy/src/DeepCopy/Filter/SetNullFilter.php
@@ -0,0 +1,24 @@
+setAccessible(true);
+ $reflectionProperty->setValue($object, null);
+ }
+}
diff --git a/vendor/myclabs/deep-copy/src/DeepCopy/Matcher/Doctrine/DoctrineProxyMatcher.php b/vendor/myclabs/deep-copy/src/DeepCopy/Matcher/Doctrine/DoctrineProxyMatcher.php
new file mode 100644
index 00000000..c5887b19
--- /dev/null
+++ b/vendor/myclabs/deep-copy/src/DeepCopy/Matcher/Doctrine/DoctrineProxyMatcher.php
@@ -0,0 +1,22 @@
+class = $class;
+ $this->property = $property;
+ }
+
+ /**
+ * Matches a specific property of a specific class.
+ *
+ * {@inheritdoc}
+ */
+ public function matches($object, $property)
+ {
+ return ($object instanceof $this->class) && $property == $this->property;
+ }
+}
diff --git a/vendor/myclabs/deep-copy/src/DeepCopy/Matcher/PropertyNameMatcher.php b/vendor/myclabs/deep-copy/src/DeepCopy/Matcher/PropertyNameMatcher.php
new file mode 100644
index 00000000..c8ec0d2b
--- /dev/null
+++ b/vendor/myclabs/deep-copy/src/DeepCopy/Matcher/PropertyNameMatcher.php
@@ -0,0 +1,32 @@
+property = $property;
+ }
+
+ /**
+ * Matches a property by its name.
+ *
+ * {@inheritdoc}
+ */
+ public function matches($object, $property)
+ {
+ return $property == $this->property;
+ }
+}
diff --git a/vendor/myclabs/deep-copy/src/DeepCopy/Matcher/PropertyTypeMatcher.php b/vendor/myclabs/deep-copy/src/DeepCopy/Matcher/PropertyTypeMatcher.php
new file mode 100644
index 00000000..c7f46908
--- /dev/null
+++ b/vendor/myclabs/deep-copy/src/DeepCopy/Matcher/PropertyTypeMatcher.php
@@ -0,0 +1,52 @@
+propertyType = $propertyType;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function matches($object, $property)
+ {
+ try {
+ $reflectionProperty = ReflectionHelper::getProperty($object, $property);
+ } catch (ReflectionException $exception) {
+ return false;
+ }
+
+ $reflectionProperty->setAccessible(true);
+
+ // Uninitialized properties (for PHP >7.4)
+ if (method_exists($reflectionProperty, 'isInitialized') && !$reflectionProperty->isInitialized($object)) {
+ // null instanceof $this->propertyType
+ return false;
+ }
+
+ return $reflectionProperty->getValue($object) instanceof $this->propertyType;
+ }
+}
diff --git a/vendor/myclabs/deep-copy/src/DeepCopy/Reflection/ReflectionHelper.php b/vendor/myclabs/deep-copy/src/DeepCopy/Reflection/ReflectionHelper.php
new file mode 100644
index 00000000..742410cb
--- /dev/null
+++ b/vendor/myclabs/deep-copy/src/DeepCopy/Reflection/ReflectionHelper.php
@@ -0,0 +1,78 @@
+getProperties() does not return private properties from ancestor classes.
+ *
+ * @author muratyaman@gmail.com
+ * @see http://php.net/manual/en/reflectionclass.getproperties.php
+ *
+ * @param ReflectionClass $ref
+ *
+ * @return ReflectionProperty[]
+ */
+ public static function getProperties(ReflectionClass $ref)
+ {
+ $props = $ref->getProperties();
+ $propsArr = array();
+
+ foreach ($props as $prop) {
+ $propertyName = $prop->getName();
+ $propsArr[$propertyName] = $prop;
+ }
+
+ if ($parentClass = $ref->getParentClass()) {
+ $parentPropsArr = self::getProperties($parentClass);
+ foreach ($propsArr as $key => $property) {
+ $parentPropsArr[$key] = $property;
+ }
+
+ return $parentPropsArr;
+ }
+
+ return $propsArr;
+ }
+
+ /**
+ * Retrieves property by name from object and all its ancestors.
+ *
+ * @param object|string $object
+ * @param string $name
+ *
+ * @throws PropertyException
+ * @throws ReflectionException
+ *
+ * @return ReflectionProperty
+ */
+ public static function getProperty($object, $name)
+ {
+ $reflection = is_object($object) ? new ReflectionObject($object) : new ReflectionClass($object);
+
+ if ($reflection->hasProperty($name)) {
+ return $reflection->getProperty($name);
+ }
+
+ if ($parentClass = $reflection->getParentClass()) {
+ return self::getProperty($parentClass->getName(), $name);
+ }
+
+ throw new PropertyException(
+ sprintf(
+ 'The class "%s" doesn\'t have a property with the given name: "%s".',
+ is_object($object) ? get_class($object) : $object,
+ $name
+ )
+ );
+ }
+}
diff --git a/vendor/myclabs/deep-copy/src/DeepCopy/TypeFilter/Date/DateIntervalFilter.php b/vendor/myclabs/deep-copy/src/DeepCopy/TypeFilter/Date/DateIntervalFilter.php
new file mode 100644
index 00000000..becd1cff
--- /dev/null
+++ b/vendor/myclabs/deep-copy/src/DeepCopy/TypeFilter/Date/DateIntervalFilter.php
@@ -0,0 +1,33 @@
+ $propertyValue) {
+ $copy->{$propertyName} = $propertyValue;
+ }
+
+ return $copy;
+ }
+}
diff --git a/vendor/myclabs/deep-copy/src/DeepCopy/TypeFilter/ReplaceFilter.php b/vendor/myclabs/deep-copy/src/DeepCopy/TypeFilter/ReplaceFilter.php
new file mode 100644
index 00000000..164f8b8e
--- /dev/null
+++ b/vendor/myclabs/deep-copy/src/DeepCopy/TypeFilter/ReplaceFilter.php
@@ -0,0 +1,30 @@
+callback = $callable;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function apply($element)
+ {
+ return call_user_func($this->callback, $element);
+ }
+}
diff --git a/vendor/myclabs/deep-copy/src/DeepCopy/TypeFilter/ShallowCopyFilter.php b/vendor/myclabs/deep-copy/src/DeepCopy/TypeFilter/ShallowCopyFilter.php
new file mode 100644
index 00000000..a5fbd7a2
--- /dev/null
+++ b/vendor/myclabs/deep-copy/src/DeepCopy/TypeFilter/ShallowCopyFilter.php
@@ -0,0 +1,17 @@
+copier = $copier;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function apply($arrayObject)
+ {
+ $clone = clone $arrayObject;
+ foreach ($arrayObject->getArrayCopy() as $k => $v) {
+ $clone->offsetSet($k, $this->copier->copy($v));
+ }
+
+ return $clone;
+ }
+}
+
diff --git a/vendor/myclabs/deep-copy/src/DeepCopy/TypeFilter/Spl/SplDoublyLinkedList.php b/vendor/myclabs/deep-copy/src/DeepCopy/TypeFilter/Spl/SplDoublyLinkedList.php
new file mode 100644
index 00000000..c5644cff
--- /dev/null
+++ b/vendor/myclabs/deep-copy/src/DeepCopy/TypeFilter/Spl/SplDoublyLinkedList.php
@@ -0,0 +1,10 @@
+copier = $copier;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function apply($element)
+ {
+ $newElement = clone $element;
+
+ $copy = $this->createCopyClosure();
+
+ return $copy($newElement);
+ }
+
+ private function createCopyClosure()
+ {
+ $copier = $this->copier;
+
+ $copy = function (SplDoublyLinkedList $list) use ($copier) {
+ // Replace each element in the list with a deep copy of itself
+ for ($i = 1; $i <= $list->count(); $i++) {
+ $copy = $copier->recursiveCopy($list->shift());
+
+ $list->push($copy);
+ }
+
+ return $list;
+ };
+
+ return Closure::bind($copy, null, DeepCopy::class);
+ }
+}
diff --git a/vendor/myclabs/deep-copy/src/DeepCopy/TypeFilter/TypeFilter.php b/vendor/myclabs/deep-copy/src/DeepCopy/TypeFilter/TypeFilter.php
new file mode 100644
index 00000000..5785a7da
--- /dev/null
+++ b/vendor/myclabs/deep-copy/src/DeepCopy/TypeFilter/TypeFilter.php
@@ -0,0 +1,13 @@
+type = $type;
+ }
+
+ /**
+ * @param mixed $element
+ *
+ * @return boolean
+ */
+ public function matches($element)
+ {
+ return is_object($element) ? is_a($element, $this->type) : gettype($element) === $this->type;
+ }
+}
diff --git a/vendor/myclabs/deep-copy/src/DeepCopy/deep_copy.php b/vendor/myclabs/deep-copy/src/DeepCopy/deep_copy.php
new file mode 100644
index 00000000..55dcc926
--- /dev/null
+++ b/vendor/myclabs/deep-copy/src/DeepCopy/deep_copy.php
@@ -0,0 +1,20 @@
+copy($value);
+ }
+}
diff --git a/vendor/nikic/php-parser/LICENSE b/vendor/nikic/php-parser/LICENSE
new file mode 100644
index 00000000..2e567183
--- /dev/null
+++ b/vendor/nikic/php-parser/LICENSE
@@ -0,0 +1,29 @@
+BSD 3-Clause License
+
+Copyright (c) 2011, Nikita Popov
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+1. Redistributions of source code must retain the above copyright notice, this
+ list of conditions and the following disclaimer.
+
+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.
+
+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 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/nikic/php-parser/README.md b/vendor/nikic/php-parser/README.md
new file mode 100644
index 00000000..36de23cd
--- /dev/null
+++ b/vendor/nikic/php-parser/README.md
@@ -0,0 +1,225 @@
+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.2 parser written in PHP. Its purpose is to simplify static code analysis and
+manipulation.
+
+[**Documentation for version 4.x**][doc_4_x] (stable; for running on PHP >= 7.0; for parsing PHP 5.2 to PHP 8.2).
+
+[Documentation for version 3.x][doc_3_x] (unsupported; for running on PHP >= 5.5; for parsing PHP 5.2 to PHP 7.2).
+
+Features
+--------
+
+The main features provided by this library are:
+
+ * Parsing PHP 5, 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.
+ * Infrastructure to traverse and modify ASTs.
+ * Resolution of namespaced names.
+ * Evaluation of constant expressions.
+ * Builders to simplify AST construction for code generation.
+ * Converting an AST into JSON and back.
+
+Quick Start
+-----------
+
+Install the library using [composer](https://getcomposer.org):
+
+ php composer.phar require nikic/php-parser
+
+Parse some PHP code into an AST and dump the result in human-readable form:
+
+```php
+create(ParserFactory::PREFER_PHP7);
+try {
+ $ast = $parser->parse($code);
+} catch (Error $error) {
+ echo "Parse error: {$error->getMessage()}\n";
+ return;
+}
+
+$dumper = new NodeDumper;
+echo $dumper->dump($ast) . "\n";
+```
+
+This dumps an AST looking something like this:
+
+```
+array(
+ 0: Stmt_Function(
+ byRef: false
+ name: Identifier(
+ name: test
+ )
+ params: array(
+ 0: Param(
+ type: null
+ byRef: false
+ variadic: false
+ var: Expr_Variable(
+ name: foo
+ )
+ default: null
+ )
+ )
+ returnType: null
+ stmts: array(
+ 0: Stmt_Expression(
+ expr: Expr_FuncCall(
+ name: Name(
+ parts: array(
+ 0: var_dump
+ )
+ )
+ args: array(
+ 0: Arg(
+ value: Expr_Variable(
+ name: foo
+ )
+ byRef: false
+ unpack: false
+ )
+ )
+ )
+ )
+ )
+ )
+)
+```
+
+Let's traverse the AST and perform some kind of modification. For example, drop all function bodies:
+
+```php
+use PhpParser\Node;
+use PhpParser\Node\Stmt\Function_;
+use PhpParser\NodeTraverser;
+use PhpParser\NodeVisitorAbstract;
+
+$traverser = new NodeTraverser();
+$traverser->addVisitor(new class extends NodeVisitorAbstract {
+ public function enterNode(Node $node) {
+ if ($node instanceof Function_) {
+ // Clean out the function body
+ $node->stmts = [];
+ }
+ }
+});
+
+$ast = $traverser->traverse($ast);
+echo $dumper->dump($ast) . "\n";
+```
+
+This gives us an AST where the `Function_::$stmts` are empty:
+
+```
+array(
+ 0: Stmt_Function(
+ byRef: false
+ name: Identifier(
+ name: test
+ )
+ params: array(
+ 0: Param(
+ type: null
+ byRef: false
+ variadic: false
+ var: Expr_Variable(
+ name: foo
+ )
+ default: null
+ )
+ )
+ returnType: null
+ stmts: array(
+ )
+ )
+)
+```
+
+Finally, we can convert the new AST back to PHP code:
+
+```php
+use PhpParser\PrettyPrinter;
+
+$prettyPrinter = new PrettyPrinter\Standard;
+echo $prettyPrinter->prettyPrintFile($ast);
+```
+
+This gives us our original code, minus the `var_dump()` call inside the function:
+
+```php
+ [
+ 'startLine', 'endLine', 'startFilePos', 'endFilePos', 'comments'
+]]);
+$parser = (new PhpParser\ParserFactory)->create(
+ PhpParser\ParserFactory::PREFER_PHP7,
+ $lexer
+);
+$dumper = new PhpParser\NodeDumper([
+ 'dumpComments' => true,
+ 'dumpPositions' => $attributes['with-positions'],
+]);
+$prettyPrinter = new PhpParser\PrettyPrinter\Standard;
+
+$traverser = new PhpParser\NodeTraverser();
+$traverser->addVisitor(new PhpParser\NodeVisitor\NameResolver);
+
+foreach ($files as $file) {
+ if (strpos($file, ' Code $code\n");
+ } else {
+ if (!file_exists($file)) {
+ fwrite(STDERR, "File $file does not exist.\n");
+ exit(1);
+ }
+
+ $code = file_get_contents($file);
+ fwrite(STDERR, "====> File $file:\n");
+ }
+
+ if ($attributes['with-recovery']) {
+ $errorHandler = new PhpParser\ErrorHandler\Collecting;
+ $stmts = $parser->parse($code, $errorHandler);
+ foreach ($errorHandler->getErrors() as $error) {
+ $message = formatErrorMessage($error, $code, $attributes['with-column-info']);
+ fwrite(STDERR, $message . "\n");
+ }
+ if (null === $stmts) {
+ continue;
+ }
+ } else {
+ try {
+ $stmts = $parser->parse($code);
+ } catch (PhpParser\Error $error) {
+ $message = formatErrorMessage($error, $code, $attributes['with-column-info']);
+ fwrite(STDERR, $message . "\n");
+ exit(1);
+ }
+ }
+
+ foreach ($operations as $operation) {
+ if ('dump' === $operation) {
+ fwrite(STDERR, "==> Node dump:\n");
+ echo $dumper->dump($stmts, $code), "\n";
+ } elseif ('pretty-print' === $operation) {
+ fwrite(STDERR, "==> Pretty print:\n");
+ echo $prettyPrinter->prettyPrintFile($stmts), "\n";
+ } elseif ('json-dump' === $operation) {
+ fwrite(STDERR, "==> JSON dump:\n");
+ echo json_encode($stmts, JSON_PRETTY_PRINT), "\n";
+ } elseif ('var-dump' === $operation) {
+ fwrite(STDERR, "==> var_dump():\n");
+ var_dump($stmts);
+ } elseif ('resolve-names' === $operation) {
+ fwrite(STDERR, "==> Resolved names.\n");
+ $stmts = $traverser->traverse($stmts);
+ }
+ }
+}
+
+function formatErrorMessage(PhpParser\Error $e, $code, $withColumnInfo) {
+ if ($withColumnInfo && $e->hasColumnInfo()) {
+ return $e->getMessageWithColumnInfo($code);
+ } else {
+ return $e->getMessage();
+ }
+}
+
+function showHelp($error = '') {
+ if ($error) {
+ fwrite(STDERR, $error . "\n\n");
+ }
+ fwrite($error ? STDERR : STDOUT, << false,
+ 'with-positions' => false,
+ 'with-recovery' => false,
+ ];
+
+ array_shift($args);
+ $parseOptions = true;
+ foreach ($args as $arg) {
+ if (!$parseOptions) {
+ $files[] = $arg;
+ continue;
+ }
+
+ switch ($arg) {
+ case '--dump':
+ case '-d':
+ $operations[] = 'dump';
+ break;
+ case '--pretty-print':
+ case '-p':
+ $operations[] = 'pretty-print';
+ break;
+ case '--json-dump':
+ case '-j':
+ $operations[] = 'json-dump';
+ break;
+ case '--var-dump':
+ $operations[] = 'var-dump';
+ break;
+ case '--resolve-names':
+ case '-N';
+ $operations[] = 'resolve-names';
+ break;
+ case '--with-column-info':
+ case '-c';
+ $attributes['with-column-info'] = true;
+ break;
+ case '--with-positions':
+ case '-P':
+ $attributes['with-positions'] = true;
+ break;
+ case '--with-recovery':
+ case '-r':
+ $attributes['with-recovery'] = true;
+ break;
+ case '--help':
+ case '-h';
+ showHelp();
+ break;
+ case '--':
+ $parseOptions = false;
+ break;
+ default:
+ if ($arg[0] === '-') {
+ showHelp("Invalid operation $arg.");
+ } else {
+ $files[] = $arg;
+ }
+ }
+ }
+
+ return [$operations, $files, $attributes];
+}
diff --git a/vendor/nikic/php-parser/composer.json b/vendor/nikic/php-parser/composer.json
new file mode 100644
index 00000000..2fd064a2
--- /dev/null
+++ b/vendor/nikic/php-parser/composer.json
@@ -0,0 +1,41 @@
+{
+ "name": "nikic/php-parser",
+ "type": "library",
+ "description": "A PHP parser written in PHP",
+ "keywords": [
+ "php",
+ "parser"
+ ],
+ "license": "BSD-3-Clause",
+ "authors": [
+ {
+ "name": "Nikita Popov"
+ }
+ ],
+ "require": {
+ "php": ">=7.0",
+ "ext-tokenizer": "*"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "^6.5 || ^7.0 || ^8.0 || ^9.0",
+ "ircmaxell/php-yacc": "^0.0.7"
+ },
+ "extra": {
+ "branch-alias": {
+ "dev-master": "4.9-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "PhpParser\\": "lib/PhpParser"
+ }
+ },
+ "autoload-dev": {
+ "psr-4": {
+ "PhpParser\\": "test/PhpParser/"
+ }
+ },
+ "bin": [
+ "bin/php-parse"
+ ]
+}
diff --git a/vendor/nikic/php-parser/grammar/README.md b/vendor/nikic/php-parser/grammar/README.md
new file mode 100644
index 00000000..4bae11d8
--- /dev/null
+++ b/vendor/nikic/php-parser/grammar/README.md
@@ -0,0 +1,30 @@
+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
new file mode 100644
index 00000000..6166607c
--- /dev/null
+++ b/vendor/nikic/php-parser/grammar/parser.template
@@ -0,0 +1,106 @@
+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
new file mode 100644
index 00000000..2920dead
--- /dev/null
+++ b/vendor/nikic/php-parser/grammar/php5.y
@@ -0,0 +1,1046 @@
+%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; }
+;
+
+identifier_maybe_readonly:
+ identifier { $$ = $1; }
+ | T_READONLY { $$ = Node\Identifier[$1]; }
+;
+
+function_declaration_statement:
+ T_FUNCTION optional_ref identifier_maybe_readonly '(' 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 ']' { $$ = Expr\ArrayDimFetch[Scalar\String_::fromString($1, attributes()), $3]; }
+ | constant '[' dim_offset ']' { $$ = Expr\ArrayDimFetch[$1, $3]; }
+ | scalar_dereference '[' dim_offset ']' { $$ = Expr\ArrayDimFetch[$1, $3]; }
+ /* alternative array syntax missing intentionally */
+;
+
+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]; }
+;
+
+name_readonly:
+ T_READONLY { $$ = Name[$1]; }
+;
+
+function_call:
+ name argument_list { $$ = Expr\FuncCall[$1, $2]; }
+ | name_readonly 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::fromString($1, attributes()); }
+ | T_CONSTANT_ENCAPSED_STRING { $$ = Scalar\String_::fromString($1, attributes(), false); }
+ | T_LINE { $$ = Scalar\MagicConst\Line[]; }
+ | T_FILE { $$ = Scalar\MagicConst\File[]; }
+ | T_DIR { $$ = Scalar\MagicConst\Dir[]; }
+ | 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
new file mode 100644
index 00000000..1f9b4bdd
--- /dev/null
+++ b/vendor/nikic/php-parser/grammar/php7.y
@@ -0,0 +1,1235 @@
+%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 { $$ = []; }
+;
+
+identifier_maybe_readonly:
+ identifier_not_reserved { $$ = $1; }
+ | T_READONLY { $$ = Node\Identifier[$1]; }
+;
+
+function_declaration_statement:
+ T_FUNCTION optional_ref identifier_maybe_readonly '(' 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_maybe_readonly '(' parameter_list ')' optional_return_type block_or_error
+ { $$ = Stmt\Function_[$4, ['byRef' => $3, 'params' => $6, 'returnType' => $8, 'stmts' => $9, 'attrGroups' => $1]]; }
+;
+
+class_declaration_statement:
+ class_entry_type identifier_not_reserved extends_from implements_list '{' class_statement_list '}'
+ { $$ = Stmt\Class_[$2, ['type' => $1, 'extends' => $3, 'implements' => $4, 'stmts' => $6, 'attrGroups' => []]];
+ $this->checkClass($$, #2); }
+ | 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; }
+ | class_modifiers T_CLASS { $$ = $1; }
+;
+
+class_modifiers:
+ class_modifier { $$ = $1; }
+ | class_modifiers class_modifier { $this->checkClassModifier($1, $2, #2); $$ = $1 | $2; }
+;
+
+class_modifier:
+ T_ABSTRACT { $$ = Stmt\Class_::MODIFIER_ABSTRACT; }
+ | T_FINAL { $$ = Stmt\Class_::MODIFIER_FINAL; }
+ | T_READONLY { $$ = Stmt\Class_::MODIFIER_READONLY; }
+;
+
+extends_from:
+ /* 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 { $$ = $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_element:
+ type { $$ = $1; }
+ | '(' intersection_type ')' { $$ = $2; }
+;
+
+union_type:
+ union_type_element '|' union_type_element { init($1, $3); }
+ | union_type '|' union_type_element { push($1, $3); }
+;
+
+union_type_without_static_element:
+ type_without_static { $$ = $1; }
+ | '(' intersection_type_without_static ')' { $$ = $2; }
+;
+
+union_type_without_static:
+ union_type_without_static_element '|' union_type_without_static_element { init($1, $3); }
+ | union_type_without_static '|' union_type_without_static_element { push($1, $3); }
+;
+
+intersection_type_list:
+ type T_AMPERSAND_NOT_FOLLOWED_BY_VAR_OR_VARARG type { init($1, $3); }
+ | intersection_type_list T_AMPERSAND_NOT_FOLLOWED_BY_VAR_OR_VARARG type
+ { push($1, $3); }
+;
+
+intersection_type:
+ intersection_type_list { $$ = Node\IntersectionType[$1]; }
+;
+
+intersection_type_without_static_list:
+ type_without_static T_AMPERSAND_NOT_FOLLOWED_BY_VAR_OR_VARARG type_without_static
+ { init($1, $3); }
+ | intersection_type_without_static_list T_AMPERSAND_NOT_FOLLOWED_BY_VAR_OR_VARARG type_without_static
+ { push($1, $3); }
+;
+
+intersection_type_without_static:
+ intersection_type_without_static_list { $$ = Node\IntersectionType[$1]; }
+;
+
+type_expr_without_static:
+ type_without_static { $$ = $1; }
+ | '?' type_without_static { $$ = Node\NullableType[$2]; }
+ | union_type_without_static { $$ = Node\UnionType[$1]; }
+ | intersection_type_without_static { $$ = $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]; }
+;
+
+name_readonly:
+ T_READONLY { $$ = Name[$1]; }
+;
+
+function_call:
+ name argument_list { $$ = Expr\FuncCall[$1, $2]; }
+ | name_readonly 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 { $$ = Scalar\String_::fromString($1, attributes()); }
+ | '"' 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::fromString($1, attributes()); }
+ | 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
new file mode 100644
index 00000000..663c2a14
--- /dev/null
+++ b/vendor/nikic/php-parser/grammar/phpyLang.php
@@ -0,0 +1,184 @@
+\'[^\\\\\']*+(?:\\\\.[^\\\\\']*+)*+\')
+ (?"[^\\\\"]*+(?:\\\\.[^\\\\"]*+)*+")
+ (?(?&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 ('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
new file mode 100644
index 00000000..2d0c6b14
--- /dev/null
+++ b/vendor/nikic/php-parser/grammar/rebuildParsers.php
@@ -0,0 +1,81 @@
+ '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
new file mode 100644
index 00000000..ba4e4901
--- /dev/null
+++ b/vendor/nikic/php-parser/grammar/tokens.template
@@ -0,0 +1,17 @@
+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
new file mode 100644
index 00000000..8f0b2172
--- /dev/null
+++ b/vendor/nikic/php-parser/grammar/tokens.y
@@ -0,0 +1,115 @@
+/* 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
new file mode 100644
index 00000000..26d8921e
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Builder.php
@@ -0,0 +1,13 @@
+constants = [new Const_($name, BuilderHelpers::normalizeValue($value))];
+ }
+
+ /**
+ * Add another constant to const group
+ *
+ * @param string|Identifier $name Name
+ * @param Node\Expr|bool|null|int|float|string|array $value Value
+ *
+ * @return $this The builder instance (for fluid interface)
+ */
+ public function addConst($name, $value) {
+ $this->constants[] = new Const_($name, BuilderHelpers::normalizeValue($value));
+
+ return $this;
+ }
+
+ /**
+ * Makes the constant public.
+ *
+ * @return $this The builder instance (for fluid interface)
+ */
+ public function makePublic() {
+ $this->flags = BuilderHelpers::addModifier($this->flags, Stmt\Class_::MODIFIER_PUBLIC);
+
+ return $this;
+ }
+
+ /**
+ * Makes the constant protected.
+ *
+ * @return $this The builder instance (for fluid interface)
+ */
+ public function makeProtected() {
+ $this->flags = BuilderHelpers::addModifier($this->flags, Stmt\Class_::MODIFIER_PROTECTED);
+
+ return $this;
+ }
+
+ /**
+ * Makes the constant private.
+ *
+ * @return $this The builder instance (for fluid interface)
+ */
+ public function makePrivate() {
+ $this->flags = BuilderHelpers::addModifier($this->flags, Stmt\Class_::MODIFIER_PRIVATE);
+
+ return $this;
+ }
+
+ /**
+ * Makes the constant final.
+ *
+ * @return $this The builder instance (for fluid interface)
+ */
+ public function makeFinal() {
+ $this->flags = BuilderHelpers::addModifier($this->flags, Stmt\Class_::MODIFIER_FINAL);
+
+ return $this;
+ }
+
+ /**
+ * Sets doc comment for the constant.
+ *
+ * @param PhpParser\Comment\Doc|string $docComment Doc comment to set
+ *
+ * @return $this The builder instance (for fluid interface)
+ */
+ public function setDocComment($docComment) {
+ $this->attributes = [
+ 'comments' => [BuilderHelpers::normalizeDocComment($docComment)]
+ ];
+
+ return $this;
+ }
+
+ /**
+ * Adds an attribute group.
+ *
+ * @param Node\Attribute|Node\AttributeGroup $attribute
+ *
+ * @return $this The builder instance (for fluid interface)
+ */
+ public function addAttribute($attribute) {
+ $this->attributeGroups[] = BuilderHelpers::normalizeAttribute($attribute);
+
+ return $this;
+ }
+
+ /**
+ * Returns the built class node.
+ *
+ * @return Stmt\ClassConst The built constant node
+ */
+ public function getNode(): PhpParser\Node {
+ return new Stmt\ClassConst(
+ $this->constants,
+ $this->flags,
+ $this->attributes,
+ $this->attributeGroups
+ );
+ }
+}
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Builder/Class_.php b/vendor/nikic/php-parser/lib/PhpParser/Builder/Class_.php
new file mode 100644
index 00000000..35b54d04
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Builder/Class_.php
@@ -0,0 +1,146 @@
+name = $name;
+ }
+
+ /**
+ * Extends a class.
+ *
+ * @param Name|string $class Name of class to extend
+ *
+ * @return $this The builder instance (for fluid interface)
+ */
+ public function extend($class) {
+ $this->extends = BuilderHelpers::normalizeName($class);
+
+ return $this;
+ }
+
+ /**
+ * Implements one or more interfaces.
+ *
+ * @param Name|string ...$interfaces Names of interfaces to implement
+ *
+ * @return $this The builder instance (for fluid interface)
+ */
+ public function implement(...$interfaces) {
+ foreach ($interfaces as $interface) {
+ $this->implements[] = BuilderHelpers::normalizeName($interface);
+ }
+
+ return $this;
+ }
+
+ /**
+ * Makes the class abstract.
+ *
+ * @return $this The builder instance (for fluid interface)
+ */
+ public function makeAbstract() {
+ $this->flags = BuilderHelpers::addClassModifier($this->flags, Stmt\Class_::MODIFIER_ABSTRACT);
+
+ return $this;
+ }
+
+ /**
+ * Makes the class final.
+ *
+ * @return $this The builder instance (for fluid interface)
+ */
+ public function makeFinal() {
+ $this->flags = BuilderHelpers::addClassModifier($this->flags, Stmt\Class_::MODIFIER_FINAL);
+
+ return $this;
+ }
+
+ public function makeReadonly() {
+ $this->flags = BuilderHelpers::addClassModifier($this->flags, Stmt\Class_::MODIFIER_READONLY);
+
+ return $this;
+ }
+
+ /**
+ * Adds a statement.
+ *
+ * @param Stmt|PhpParser\Builder $stmt The statement to add
+ *
+ * @return $this The builder instance (for fluid interface)
+ */
+ 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])) {
+ throw new \LogicException(sprintf('Unexpected node of type "%s"', $stmt->getType()));
+ }
+
+ $targets[$class][] = $stmt;
+
+ return $this;
+ }
+
+ /**
+ * Adds an attribute group.
+ *
+ * @param Node\Attribute|Node\AttributeGroup $attribute
+ *
+ * @return $this The builder instance (for fluid interface)
+ */
+ public function addAttribute($attribute) {
+ $this->attributeGroups[] = BuilderHelpers::normalizeAttribute($attribute);
+
+ return $this;
+ }
+
+ /**
+ * Returns the built class node.
+ *
+ * @return Stmt\Class_ The built class node
+ */
+ public function getNode() : PhpParser\Node {
+ return new Stmt\Class_($this->name, [
+ 'flags' => $this->flags,
+ 'extends' => $this->extends,
+ 'implements' => $this->implements,
+ 'stmts' => array_merge($this->uses, $this->constants, $this->properties, $this->methods),
+ 'attrGroups' => $this->attributeGroups,
+ ], $this->attributes);
+ }
+}
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Builder/Declaration.php b/vendor/nikic/php-parser/lib/PhpParser/Builder/Declaration.php
new file mode 100644
index 00000000..83094992
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Builder/Declaration.php
@@ -0,0 +1,43 @@
+addStmt($stmt);
+ }
+
+ return $this;
+ }
+
+ /**
+ * Sets doc comment for the declaration.
+ *
+ * @param PhpParser\Comment\Doc|string $docComment Doc comment to set
+ *
+ * @return $this The builder instance (for fluid interface)
+ */
+ public function setDocComment($docComment) {
+ $this->attributes['comments'] = [
+ BuilderHelpers::normalizeDocComment($docComment)
+ ];
+
+ return $this;
+ }
+}
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Builder/EnumCase.php b/vendor/nikic/php-parser/lib/PhpParser/Builder/EnumCase.php
new file mode 100644
index 00000000..accc5166
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Builder/EnumCase.php
@@ -0,0 +1,85 @@
+name = $name;
+ }
+
+ /**
+ * Sets the value.
+ *
+ * @param Node\Expr|string|int $value
+ *
+ * @return $this
+ */
+ public function setValue($value) {
+ $this->value = BuilderHelpers::normalizeValue($value);
+
+ return $this;
+ }
+
+ /**
+ * Sets doc comment for the constant.
+ *
+ * @param PhpParser\Comment\Doc|string $docComment Doc comment to set
+ *
+ * @return $this The builder instance (for fluid interface)
+ */
+ public function setDocComment($docComment) {
+ $this->attributes = [
+ 'comments' => [BuilderHelpers::normalizeDocComment($docComment)]
+ ];
+
+ return $this;
+ }
+
+ /**
+ * Adds an attribute group.
+ *
+ * @param Node\Attribute|Node\AttributeGroup $attribute
+ *
+ * @return $this The builder instance (for fluid interface)
+ */
+ public function addAttribute($attribute) {
+ $this->attributeGroups[] = BuilderHelpers::normalizeAttribute($attribute);
+
+ return $this;
+ }
+
+ /**
+ * Returns the built enum case node.
+ *
+ * @return Stmt\EnumCase The built constant node
+ */
+ public function getNode(): PhpParser\Node {
+ return new Stmt\EnumCase(
+ $this->name,
+ $this->value,
+ $this->attributeGroups,
+ $this->attributes
+ );
+ }
+}
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Builder/Enum_.php b/vendor/nikic/php-parser/lib/PhpParser/Builder/Enum_.php
new file mode 100644
index 00000000..be7eef95
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Builder/Enum_.php
@@ -0,0 +1,117 @@
+name = $name;
+ }
+
+ /**
+ * Sets the scalar type.
+ *
+ * @param string|Identifier $type
+ *
+ * @return $this
+ */
+ public function setScalarType($scalarType) {
+ $this->scalarType = BuilderHelpers::normalizeType($scalarType);
+
+ return $this;
+ }
+
+ /**
+ * Implements one or more interfaces.
+ *
+ * @param Name|string ...$interfaces Names of interfaces to implement
+ *
+ * @return $this The builder instance (for fluid interface)
+ */
+ public function implement(...$interfaces) {
+ foreach ($interfaces as $interface) {
+ $this->implements[] = BuilderHelpers::normalizeName($interface);
+ }
+
+ return $this;
+ }
+
+ /**
+ * Adds a statement.
+ *
+ * @param Stmt|PhpParser\Builder $stmt The statement to add
+ *
+ * @return $this The builder instance (for fluid interface)
+ */
+ 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])) {
+ throw new \LogicException(sprintf('Unexpected node of type "%s"', $stmt->getType()));
+ }
+
+ $targets[$class][] = $stmt;
+
+ return $this;
+ }
+
+ /**
+ * Adds an attribute group.
+ *
+ * @param Node\Attribute|Node\AttributeGroup $attribute
+ *
+ * @return $this The builder instance (for fluid interface)
+ */
+ public function addAttribute($attribute) {
+ $this->attributeGroups[] = BuilderHelpers::normalizeAttribute($attribute);
+
+ return $this;
+ }
+
+ /**
+ * Returns the built class node.
+ *
+ * @return Stmt\Enum_ The built enum node
+ */
+ public function getNode() : PhpParser\Node {
+ return new Stmt\Enum_($this->name, [
+ 'scalarType' => $this->scalarType,
+ 'implements' => $this->implements,
+ 'stmts' => array_merge($this->uses, $this->enumCases, $this->constants, $this->methods),
+ 'attrGroups' => $this->attributeGroups,
+ ], $this->attributes);
+ }
+}
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Builder/FunctionLike.php b/vendor/nikic/php-parser/lib/PhpParser/Builder/FunctionLike.php
new file mode 100644
index 00000000..98ea9d33
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Builder/FunctionLike.php
@@ -0,0 +1,73 @@
+returnByRef = true;
+
+ return $this;
+ }
+
+ /**
+ * Adds a parameter.
+ *
+ * @param Node\Param|Param $param The parameter to add
+ *
+ * @return $this The builder instance (for fluid interface)
+ */
+ public function addParam($param) {
+ $param = BuilderHelpers::normalizeNode($param);
+
+ if (!$param instanceof Node\Param) {
+ throw new \LogicException(sprintf('Expected parameter node, got "%s"', $param->getType()));
+ }
+
+ $this->params[] = $param;
+
+ return $this;
+ }
+
+ /**
+ * Adds multiple parameters.
+ *
+ * @param array $params The parameters to add
+ *
+ * @return $this The builder instance (for fluid interface)
+ */
+ public function addParams(array $params) {
+ foreach ($params as $param) {
+ $this->addParam($param);
+ }
+
+ return $this;
+ }
+
+ /**
+ * Sets the return type for PHP 7.
+ *
+ * @param string|Node\Name|Node\Identifier|Node\ComplexType $type
+ *
+ * @return $this The builder instance (for fluid interface)
+ */
+ public function setReturnType($type) {
+ $this->returnType = BuilderHelpers::normalizeType($type);
+
+ return $this;
+ }
+}
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Builder/Function_.php b/vendor/nikic/php-parser/lib/PhpParser/Builder/Function_.php
new file mode 100644
index 00000000..1cd73c0d
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Builder/Function_.php
@@ -0,0 +1,67 @@
+name = $name;
+ }
+
+ /**
+ * Adds a statement.
+ *
+ * @param Node|PhpParser\Builder $stmt The statement to add
+ *
+ * @return $this The builder instance (for fluid interface)
+ */
+ public function addStmt($stmt) {
+ $this->stmts[] = BuilderHelpers::normalizeStmt($stmt);
+
+ return $this;
+ }
+
+ /**
+ * Adds an attribute group.
+ *
+ * @param Node\Attribute|Node\AttributeGroup $attribute
+ *
+ * @return $this The builder instance (for fluid interface)
+ */
+ public function addAttribute($attribute) {
+ $this->attributeGroups[] = BuilderHelpers::normalizeAttribute($attribute);
+
+ return $this;
+ }
+
+ /**
+ * Returns the built function node.
+ *
+ * @return Stmt\Function_ The built function node
+ */
+ public function getNode() : Node {
+ return new Stmt\Function_($this->name, [
+ 'byRef' => $this->returnByRef,
+ 'params' => $this->params,
+ 'returnType' => $this->returnType,
+ 'stmts' => $this->stmts,
+ 'attrGroups' => $this->attributeGroups,
+ ], $this->attributes);
+ }
+}
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Builder/Interface_.php b/vendor/nikic/php-parser/lib/PhpParser/Builder/Interface_.php
new file mode 100644
index 00000000..7806e85f
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Builder/Interface_.php
@@ -0,0 +1,93 @@
+name = $name;
+ }
+
+ /**
+ * Extends one or more interfaces.
+ *
+ * @param Name|string ...$interfaces Names of interfaces to extend
+ *
+ * @return $this The builder instance (for fluid interface)
+ */
+ public function extend(...$interfaces) {
+ foreach ($interfaces as $interface) {
+ $this->extends[] = BuilderHelpers::normalizeName($interface);
+ }
+
+ return $this;
+ }
+
+ /**
+ * Adds a statement.
+ *
+ * @param Stmt|PhpParser\Builder $stmt The statement to add
+ *
+ * @return $this The builder instance (for fluid interface)
+ */
+ public function addStmt($stmt) {
+ $stmt = BuilderHelpers::normalizeNode($stmt);
+
+ if ($stmt instanceof Stmt\ClassConst) {
+ $this->constants[] = $stmt;
+ } elseif ($stmt instanceof Stmt\ClassMethod) {
+ // we erase all statements in the body of an interface method
+ $stmt->stmts = null;
+ $this->methods[] = $stmt;
+ } else {
+ throw new \LogicException(sprintf('Unexpected node of type "%s"', $stmt->getType()));
+ }
+
+ return $this;
+ }
+
+ /**
+ * Adds an attribute group.
+ *
+ * @param Node\Attribute|Node\AttributeGroup $attribute
+ *
+ * @return $this The builder instance (for fluid interface)
+ */
+ public function addAttribute($attribute) {
+ $this->attributeGroups[] = BuilderHelpers::normalizeAttribute($attribute);
+
+ return $this;
+ }
+
+ /**
+ * Returns the built interface node.
+ *
+ * @return Stmt\Interface_ The built interface node
+ */
+ public function getNode() : PhpParser\Node {
+ return new Stmt\Interface_($this->name, [
+ 'extends' => $this->extends,
+ 'stmts' => array_merge($this->constants, $this->methods),
+ 'attrGroups' => $this->attributeGroups,
+ ], $this->attributes);
+ }
+}
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Builder/Method.php b/vendor/nikic/php-parser/lib/PhpParser/Builder/Method.php
new file mode 100644
index 00000000..232d7cb8
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Builder/Method.php
@@ -0,0 +1,146 @@
+name = $name;
+ }
+
+ /**
+ * Makes the method public.
+ *
+ * @return $this The builder instance (for fluid interface)
+ */
+ public function makePublic() {
+ $this->flags = BuilderHelpers::addModifier($this->flags, Stmt\Class_::MODIFIER_PUBLIC);
+
+ return $this;
+ }
+
+ /**
+ * Makes the method protected.
+ *
+ * @return $this The builder instance (for fluid interface)
+ */
+ public function makeProtected() {
+ $this->flags = BuilderHelpers::addModifier($this->flags, Stmt\Class_::MODIFIER_PROTECTED);
+
+ return $this;
+ }
+
+ /**
+ * Makes the method private.
+ *
+ * @return $this The builder instance (for fluid interface)
+ */
+ public function makePrivate() {
+ $this->flags = BuilderHelpers::addModifier($this->flags, Stmt\Class_::MODIFIER_PRIVATE);
+
+ return $this;
+ }
+
+ /**
+ * Makes the method static.
+ *
+ * @return $this The builder instance (for fluid interface)
+ */
+ public function makeStatic() {
+ $this->flags = BuilderHelpers::addModifier($this->flags, Stmt\Class_::MODIFIER_STATIC);
+
+ return $this;
+ }
+
+ /**
+ * Makes the method abstract.
+ *
+ * @return $this The builder instance (for fluid interface)
+ */
+ public function makeAbstract() {
+ if (!empty($this->stmts)) {
+ throw new \LogicException('Cannot make method with statements abstract');
+ }
+
+ $this->flags = BuilderHelpers::addModifier($this->flags, Stmt\Class_::MODIFIER_ABSTRACT);
+ $this->stmts = null; // abstract methods don't have statements
+
+ return $this;
+ }
+
+ /**
+ * Makes the method final.
+ *
+ * @return $this The builder instance (for fluid interface)
+ */
+ public function makeFinal() {
+ $this->flags = BuilderHelpers::addModifier($this->flags, Stmt\Class_::MODIFIER_FINAL);
+
+ return $this;
+ }
+
+ /**
+ * Adds a statement.
+ *
+ * @param Node|PhpParser\Builder $stmt The statement to add
+ *
+ * @return $this The builder instance (for fluid interface)
+ */
+ public function addStmt($stmt) {
+ if (null === $this->stmts) {
+ throw new \LogicException('Cannot add statements to an abstract method');
+ }
+
+ $this->stmts[] = BuilderHelpers::normalizeStmt($stmt);
+
+ return $this;
+ }
+
+ /**
+ * Adds an attribute group.
+ *
+ * @param Node\Attribute|Node\AttributeGroup $attribute
+ *
+ * @return $this The builder instance (for fluid interface)
+ */
+ public function addAttribute($attribute) {
+ $this->attributeGroups[] = BuilderHelpers::normalizeAttribute($attribute);
+
+ return $this;
+ }
+
+ /**
+ * Returns the built method node.
+ *
+ * @return Stmt\ClassMethod The built method node
+ */
+ public function getNode() : Node {
+ return new Stmt\ClassMethod($this->name, [
+ 'flags' => $this->flags,
+ 'byRef' => $this->returnByRef,
+ 'params' => $this->params,
+ 'returnType' => $this->returnType,
+ 'stmts' => $this->stmts,
+ 'attrGroups' => $this->attributeGroups,
+ ], $this->attributes);
+ }
+}
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Builder/Namespace_.php b/vendor/nikic/php-parser/lib/PhpParser/Builder/Namespace_.php
new file mode 100644
index 00000000..1c751e16
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Builder/Namespace_.php
@@ -0,0 +1,45 @@
+name = null !== $name ? BuilderHelpers::normalizeName($name) : null;
+ }
+
+ /**
+ * Adds a statement.
+ *
+ * @param Node|PhpParser\Builder $stmt The statement to add
+ *
+ * @return $this The builder instance (for fluid interface)
+ */
+ public function addStmt($stmt) {
+ $this->stmts[] = BuilderHelpers::normalizeStmt($stmt);
+
+ return $this;
+ }
+
+ /**
+ * Returns the built node.
+ *
+ * @return Stmt\Namespace_ The built node
+ */
+ public function getNode() : Node {
+ 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
new file mode 100644
index 00000000..de9aae7e
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Builder/Param.php
@@ -0,0 +1,122 @@
+name = $name;
+ }
+
+ /**
+ * Sets default value for the parameter.
+ *
+ * @param mixed $value Default value to use
+ *
+ * @return $this The builder instance (for fluid interface)
+ */
+ public function setDefault($value) {
+ $this->default = BuilderHelpers::normalizeValue($value);
+
+ 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)
+ */
+ public function setType($type) {
+ $this->type = BuilderHelpers::normalizeType($type);
+ if ($this->type == 'void') {
+ throw new \LogicException('Parameter type cannot be void');
+ }
+
+ 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.
+ *
+ * @return $this The builder instance (for fluid interface)
+ */
+ public function makeByRef() {
+ $this->byRef = true;
+
+ return $this;
+ }
+
+ /**
+ * Make the parameter variadic
+ *
+ * @return $this The builder instance (for fluid interface)
+ */
+ public function makeVariadic() {
+ $this->variadic = true;
+
+ return $this;
+ }
+
+ /**
+ * Adds an attribute group.
+ *
+ * @param Node\Attribute|Node\AttributeGroup $attribute
+ *
+ * @return $this The builder instance (for fluid interface)
+ */
+ public function addAttribute($attribute) {
+ $this->attributeGroups[] = BuilderHelpers::normalizeAttribute($attribute);
+
+ return $this;
+ }
+
+ /**
+ * Returns the built parameter node.
+ *
+ * @return Node\Param The built parameter node
+ */
+ public function getNode() : Node {
+ return new Node\Param(
+ new Node\Expr\Variable($this->name),
+ $this->default, $this->type, $this->byRef, $this->variadic, [], 0, $this->attributeGroups
+ );
+ }
+}
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Builder/Property.php b/vendor/nikic/php-parser/lib/PhpParser/Builder/Property.php
new file mode 100644
index 00000000..68e31856
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Builder/Property.php
@@ -0,0 +1,161 @@
+name = $name;
+ }
+
+ /**
+ * Makes the property public.
+ *
+ * @return $this The builder instance (for fluid interface)
+ */
+ public function makePublic() {
+ $this->flags = BuilderHelpers::addModifier($this->flags, Stmt\Class_::MODIFIER_PUBLIC);
+
+ return $this;
+ }
+
+ /**
+ * Makes the property protected.
+ *
+ * @return $this The builder instance (for fluid interface)
+ */
+ public function makeProtected() {
+ $this->flags = BuilderHelpers::addModifier($this->flags, Stmt\Class_::MODIFIER_PROTECTED);
+
+ return $this;
+ }
+
+ /**
+ * Makes the property private.
+ *
+ * @return $this The builder instance (for fluid interface)
+ */
+ public function makePrivate() {
+ $this->flags = BuilderHelpers::addModifier($this->flags, Stmt\Class_::MODIFIER_PRIVATE);
+
+ return $this;
+ }
+
+ /**
+ * Makes the property static.
+ *
+ * @return $this The builder instance (for fluid interface)
+ */
+ public function makeStatic() {
+ $this->flags = BuilderHelpers::addModifier($this->flags, Stmt\Class_::MODIFIER_STATIC);
+
+ return $this;
+ }
+
+ /**
+ * Makes the property readonly.
+ *
+ * @return $this The builder instance (for fluid interface)
+ */
+ public function makeReadonly() {
+ $this->flags = BuilderHelpers::addModifier($this->flags, Stmt\Class_::MODIFIER_READONLY);
+
+ return $this;
+ }
+
+ /**
+ * Sets default value for the property.
+ *
+ * @param mixed $value Default value to use
+ *
+ * @return $this The builder instance (for fluid interface)
+ */
+ public function setDefault($value) {
+ $this->default = BuilderHelpers::normalizeValue($value);
+
+ return $this;
+ }
+
+ /**
+ * Sets doc comment for the property.
+ *
+ * @param PhpParser\Comment\Doc|string $docComment Doc comment to set
+ *
+ * @return $this The builder instance (for fluid interface)
+ */
+ public function setDocComment($docComment) {
+ $this->attributes = [
+ 'comments' => [BuilderHelpers::normalizeDocComment($docComment)]
+ ];
+
+ return $this;
+ }
+
+ /**
+ * Sets the property type for PHP 7.4+.
+ *
+ * @param string|Name|Identifier|ComplexType $type
+ *
+ * @return $this
+ */
+ public function setType($type) {
+ $this->type = BuilderHelpers::normalizeType($type);
+
+ return $this;
+ }
+
+ /**
+ * Adds an attribute group.
+ *
+ * @param Node\Attribute|Node\AttributeGroup $attribute
+ *
+ * @return $this The builder instance (for fluid interface)
+ */
+ public function addAttribute($attribute) {
+ $this->attributeGroups[] = BuilderHelpers::normalizeAttribute($attribute);
+
+ return $this;
+ }
+
+ /**
+ * Returns the built class node.
+ *
+ * @return Stmt\Property The built property node
+ */
+ public function getNode() : PhpParser\Node {
+ return new Stmt\Property(
+ $this->flags !== 0 ? $this->flags : Stmt\Class_::MODIFIER_PUBLIC,
+ [
+ new Stmt\PropertyProperty($this->name, $this->default)
+ ],
+ $this->attributes,
+ $this->type,
+ $this->attributeGroups
+ );
+ }
+}
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Builder/TraitUse.php b/vendor/nikic/php-parser/lib/PhpParser/Builder/TraitUse.php
new file mode 100644
index 00000000..311e8cd7
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Builder/TraitUse.php
@@ -0,0 +1,64 @@
+and($trait);
+ }
+ }
+
+ /**
+ * Adds used trait.
+ *
+ * @param Node\Name|string $trait Trait name
+ *
+ * @return $this The builder instance (for fluid interface)
+ */
+ public function and($trait) {
+ $this->traits[] = BuilderHelpers::normalizeName($trait);
+ return $this;
+ }
+
+ /**
+ * Adds trait adaptation.
+ *
+ * @param Stmt\TraitUseAdaptation|Builder\TraitUseAdaptation $adaptation Trait adaptation
+ *
+ * @return $this The builder instance (for fluid interface)
+ */
+ public function with($adaptation) {
+ $adaptation = BuilderHelpers::normalizeNode($adaptation);
+
+ if (!$adaptation instanceof Stmt\TraitUseAdaptation) {
+ throw new \LogicException('Adaptation must have type TraitUseAdaptation');
+ }
+
+ $this->adaptations[] = $adaptation;
+ return $this;
+ }
+
+ /**
+ * Returns the built node.
+ *
+ * @return Node The built node
+ */
+ public function getNode() : Node {
+ 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
new file mode 100644
index 00000000..eb6c0b62
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Builder/TraitUseAdaptation.php
@@ -0,0 +1,148 @@
+type = self::TYPE_UNDEFINED;
+
+ $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
+ *
+ * @return $this The builder instance (for fluid interface)
+ */
+ public function as($alias) {
+ if ($this->type === self::TYPE_UNDEFINED) {
+ $this->type = self::TYPE_ALIAS;
+ }
+
+ if ($this->type !== self::TYPE_ALIAS) {
+ throw new \LogicException('Cannot set alias for not alias adaptation buider');
+ }
+
+ $this->alias = $alias;
+ return $this;
+ }
+
+ /**
+ * Sets adaptated method public.
+ *
+ * @return $this The builder instance (for fluid interface)
+ */
+ public function makePublic() {
+ $this->setModifier(Stmt\Class_::MODIFIER_PUBLIC);
+ return $this;
+ }
+
+ /**
+ * Sets adaptated method protected.
+ *
+ * @return $this The builder instance (for fluid interface)
+ */
+ public function makeProtected() {
+ $this->setModifier(Stmt\Class_::MODIFIER_PROTECTED);
+ return $this;
+ }
+
+ /**
+ * Sets adaptated method private.
+ *
+ * @return $this The builder instance (for fluid interface)
+ */
+ public function makePrivate() {
+ $this->setModifier(Stmt\Class_::MODIFIER_PRIVATE);
+ return $this;
+ }
+
+ /**
+ * Adds overwritten traits.
+ *
+ * @param Node\Name|string ...$traits Traits for overwrite
+ *
+ * @return $this The builder instance (for fluid interface)
+ */
+ public function insteadof(...$traits) {
+ if ($this->type === self::TYPE_UNDEFINED) {
+ if (is_null($this->trait)) {
+ throw new \LogicException('Precedence adaptation must have trait');
+ }
+
+ $this->type = self::TYPE_PRECEDENCE;
+ }
+
+ if ($this->type !== self::TYPE_PRECEDENCE) {
+ throw new \LogicException('Cannot add overwritten traits for not precedence adaptation buider');
+ }
+
+ foreach ($traits as $trait) {
+ $this->insteadof[] = BuilderHelpers::normalizeName($trait);
+ }
+
+ return $this;
+ }
+
+ protected function setModifier(int $modifier) {
+ if ($this->type === self::TYPE_UNDEFINED) {
+ $this->type = self::TYPE_ALIAS;
+ }
+
+ if ($this->type !== self::TYPE_ALIAS) {
+ throw new \LogicException('Cannot set access modifier for not alias adaptation buider');
+ }
+
+ if (is_null($this->modifier)) {
+ $this->modifier = $modifier;
+ } else {
+ throw new \LogicException('Multiple access type modifiers are not allowed');
+ }
+ }
+
+ /**
+ * Returns the built node.
+ *
+ * @return Node The built node
+ */
+ public function getNode() : Node {
+ switch ($this->type) {
+ case self::TYPE_ALIAS:
+ return new Stmt\TraitUseAdaptation\Alias($this->trait, $this->method, $this->modifier, $this->alias);
+ case self::TYPE_PRECEDENCE:
+ return new Stmt\TraitUseAdaptation\Precedence($this->trait, $this->method, $this->insteadof);
+ default:
+ throw new \LogicException('Type of adaptation is not defined');
+ }
+ }
+}
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Builder/Trait_.php b/vendor/nikic/php-parser/lib/PhpParser/Builder/Trait_.php
new file mode 100644
index 00000000..97f32f98
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Builder/Trait_.php
@@ -0,0 +1,78 @@
+name = $name;
+ }
+
+ /**
+ * Adds a statement.
+ *
+ * @param Stmt|PhpParser\Builder $stmt The statement to add
+ *
+ * @return $this The builder instance (for fluid interface)
+ */
+ public function addStmt($stmt) {
+ $stmt = BuilderHelpers::normalizeNode($stmt);
+
+ if ($stmt instanceof Stmt\Property) {
+ $this->properties[] = $stmt;
+ } elseif ($stmt instanceof Stmt\ClassMethod) {
+ $this->methods[] = $stmt;
+ } elseif ($stmt instanceof Stmt\TraitUse) {
+ $this->uses[] = $stmt;
+ } else {
+ throw new \LogicException(sprintf('Unexpected node of type "%s"', $stmt->getType()));
+ }
+
+ return $this;
+ }
+
+ /**
+ * Adds an attribute group.
+ *
+ * @param Node\Attribute|Node\AttributeGroup $attribute
+ *
+ * @return $this The builder instance (for fluid interface)
+ */
+ public function addAttribute($attribute) {
+ $this->attributeGroups[] = BuilderHelpers::normalizeAttribute($attribute);
+
+ return $this;
+ }
+
+ /**
+ * Returns the built trait node.
+ *
+ * @return Stmt\Trait_ The built interface node
+ */
+ public function getNode() : PhpParser\Node {
+ return new Stmt\Trait_(
+ $this->name, [
+ 'stmts' => array_merge($this->uses, $this->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
new file mode 100644
index 00000000..4bd3d12d
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Builder/Use_.php
@@ -0,0 +1,49 @@
+name = BuilderHelpers::normalizeName($name);
+ $this->type = $type;
+ }
+
+ /**
+ * Sets alias for used name.
+ *
+ * @param string $alias Alias to use (last component of full name by default)
+ *
+ * @return $this The builder instance (for fluid interface)
+ */
+ public function as(string $alias) {
+ $this->alias = $alias;
+ return $this;
+ }
+
+ /**
+ * Returns the built node.
+ *
+ * @return Stmt\Use_ The built node
+ */
+ public function getNode() : Node {
+ return new Stmt\Use_([
+ new Stmt\UseUse($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
new file mode 100644
index 00000000..fef2579b
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/BuilderFactory.php
@@ -0,0 +1,399 @@
+args($args)
+ );
+ }
+
+ /**
+ * Creates a namespace builder.
+ *
+ * @param null|string|Node\Name $name Name of the namespace
+ *
+ * @return Builder\Namespace_ The created namespace builder
+ */
+ public function namespace($name) : Builder\Namespace_ {
+ return new Builder\Namespace_($name);
+ }
+
+ /**
+ * Creates a class builder.
+ *
+ * @param string $name Name of the class
+ *
+ * @return Builder\Class_ The created class builder
+ */
+ public function class(string $name) : Builder\Class_ {
+ return new Builder\Class_($name);
+ }
+
+ /**
+ * Creates an interface builder.
+ *
+ * @param string $name Name of the interface
+ *
+ * @return Builder\Interface_ The created interface builder
+ */
+ public function interface(string $name) : Builder\Interface_ {
+ return new Builder\Interface_($name);
+ }
+
+ /**
+ * Creates a trait builder.
+ *
+ * @param string $name Name of the trait
+ *
+ * @return Builder\Trait_ The created trait builder
+ */
+ public function trait(string $name) : Builder\Trait_ {
+ return new Builder\Trait_($name);
+ }
+
+ /**
+ * Creates an enum builder.
+ *
+ * @param string $name Name of the enum
+ *
+ * @return Builder\Enum_ The created enum builder
+ */
+ public function enum(string $name) : Builder\Enum_ {
+ return new Builder\Enum_($name);
+ }
+
+ /**
+ * Creates a trait use builder.
+ *
+ * @param Node\Name|string ...$traits Trait names
+ *
+ * @return Builder\TraitUse The create trait use builder
+ */
+ 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\Identifier|string $method Method name
+ *
+ * @return Builder\TraitUseAdaptation The create trait use adaptation builder
+ */
+ public function traitUseAdaptation($trait, $method = null) : Builder\TraitUseAdaptation {
+ if ($method === null) {
+ $method = $trait;
+ $trait = null;
+ }
+
+ return new Builder\TraitUseAdaptation($trait, $method);
+ }
+
+ /**
+ * Creates a method builder.
+ *
+ * @param string $name Name of the method
+ *
+ * @return Builder\Method The created method builder
+ */
+ public function method(string $name) : Builder\Method {
+ return new Builder\Method($name);
+ }
+
+ /**
+ * Creates a parameter builder.
+ *
+ * @param string $name Name of the parameter
+ *
+ * @return Builder\Param The created parameter builder
+ */
+ public function param(string $name) : Builder\Param {
+ return new Builder\Param($name);
+ }
+
+ /**
+ * Creates a property builder.
+ *
+ * @param string $name Name of the property
+ *
+ * @return Builder\Property The created property builder
+ */
+ public function property(string $name) : Builder\Property {
+ return new Builder\Property($name);
+ }
+
+ /**
+ * Creates a function builder.
+ *
+ * @param string $name Name of the function
+ *
+ * @return Builder\Function_ The created function builder
+ */
+ public function function(string $name) : Builder\Function_ {
+ return new Builder\Function_($name);
+ }
+
+ /**
+ * Creates a namespace/class use builder.
+ *
+ * @param Node\Name|string $name Name of the entity (namespace or class) to alias
+ *
+ * @return Builder\Use_ The created use builder
+ */
+ public function use($name) : Builder\Use_ {
+ return new Builder\Use_($name, Use_::TYPE_NORMAL);
+ }
+
+ /**
+ * Creates a function use builder.
+ *
+ * @param Node\Name|string $name Name of the function to alias
+ *
+ * @return Builder\Use_ The created use function builder
+ */
+ public function useFunction($name) : Builder\Use_ {
+ return new Builder\Use_($name, Use_::TYPE_FUNCTION);
+ }
+
+ /**
+ * Creates a constant use builder.
+ *
+ * @param Node\Name|string $name Name of the const to alias
+ *
+ * @return Builder\Use_ The created use const builder
+ */
+ 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 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 {
+ return new Builder\ClassConst($name, $value);
+ }
+
+ /**
+ * Creates an enum case builder.
+ *
+ * @param string|Identifier $name Name
+ *
+ * @return Builder\EnumCase The created use const builder
+ */
+ public function enumCase($name) : Builder\EnumCase {
+ return new Builder\EnumCase($name);
+ }
+
+ /**
+ * Creates node a for a literal value.
+ *
+ * @param Expr|bool|null|int|float|string|array $value $value
+ *
+ * @return Expr
+ */
+ public function val($value) : Expr {
+ return BuilderHelpers::normalizeValue($value);
+ }
+
+ /**
+ * Creates variable node.
+ *
+ * @param string|Expr $name Name
+ *
+ * @return Expr\Variable
+ */
+ public function var($name) : Expr\Variable {
+ if (!\is_string($name) && !$name instanceof Expr) {
+ throw new \LogicException('Variable name must be string or Expr');
+ }
+
+ return new Expr\Variable($name);
+ }
+
+ /**
+ * Normalizes an argument list.
+ *
+ * Creates Arg nodes for all arguments and converts literal values to expressions.
+ *
+ * @param array $args List of arguments to normalize
+ *
+ * @return Arg[]
+ */
+ public function args(array $args) : array {
+ $normalizedArgs = [];
+ foreach ($args as $key => $arg) {
+ if (!($arg instanceof Arg)) {
+ $arg = new Arg(BuilderHelpers::normalizeValue($arg));
+ }
+ if (\is_string($key)) {
+ $arg->name = BuilderHelpers::normalizeIdentifier($key);
+ }
+ $normalizedArgs[] = $arg;
+ }
+ return $normalizedArgs;
+ }
+
+ /**
+ * Creates a function call node.
+ *
+ * @param string|Name|Expr $name Function name
+ * @param array $args Function arguments
+ *
+ * @return Expr\FuncCall
+ */
+ public function funcCall($name, array $args = []) : Expr\FuncCall {
+ return new Expr\FuncCall(
+ BuilderHelpers::normalizeNameOrExpr($name),
+ $this->args($args)
+ );
+ }
+
+ /**
+ * Creates a method call node.
+ *
+ * @param Expr $var Variable the method is called on
+ * @param string|Identifier|Expr $name Method name
+ * @param array $args Method arguments
+ *
+ * @return Expr\MethodCall
+ */
+ public function methodCall(Expr $var, $name, array $args = []) : Expr\MethodCall {
+ return new Expr\MethodCall(
+ $var,
+ BuilderHelpers::normalizeIdentifierOrExpr($name),
+ $this->args($args)
+ );
+ }
+
+ /**
+ * Creates a static method call node.
+ *
+ * @param string|Name|Expr $class Class name
+ * @param string|Identifier|Expr $name Method name
+ * @param array $args Method arguments
+ *
+ * @return Expr\StaticCall
+ */
+ public function staticCall($class, $name, array $args = []) : Expr\StaticCall {
+ return new Expr\StaticCall(
+ BuilderHelpers::normalizeNameOrExpr($class),
+ BuilderHelpers::normalizeIdentifierOrExpr($name),
+ $this->args($args)
+ );
+ }
+
+ /**
+ * Creates an object creation node.
+ *
+ * @param string|Name|Expr $class Class name
+ * @param array $args Constructor arguments
+ *
+ * @return Expr\New_
+ */
+ public function new($class, array $args = []) : Expr\New_ {
+ return new Expr\New_(
+ BuilderHelpers::normalizeNameOrExpr($class),
+ $this->args($args)
+ );
+ }
+
+ /**
+ * Creates a constant fetch node.
+ *
+ * @param string|Name $name Constant name
+ *
+ * @return Expr\ConstFetch
+ */
+ public function constFetch($name) : Expr\ConstFetch {
+ return new Expr\ConstFetch(BuilderHelpers::normalizeName($name));
+ }
+
+ /**
+ * Creates a property fetch node.
+ *
+ * @param Expr $var Variable holding object
+ * @param string|Identifier|Expr $name Property name
+ *
+ * @return 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
+ */
+ public function classConstFetch($class, $name): Expr\ClassConstFetch {
+ return new Expr\ClassConstFetch(
+ BuilderHelpers::normalizeNameOrExpr($class),
+ BuilderHelpers::normalizeIdentifier($name)
+ );
+ }
+
+ /**
+ * Creates nested Concat nodes from a list of expressions.
+ *
+ * @param Expr|string ...$exprs Expressions or literal strings
+ *
+ * @return Concat
+ */
+ public function concat(...$exprs) : Concat {
+ $numExprs = count($exprs);
+ if ($numExprs < 2) {
+ throw new \LogicException('Expected at least two expressions');
+ }
+
+ $lastConcat = $this->normalizeStringExpr($exprs[0]);
+ for ($i = 1; $i < $numExprs; $i++) {
+ $lastConcat = new Concat($lastConcat, $this->normalizeStringExpr($exprs[$i]));
+ }
+ return $lastConcat;
+ }
+
+ /**
+ * @param string|Expr $expr
+ * @return Expr
+ */
+ private function normalizeStringExpr($expr) : Expr {
+ if ($expr instanceof Expr) {
+ return $expr;
+ }
+
+ if (\is_string($expr)) {
+ return new String_($expr);
+ }
+
+ throw new \LogicException('Expected string or Expr');
+ }
+}
diff --git a/vendor/nikic/php-parser/lib/PhpParser/BuilderHelpers.php b/vendor/nikic/php-parser/lib/PhpParser/BuilderHelpers.php
new file mode 100644
index 00000000..af6ceb99
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/BuilderHelpers.php
@@ -0,0 +1,335 @@
+getNode();
+ }
+
+ if ($node instanceof Node) {
+ return $node;
+ }
+
+ throw new \LogicException('Expected node or builder object');
+ }
+
+ /**
+ * Normalizes a node to a statement.
+ *
+ * Expressions are wrapped in a Stmt\Expression node.
+ *
+ * @param Node|Builder $node The node to normalize
+ *
+ * @return Stmt The normalized statement node
+ */
+ public static function normalizeStmt($node) : Stmt {
+ $node = self::normalizeNode($node);
+ if ($node instanceof Stmt) {
+ return $node;
+ }
+
+ if ($node instanceof Expr) {
+ return new Stmt\Expression($node);
+ }
+
+ throw new \LogicException('Expected statement or expression node');
+ }
+
+ /**
+ * Normalizes strings to Identifier.
+ *
+ * @param string|Identifier $name The identifier to normalize
+ *
+ * @return Identifier The normalized identifier
+ */
+ public static function normalizeIdentifier($name) : Identifier {
+ if ($name instanceof Identifier) {
+ return $name;
+ }
+
+ if (\is_string($name)) {
+ return new Identifier($name);
+ }
+
+ throw new \LogicException('Expected string or instance of Node\Identifier');
+ }
+
+ /**
+ * Normalizes strings to Identifier, also allowing expressions.
+ *
+ * @param string|Identifier|Expr $name The identifier to normalize
+ *
+ * @return Identifier|Expr The normalized identifier or expression
+ */
+ public static function normalizeIdentifierOrExpr($name) {
+ if ($name instanceof Identifier || $name instanceof Expr) {
+ return $name;
+ }
+
+ if (\is_string($name)) {
+ return new Identifier($name);
+ }
+
+ throw new \LogicException('Expected string or instance of Node\Identifier or Node\Expr');
+ }
+
+ /**
+ * Normalizes a name: Converts string names to Name nodes.
+ *
+ * @param Name|string $name The name to normalize
+ *
+ * @return Name The normalized name
+ */
+ public static function normalizeName($name) : Name {
+ if ($name instanceof Name) {
+ return $name;
+ }
+
+ if (is_string($name)) {
+ if (!$name) {
+ throw new \LogicException('Name cannot be empty');
+ }
+
+ if ($name[0] === '\\') {
+ return new Name\FullyQualified(substr($name, 1));
+ }
+
+ if (0 === strpos($name, 'namespace\\')) {
+ return new Name\Relative(substr($name, strlen('namespace\\')));
+ }
+
+ return new Name($name);
+ }
+
+ throw new \LogicException('Name must be a string or an instance of Node\Name');
+ }
+
+ /**
+ * Normalizes a name: Converts string names to Name nodes, while also allowing expressions.
+ *
+ * @param Expr|Name|string $name The name to normalize
+ *
+ * @return Name|Expr The normalized name or expression
+ */
+ public static function normalizeNameOrExpr($name) {
+ if ($name instanceof Expr) {
+ return $name;
+ }
+
+ if (!is_string($name) && !($name instanceof Name)) {
+ throw new \LogicException(
+ 'Name must be a string or an instance of Node\Name or Node\Expr'
+ );
+ }
+
+ return self::normalizeName($name);
+ }
+
+ /**
+ * Normalizes a type: Converts plain-text type names into proper AST representation.
+ *
+ * In particular, builtin types become Identifiers, custom types become Names and nullables
+ * are wrapped in NullableType nodes.
+ *
+ * @param string|Name|Identifier|ComplexType $type The type to normalize
+ *
+ * @return Name|Identifier|ComplexType The normalized type
+ */
+ public static function normalizeType($type) {
+ if (!is_string($type)) {
+ if (
+ !$type instanceof Name && !$type instanceof Identifier &&
+ !$type instanceof ComplexType
+ ) {
+ throw new \LogicException(
+ 'Type must be a string, or an instance of Name, Identifier or ComplexType'
+ );
+ }
+ return $type;
+ }
+
+ $nullable = false;
+ if (strlen($type) > 0 && $type[0] === '?') {
+ $nullable = true;
+ $type = substr($type, 1);
+ }
+
+ $builtinTypes = [
+ 'array',
+ 'callable',
+ 'bool',
+ 'int',
+ 'float',
+ 'string',
+ 'iterable',
+ 'void',
+ 'object',
+ 'null',
+ 'false',
+ 'mixed',
+ 'never',
+ 'true',
+ ];
+
+ $lowerType = strtolower($type);
+ if (in_array($lowerType, $builtinTypes)) {
+ $type = new Identifier($lowerType);
+ } else {
+ $type = self::normalizeName($type);
+ }
+
+ $notNullableTypes = [
+ 'void', 'mixed', 'never',
+ ];
+ if ($nullable && in_array((string) $type, $notNullableTypes)) {
+ throw new \LogicException(sprintf('%s type cannot be nullable', $type));
+ }
+
+ return $nullable ? new NullableType($type) : $type;
+ }
+
+ /**
+ * Normalizes a value: Converts nulls, booleans, integers,
+ * floats, strings and arrays into their respective nodes
+ *
+ * @param Node\Expr|bool|null|int|float|string|array $value The value to normalize
+ *
+ * @return Expr The normalized value
+ */
+ public static function normalizeValue($value) : Expr {
+ if ($value instanceof Node\Expr) {
+ return $value;
+ }
+
+ if (is_null($value)) {
+ return new Expr\ConstFetch(
+ new Name('null')
+ );
+ }
+
+ if (is_bool($value)) {
+ return new Expr\ConstFetch(
+ new Name($value ? 'true' : 'false')
+ );
+ }
+
+ if (is_int($value)) {
+ return new Scalar\LNumber($value);
+ }
+
+ if (is_float($value)) {
+ return new Scalar\DNumber($value);
+ }
+
+ if (is_string($value)) {
+ return new Scalar\String_($value);
+ }
+
+ if (is_array($value)) {
+ $items = [];
+ $lastKey = -1;
+ foreach ($value as $itemKey => $itemValue) {
+ // for consecutive, numeric keys don't generate keys
+ if (null !== $lastKey && ++$lastKey === $itemKey) {
+ $items[] = new Expr\ArrayItem(
+ self::normalizeValue($itemValue)
+ );
+ } else {
+ $lastKey = null;
+ $items[] = new Expr\ArrayItem(
+ self::normalizeValue($itemValue),
+ self::normalizeValue($itemKey)
+ );
+ }
+ }
+
+ return new Expr\Array_($items);
+ }
+
+ throw new \LogicException('Invalid value');
+ }
+
+ /**
+ * Normalizes a doc comment: Converts plain strings to PhpParser\Comment\Doc.
+ *
+ * @param Comment\Doc|string $docComment The doc comment to normalize
+ *
+ * @return Comment\Doc The normalized doc comment
+ */
+ public static function normalizeDocComment($docComment) : Comment\Doc {
+ if ($docComment instanceof Comment\Doc) {
+ return $docComment;
+ }
+
+ if (is_string($docComment)) {
+ return new Comment\Doc($docComment);
+ }
+
+ throw new \LogicException('Doc comment must be a string or an instance of PhpParser\Comment\Doc');
+ }
+
+ /**
+ * Normalizes a attribute: Converts attribute to the Attribute Group if needed.
+ *
+ * @param Node\Attribute|Node\AttributeGroup $attribute
+ *
+ * @return Node\AttributeGroup The Attribute Group
+ */
+ public static function normalizeAttribute($attribute) : Node\AttributeGroup
+ {
+ if ($attribute instanceof Node\AttributeGroup) {
+ return $attribute;
+ }
+
+ if (!($attribute instanceof Node\Attribute)) {
+ throw new \LogicException('Attribute must be an instance of PhpParser\Node\Attribute or PhpParser\Node\AttributeGroup');
+ }
+
+ return new Node\AttributeGroup([$attribute]);
+ }
+
+ /**
+ * Adds a modifier and returns new modifier bitmask.
+ *
+ * @param int $modifiers Existing modifiers
+ * @param int $modifier Modifier to set
+ *
+ * @return int New modifiers
+ */
+ public static function addModifier(int $modifiers, int $modifier) : int {
+ Stmt\Class_::verifyModifier($modifiers, $modifier);
+ return $modifiers | $modifier;
+ }
+
+ /**
+ * Adds a modifier and returns new modifier bitmask.
+ * @return int New modifiers
+ */
+ public static function addClassModifier(int $existingModifiers, int $modifierToSet) : int {
+ Stmt\Class_::verifyClassModifier($existingModifiers, $modifierToSet);
+ return $existingModifiers | $modifierToSet;
+ }
+}
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Comment.php b/vendor/nikic/php-parser/lib/PhpParser/Comment.php
new file mode 100644
index 00000000..61e98d3d
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Comment.php
@@ -0,0 +1,239 @@
+text = $text;
+ $this->startLine = $startLine;
+ $this->startFilePos = $startFilePos;
+ $this->startTokenPos = $startTokenPos;
+ $this->endLine = $endLine;
+ $this->endFilePos = $endFilePos;
+ $this->endTokenPos = $endTokenPos;
+ }
+
+ /**
+ * Gets the comment text.
+ *
+ * @return string The comment text (including comment delimiters like /*)
+ */
+ public function getText() : string {
+ return $this->text;
+ }
+
+ /**
+ * Gets the line number the comment started on.
+ *
+ * @return int Line number (or -1 if not available)
+ */
+ public function getStartLine() : int {
+ return $this->startLine;
+ }
+
+ /**
+ * Gets the file offset the comment started on.
+ *
+ * @return int File offset (or -1 if not available)
+ */
+ public function getStartFilePos() : int {
+ return $this->startFilePos;
+ }
+
+ /**
+ * Gets the token offset the comment started on.
+ *
+ * @return int Token offset (or -1 if not available)
+ */
+ public function getStartTokenPos() : int {
+ return $this->startTokenPos;
+ }
+
+ /**
+ * Gets the line number the comment ends on.
+ *
+ * @return int Line number (or -1 if not available)
+ */
+ public function getEndLine() : int {
+ return $this->endLine;
+ }
+
+ /**
+ * Gets the file offset the comment ends on.
+ *
+ * @return int File offset (or -1 if not available)
+ */
+ public function getEndFilePos() : int {
+ return $this->endFilePos;
+ }
+
+ /**
+ * Gets the token offset the comment ends on.
+ *
+ * @return int Token offset (or -1 if not available)
+ */
+ 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 {
+ return $this->text;
+ }
+
+ /**
+ * Gets the reformatted comment text.
+ *
+ * "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
+ * on all subsequent lines.
+ *
+ * @return mixed|string
+ */
+ public function getReformattedText() {
+ $text = trim($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)) {
+ // Multi line comment of the type
+ //
+ // /*
+ // * Some text.
+ // * Some more text.
+ // */
+ //
+ // 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)) {
+ // Multi line comment of the type
+ //
+ // /*
+ // Some text.
+ // Some more text.
+ // */
+ //
+ // is handled by removing the whitespace sequence on the line before the closing
+ // */ 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)) {
+ // Multi line comment of the type
+ //
+ // /* Some text.
+ // Some more text.
+ // Indented text.
+ // Even more text. */
+ //
+ // is handled by removing the difference between the shortest whitespace prefix on all
+ // lines and the length of the "/* " opening sequence.
+ $prefixLen = $this->getShortestWhitespacePrefixLen(substr($text, $newlinePos + 1));
+ $removeLen = $prefixLen - strlen($matches[0]);
+ return preg_replace('(^\s{' . $removeLen . '})m', '', $text);
+ }
+
+ // No idea how to format this comment, so simply return as is
+ return $text;
+ }
+
+ /**
+ * Get length of shortest whitespace prefix (at the start of a line).
+ *
+ * If there is a line with no prefix whitespace, 0 is a valid return value.
+ *
+ * @param string $str String to check
+ * @return int Length in characters. Tabs count as single characters.
+ */
+ private function getShortestWhitespacePrefixLen(string $str) : int {
+ $lines = explode("\n", $str);
+ $shortestPrefixLen = \INF;
+ foreach ($lines as $line) {
+ preg_match('(^\s*)', $line, $matches);
+ $prefixLen = strlen($matches[0]);
+ if ($prefixLen < $shortestPrefixLen) {
+ $shortestPrefixLen = $prefixLen;
+ }
+ }
+ return $shortestPrefixLen;
+ }
+
+ /**
+ * @return array
+ * @psalm-return array{nodeType:string, text:mixed, line:mixed, filePos:mixed}
+ */
+ 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 [
+ 'nodeType' => $type,
+ 'text' => $this->text,
+ // TODO: Rename these to include "start".
+ 'line' => $this->startLine,
+ 'filePos' => $this->startFilePos,
+ 'tokenPos' => $this->startTokenPos,
+ 'endLine' => $this->endLine,
+ 'endFilePos' => $this->endFilePos,
+ 'endTokenPos' => $this->endTokenPos,
+ ];
+ }
+}
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Comment/Doc.php b/vendor/nikic/php-parser/lib/PhpParser/Comment/Doc.php
new file mode 100644
index 00000000..a9db6128
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Comment/Doc.php
@@ -0,0 +1,7 @@
+fallbackEvaluator = $fallbackEvaluator ?? function(Expr $expr) {
+ throw new ConstExprEvaluationException(
+ "Expression of type {$expr->getType()} cannot be evaluated"
+ );
+ };
+ }
+
+ /**
+ * Silently evaluates a constant expression into a PHP value.
+ *
+ * Thrown Errors, warnings or notices will be converted into a ConstExprEvaluationException.
+ * The original source of the exception is available through getPrevious().
+ *
+ * If some part of the expression cannot be evaluated, the fallback evaluator passed to the
+ * constructor will be invoked. By default, if no fallback is provided, an exception of type
+ * ConstExprEvaluationException is thrown.
+ *
+ * See class doc comment for caveats and limitations.
+ *
+ * @param Expr $expr Constant expression to evaluate
+ * @return mixed Result of evaluation
+ *
+ * @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) {
+ throw new \ErrorException($str, 0, $num, $file, $line);
+ });
+
+ try {
+ return $this->evaluate($expr);
+ } catch (\Throwable $e) {
+ if (!$e instanceof ConstExprEvaluationException) {
+ $e = new ConstExprEvaluationException(
+ "An error occurred during constant expression evaluation", 0, $e);
+ }
+ throw $e;
+ } finally {
+ restore_error_handler();
+ }
+ }
+
+ /**
+ * Directly evaluates a constant expression into a PHP value.
+ *
+ * May generate Error exceptions, warnings or notices. Use evaluateSilently() to convert these
+ * into a ConstExprEvaluationException.
+ *
+ * If some part of the expression cannot be evaluated, the fallback evaluator passed to the
+ * constructor will be invoked. By default, if no fallback is provided, an exception of type
+ * ConstExprEvaluationException is thrown.
+ *
+ * See class doc comment for caveats and limitations.
+ *
+ * @param Expr $expr Constant expression to evaluate
+ * @return mixed Result of evaluation
+ *
+ * @throws ConstExprEvaluationException if the expression cannot be evaluated
+ */
+ public function evaluateDirectly(Expr $expr) {
+ return $this->evaluate($expr);
+ }
+
+ private function evaluate(Expr $expr) {
+ if ($expr instanceof Scalar\LNumber
+ || $expr instanceof Scalar\DNumber
+ || $expr instanceof Scalar\String_
+ ) {
+ return $expr->value;
+ }
+
+ if ($expr instanceof Expr\Array_) {
+ return $this->evaluateArray($expr);
+ }
+
+ // Unary operators
+ if ($expr instanceof Expr\UnaryPlus) {
+ return +$this->evaluate($expr->expr);
+ }
+ if ($expr instanceof Expr\UnaryMinus) {
+ return -$this->evaluate($expr->expr);
+ }
+ if ($expr instanceof Expr\BooleanNot) {
+ return !$this->evaluate($expr->expr);
+ }
+ if ($expr instanceof Expr\BitwiseNot) {
+ return ~$this->evaluate($expr->expr);
+ }
+
+ if ($expr instanceof Expr\BinaryOp) {
+ return $this->evaluateBinaryOp($expr);
+ }
+
+ if ($expr instanceof Expr\Ternary) {
+ return $this->evaluateTernary($expr);
+ }
+
+ if ($expr instanceof Expr\ArrayDimFetch && null !== $expr->dim) {
+ return $this->evaluate($expr->var)[$this->evaluate($expr->dim)];
+ }
+
+ if ($expr instanceof Expr\ConstFetch) {
+ return $this->evaluateConstFetch($expr);
+ }
+
+ return ($this->fallbackEvaluator)($expr);
+ }
+
+ private function evaluateArray(Expr\Array_ $expr) {
+ $array = [];
+ foreach ($expr->items as $item) {
+ if (null !== $item->key) {
+ $array[$this->evaluate($item->key)] = $this->evaluate($item->value);
+ } elseif ($item->unpack) {
+ $array = array_merge($array, $this->evaluate($item->value));
+ } else {
+ $array[] = $this->evaluate($item->value);
+ }
+ }
+ return $array;
+ }
+
+ private function evaluateTernary(Expr\Ternary $expr) {
+ if (null === $expr->if) {
+ return $this->evaluate($expr->cond) ?: $this->evaluate($expr->else);
+ }
+
+ return $this->evaluate($expr->cond)
+ ? $this->evaluate($expr->if)
+ : $this->evaluate($expr->else);
+ }
+
+ private function evaluateBinaryOp(Expr\BinaryOp $expr) {
+ if ($expr instanceof Expr\BinaryOp\Coalesce
+ && $expr->left instanceof Expr\ArrayDimFetch
+ ) {
+ // This needs to be special cased to respect BP_VAR_IS fetch semantics
+ return $this->evaluate($expr->left->var)[$this->evaluate($expr->left->dim)]
+ ?? $this->evaluate($expr->right);
+ }
+
+ // The evaluate() calls are repeated in each branch, because some of the operators are
+ // short-circuiting and evaluating the RHS in advance may be illegal in that case
+ $l = $expr->left;
+ $r = $expr->right;
+ switch ($expr->getOperatorSigil()) {
+ case '&': return $this->evaluate($l) & $this->evaluate($r);
+ case '|': return $this->evaluate($l) | $this->evaluate($r);
+ case '^': return $this->evaluate($l) ^ $this->evaluate($r);
+ case '&&': return $this->evaluate($l) && $this->evaluate($r);
+ case '||': return $this->evaluate($l) || $this->evaluate($r);
+ case '??': return $this->evaluate($l) ?? $this->evaluate($r);
+ case '.': return $this->evaluate($l) . $this->evaluate($r);
+ case '/': return $this->evaluate($l) / $this->evaluate($r);
+ case '==': return $this->evaluate($l) == $this->evaluate($r);
+ case '>': return $this->evaluate($l) > $this->evaluate($r);
+ case '>=': return $this->evaluate($l) >= $this->evaluate($r);
+ case '===': return $this->evaluate($l) === $this->evaluate($r);
+ case 'and': return $this->evaluate($l) and $this->evaluate($r);
+ case 'or': return $this->evaluate($l) or $this->evaluate($r);
+ case 'xor': return $this->evaluate($l) xor $this->evaluate($r);
+ case '-': return $this->evaluate($l) - $this->evaluate($r);
+ case '%': return $this->evaluate($l) % $this->evaluate($r);
+ case '*': return $this->evaluate($l) * $this->evaluate($r);
+ case '!=': return $this->evaluate($l) != $this->evaluate($r);
+ case '!==': return $this->evaluate($l) !== $this->evaluate($r);
+ case '+': return $this->evaluate($l) + $this->evaluate($r);
+ case '**': return $this->evaluate($l) ** $this->evaluate($r);
+ case '<<': return $this->evaluate($l) << $this->evaluate($r);
+ case '>>': return $this->evaluate($l) >> $this->evaluate($r);
+ case '<': return $this->evaluate($l) < $this->evaluate($r);
+ case '<=': return $this->evaluate($l) <= $this->evaluate($r);
+ case '<=>': return $this->evaluate($l) <=> $this->evaluate($r);
+ }
+
+ throw new \Exception('Should not happen');
+ }
+
+ private function evaluateConstFetch(Expr\ConstFetch $expr) {
+ $name = $expr->name->toLowerString();
+ switch ($name) {
+ case 'null': return null;
+ case 'false': return false;
+ case 'true': return true;
+ }
+
+ return ($this->fallbackEvaluator)($expr);
+ }
+}
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Error.php b/vendor/nikic/php-parser/lib/PhpParser/Error.php
new file mode 100644
index 00000000..d1fb959d
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Error.php
@@ -0,0 +1,180 @@
+rawMessage = $message;
+ if (is_array($attributes)) {
+ $this->attributes = $attributes;
+ } else {
+ $this->attributes = ['startLine' => $attributes];
+ }
+ $this->updateMessage();
+ }
+
+ /**
+ * Gets the error message
+ *
+ * @return string Error message
+ */
+ public function getRawMessage() : string {
+ return $this->rawMessage;
+ }
+
+ /**
+ * Gets the line the error starts in.
+ *
+ * @return int Error start line
+ */
+ public function getStartLine() : int {
+ return $this->attributes['startLine'] ?? -1;
+ }
+
+ /**
+ * Gets the line the error ends in.
+ *
+ * @return int Error end line
+ */
+ public function getEndLine() : int {
+ return $this->attributes['endLine'] ?? -1;
+ }
+
+ /**
+ * Gets the attributes of the node/token the error occurred at.
+ *
+ * @return array
+ */
+ public function getAttributes() : array {
+ return $this->attributes;
+ }
+
+ /**
+ * Sets the attributes of the node/token the error occurred at.
+ *
+ * @param array $attributes
+ */
+ public function setAttributes(array $attributes) {
+ $this->attributes = $attributes;
+ $this->updateMessage();
+ }
+
+ /**
+ * Sets the line of the PHP file the error occurred in.
+ *
+ * @param string $message Error message
+ */
+ public function setRawMessage(string $message) {
+ $this->rawMessage = $message;
+ $this->updateMessage();
+ }
+
+ /**
+ * Sets the line the error starts in.
+ *
+ * @param int $line Error start line
+ */
+ public function setStartLine(int $line) {
+ $this->attributes['startLine'] = $line;
+ $this->updateMessage();
+ }
+
+ /**
+ * Returns whether the error has start and end column information.
+ *
+ * For column information enable the startFilePos and endFilePos in the lexer options.
+ *
+ * @return bool
+ */
+ public function hasColumnInfo() : bool {
+ return isset($this->attributes['startFilePos'], $this->attributes['endFilePos']);
+ }
+
+ /**
+ * Gets the start column (1-based) into the line where the error started.
+ *
+ * @param string $code Source code of the file
+ * @return int
+ */
+ public function getStartColumn(string $code) : int {
+ if (!$this->hasColumnInfo()) {
+ throw new \RuntimeException('Error does not have column information');
+ }
+
+ return $this->toColumn($code, $this->attributes['startFilePos']);
+ }
+
+ /**
+ * Gets the end column (1-based) into the line where the error ended.
+ *
+ * @param string $code Source code of the file
+ * @return int
+ */
+ public function getEndColumn(string $code) : int {
+ if (!$this->hasColumnInfo()) {
+ throw new \RuntimeException('Error does not have column information');
+ }
+
+ return $this->toColumn($code, $this->attributes['endFilePos']);
+ }
+
+ /**
+ * Formats message including line and column information.
+ *
+ * @param string $code Source code associated with the error, for calculation of the columns
+ *
+ * @return string Formatted message
+ */
+ public function getMessageWithColumnInfo(string $code) : string {
+ return sprintf(
+ '%s from %d:%d to %d:%d', $this->getRawMessage(),
+ $this->getStartLine(), $this->getStartColumn($code),
+ $this->getEndLine(), $this->getEndColumn($code)
+ );
+ }
+
+ /**
+ * Converts a file offset into a column.
+ *
+ * @param string $code Source code that $pos indexes into
+ * @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 {
+ if ($pos > strlen($code)) {
+ throw new \RuntimeException('Invalid position information');
+ }
+
+ $lineStartPos = strrpos($code, "\n", $pos - strlen($code));
+ if (false === $lineStartPos) {
+ $lineStartPos = -1;
+ }
+
+ return $pos - $lineStartPos;
+ }
+
+ /**
+ * Updates the exception message after a change to rawMessage or rawLine.
+ */
+ protected function updateMessage() {
+ $this->message = $this->rawMessage;
+
+ if (-1 === $this->getStartLine()) {
+ $this->message .= ' on unknown line';
+ } else {
+ $this->message .= ' on line ' . $this->getStartLine();
+ }
+ }
+}
diff --git a/vendor/nikic/php-parser/lib/PhpParser/ErrorHandler.php b/vendor/nikic/php-parser/lib/PhpParser/ErrorHandler.php
new file mode 100644
index 00000000..d620e745
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/ErrorHandler.php
@@ -0,0 +1,13 @@
+errors[] = $error;
+ }
+
+ /**
+ * Get collected errors.
+ *
+ * @return Error[]
+ */
+ public function getErrors() : array {
+ return $this->errors;
+ }
+
+ /**
+ * Check whether there are any errors.
+ *
+ * @return bool
+ */
+ public function hasErrors() : bool {
+ return !empty($this->errors);
+ }
+
+ /**
+ * Reset/clear collected errors.
+ */
+ public function clearErrors() {
+ $this->errors = [];
+ }
+}
diff --git a/vendor/nikic/php-parser/lib/PhpParser/ErrorHandler/Throwing.php b/vendor/nikic/php-parser/lib/PhpParser/ErrorHandler/Throwing.php
new file mode 100644
index 00000000..aeee989b
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/ErrorHandler/Throwing.php
@@ -0,0 +1,18 @@
+type = $type;
+ $this->old = $old;
+ $this->new = $new;
+ }
+}
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Internal/Differ.php b/vendor/nikic/php-parser/lib/PhpParser/Internal/Differ.php
new file mode 100644
index 00000000..7f218c74
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Internal/Differ.php
@@ -0,0 +1,164 @@
+isEqual = $isEqual;
+ }
+
+ /**
+ * Calculate diff (edit script) from $old to $new.
+ *
+ * @param array $old Original array
+ * @param array $new New array
+ *
+ * @return DiffElem[] Diff (edit script)
+ */
+ public function diff(array $old, array $new) {
+ list($trace, $x, $y) = $this->calculateTrace($old, $new);
+ return $this->extractDiff($trace, $x, $y, $old, $new);
+ }
+
+ /**
+ * Calculate diff, including "replace" operations.
+ *
+ * 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
+ *
+ * @return DiffElem[] Diff (edit script), including replace operations
+ */
+ public function diffWithReplacements(array $old, array $new) {
+ return $this->coalesceReplacements($this->diff($old, $new));
+ }
+
+ private function calculateTrace(array $a, array $b) {
+ $n = \count($a);
+ $m = \count($b);
+ $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];
+ } else {
+ $x = $v[$k-1] + 1;
+ }
+
+ $y = $x - $k;
+ while ($x < $n && $y < $m && ($this->isEqual)($a[$x], $b[$y])) {
+ $x++;
+ $y++;
+ }
+
+ $v[$k] = $x;
+ if ($x >= $n && $y >= $m) {
+ return [$trace, $x, $y];
+ }
+ }
+ }
+ throw new \Exception('Should not happen');
+ }
+
+ private function extractDiff(array $trace, int $x, int $y, array $a, array $b) {
+ $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])) {
+ $prevK = $k + 1;
+ } else {
+ $prevK = $k - 1;
+ }
+
+ $prevX = $v[$prevK];
+ $prevY = $prevX - $prevK;
+
+ while ($x > $prevX && $y > $prevY) {
+ $result[] = new DiffElem(DiffElem::TYPE_KEEP, $a[$x-1], $b[$y-1]);
+ $x--;
+ $y--;
+ }
+
+ if ($d === 0) {
+ break;
+ }
+
+ while ($x > $prevX) {
+ $result[] = new DiffElem(DiffElem::TYPE_REMOVE, $a[$x-1], null);
+ $x--;
+ }
+
+ while ($y > $prevY) {
+ $result[] = new DiffElem(DiffElem::TYPE_ADD, null, $b[$y-1]);
+ $y--;
+ }
+ }
+ return array_reverse($result);
+ }
+
+ /**
+ * Coalesce equal-length sequences of remove+add into a replace operation.
+ *
+ * @param DiffElem[] $diff
+ * @return DiffElem[]
+ */
+ private function coalesceReplacements(array $diff) {
+ $newDiff = [];
+ $c = \count($diff);
+ for ($i = 0; $i < $c; $i++) {
+ $diffType = $diff[$i]->type;
+ if ($diffType !== DiffElem::TYPE_REMOVE) {
+ $newDiff[] = $diff[$i];
+ continue;
+ }
+
+ $j = $i;
+ while ($j < $c && $diff[$j]->type === DiffElem::TYPE_REMOVE) {
+ $j++;
+ }
+
+ $k = $j;
+ while ($k < $c && $diff[$k]->type === DiffElem::TYPE_ADD) {
+ $k++;
+ }
+
+ if ($j - $i === $k - $j) {
+ $len = $j - $i;
+ for ($n = 0; $n < $len; $n++) {
+ $newDiff[] = new DiffElem(
+ DiffElem::TYPE_REPLACE, $diff[$i + $n]->old, $diff[$j + $n]->new
+ );
+ }
+ } else {
+ for (; $i < $k; $i++) {
+ $newDiff[] = $diff[$i];
+ }
+ }
+ $i = $k - 1;
+ }
+ return $newDiff;
+ }
+}
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Internal/PrintableNewAnonClassNode.php b/vendor/nikic/php-parser/lib/PhpParser/Internal/PrintableNewAnonClassNode.php
new file mode 100644
index 00000000..3eeac04a
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Internal/PrintableNewAnonClassNode.php
@@ -0,0 +1,61 @@
+attrGroups = $attrGroups;
+ $this->args = $args;
+ $this->extends = $extends;
+ $this->implements = $implements;
+ $this->stmts = $stmts;
+ }
+
+ public static function fromNewNode(Expr\New_ $newNode) {
+ $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->stmts, $newNode->getAttributes()
+ );
+ }
+
+ public function getType() : string {
+ return 'Expr_PrintableNewAnonClass';
+ }
+
+ public function getSubNodeNames() : array {
+ return ['attrGroups', '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
new file mode 100644
index 00000000..7e0a5de0
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Internal/TokenStream.php
@@ -0,0 +1,286 @@
+tokens = $tokens;
+ $this->indentMap = $this->calcIndentMap();
+ }
+
+ /**
+ * Whether the given position is immediately surrounded by parenthesis.
+ *
+ * @param int $startPos Start position
+ * @param int $endPos End position
+ *
+ * @return bool
+ */
+ public function haveParens(int $startPos, int $endPos) : bool {
+ return $this->haveTokenImmediatelyBefore($startPos, '(')
+ && $this->haveTokenImmediatelyAfter($endPos, ')');
+ }
+
+ /**
+ * Whether the given position is immediately surrounded by braces.
+ *
+ * @param int $startPos Start position
+ * @param int $endPos End position
+ *
+ * @return bool
+ */
+ public function haveBraces(int $startPos, int $endPos) : bool {
+ return ($this->haveTokenImmediatelyBefore($startPos, '{')
+ || $this->haveTokenImmediatelyBefore($startPos, T_CURLY_OPEN))
+ && $this->haveTokenImmediatelyAfter($endPos, '}');
+ }
+
+ /**
+ * Check whether the position is directly preceded by a certain token type.
+ *
+ * During this check whitespace and comments are skipped.
+ *
+ * @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 {
+ $tokens = $this->tokens;
+ $pos--;
+ for (; $pos >= 0; $pos--) {
+ $tokenType = $tokens[$pos][0];
+ if ($tokenType === $expectedTokenType) {
+ return true;
+ }
+ if ($tokenType !== \T_WHITESPACE
+ && $tokenType !== \T_COMMENT && $tokenType !== \T_DOC_COMMENT) {
+ break;
+ }
+ }
+ return false;
+ }
+
+ /**
+ * Check whether the position is directly followed by a certain token type.
+ *
+ * During this check whitespace and comments are skipped.
+ *
+ * @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 {
+ $tokens = $this->tokens;
+ $pos++;
+ for (; $pos < \count($tokens); $pos++) {
+ $tokenType = $tokens[$pos][0];
+ if ($tokenType === $expectedTokenType) {
+ return true;
+ }
+ if ($tokenType !== \T_WHITESPACE
+ && $tokenType !== \T_COMMENT && $tokenType !== \T_DOC_COMMENT) {
+ break;
+ }
+ }
+ return false;
+ }
+
+ public function skipLeft(int $pos, $skipTokenType) {
+ $tokens = $this->tokens;
+
+ $pos = $this->skipLeftWhitespace($pos);
+ if ($skipTokenType === \T_WHITESPACE) {
+ return $pos;
+ }
+
+ if ($tokens[$pos][0] !== $skipTokenType) {
+ // Shouldn't happen. The skip token MUST be there
+ throw new \Exception('Encountered unexpected token');
+ }
+ $pos--;
+
+ return $this->skipLeftWhitespace($pos);
+ }
+
+ public function skipRight(int $pos, $skipTokenType) {
+ $tokens = $this->tokens;
+
+ $pos = $this->skipRightWhitespace($pos);
+ if ($skipTokenType === \T_WHITESPACE) {
+ return $pos;
+ }
+
+ if ($tokens[$pos][0] !== $skipTokenType) {
+ // Shouldn't happen. The skip token MUST be there
+ throw new \Exception('Encountered unexpected token');
+ }
+ $pos++;
+
+ return $this->skipRightWhitespace($pos);
+ }
+
+ /**
+ * Return first non-whitespace token position smaller or equal to passed position.
+ *
+ * @param int $pos Token position
+ * @return int Non-whitespace token position
+ */
+ public function skipLeftWhitespace(int $pos) {
+ $tokens = $this->tokens;
+ for (; $pos >= 0; $pos--) {
+ $type = $tokens[$pos][0];
+ if ($type !== \T_WHITESPACE && $type !== \T_COMMENT && $type !== \T_DOC_COMMENT) {
+ break;
+ }
+ }
+ return $pos;
+ }
+
+ /**
+ * Return first non-whitespace position greater or equal to passed position.
+ *
+ * @param int $pos Token position
+ * @return int Non-whitespace token position
+ */
+ public function skipRightWhitespace(int $pos) {
+ $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) {
+ break;
+ }
+ }
+ return $pos;
+ }
+
+ public function findRight(int $pos, $findTokenType) {
+ $tokens = $this->tokens;
+ for ($count = \count($tokens); $pos < $count; $pos++) {
+ $type = $tokens[$pos][0];
+ if ($type === $findTokenType) {
+ return $pos;
+ }
+ }
+ return -1;
+ }
+
+ /**
+ * Whether the given position range contains a certain token type.
+ *
+ * @param int $startPos Starting position (inclusive)
+ * @param int $endPos Ending position (exclusive)
+ * @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) {
+ $tokens = $this->tokens;
+ for ($pos = $startPos; $pos < $endPos; $pos++) {
+ if ($tokens[$pos][0] === $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);
+ }
+
+ /**
+ * Get indentation before token position.
+ *
+ * @param int $pos Token position
+ *
+ * @return int Indentation depth (in spaces)
+ */
+ 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 $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 {
+ $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;
+ }
+ }
+ } else {
+ $result .= $token;
+ }
+ }
+ return $result;
+ }
+
+ /**
+ * Precalculate the indentation at every token position.
+ *
+ * @return int[] Token position to indentation map
+ */
+ private function calcIndentMap() {
+ $indentMap = [];
+ $indent = 0;
+ foreach ($this->tokens as $token) {
+ $indentMap[] = $indent;
+
+ if ($token[0] === \T_WHITESPACE) {
+ $content = $token[1];
+ $newlinePos = \strrpos($content, "\n");
+ if (false !== $newlinePos) {
+ $indent = \strlen($content) - $newlinePos - 1;
+ }
+ }
+ }
+
+ // Add a sentinel for one past end of the file
+ $indentMap[] = $indent;
+
+ return $indentMap;
+ }
+}
diff --git a/vendor/nikic/php-parser/lib/PhpParser/JsonDecoder.php b/vendor/nikic/php-parser/lib/PhpParser/JsonDecoder.php
new file mode 100644
index 00000000..47d2003d
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/JsonDecoder.php
@@ -0,0 +1,103 @@
+decodeRecursive($value);
+ }
+
+ private function decodeRecursive($value) {
+ if (\is_array($value)) {
+ if (isset($value['nodeType'])) {
+ if ($value['nodeType'] === 'Comment' || $value['nodeType'] === 'Comment_Doc') {
+ return $this->decodeComment($value);
+ }
+ return $this->decodeNode($value);
+ }
+ return $this->decodeArray($value);
+ }
+ return $value;
+ }
+
+ private function decodeArray(array $array) : array {
+ $decodedArray = [];
+ foreach ($array as $key => $value) {
+ $decodedArray[$key] = $this->decodeRecursive($value);
+ }
+ return $decodedArray;
+ }
+
+ private function decodeNode(array $value) : Node {
+ $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'])) {
+ if (!\is_array($value['attributes'])) {
+ throw new \RuntimeException('Attributes must be an array');
+ }
+
+ $node->setAttributes($this->decodeArray($value['attributes']));
+ }
+
+ foreach ($value as $name => $subNode) {
+ if ($name === 'nodeType' || $name === 'attributes') {
+ continue;
+ }
+
+ $node->$name = $this->decodeRecursive($subNode);
+ }
+
+ return $node;
+ }
+
+ private function decodeComment(array $value) : Comment {
+ $className = $value['nodeType'] === 'Comment' ? Comment::class : Comment\Doc::class;
+ if (!isset($value['text'])) {
+ throw new \RuntimeException('Comment must have text');
+ }
+
+ return new $className(
+ $value['text'],
+ $value['line'] ?? -1, $value['filePos'] ?? -1, $value['tokenPos'] ?? -1,
+ $value['endLine'] ?? -1, $value['endFilePos'] ?? -1, $value['endTokenPos'] ?? -1
+ );
+ }
+
+ private function reflectionClassFromNodeType(string $nodeType) : \ReflectionClass {
+ if (!isset($this->reflectionClassCache[$nodeType])) {
+ $className = $this->classNameFromNodeType($nodeType);
+ $this->reflectionClassCache[$nodeType] = new \ReflectionClass($className);
+ }
+ return $this->reflectionClassCache[$nodeType];
+ }
+
+ private function classNameFromNodeType(string $nodeType) : string {
+ $className = 'PhpParser\\Node\\' . strtr($nodeType, '_', '\\');
+ if (class_exists($className)) {
+ return $className;
+ }
+
+ $className .= '_';
+ if (class_exists($className)) {
+ return $className;
+ }
+
+ throw new \RuntimeException("Unknown node type \"$nodeType\"");
+ }
+}
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Lexer.php b/vendor/nikic/php-parser/lib/PhpParser/Lexer.php
new file mode 100644
index 00000000..e15dd0a5
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Lexer.php
@@ -0,0 +1,560 @@
+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.
+ *
+ * This function does not throw if lexing errors occur. Instead, errors may be retrieved using
+ * the getErrors() method.
+ *
+ * @param string $code The source code to lex
+ * @param ErrorHandler|null $errorHandler Error handler to use for lexing errors. Defaults to
+ * ErrorHandler\Throwing
+ */
+ public function startLexing(string $code, ErrorHandler $errorHandler = null) {
+ 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);
+
+ 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) !== '*/';
+ }
+
+ 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.
+ // * 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.
+
+ $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);
+ }
+
+ 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 === '&') {
+ $next = $i + 1;
+ while (isset($this->tokens[$next]) && $this->tokens[$next][0] === \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;
+ }
+ }
+
+ // 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--;
+ }
+ }
+
+ $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);
+ }
+}
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Lexer/Emulative.php b/vendor/nikic/php-parser/lib/PhpParser/Lexer/Emulative.php
new file mode 100644
index 00000000..b0929f3c
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Lexer/Emulative.php
@@ -0,0 +1,251 @@
+targetPhpVersion = $options['phpVersion'] ?? Emulative::PHP_8_2;
+ unset($options['phpVersion']);
+
+ parent::__construct($options);
+
+ $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
+ // and the PHP version we're targeting for emulation.
+ foreach ($emulators as $emulator) {
+ $emulatorPhpVersion = $emulator->getPhpVersion();
+ if ($this->isForwardEmulationNeeded($emulatorPhpVersion)) {
+ $this->emulators[] = $emulator;
+ } else if ($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) {
+ return $emulator->isEmulationNeeded($code);
+ });
+
+ if (empty($emulators)) {
+ // Nothing to emulate, yay
+ parent::startLexing($code, $errorHandler);
+ return;
+ }
+
+ $this->patches = [];
+ foreach ($emulators as $emulator) {
+ $code = $emulator->preprocessCode($code, $this->patches);
+ }
+
+ $collector = new ErrorHandler\Collecting();
+ parent::startLexing($code, $collector);
+ $this->sortPatches();
+ $this->fixupTokens();
+
+ $errors = $collector->getErrors();
+ if (!empty($errors)) {
+ $this->fixupErrors($errors);
+ foreach ($errors as $error) {
+ $errorHandler->handleError($error);
+ }
+ }
+
+ foreach ($emulators as $emulator) {
+ $this->tokens = $emulator->emulate($code, $this->tokens);
+ }
+ }
+
+ private function isForwardEmulationNeeded(string $emulatorPhpVersion): bool {
+ return version_compare(\PHP_VERSION, $emulatorPhpVersion, '<')
+ && version_compare($this->targetPhpVersion, $emulatorPhpVersion, '>=');
+ }
+
+ private function isReverseEmulationNeeded(string $emulatorPhpVersion): bool {
+ return version_compare(\PHP_VERSION, $emulatorPhpVersion, '>=')
+ && version_compare($this->targetPhpVersion, $emulatorPhpVersion, '<');
+ }
+
+ private function sortPatches()
+ {
+ // Patches may be contributed by different emulators.
+ // Make sure they are sorted by increasing patch position.
+ usort($this->patches, function($p1, $p2) {
+ return $p1[0] <=> $p2[0];
+ });
+ }
+
+ private function fixupTokens()
+ {
+ if (\count($this->patches) === 0) {
+ return;
+ }
+
+ // 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;
+ 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, []);
+ $i--;
+ $c--;
+ } else {
+ // Remove from token string
+ $this->tokens[$i][1] = substr_replace(
+ $token[1], '', $patchPos - $pos + $posDelta, $patchTextLen
+ );
+ $posDelta -= $patchTextLen;
+ }
+ } elseif ($patchType === 'add') {
+ // Insert into the token string
+ $this->tokens[$i][1] = substr_replace(
+ $token[1], $patchText, $patchPos - $pos + $posDelta, 0
+ );
+ $posDelta += $patchTextLen;
+ } else if ($patchType === 'replace') {
+ // Replace inside the token string
+ $this->tokens[$i][1] = substr_replace(
+ $token[1], $patchText, $patchPos - $pos + $posDelta, $patchTextLen
+ );
+ } else {
+ assert(false);
+ }
+
+ // Fetch the next patch
+ $patchIdx++;
+ if ($patchIdx >= \count($this->patches)) {
+ // No more patches, we're done
+ return;
+ }
+
+ 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;
+ }
+
+ // A patch did not apply
+ assert(false);
+ }
+
+ /**
+ * Fixup line and position information in errors.
+ *
+ * @param Error[] $errors
+ */
+ private function fixupErrors(array $errors) {
+ foreach ($errors as $error) {
+ $attrs = $error->getAttributes();
+
+ $posDelta = 0;
+ $lineDelta = 0;
+ foreach ($this->patches as $patch) {
+ list($patchPos, $patchType, $patchText) = $patch;
+ if ($patchPos >= $attrs['startFilePos']) {
+ // No longer relevant
+ break;
+ }
+
+ if ($patchType === 'add') {
+ $posDelta += strlen($patchText);
+ $lineDelta += substr_count($patchText, "\n");
+ } else if ($patchType === 'remove') {
+ $posDelta -= strlen($patchText);
+ $lineDelta -= substr_count($patchText, "\n");
+ }
+ }
+
+ $attrs['startFilePos'] += $posDelta;
+ $attrs['endFilePos'] += $posDelta;
+ $attrs['startLine'] += $lineDelta;
+ $attrs['endLine'] += $lineDelta;
+ $error->setAttributes($attrs);
+ }
+ }
+}
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/AttributeEmulator.php b/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/AttributeEmulator.php
new file mode 100644
index 00000000..6776a519
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/AttributeEmulator.php
@@ -0,0 +1,56 @@
+resolveIntegerOrFloatToken($tokens[$i + 1][1]);
+ array_splice($tokens, $i, 2, [
+ [$tokenKind, '0' . $tokens[$i + 1][1], $tokens[$i][2]],
+ ]);
+ $c--;
+ }
+ }
+ return $tokens;
+ }
+
+ private function resolveIntegerOrFloatToken(string $str): int
+ {
+ $str = substr($str, 1);
+ $str = str_replace('_', '', $str);
+ $num = octdec($str);
+ return is_float($num) ? \T_DNUMBER : \T_LNUMBER;
+ }
+
+ public function reverseEmulate(string $code, array $tokens): array {
+ // Explicit octals were not legal code previously, don't bother.
+ return $tokens;
+ }
+}
\ 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
new file mode 100644
index 00000000..c15d6271
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/FlexibleDocStringEmulator.php
@@ -0,0 +1,76 @@
+\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
new file mode 100644
index 00000000..eb7e4963
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/FnTokenEmulator.php
@@ -0,0 +1,23 @@
+getKeywordString()) !== false;
+ }
+
+ protected function isKeywordContext(array $tokens, int $pos): bool
+ {
+ $previousNonSpaceToken = $this->getPreviousNonSpaceToken($tokens, $pos);
+ return $previousNonSpaceToken === null || $previousNonSpaceToken[0] !== \T_OBJECT_OPERATOR;
+ }
+
+ 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
+ && $this->isKeywordContext($tokens, $i)) {
+ $tokens[$i][0] = $this->getKeywordToken();
+ }
+ }
+
+ return $tokens;
+ }
+
+ /**
+ * @param mixed[] $tokens
+ * @return array|string|null
+ */
+ private function getPreviousNonSpaceToken(array $tokens, int $start)
+ {
+ for ($i = $start - 1; $i >= 0; --$i) {
+ if ($tokens[$i][0] === T_WHITESPACE) {
+ continue;
+ }
+
+ return $tokens[$i];
+ }
+
+ return null;
+ }
+
+ 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;
+ }
+ }
+
+ return $tokens;
+ }
+}
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/MatchTokenEmulator.php b/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/MatchTokenEmulator.php
new file mode 100644
index 00000000..902a46df
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/MatchTokenEmulator.php
@@ -0,0 +1,23 @@
+') !== false;
+ }
+
+ public function emulate(string $code, array $tokens): array
+ {
+ // We need to manually iterate and manage a count because we'll change
+ // the tokens array on the way
+ $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) {
+ array_splice($tokens, $i, 2, [
+ [\T_NULLSAFE_OBJECT_OPERATOR, '?->', $line]
+ ]);
+ $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)
+ ) {
+ $replacement = [
+ [\T_NULLSAFE_OBJECT_OPERATOR, '?->', $line],
+ [\T_STRING, $matches[1], $line],
+ ];
+ if (\strlen($matches[0]) !== \strlen($tokens[$i][1])) {
+ $replacement[] = [
+ \T_ENCAPSED_AND_WHITESPACE,
+ \substr($tokens[$i][1], \strlen($matches[0])),
+ $line
+ ];
+ }
+ 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
+ {
+ // ?-> 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
new file mode 100644
index 00000000..cdf793e4
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/NumericLiteralSeparatorEmulator.php
@@ -0,0 +1,105 @@
+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/ReadonlyFunctionTokenEmulator.php b/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/ReadonlyFunctionTokenEmulator.php
new file mode 100644
index 00000000..e671458c
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/ReadonlyFunctionTokenEmulator.php
@@ -0,0 +1,31 @@
+emulator = $emulator;
+ }
+
+ public function getPhpVersion(): string {
+ return $this->emulator->getPhpVersion();
+ }
+
+ public function isEmulationNeeded(string $code): bool {
+ return $this->emulator->isEmulationNeeded($code);
+ }
+
+ public function emulate(string $code, array $tokens): array {
+ return $this->emulator->reverseEmulate($code, $tokens);
+ }
+
+ public function reverseEmulate(string $code, array $tokens): array {
+ return $this->emulator->emulate($code, $tokens);
+ }
+
+ public function preprocessCode(string $code, array &$patches): string {
+ return $code;
+ }
+}
\ 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
new file mode 100644
index 00000000..a020bc0f
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/TokenEmulator.php
@@ -0,0 +1,25 @@
+ [aliasName => originalName]] */
+ protected $aliases = [];
+
+ /** @var Name[][] Same as $aliases but preserving original case */
+ protected $origAliases = [];
+
+ /** @var ErrorHandler Error handler */
+ protected $errorHandler;
+
+ /**
+ * Create a name context.
+ *
+ * @param ErrorHandler $errorHandler Error handling used to report errors
+ */
+ public function __construct(ErrorHandler $errorHandler) {
+ $this->errorHandler = $errorHandler;
+ }
+
+ /**
+ * Start a new namespace.
+ *
+ * This also resets the alias table.
+ *
+ * @param Name|null $namespace Null is the global namespace
+ */
+ public function startNamespace(Name $namespace = null) {
+ $this->namespace = $namespace;
+ $this->origAliases = $this->aliases = [
+ Stmt\Use_::TYPE_NORMAL => [],
+ Stmt\Use_::TYPE_FUNCTION => [],
+ Stmt\Use_::TYPE_CONSTANT => [],
+ ];
+ }
+
+ /**
+ * 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
+ */
+ public function addAlias(Name $name, string $aliasName, int $type, array $errorAttrs = []) {
+ // Constant names are case sensitive, everything else case insensitive
+ if ($type === Stmt\Use_::TYPE_CONSTANT) {
+ $aliasLookupName = $aliasName;
+ } else {
+ $aliasLookupName = strtolower($aliasName);
+ }
+
+ if (isset($this->aliases[$type][$aliasLookupName])) {
+ $typeStringMap = [
+ Stmt\Use_::TYPE_NORMAL => '',
+ Stmt\Use_::TYPE_FUNCTION => 'function ',
+ Stmt\Use_::TYPE_CONSTANT => 'const ',
+ ];
+
+ $this->errorHandler->handleError(new Error(
+ sprintf(
+ 'Cannot use %s%s as %s because the name is already in use',
+ $typeStringMap[$type], $name, $aliasName
+ ),
+ $errorAttrs
+ ));
+ return;
+ }
+
+ $this->aliases[$type][$aliasLookupName] = $name;
+ $this->origAliases[$type][$aliasName] = $name;
+ }
+
+ /**
+ * Get current namespace.
+ *
+ * @return null|Name Namespace (or null if global namespace)
+ */
+ public function getNamespace() {
+ return $this->namespace;
+ }
+
+ /**
+ * Get resolved name.
+ *
+ * @param Name $name Name to resolve
+ * @param int $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) {
+ // don't resolve special class names
+ if ($type === Stmt\Use_::TYPE_NORMAL && $name->isSpecialClassName()) {
+ if (!$name->isUnqualified()) {
+ $this->errorHandler->handleError(new Error(
+ sprintf("'\\%s' is an invalid class name", $name->toString()),
+ $name->getAttributes()
+ ));
+ }
+ return $name;
+ }
+
+ // fully qualified names are already resolved
+ if ($name->isFullyQualified()) {
+ return $name;
+ }
+
+ // Try to resolve aliases
+ if (null !== $resolvedName = $this->resolveAlias($name, $type)) {
+ return $resolvedName;
+ }
+
+ if ($type !== Stmt\Use_::TYPE_NORMAL && $name->isUnqualified()) {
+ if (null === $this->namespace) {
+ // outside of a namespace unaliased unqualified is same as fully qualified
+ return new FullyQualified($name, $name->getAttributes());
+ }
+
+ // Cannot resolve statically
+ return null;
+ }
+
+ // if no alias exists prepend current namespace
+ return FullyQualified::concat($this->namespace, $name, $name->getAttributes());
+ }
+
+ /**
+ * Get resolved class name.
+ *
+ * @param Name $name Class ame to resolve
+ *
+ * @return Name Resolved name
+ */
+ public function getResolvedClassName(Name $name) : Name {
+ return $this->getResolvedName($name, Stmt\Use_::TYPE_NORMAL);
+ }
+
+ /**
+ * Get possible ways of writing a fully qualified name (e.g., by making use of aliases).
+ *
+ * @param string $name Fully-qualified name (without leading namespace separator)
+ * @param int $type One of Stmt\Use_::TYPE_*
+ *
+ * @return Name[] Possible representations of the name
+ */
+ public function getPossibleNames(string $name, int $type) : array {
+ $lcName = strtolower($name);
+
+ if ($type === Stmt\Use_::TYPE_NORMAL) {
+ // self, parent and static must always be unqualified
+ if ($lcName === "self" || $lcName === "parent" || $lcName === "static") {
+ return [new Name($name)];
+ }
+ }
+
+ // Collect possible ways to write this name, starting with the fully-qualified name
+ $possibleNames = [new FullyQualified($name)];
+
+ if (null !== $nsRelativeName = $this->getNamespaceRelativeName($name, $lcName, $type)) {
+ // Make sure there is no alias that makes the normally namespace-relative name
+ // into something else
+ if (null === $this->resolveAlias($nsRelativeName, $type)) {
+ $possibleNames[] = $nsRelativeName;
+ }
+ }
+
+ // Check for relevant namespace use statements
+ foreach ($this->origAliases[Stmt\Use_::TYPE_NORMAL] as $alias => $orig) {
+ $lcOrig = $orig->toLowerString();
+ if (0 === strpos($lcName, $lcOrig . '\\')) {
+ $possibleNames[] = new Name($alias . substr($name, strlen($lcOrig)));
+ }
+ }
+
+ // Check for relevant type-specific use statements
+ foreach ($this->origAliases[$type] as $alias => $orig) {
+ if ($type === Stmt\Use_::TYPE_CONSTANT) {
+ // Constants are are complicated-sensitive
+ $normalizedOrig = $this->normalizeConstName($orig->toString());
+ if ($normalizedOrig === $this->normalizeConstName($name)) {
+ $possibleNames[] = new Name($alias);
+ }
+ } else {
+ // Everything else is case-insensitive
+ if ($orig->toLowerString() === $lcName) {
+ $possibleNames[] = new Name($alias);
+ }
+ }
+ }
+
+ return $possibleNames;
+ }
+
+ /**
+ * 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_*
+ *
+ * @return Name Shortest representation
+ */
+ public function getShortName(string $name, int $type) : Name {
+ $possibleNames = $this->getPossibleNames($name, $type);
+
+ // Find shortest name
+ $shortestName = null;
+ $shortestLength = \INF;
+ foreach ($possibleNames as $possibleName) {
+ $length = strlen($possibleName->toCodeString());
+ if ($length < $shortestLength) {
+ $shortestName = $possibleName;
+ $shortestLength = $length;
+ }
+ }
+
+ return $shortestName;
+ }
+
+ private function resolveAlias(Name $name, $type) {
+ $firstPart = $name->getFirst();
+
+ if ($name->isQualified()) {
+ // resolve aliases for qualified names, always against class alias table
+ $checkName = strtolower($firstPart);
+ if (isset($this->aliases[Stmt\Use_::TYPE_NORMAL][$checkName])) {
+ $alias = $this->aliases[Stmt\Use_::TYPE_NORMAL][$checkName];
+ return FullyQualified::concat($alias, $name->slice(1), $name->getAttributes());
+ }
+ } elseif ($name->isUnqualified()) {
+ // constant aliases are case-sensitive, function aliases case-insensitive
+ $checkName = $type === Stmt\Use_::TYPE_CONSTANT ? $firstPart : strtolower($firstPart);
+ if (isset($this->aliases[$type][$checkName])) {
+ // resolve unqualified aliases
+ return new FullyQualified($this->aliases[$type][$checkName], $name->getAttributes());
+ }
+ }
+
+ // No applicable aliases
+ return null;
+ }
+
+ private function getNamespaceRelativeName(string $name, string $lcName, int $type) {
+ if (null === $this->namespace) {
+ return new Name($name);
+ }
+
+ if ($type === Stmt\Use_::TYPE_CONSTANT) {
+ // The constants true/false/null always resolve to the global symbols, even inside a
+ // namespace, so they may be used without qualification
+ if ($lcName === "true" || $lcName === "false" || $lcName === "null") {
+ return new Name($name);
+ }
+ }
+
+ $namespacePrefix = strtolower($this->namespace . '\\');
+ if (0 === strpos($lcName, $namespacePrefix)) {
+ return new Name(substr($name, strlen($namespacePrefix)));
+ }
+
+ return null;
+ }
+
+ private function normalizeConstName(string $name) {
+ $nsSep = strrpos($name, '\\');
+ if (false === $nsSep) {
+ return $name;
+ }
+
+ // Constants have case-insensitive namespace and case-sensitive short-name
+ $ns = substr($name, 0, $nsSep);
+ $shortName = substr($name, $nsSep + 1);
+ return strtolower($ns) . '\\' . $shortName;
+ }
+}
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node.php b/vendor/nikic/php-parser/lib/PhpParser/Node.php
new file mode 100644
index 00000000..befb2565
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node.php
@@ -0,0 +1,151 @@
+attributes = $attributes;
+ $this->name = $name;
+ $this->value = $value;
+ $this->byRef = $byRef;
+ $this->unpack = $unpack;
+ }
+
+ public function getSubNodeNames() : array {
+ return ['name', 'value', 'byRef', 'unpack'];
+ }
+
+ 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
new file mode 100644
index 00000000..c96f66e5
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Attribute.php
@@ -0,0 +1,34 @@
+attributes = $attributes;
+ $this->name = $name;
+ $this->args = $args;
+ }
+
+ public function getSubNodeNames() : array {
+ return ['name', 'args'];
+ }
+
+ 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
new file mode 100644
index 00000000..613bfc41
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/AttributeGroup.php
@@ -0,0 +1,29 @@
+attributes = $attributes;
+ $this->attrs = $attrs;
+ }
+
+ public function getSubNodeNames() : array {
+ return ['attrs'];
+ }
+
+ 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
new file mode 100644
index 00000000..9505532a
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/ComplexType.php
@@ -0,0 +1,14 @@
+attributes = $attributes;
+ $this->name = \is_string($name) ? new Identifier($name) : $name;
+ $this->value = $value;
+ }
+
+ public function getSubNodeNames() : array {
+ return ['name', 'value'];
+ }
+
+ 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
new file mode 100644
index 00000000..6cf4df22
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr.php
@@ -0,0 +1,9 @@
+attributes = $attributes;
+ $this->var = $var;
+ $this->dim = $dim;
+ }
+
+ public function getSubNodeNames() : array {
+ return ['var', 'dim'];
+ }
+
+ 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
new file mode 100644
index 00000000..1b078f82
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ArrayItem.php
@@ -0,0 +1,41 @@
+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';
+ }
+}
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Array_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Array_.php
new file mode 100644
index 00000000..e6eaa283
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Array_.php
@@ -0,0 +1,34 @@
+attributes = $attributes;
+ $this->items = $items;
+ }
+
+ public function getSubNodeNames() : array {
+ return ['items'];
+ }
+
+ public function getType() : string {
+ return 'Expr_Array';
+ }
+}
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ArrowFunction.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ArrowFunction.php
new file mode 100644
index 00000000..c273fb7e
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ArrowFunction.php
@@ -0,0 +1,79 @@
+ 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
+ */
+ 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->expr = $subNodes['expr'];
+ $this->attrGroups = $subNodes['attrGroups'] ?? [];
+ }
+
+ public function getSubNodeNames() : array {
+ return ['attrGroups', 'static', 'byRef', 'params', 'returnType', 'expr'];
+ }
+
+ public function returnsByRef() : bool {
+ return $this->byRef;
+ }
+
+ public function getParams() : array {
+ return $this->params;
+ }
+
+ public function getReturnType() {
+ return $this->returnType;
+ }
+
+ public function getAttrGroups() : array {
+ return $this->attrGroups;
+ }
+
+ /**
+ * @return Node\Stmt\Return_[]
+ */
+ public function getStmts() : array {
+ return [new Node\Stmt\Return_($this->expr)];
+ }
+
+ 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
new file mode 100644
index 00000000..cf9e6e82
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Assign.php
@@ -0,0 +1,34 @@
+attributes = $attributes;
+ $this->var = $var;
+ $this->expr = $expr;
+ }
+
+ public function getSubNodeNames() : array {
+ return ['var', 'expr'];
+ }
+
+ 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
new file mode 100644
index 00000000..bce8604f
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp.php
@@ -0,0 +1,30 @@
+attributes = $attributes;
+ $this->var = $var;
+ $this->expr = $expr;
+ }
+
+ 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
new file mode 100644
index 00000000..420284cd
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/BitwiseAnd.php
@@ -0,0 +1,12 @@
+attributes = $attributes;
+ $this->var = $var;
+ $this->expr = $expr;
+ }
+
+ public function getSubNodeNames() : array {
+ return ['var', 'expr'];
+ }
+
+ 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
new file mode 100644
index 00000000..d9c582b0
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp.php
@@ -0,0 +1,40 @@
+attributes = $attributes;
+ $this->left = $left;
+ $this->right = $right;
+ }
+
+ public function getSubNodeNames() : array {
+ return ['left', 'right'];
+ }
+
+ /**
+ * Get the operator sigil for this binary operation.
+ *
+ * In the case there are multiple possible sigils for an operator, this method does not
+ * necessarily return the one used in the parsed code.
+ *
+ * @return 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
new file mode 100644
index 00000000..d907393b
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/BitwiseAnd.php
@@ -0,0 +1,16 @@
+';
+ }
+
+ 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
new file mode 100644
index 00000000..d677502c
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/GreaterOrEqual.php
@@ -0,0 +1,16 @@
+=';
+ }
+
+ 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
new file mode 100644
index 00000000..3d96285c
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Identical.php
@@ -0,0 +1,16 @@
+>';
+ }
+
+ 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
new file mode 100644
index 00000000..3cb8e7e0
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Smaller.php
@@ -0,0 +1,16 @@
+';
+ }
+
+ 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
new file mode 100644
index 00000000..ed44984b
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BitwiseNot.php
@@ -0,0 +1,30 @@
+attributes = $attributes;
+ $this->expr = $expr;
+ }
+
+ public function getSubNodeNames() : array {
+ return ['expr'];
+ }
+
+ 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
new file mode 100644
index 00000000..bf27e9f6
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BooleanNot.php
@@ -0,0 +1,30 @@
+attributes = $attributes;
+ $this->expr = $expr;
+ }
+
+ public function getSubNodeNames() : array {
+ return ['expr'];
+ }
+
+ 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
new file mode 100644
index 00000000..78e1cf34
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/CallLike.php
@@ -0,0 +1,39 @@
+
+ */
+ abstract public function getRawArgs(): array;
+
+ /**
+ * 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;
+ }
+
+ /**
+ * Assert that this is not a first-class callable and return only ordinary Args.
+ *
+ * @return Arg[]
+ */
+ public function getArgs(): array {
+ 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
new file mode 100644
index 00000000..36769d4f
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast.php
@@ -0,0 +1,26 @@
+attributes = $attributes;
+ $this->expr = $expr;
+ }
+
+ 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
new file mode 100644
index 00000000..57cc473b
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Array_.php
@@ -0,0 +1,12 @@
+attributes = $attributes;
+ $this->class = $class;
+ $this->name = \is_string($name) ? new Identifier($name) : $name;
+ }
+
+ public function getSubNodeNames() : array {
+ return ['class', 'name'];
+ }
+
+ 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
new file mode 100644
index 00000000..db216b8f
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Clone_.php
@@ -0,0 +1,30 @@
+attributes = $attributes;
+ $this->expr = $expr;
+ }
+
+ public function getSubNodeNames() : array {
+ return ['expr'];
+ }
+
+ 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
new file mode 100644
index 00000000..56ddea6a
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Closure.php
@@ -0,0 +1,79 @@
+ 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;
+ $this->static = $subNodes['static'] ?? false;
+ $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->stmts = $subNodes['stmts'] ?? [];
+ $this->attrGroups = $subNodes['attrGroups'] ?? [];
+ }
+
+ public function getSubNodeNames() : array {
+ return ['attrGroups', 'static', 'byRef', 'params', 'uses', 'returnType', 'stmts'];
+ }
+
+ public function returnsByRef() : bool {
+ return $this->byRef;
+ }
+
+ public function getParams() : array {
+ return $this->params;
+ }
+
+ public function getReturnType() {
+ return $this->returnType;
+ }
+
+ /** @return Node\Stmt[] */
+ public function getStmts() : array {
+ return $this->stmts;
+ }
+
+ public function getAttrGroups() : array {
+ return $this->attrGroups;
+ }
+
+ 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
new file mode 100644
index 00000000..2b8a0966
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ClosureUse.php
@@ -0,0 +1,34 @@
+attributes = $attributes;
+ $this->var = $var;
+ $this->byRef = $byRef;
+ }
+
+ public function getSubNodeNames() : array {
+ return ['var', 'byRef'];
+ }
+
+ public function getType() : string {
+ return 'Expr_ClosureUse';
+ }
+}
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ConstFetch.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ConstFetch.php
new file mode 100644
index 00000000..14ebd16b
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ConstFetch.php
@@ -0,0 +1,31 @@
+attributes = $attributes;
+ $this->name = $name;
+ }
+
+ public function getSubNodeNames() : array {
+ return ['name'];
+ }
+
+ 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
new file mode 100644
index 00000000..4042ec93
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Empty_.php
@@ -0,0 +1,30 @@
+attributes = $attributes;
+ $this->expr = $expr;
+ }
+
+ public function getSubNodeNames() : array {
+ return ['expr'];
+ }
+
+ 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
new file mode 100644
index 00000000..1637f3ae
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Error.php
@@ -0,0 +1,31 @@
+attributes = $attributes;
+ }
+
+ public function getSubNodeNames() : array {
+ return [];
+ }
+
+ 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
new file mode 100644
index 00000000..c44ff6f9
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ErrorSuppress.php
@@ -0,0 +1,30 @@
+attributes = $attributes;
+ $this->expr = $expr;
+ }
+
+ public function getSubNodeNames() : array {
+ return ['expr'];
+ }
+
+ 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
new file mode 100644
index 00000000..85685474
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Eval_.php
@@ -0,0 +1,30 @@
+attributes = $attributes;
+ $this->expr = $expr;
+ }
+
+ public function getSubNodeNames() : array {
+ return ['expr'];
+ }
+
+ 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
new file mode 100644
index 00000000..b88a8f7e
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Exit_.php
@@ -0,0 +1,34 @@
+attributes = $attributes;
+ $this->expr = $expr;
+ }
+
+ public function getSubNodeNames() : array {
+ return ['expr'];
+ }
+
+ 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
new file mode 100644
index 00000000..2de4d0dd
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/FuncCall.php
@@ -0,0 +1,39 @@
+ Arguments */
+ public $args;
+
+ /**
+ * Constructs a function call node.
+ *
+ * @param Node\Name|Expr $name Function name
+ * @param array $args Arguments
+ * @param array $attributes Additional attributes
+ */
+ public function __construct($name, array $args = [], array $attributes = []) {
+ $this->attributes = $attributes;
+ $this->name = $name;
+ $this->args = $args;
+ }
+
+ public function getSubNodeNames() : array {
+ return ['name', 'args'];
+ }
+
+ public function getType() : string {
+ return 'Expr_FuncCall';
+ }
+
+ public function getRawArgs(): array {
+ return $this->args;
+ }
+}
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Include_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Include_.php
new file mode 100644
index 00000000..07ce5968
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Include_.php
@@ -0,0 +1,39 @@
+attributes = $attributes;
+ $this->expr = $expr;
+ $this->type = $type;
+ }
+
+ public function getSubNodeNames() : array {
+ return ['expr', 'type'];
+ }
+
+ 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
new file mode 100644
index 00000000..9000d47b
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Instanceof_.php
@@ -0,0 +1,35 @@
+attributes = $attributes;
+ $this->expr = $expr;
+ $this->class = $class;
+ }
+
+ public function getSubNodeNames() : array {
+ return ['expr', 'class'];
+ }
+
+ 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
new file mode 100644
index 00000000..76b73875
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Isset_.php
@@ -0,0 +1,30 @@
+attributes = $attributes;
+ $this->vars = $vars;
+ }
+
+ public function getSubNodeNames() : array {
+ return ['vars'];
+ }
+
+ 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
new file mode 100644
index 00000000..c27a27b9
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/List_.php
@@ -0,0 +1,30 @@
+attributes = $attributes;
+ $this->items = $items;
+ }
+
+ public function getSubNodeNames() : array {
+ return ['items'];
+ }
+
+ 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
new file mode 100644
index 00000000..2455a302
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Match_.php
@@ -0,0 +1,31 @@
+attributes = $attributes;
+ $this->cond = $cond;
+ $this->arms = $arms;
+ }
+
+ public function getSubNodeNames() : array {
+ return ['cond', 'arms'];
+ }
+
+ 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
new file mode 100644
index 00000000..49ca4835
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/MethodCall.php
@@ -0,0 +1,45 @@
+ Arguments */
+ public $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
+ */
+ public function __construct(Expr $var, $name, array $args = [], array $attributes = []) {
+ $this->attributes = $attributes;
+ $this->var = $var;
+ $this->name = \is_string($name) ? new Identifier($name) : $name;
+ $this->args = $args;
+ }
+
+ public function getSubNodeNames() : array {
+ return ['var', 'name', 'args'];
+ }
+
+ public function getType() : string {
+ return 'Expr_MethodCall';
+ }
+
+ public function getRawArgs(): array {
+ return $this->args;
+ }
+}
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/New_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/New_.php
new file mode 100644
index 00000000..e2bb6492
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/New_.php
@@ -0,0 +1,41 @@
+ Arguments */
+ public $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
+ */
+ public function __construct($class, array $args = [], array $attributes = []) {
+ $this->attributes = $attributes;
+ $this->class = $class;
+ $this->args = $args;
+ }
+
+ public function getSubNodeNames() : array {
+ return ['class', 'args'];
+ }
+
+ public function getType() : string {
+ return 'Expr_New';
+ }
+
+ public function getRawArgs(): array {
+ return $this->args;
+ }
+}
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/NullsafeMethodCall.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/NullsafeMethodCall.php
new file mode 100644
index 00000000..07a571fd
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/NullsafeMethodCall.php
@@ -0,0 +1,45 @@
+ Arguments */
+ public $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
+ */
+ public function __construct(Expr $var, $name, array $args = [], array $attributes = []) {
+ $this->attributes = $attributes;
+ $this->var = $var;
+ $this->name = \is_string($name) ? new Identifier($name) : $name;
+ $this->args = $args;
+ }
+
+ public function getSubNodeNames() : array {
+ return ['var', 'name', 'args'];
+ }
+
+ public function getType() : string {
+ return 'Expr_NullsafeMethodCall';
+ }
+
+ public function getRawArgs(): array {
+ return $this->args;
+ }
+}
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/NullsafePropertyFetch.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/NullsafePropertyFetch.php
new file mode 100644
index 00000000..9317eb3b
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/NullsafePropertyFetch.php
@@ -0,0 +1,35 @@
+attributes = $attributes;
+ $this->var = $var;
+ $this->name = \is_string($name) ? new Identifier($name) : $name;
+ }
+
+ public function getSubNodeNames() : array {
+ return ['var', 'name'];
+ }
+
+ 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
new file mode 100644
index 00000000..94d6c296
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/PostDec.php
@@ -0,0 +1,30 @@
+attributes = $attributes;
+ $this->var = $var;
+ }
+
+ public function getSubNodeNames() : array {
+ return ['var'];
+ }
+
+ 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
new file mode 100644
index 00000000..005c443a
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/PostInc.php
@@ -0,0 +1,30 @@
+attributes = $attributes;
+ $this->var = $var;
+ }
+
+ public function getSubNodeNames() : array {
+ return ['var'];
+ }
+
+ 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
new file mode 100644
index 00000000..a5ca685a
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/PreDec.php
@@ -0,0 +1,30 @@
+attributes = $attributes;
+ $this->var = $var;
+ }
+
+ public function getSubNodeNames() : array {
+ return ['var'];
+ }
+
+ 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
new file mode 100644
index 00000000..0986c447
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/PreInc.php
@@ -0,0 +1,30 @@
+attributes = $attributes;
+ $this->var = $var;
+ }
+
+ public function getSubNodeNames() : array {
+ return ['var'];
+ }
+
+ 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
new file mode 100644
index 00000000..2d43c2ac
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Print_.php
@@ -0,0 +1,30 @@
+attributes = $attributes;
+ $this->expr = $expr;
+ }
+
+ public function getSubNodeNames() : array {
+ return ['expr'];
+ }
+
+ 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
new file mode 100644
index 00000000..4281f31c
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/PropertyFetch.php
@@ -0,0 +1,35 @@
+attributes = $attributes;
+ $this->var = $var;
+ $this->name = \is_string($name) ? new Identifier($name) : $name;
+ }
+
+ public function getSubNodeNames() : array {
+ return ['var', 'name'];
+ }
+
+ 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
new file mode 100644
index 00000000..537a7cc8
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ShellExec.php
@@ -0,0 +1,30 @@
+attributes = $attributes;
+ $this->parts = $parts;
+ }
+
+ public function getSubNodeNames() : array {
+ return ['parts'];
+ }
+
+ 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
new file mode 100644
index 00000000..d0d099c4
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/StaticCall.php
@@ -0,0 +1,46 @@
+ Arguments */
+ public $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
+ */
+ public function __construct($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 {
+ return ['class', 'name', 'args'];
+ }
+
+ public function getType() : string {
+ return 'Expr_StaticCall';
+ }
+
+ public function getRawArgs(): array {
+ return $this->args;
+ }
+}
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/StaticPropertyFetch.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/StaticPropertyFetch.php
new file mode 100644
index 00000000..1ee1a25e
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/StaticPropertyFetch.php
@@ -0,0 +1,36 @@
+attributes = $attributes;
+ $this->class = $class;
+ $this->name = \is_string($name) ? new VarLikeIdentifier($name) : $name;
+ }
+
+ public function getSubNodeNames() : array {
+ return ['class', 'name'];
+ }
+
+ 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
new file mode 100644
index 00000000..9316f47d
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Ternary.php
@@ -0,0 +1,38 @@
+attributes = $attributes;
+ $this->cond = $cond;
+ $this->if = $if;
+ $this->else = $else;
+ }
+
+ public function getSubNodeNames() : array {
+ return ['cond', 'if', 'else'];
+ }
+
+ 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
new file mode 100644
index 00000000..5c97f0e2
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Throw_.php
@@ -0,0 +1,30 @@
+attributes = $attributes;
+ $this->expr = $expr;
+ }
+
+ public function getSubNodeNames() : array {
+ return ['expr'];
+ }
+
+ 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
new file mode 100644
index 00000000..ce8808bc
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/UnaryMinus.php
@@ -0,0 +1,30 @@
+attributes = $attributes;
+ $this->expr = $expr;
+ }
+
+ public function getSubNodeNames() : array {
+ return ['expr'];
+ }
+
+ 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
new file mode 100644
index 00000000..d23047e5
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/UnaryPlus.php
@@ -0,0 +1,30 @@
+attributes = $attributes;
+ $this->expr = $expr;
+ }
+
+ public function getSubNodeNames() : array {
+ return ['expr'];
+ }
+
+ 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
new file mode 100644
index 00000000..b47d38e9
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Variable.php
@@ -0,0 +1,30 @@
+attributes = $attributes;
+ $this->name = $name;
+ }
+
+ public function getSubNodeNames() : array {
+ return ['name'];
+ }
+
+ 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
new file mode 100644
index 00000000..a3efce61
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/YieldFrom.php
@@ -0,0 +1,30 @@
+attributes = $attributes;
+ $this->expr = $expr;
+ }
+
+ public function getSubNodeNames() : array {
+ return ['expr'];
+ }
+
+ 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
new file mode 100644
index 00000000..aef8fc33
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Yield_.php
@@ -0,0 +1,34 @@
+attributes = $attributes;
+ $this->key = $key;
+ $this->value = $value;
+ }
+
+ public function getSubNodeNames() : array {
+ return ['key', 'value'];
+ }
+
+ 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
new file mode 100644
index 00000000..5a825e73
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/FunctionLike.php
@@ -0,0 +1,43 @@
+ true,
+ 'parent' => true,
+ 'static' => true,
+ ];
+
+ /**
+ * Constructs an identifier node.
+ *
+ * @param string $name Identifier as string
+ * @param array $attributes Additional attributes
+ */
+ public function __construct(string $name, array $attributes = []) {
+ $this->attributes = $attributes;
+ $this->name = $name;
+ }
+
+ public function getSubNodeNames() : array {
+ return ['name'];
+ }
+
+ /**
+ * Get identifier as string.
+ *
+ * @return string Identifier as string.
+ */
+ public function toString() : string {
+ return $this->name;
+ }
+
+ /**
+ * Get lowercased identifier as string.
+ *
+ * @return string Lowercased identifier as string
+ */
+ public function toLowerString() : string {
+ return strtolower($this->name);
+ }
+
+ /**
+ * Checks whether the identifier is a special class name (self, parent or static).
+ *
+ * @return bool Whether identifier is a special class name
+ */
+ public function isSpecialClassName() : bool {
+ return isset(self::$specialClassNames[strtolower($this->name)]);
+ }
+
+ /**
+ * Get identifier as string.
+ *
+ * @return string Identifier as string
+ */
+ public function __toString() : string {
+ return $this->name;
+ }
+
+ 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
new file mode 100644
index 00000000..9208e139
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/IntersectionType.php
@@ -0,0 +1,30 @@
+attributes = $attributes;
+ $this->types = $types;
+ }
+
+ public function getSubNodeNames() : array {
+ return ['types'];
+ }
+
+ 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
new file mode 100644
index 00000000..2ae1c86b
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/MatchArm.php
@@ -0,0 +1,31 @@
+conds = $conds;
+ $this->body = $body;
+ $this->attributes = $attributes;
+ }
+
+ public function getSubNodeNames() : array {
+ return ['conds', 'body'];
+ }
+
+ public function getType() : string {
+ return 'MatchArm';
+ }
+}
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Name.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Name.php
new file mode 100644
index 00000000..17bd1c0f
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Name.php
@@ -0,0 +1,242 @@
+ true,
+ 'parent' => true,
+ 'static' => true,
+ ];
+
+ /**
+ * Constructs a name node.
+ *
+ * @param string|string[]|self $name Name as string, part array or Name instance (copy ctor)
+ * @param array $attributes Additional attributes
+ */
+ public function __construct($name, array $attributes = []) {
+ $this->attributes = $attributes;
+ $this->parts = self::prepareName($name);
+ }
+
+ public function getSubNodeNames() : array {
+ return ['parts'];
+ }
+
+ /**
+ * Gets the first part of the name, i.e. everything before the first namespace separator.
+ *
+ * @return string First part of the name
+ */
+ public function getFirst() : string {
+ return $this->parts[0];
+ }
+
+ /**
+ * Gets the last part of the name, i.e. everything after the last namespace separator.
+ *
+ * @return string Last part of the name
+ */
+ public function getLast() : string {
+ return $this->parts[count($this->parts) - 1];
+ }
+
+ /**
+ * Checks whether the name is unqualified. (E.g. Name)
+ *
+ * @return bool Whether the name is unqualified
+ */
+ public function isUnqualified() : bool {
+ return 1 === count($this->parts);
+ }
+
+ /**
+ * Checks whether the name is qualified. (E.g. Name\Name)
+ *
+ * @return bool Whether the name is qualified
+ */
+ public function isQualified() : bool {
+ return 1 < count($this->parts);
+ }
+
+ /**
+ * Checks whether the name is fully qualified. (E.g. \Name)
+ *
+ * @return bool Whether the name is fully qualified
+ */
+ public function isFullyQualified() : bool {
+ return false;
+ }
+
+ /**
+ * Checks whether the name is explicitly relative to the current namespace. (E.g. namespace\Name)
+ *
+ * @return bool Whether the name is relative
+ */
+ public function isRelative() : bool {
+ return false;
+ }
+
+ /**
+ * Returns a string representation of the name itself, without taking the name type into
+ * account (e.g., not including a leading backslash for fully qualified names).
+ *
+ * @return string String representation
+ */
+ public function toString() : string {
+ return implode('\\', $this->parts);
+ }
+
+ /**
+ * Returns a string representation of the name as it would occur in code (e.g., including
+ * leading backslash for fully qualified names.
+ *
+ * @return string String representation
+ */
+ public function toCodeString() : string {
+ return $this->toString();
+ }
+
+ /**
+ * Returns lowercased string representation of the name, without taking the name type into
+ * account (e.g., no leading backslash for fully qualified names).
+ *
+ * @return string Lowercased string representation
+ */
+ public function toLowerString() : string {
+ return strtolower(implode('\\', $this->parts));
+ }
+
+ /**
+ * Checks whether the identifier is a special class name (self, parent or static).
+ *
+ * @return bool Whether identifier is a special class name
+ */
+ public function isSpecialClassName() : bool {
+ return count($this->parts) === 1
+ && isset(self::$specialClassNames[strtolower($this->parts[0])]);
+ }
+
+ /**
+ * Returns a string representation of the name by imploding the namespace parts with the
+ * namespace separator.
+ *
+ * @return string String representation
+ */
+ public function __toString() : string {
+ return implode('\\', $this->parts);
+ }
+
+ /**
+ * Gets a slice of a name (similar to array_slice).
+ *
+ * This method returns a new instance of the same type as the original and with the same
+ * attributes.
+ *
+ * If the slice is empty, null is returned. The null value will be correctly handled in
+ * concatenations using concat().
+ *
+ * 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|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);
+
+ $realOffset = $offset < 0 ? $offset + $numParts : $offset;
+ if ($realOffset < 0 || $realOffset > $numParts) {
+ throw new \OutOfBoundsException(sprintf('Offset %d is out of bounds', $offset));
+ }
+
+ if (null === $length) {
+ $realLength = $numParts - $realOffset;
+ } else {
+ $realLength = $length < 0 ? $length + $numParts - $realOffset : $length;
+ if ($realLength < 0 || $realLength > $numParts - $realOffset) {
+ throw new \OutOfBoundsException(sprintf('Length %d is out of bounds', $length));
+ }
+ }
+
+ if ($realLength === 0) {
+ // Empty slice is represented as null
+ return null;
+ }
+
+ return new static(array_slice($this->parts, $realOffset, $realLength), $this->attributes);
+ }
+
+ /**
+ * Concatenate two names, yielding a new Name instance.
+ *
+ * The type of the generated instance depends on which class this method is called on, for
+ * example Name\FullyQualified::concat() will yield a Name\FullyQualified instance.
+ *
+ * If one of the arguments is null, a new instance of the other name will be returned. If both
+ * arguments are null, null will be returned. As such, writing
+ * 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
+ *
+ * @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);
+ } else {
+ return new static(
+ array_merge(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.
+ *
+ * @param string|string[]|self $name Name to prepare
+ *
+ * @return string[] Prepared name
+ */
+ private static function prepareName($name) : array {
+ if (\is_string($name)) {
+ if ('' === $name) {
+ throw new \InvalidArgumentException('Name cannot be empty');
+ }
+
+ return explode('\\', $name);
+ } elseif (\is_array($name)) {
+ if (empty($name)) {
+ throw new \InvalidArgumentException('Name cannot be empty');
+ }
+
+ return $name;
+ } elseif ($name instanceof self) {
+ return $name->parts;
+ }
+
+ throw new \InvalidArgumentException(
+ 'Expected string, array of parts or Name instance'
+ );
+ }
+
+ 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
new file mode 100644
index 00000000..1df93a56
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Name/FullyQualified.php
@@ -0,0 +1,50 @@
+toString();
+ }
+
+ 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
new file mode 100644
index 00000000..57bf7af2
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Name/Relative.php
@@ -0,0 +1,50 @@
+toString();
+ }
+
+ 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
new file mode 100644
index 00000000..d68e26a3
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/NullableType.php
@@ -0,0 +1,28 @@
+attributes = $attributes;
+ $this->type = \is_string($type) ? new Identifier($type) : $type;
+ }
+
+ public function getSubNodeNames() : array {
+ return ['type'];
+ }
+
+ 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
new file mode 100644
index 00000000..1e90b794
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Param.php
@@ -0,0 +1,60 @@
+attributes = $attributes;
+ $this->type = \is_string($type) ? new Identifier($type) : $type;
+ $this->byRef = $byRef;
+ $this->variadic = $variadic;
+ $this->var = $var;
+ $this->default = $default;
+ $this->flags = $flags;
+ $this->attrGroups = $attrGroups;
+ }
+
+ public function getSubNodeNames() : array {
+ return ['attrGroups', 'flags', 'type', 'byRef', 'variadic', 'var', 'default'];
+ }
+
+ public function getType() : string {
+ return 'Param';
+ }
+}
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar.php
new file mode 100644
index 00000000..8117909b
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar.php
@@ -0,0 +1,7 @@
+attributes = $attributes;
+ $this->value = $value;
+ }
+
+ public function getSubNodeNames() : array {
+ return ['value'];
+ }
+
+ /**
+ * @param mixed[] $attributes
+ */
+ public static function fromString(string $str, array $attributes = []): DNumber
+ {
+ $attributes['rawValue'] = $str;
+ $float = self::parse($str);
+
+ return new DNumber($float, $attributes);
+ }
+
+ /**
+ * @internal
+ *
+ * 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);
+
+ // Check whether this is one of the special integer notations.
+ if ('0' === $str[0]) {
+ // hex
+ if ('x' === $str[1] || 'X' === $str[1]) {
+ return hexdec($str);
+ }
+
+ // bin
+ if ('b' === $str[1] || 'B' === $str[1]) {
+ return bindec($str);
+ }
+
+ // oct, but only if the string does not contain any of '.eE'.
+ if (false === strpbrk($str, '.eE')) {
+ // 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';
+ }
+}
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/Encapsed.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/Encapsed.php
new file mode 100644
index 00000000..fa5d2e26
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/Encapsed.php
@@ -0,0 +1,31 @@
+attributes = $attributes;
+ $this->parts = $parts;
+ }
+
+ public function getSubNodeNames() : array {
+ return ['parts'];
+ }
+
+ public function getType() : string {
+ return 'Scalar_Encapsed';
+ }
+}
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/EncapsedStringPart.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/EncapsedStringPart.php
new file mode 100644
index 00000000..bb3194c1
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/EncapsedStringPart.php
@@ -0,0 +1,30 @@
+attributes = $attributes;
+ $this->value = $value;
+ }
+
+ public function getSubNodeNames() : array {
+ return ['value'];
+ }
+
+ public function getType() : string {
+ return 'Scalar_EncapsedStringPart';
+ }
+}
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/LNumber.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/LNumber.php
new file mode 100644
index 00000000..2cc2b22c
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/LNumber.php
@@ -0,0 +1,80 @@
+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 {
+ $attributes['rawValue'] = $str;
+
+ $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';
+ }
+}
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst.php
new file mode 100644
index 00000000..941f0c76
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst.php
@@ -0,0 +1,28 @@
+attributes = $attributes;
+ }
+
+ public function getSubNodeNames() : array {
+ return [];
+ }
+
+ /**
+ * Get name of magic constant.
+ *
+ * @return string Name of magic constant
+ */
+ abstract public function getName() : string;
+}
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Class_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Class_.php
new file mode 100644
index 00000000..24432847
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Class_.php
@@ -0,0 +1,16 @@
+ '\\',
+ '$' => '$',
+ 'n' => "\n",
+ 'r' => "\r",
+ 't' => "\t",
+ 'f' => "\f",
+ 'v' => "\v",
+ 'e' => "\x1B",
+ ];
+
+ /**
+ * Constructs a string scalar node.
+ *
+ * @param string $value Value of the string
+ * @param array $attributes Additional attributes
+ */
+ public function __construct(string $value, array $attributes = []) {
+ $this->attributes = $attributes;
+ $this->value = $value;
+ }
+
+ public function getSubNodeNames() : array {
+ return ['value'];
+ }
+
+ /**
+ * @param bool $parseUnicodeEscape Whether to parse PHP 7 \u escapes
+ */
+ public static function fromString(string $str, array $attributes = [], bool $parseUnicodeEscape = true): self
+ {
+ $attributes['kind'] = ($str[0] === "'" || ($str[1] === "'" && ($str[0] === 'b' || $str[0] === 'B')))
+ ? Scalar\String_::KIND_SINGLE_QUOTED
+ : Scalar\String_::KIND_DOUBLE_QUOTED;
+
+ $attributes['rawValue'] = $str;
+
+ $string = self::parse($str, $parseUnicodeEscape);
+
+ return new self($string, $attributes);
+ }
+
+ /**
+ * @internal
+ *
+ * Parses a string token.
+ *
+ * @param string $str String token content
+ * @param bool $parseUnicodeEscape Whether to parse PHP 7 \u escapes
+ *
+ * @return string The parsed string
+ */
+ public static function parse(string $str, bool $parseUnicodeEscape = true) : string {
+ $bLength = 0;
+ if ('b' === $str[0] || 'B' === $str[0]) {
+ $bLength = 1;
+ }
+
+ if ('\'' === $str[$bLength]) {
+ return str_replace(
+ ['\\\\', '\\\''],
+ ['\\', '\''],
+ substr($str, $bLength + 1, -1)
+ );
+ } else {
+ return self::parseEscapeSequences(
+ substr($str, $bLength + 1, -1), '"', $parseUnicodeEscape
+ );
+ }
+ }
+
+ /**
+ * @internal
+ *
+ * Parses escape sequences in strings (all string types apart from single quoted).
+ *
+ * @param string $str String without quotes
+ * @param null|string $quote Quote type
+ * @param bool $parseUnicodeEscape Whether to parse PHP 7 \u escapes
+ *
+ * @return string String with escape sequences parsed
+ */
+ public static function parseEscapeSequences(string $str, $quote, bool $parseUnicodeEscape = true) : string {
+ if (null !== $quote) {
+ $str = str_replace('\\' . $quote, $quote, $str);
+ }
+
+ $extra = '';
+ if ($parseUnicodeEscape) {
+ $extra = '|u\{([0-9a-fA-F]+)\}';
+ }
+
+ return preg_replace_callback(
+ '~\\\\([\\\\$nrtfve]|[xX][0-9a-fA-F]{1,2}|[0-7]{1,3}' . $extra . ')~',
+ function($matches) {
+ $str = $matches[1];
+
+ if (isset(self::$replacements[$str])) {
+ return self::$replacements[$str];
+ } elseif ('x' === $str[0] || 'X' === $str[0]) {
+ return chr(hexdec(substr($str, 1)));
+ } elseif ('u' === $str[0]) {
+ return self::codePointToUtf8(hexdec($matches[2]));
+ } else {
+ return chr(octdec($str));
+ }
+ },
+ $str
+ );
+ }
+
+ /**
+ * Converts a Unicode code point to its UTF-8 encoded representation.
+ *
+ * @param int $num Code point
+ *
+ * @return string UTF-8 representation of code point
+ */
+ private static function codePointToUtf8(int $num) : string {
+ if ($num <= 0x7F) {
+ return chr($num);
+ }
+ if ($num <= 0x7FF) {
+ return chr(($num>>6) + 0xC0) . chr(($num&0x3F) + 0x80);
+ }
+ if ($num <= 0xFFFF) {
+ return chr(($num>>12) + 0xE0) . chr((($num>>6)&0x3F) + 0x80) . chr(($num&0x3F) + 0x80);
+ }
+ if ($num <= 0x1FFFFF) {
+ return chr(($num>>18) + 0xF0) . chr((($num>>12)&0x3F) + 0x80)
+ . chr((($num>>6)&0x3F) + 0x80) . chr(($num&0x3F) + 0x80);
+ }
+ throw new Error('Invalid UTF-8 codepoint escape sequence: Codepoint too large');
+ }
+
+ public function getType() : string {
+ return 'Scalar_String';
+ }
+}
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt.php
new file mode 100644
index 00000000..69d33e57
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt.php
@@ -0,0 +1,9 @@
+attributes = $attributes;
+ $this->num = $num;
+ }
+
+ public function getSubNodeNames() : array {
+ return ['num'];
+ }
+
+ 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
new file mode 100644
index 00000000..2bf044c9
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Case_.php
@@ -0,0 +1,34 @@
+attributes = $attributes;
+ $this->cond = $cond;
+ $this->stmts = $stmts;
+ }
+
+ public function getSubNodeNames() : array {
+ return ['cond', 'stmts'];
+ }
+
+ 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
new file mode 100644
index 00000000..9b9c0947
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Catch_.php
@@ -0,0 +1,41 @@
+attributes = $attributes;
+ $this->types = $types;
+ $this->var = $var;
+ $this->stmts = $stmts;
+ }
+
+ public function getSubNodeNames() : array {
+ return ['types', 'var', 'stmts'];
+ }
+
+ 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
new file mode 100644
index 00000000..1fc7f336
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/ClassConst.php
@@ -0,0 +1,80 @@
+attributes = $attributes;
+ $this->flags = $flags;
+ $this->consts = $consts;
+ $this->attrGroups = $attrGroups;
+ }
+
+ public function getSubNodeNames() : array {
+ return ['attrGroups', 'flags', '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;
+ }
+
+ /**
+ * Whether constant is protected.
+ *
+ * @return bool
+ */
+ public function isProtected() : bool {
+ return (bool) ($this->flags & Class_::MODIFIER_PROTECTED);
+ }
+
+ /**
+ * Whether constant is private.
+ *
+ * @return bool
+ */
+ public function isPrivate() : bool {
+ return (bool) ($this->flags & Class_::MODIFIER_PRIVATE);
+ }
+
+ /**
+ * Whether constant is final.
+ *
+ * @return bool
+ */
+ public function isFinal() : bool {
+ return (bool) ($this->flags & Class_::MODIFIER_FINAL);
+ }
+
+ 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
new file mode 100644
index 00000000..2fa4e861
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/ClassLike.php
@@ -0,0 +1,109 @@
+stmts as $stmt) {
+ if ($stmt instanceof TraitUse) {
+ $traitUses[] = $stmt;
+ }
+ }
+ return $traitUses;
+ }
+
+ /**
+ * @return ClassConst[]
+ */
+ public function getConstants() : array {
+ $constants = [];
+ foreach ($this->stmts as $stmt) {
+ if ($stmt instanceof ClassConst) {
+ $constants[] = $stmt;
+ }
+ }
+ return $constants;
+ }
+
+ /**
+ * @return Property[]
+ */
+ public function getProperties() : array {
+ $properties = [];
+ foreach ($this->stmts as $stmt) {
+ if ($stmt instanceof Property) {
+ $properties[] = $stmt;
+ }
+ }
+ return $properties;
+ }
+
+ /**
+ * Gets property with the given name defined directly in this class/interface/trait.
+ *
+ * @param string $name Name of the property
+ *
+ * @return Property|null Property node or null if the property does not exist
+ */
+ public function getProperty(string $name) {
+ foreach ($this->stmts as $stmt) {
+ if ($stmt instanceof Property) {
+ foreach ($stmt->props as $prop) {
+ if ($prop instanceof PropertyProperty && $name === $prop->name->toString()) {
+ return $stmt;
+ }
+ }
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Gets all methods defined directly in this class/interface/trait
+ *
+ * @return ClassMethod[]
+ */
+ public function getMethods() : array {
+ $methods = [];
+ foreach ($this->stmts as $stmt) {
+ if ($stmt instanceof ClassMethod) {
+ $methods[] = $stmt;
+ }
+ }
+ return $methods;
+ }
+
+ /**
+ * Gets method with the given name defined directly in this class/interface/trait.
+ *
+ * @param string $name Name of the method (compared case-insensitively)
+ *
+ * @return ClassMethod|null Method node or null if the method does not exist
+ */
+ public function getMethod(string $name) {
+ $lowerName = strtolower($name);
+ foreach ($this->stmts as $stmt) {
+ if ($stmt instanceof ClassMethod && $lowerName === $stmt->name->toLowerString()) {
+ return $stmt;
+ }
+ }
+ return null;
+ }
+}
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/ClassMethod.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/ClassMethod.php
new file mode 100644
index 00000000..6e85161e
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/ClassMethod.php
@@ -0,0 +1,161 @@
+ 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
+ */
+ public function __construct($name, array $subNodes = [], array $attributes = []) {
+ $this->attributes = $attributes;
+ $this->flags = $subNodes['flags'] ?? $subNodes['type'] ?? 0;
+ $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->stmts = array_key_exists('stmts', $subNodes) ? $subNodes['stmts'] : [];
+ $this->attrGroups = $subNodes['attrGroups'] ?? [];
+ }
+
+ public function getSubNodeNames() : array {
+ return ['attrGroups', 'flags', 'byRef', 'name', 'params', 'returnType', 'stmts'];
+ }
+
+ public function returnsByRef() : bool {
+ return $this->byRef;
+ }
+
+ public function getParams() : array {
+ return $this->params;
+ }
+
+ public function getReturnType() {
+ return $this->returnType;
+ }
+
+ public function getStmts() {
+ return $this->stmts;
+ }
+
+ 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;
+ }
+
+ /**
+ * Whether the method is protected.
+ *
+ * @return bool
+ */
+ public function isProtected() : bool {
+ return (bool) ($this->flags & Class_::MODIFIER_PROTECTED);
+ }
+
+ /**
+ * Whether the method is private.
+ *
+ * @return bool
+ */
+ public function isPrivate() : bool {
+ return (bool) ($this->flags & Class_::MODIFIER_PRIVATE);
+ }
+
+ /**
+ * Whether the method is abstract.
+ *
+ * @return bool
+ */
+ public function isAbstract() : bool {
+ return (bool) ($this->flags & Class_::MODIFIER_ABSTRACT);
+ }
+
+ /**
+ * Whether the method is final.
+ *
+ * @return bool
+ */
+ public function isFinal() : bool {
+ return (bool) ($this->flags & Class_::MODIFIER_FINAL);
+ }
+
+ /**
+ * Whether the method is static.
+ *
+ * @return bool
+ */
+ public function isStatic() : bool {
+ return (bool) ($this->flags & Class_::MODIFIER_STATIC);
+ }
+
+ /**
+ * Whether the method is magic.
+ *
+ * @return bool
+ */
+ public function isMagic() : bool {
+ return isset(self::$magicNames[$this->name->toLowerString()]);
+ }
+
+ 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
new file mode 100644
index 00000000..52ed6c6c
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Class_.php
@@ -0,0 +1,137 @@
+ 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;
+ $this->flags = $subNodes['flags'] ?? $subNodes['type'] ?? 0;
+ $this->name = \is_string($name) ? new Node\Identifier($name) : $name;
+ $this->extends = $subNodes['extends'] ?? null;
+ $this->implements = $subNodes['implements'] ?? [];
+ $this->stmts = $subNodes['stmts'] ?? [];
+ $this->attrGroups = $subNodes['attrGroups'] ?? [];
+ }
+
+ 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);
+ }
+
+ /**
+ * Whether the class is final.
+ *
+ * @return bool
+ */
+ public function isFinal() : bool {
+ return (bool) ($this->flags & self::MODIFIER_FINAL);
+ }
+
+ public function isReadonly() : bool {
+ return (bool) ($this->flags & self::MODIFIER_READONLY);
+ }
+
+ /**
+ * Whether the class is anonymous.
+ *
+ * @return bool
+ */
+ public function isAnonymous() : bool {
+ return null === $this->name;
+ }
+
+ /**
+ * @internal
+ */
+ public static function verifyClassModifier($a, $b) {
+ if ($a & self::MODIFIER_ABSTRACT && $b & self::MODIFIER_ABSTRACT) {
+ throw new Error('Multiple abstract modifiers are not allowed');
+ }
+
+ if ($a & self::MODIFIER_FINAL && $b & self::MODIFIER_FINAL) {
+ throw new Error('Multiple final modifiers are not allowed');
+ }
+
+ if ($a & self::MODIFIER_READONLY && $b & self::MODIFIER_READONLY) {
+ throw new Error('Multiple readonly modifiers are not allowed');
+ }
+
+ if ($a & 48 && $b & 48) {
+ throw new Error('Cannot use the final modifier on an abstract class');
+ }
+ }
+
+ /**
+ * @internal
+ */
+ 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 {
+ 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
new file mode 100644
index 00000000..e6316345
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Const_.php
@@ -0,0 +1,30 @@
+attributes = $attributes;
+ $this->consts = $consts;
+ }
+
+ public function getSubNodeNames() : array {
+ return ['consts'];
+ }
+
+ 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
new file mode 100644
index 00000000..24882683
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Continue_.php
@@ -0,0 +1,30 @@
+attributes = $attributes;
+ $this->num = $num;
+ }
+
+ public function getSubNodeNames() : array {
+ return ['num'];
+ }
+
+ 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
new file mode 100644
index 00000000..ac07f30c
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/DeclareDeclare.php
@@ -0,0 +1,34 @@
+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';
+ }
+}
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Declare_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Declare_.php
new file mode 100644
index 00000000..f46ff0ba
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Declare_.php
@@ -0,0 +1,34 @@
+attributes = $attributes;
+ $this->declares = $declares;
+ $this->stmts = $stmts;
+ }
+
+ public function getSubNodeNames() : array {
+ return ['declares', 'stmts'];
+ }
+
+ 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
new file mode 100644
index 00000000..78e90da0
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Do_.php
@@ -0,0 +1,34 @@
+attributes = $attributes;
+ $this->cond = $cond;
+ $this->stmts = $stmts;
+ }
+
+ public function getSubNodeNames() : array {
+ return ['stmts', 'cond'];
+ }
+
+ 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
new file mode 100644
index 00000000..7cc50d5d
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Echo_.php
@@ -0,0 +1,30 @@
+attributes = $attributes;
+ $this->exprs = $exprs;
+ }
+
+ public function getSubNodeNames() : array {
+ return ['exprs'];
+ }
+
+ 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
new file mode 100644
index 00000000..eef1ece3
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/ElseIf_.php
@@ -0,0 +1,34 @@
+attributes = $attributes;
+ $this->cond = $cond;
+ $this->stmts = $stmts;
+ }
+
+ public function getSubNodeNames() : array {
+ return ['cond', 'stmts'];
+ }
+
+ 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
new file mode 100644
index 00000000..0e61778e
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Else_.php
@@ -0,0 +1,30 @@
+attributes = $attributes;
+ $this->stmts = $stmts;
+ }
+
+ public function getSubNodeNames() : array {
+ return ['stmts'];
+ }
+
+ 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
new file mode 100644
index 00000000..5beff8b3
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/EnumCase.php
@@ -0,0 +1,37 @@
+name = \is_string($name) ? new Node\Identifier($name) : $name;
+ $this->expr = $expr;
+ $this->attrGroups = $attrGroups;
+ }
+
+ public function getSubNodeNames() : array {
+ return ['attrGroups', 'name', 'expr'];
+ }
+
+ 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
new file mode 100644
index 00000000..3a50c225
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Enum_.php
@@ -0,0 +1,40 @@
+ 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;
+ $this->scalarType = $subNodes['scalarType'] ?? null;
+ $this->implements = $subNodes['implements'] ?? [];
+ $this->stmts = $subNodes['stmts'] ?? [];
+ $this->attrGroups = $subNodes['attrGroups'] ?? [];
+
+ parent::__construct($attributes);
+ }
+
+ public function getSubNodeNames() : array {
+ return ['attrGroups', 'name', 'scalarType', 'implements', 'stmts'];
+ }
+
+ 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
new file mode 100644
index 00000000..99d1687d
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Expression.php
@@ -0,0 +1,33 @@
+attributes = $attributes;
+ $this->expr = $expr;
+ }
+
+ public function getSubNodeNames() : array {
+ return ['expr'];
+ }
+
+ 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
new file mode 100644
index 00000000..d55b8b68
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Finally_.php
@@ -0,0 +1,30 @@
+attributes = $attributes;
+ $this->stmts = $stmts;
+ }
+
+ public function getSubNodeNames() : array {
+ return ['stmts'];
+ }
+
+ 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
new file mode 100644
index 00000000..1323d37c
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/For_.php
@@ -0,0 +1,43 @@
+ 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;
+ $this->init = $subNodes['init'] ?? [];
+ $this->cond = $subNodes['cond'] ?? [];
+ $this->loop = $subNodes['loop'] ?? [];
+ $this->stmts = $subNodes['stmts'] ?? [];
+ }
+
+ public function getSubNodeNames() : array {
+ return ['init', 'cond', 'loop', 'stmts'];
+ }
+
+ 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
new file mode 100644
index 00000000..0556a7ce
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Foreach_.php
@@ -0,0 +1,47 @@
+ 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;
+ $this->expr = $expr;
+ $this->keyVar = $subNodes['keyVar'] ?? null;
+ $this->byRef = $subNodes['byRef'] ?? false;
+ $this->valueVar = $valueVar;
+ $this->stmts = $subNodes['stmts'] ?? [];
+ }
+
+ public function getSubNodeNames() : array {
+ return ['expr', 'keyVar', 'byRef', 'valueVar', 'stmts'];
+ }
+
+ 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
new file mode 100644
index 00000000..c2ccae24
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Function_.php
@@ -0,0 +1,77 @@
+ 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->stmts = $subNodes['stmts'] ?? [];
+ $this->attrGroups = $subNodes['attrGroups'] ?? [];
+ }
+
+ public function getSubNodeNames() : array {
+ return ['attrGroups', 'byRef', 'name', 'params', 'returnType', 'stmts'];
+ }
+
+ public function returnsByRef() : bool {
+ return $this->byRef;
+ }
+
+ public function getParams() : array {
+ return $this->params;
+ }
+
+ public function getReturnType() {
+ return $this->returnType;
+ }
+
+ public function getAttrGroups() : array {
+ return $this->attrGroups;
+ }
+
+ /** @return Node\Stmt[] */
+ public function getStmts() : array {
+ return $this->stmts;
+ }
+
+ 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
new file mode 100644
index 00000000..a0022ad9
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Global_.php
@@ -0,0 +1,30 @@
+attributes = $attributes;
+ $this->vars = $vars;
+ }
+
+ public function getSubNodeNames() : array {
+ return ['vars'];
+ }
+
+ 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
new file mode 100644
index 00000000..24a57f78
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Goto_.php
@@ -0,0 +1,31 @@
+attributes = $attributes;
+ $this->name = \is_string($name) ? new Identifier($name) : $name;
+ }
+
+ public function getSubNodeNames() : array {
+ return ['name'];
+ }
+
+ 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
new file mode 100644
index 00000000..24520d22
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/GroupUse.php
@@ -0,0 +1,39 @@
+attributes = $attributes;
+ $this->type = $type;
+ $this->prefix = $prefix;
+ $this->uses = $uses;
+ }
+
+ public function getSubNodeNames() : array {
+ return ['type', 'prefix', 'uses'];
+ }
+
+ 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
new file mode 100644
index 00000000..8e624e0f
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/HaltCompiler.php
@@ -0,0 +1,30 @@
+attributes = $attributes;
+ $this->remaining = $remaining;
+ }
+
+ public function getSubNodeNames() : array {
+ return ['remaining'];
+ }
+
+ 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
new file mode 100644
index 00000000..a1bae4bf
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/If_.php
@@ -0,0 +1,43 @@
+ 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;
+ $this->cond = $cond;
+ $this->stmts = $subNodes['stmts'] ?? [];
+ $this->elseifs = $subNodes['elseifs'] ?? [];
+ $this->else = $subNodes['else'] ?? null;
+ }
+
+ public function getSubNodeNames() : array {
+ return ['cond', 'stmts', 'elseifs', 'else'];
+ }
+
+ 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
new file mode 100644
index 00000000..0711d284
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/InlineHTML.php
@@ -0,0 +1,30 @@
+attributes = $attributes;
+ $this->value = $value;
+ }
+
+ public function getSubNodeNames() : array {
+ return ['value'];
+ }
+
+ 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
new file mode 100644
index 00000000..4d587dd4
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Interface_.php
@@ -0,0 +1,37 @@
+ 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;
+ $this->name = \is_string($name) ? new Node\Identifier($name) : $name;
+ $this->extends = $subNodes['extends'] ?? [];
+ $this->stmts = $subNodes['stmts'] ?? [];
+ $this->attrGroups = $subNodes['attrGroups'] ?? [];
+ }
+
+ public function getSubNodeNames() : array {
+ return ['attrGroups', 'name', 'extends', 'stmts'];
+ }
+
+ 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
new file mode 100644
index 00000000..3edcb3be
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Label.php
@@ -0,0 +1,31 @@
+attributes = $attributes;
+ $this->name = \is_string($name) ? new Identifier($name) : $name;
+ }
+
+ public function getSubNodeNames() : array {
+ return ['name'];
+ }
+
+ public function getType() : string {
+ return 'Stmt_Label';
+ }
+}
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Namespace_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Namespace_.php
new file mode 100644
index 00000000..c6320457
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Namespace_.php
@@ -0,0 +1,38 @@
+attributes = $attributes;
+ $this->name = $name;
+ $this->stmts = $stmts;
+ }
+
+ public function getSubNodeNames() : array {
+ return ['name', 'stmts'];
+ }
+
+ 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
new file mode 100644
index 00000000..f86f8df7
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Nop.php
@@ -0,0 +1,17 @@
+attributes = $attributes;
+ $this->flags = $flags;
+ $this->props = $props;
+ $this->type = \is_string($type) ? new Identifier($type) : $type;
+ $this->attrGroups = $attrGroups;
+ }
+
+ 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;
+ }
+
+ /**
+ * Whether the property is protected.
+ *
+ * @return bool
+ */
+ public function isProtected() : bool {
+ return (bool) ($this->flags & Class_::MODIFIER_PROTECTED);
+ }
+
+ /**
+ * Whether the property is private.
+ *
+ * @return bool
+ */
+ public function isPrivate() : bool {
+ return (bool) ($this->flags & Class_::MODIFIER_PRIVATE);
+ }
+
+ /**
+ * Whether the property is static.
+ *
+ * @return bool
+ */
+ public function isStatic() : bool {
+ return (bool) ($this->flags & Class_::MODIFIER_STATIC);
+ }
+
+ /**
+ * Whether the property is readonly.
+ *
+ * @return bool
+ */
+ public function isReadonly() : bool {
+ return (bool) ($this->flags & Class_::MODIFIER_READONLY);
+ }
+
+ 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
new file mode 100644
index 00000000..205731e2
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/PropertyProperty.php
@@ -0,0 +1,34 @@
+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';
+ }
+}
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Return_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Return_.php
new file mode 100644
index 00000000..efc578c5
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Return_.php
@@ -0,0 +1,30 @@
+attributes = $attributes;
+ $this->expr = $expr;
+ }
+
+ public function getSubNodeNames() : array {
+ return ['expr'];
+ }
+
+ 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
new file mode 100644
index 00000000..29584560
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/StaticVar.php
@@ -0,0 +1,37 @@
+attributes = $attributes;
+ $this->var = $var;
+ $this->default = $default;
+ }
+
+ public function getSubNodeNames() : array {
+ return ['var', 'default'];
+ }
+
+ public function getType() : string {
+ return 'Stmt_StaticVar';
+ }
+}
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Static_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Static_.php
new file mode 100644
index 00000000..464898ff
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Static_.php
@@ -0,0 +1,30 @@
+attributes = $attributes;
+ $this->vars = $vars;
+ }
+
+ public function getSubNodeNames() : array {
+ return ['vars'];
+ }
+
+ 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
new file mode 100644
index 00000000..2c8dae02
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Switch_.php
@@ -0,0 +1,34 @@
+attributes = $attributes;
+ $this->cond = $cond;
+ $this->cases = $cases;
+ }
+
+ public function getSubNodeNames() : array {
+ return ['cond', 'cases'];
+ }
+
+ 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
new file mode 100644
index 00000000..a34e2b36
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Throw_.php
@@ -0,0 +1,30 @@
+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
new file mode 100644
index 00000000..9e97053b
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUse.php
@@ -0,0 +1,34 @@
+attributes = $attributes;
+ $this->traits = $traits;
+ $this->adaptations = $adaptations;
+ }
+
+ public function getSubNodeNames() : array {
+ return ['traits', 'adaptations'];
+ }
+
+ 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
new file mode 100644
index 00000000..8bdd2c04
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUseAdaptation.php
@@ -0,0 +1,13 @@
+attributes = $attributes;
+ $this->trait = $trait;
+ $this->method = \is_string($method) ? new Node\Identifier($method) : $method;
+ $this->newModifier = $newModifier;
+ $this->newName = \is_string($newName) ? new Node\Identifier($newName) : $newName;
+ }
+
+ public function getSubNodeNames() : array {
+ return ['trait', 'method', 'newModifier', 'newName'];
+ }
+
+ 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
new file mode 100644
index 00000000..80385f64
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUseAdaptation/Precedence.php
@@ -0,0 +1,34 @@
+attributes = $attributes;
+ $this->trait = $trait;
+ $this->method = \is_string($method) ? new Node\Identifier($method) : $method;
+ $this->insteadof = $insteadof;
+ }
+
+ public function getSubNodeNames() : array {
+ return ['trait', 'method', 'insteadof'];
+ }
+
+ 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
new file mode 100644
index 00000000..0cec203a
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Trait_.php
@@ -0,0 +1,32 @@
+ array(): Statements
+ * 'attrGroups' => array(): PHP attribute groups
+ * @param array $attributes Additional attributes
+ */
+ public function __construct($name, array $subNodes = [], array $attributes = []) {
+ $this->attributes = $attributes;
+ $this->name = \is_string($name) ? new Node\Identifier($name) : $name;
+ $this->stmts = $subNodes['stmts'] ?? [];
+ $this->attrGroups = $subNodes['attrGroups'] ?? [];
+ }
+
+ public function getSubNodeNames() : array {
+ return ['attrGroups', 'name', 'stmts'];
+ }
+
+ 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
new file mode 100644
index 00000000..7fc158c5
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/TryCatch.php
@@ -0,0 +1,38 @@
+attributes = $attributes;
+ $this->stmts = $stmts;
+ $this->catches = $catches;
+ $this->finally = $finally;
+ }
+
+ public function getSubNodeNames() : array {
+ return ['stmts', 'catches', 'finally'];
+ }
+
+ 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
new file mode 100644
index 00000000..310e427a
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Unset_.php
@@ -0,0 +1,30 @@
+attributes = $attributes;
+ $this->vars = $vars;
+ }
+
+ public function getSubNodeNames() : array {
+ return ['vars'];
+ }
+
+ 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
new file mode 100644
index 00000000..32bd7847
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/UseUse.php
@@ -0,0 +1,52 @@
+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';
+ }
+}
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Use_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Use_.php
new file mode 100644
index 00000000..8753da31
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Use_.php
@@ -0,0 +1,47 @@
+attributes = $attributes;
+ $this->type = $type;
+ $this->uses = $uses;
+ }
+
+ public function getSubNodeNames() : array {
+ return ['type', 'uses'];
+ }
+
+ 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
new file mode 100644
index 00000000..f41034f8
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/While_.php
@@ -0,0 +1,34 @@
+attributes = $attributes;
+ $this->cond = $cond;
+ $this->stmts = $stmts;
+ }
+
+ public function getSubNodeNames() : array {
+ return ['cond', 'stmts'];
+ }
+
+ 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
new file mode 100644
index 00000000..93cecd23
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/UnionType.php
@@ -0,0 +1,28 @@
+attributes = $attributes;
+ $this->types = $types;
+ }
+
+ public function getSubNodeNames() : array {
+ return ['types'];
+ }
+
+ 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
new file mode 100644
index 00000000..a30807a6
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/VarLikeIdentifier.php
@@ -0,0 +1,17 @@
+attributes = $attributes;
+ }
+
+ public function getType(): string {
+ return 'VariadicPlaceholder';
+ }
+
+ 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
new file mode 100644
index 00000000..04514da1
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/NodeAbstract.php
@@ -0,0 +1,178 @@
+attributes = $attributes;
+ }
+
+ /**
+ * Gets line the node started in (alias of getStartLine).
+ *
+ * @return int Start line (or -1 if not available)
+ */
+ public function getLine() : int {
+ return $this->attributes['startLine'] ?? -1;
+ }
+
+ /**
+ * Gets line the node started in.
+ *
+ * Requires the 'startLine' attribute to be enabled in the lexer (enabled by default).
+ *
+ * @return int Start line (or -1 if not available)
+ */
+ public function getStartLine() : int {
+ return $this->attributes['startLine'] ?? -1;
+ }
+
+ /**
+ * Gets the line the node ended in.
+ *
+ * Requires the 'endLine' attribute to be enabled in the lexer (enabled by default).
+ *
+ * @return int End line (or -1 if not available)
+ */
+ public function getEndLine() : int {
+ return $this->attributes['endLine'] ?? -1;
+ }
+
+ /**
+ * Gets the token offset of the first token that is part of this node.
+ *
+ * The offset is an index into the array returned by Lexer::getTokens().
+ *
+ * Requires the 'startTokenPos' attribute to be enabled in the lexer (DISABLED by default).
+ *
+ * @return int Token start position (or -1 if not available)
+ */
+ public function getStartTokenPos() : int {
+ return $this->attributes['startTokenPos'] ?? -1;
+ }
+
+ /**
+ * Gets the token offset of the last token that is part of this node.
+ *
+ * The offset is an index into the array returned by Lexer::getTokens().
+ *
+ * Requires the 'endTokenPos' attribute to be enabled in the lexer (DISABLED by default).
+ *
+ * @return int Token end position (or -1 if not available)
+ */
+ public function getEndTokenPos() : int {
+ return $this->attributes['endTokenPos'] ?? -1;
+ }
+
+ /**
+ * Gets the file offset of the first character that is part of this node.
+ *
+ * Requires the 'startFilePos' attribute to be enabled in the lexer (DISABLED by default).
+ *
+ * @return int File start position (or -1 if not available)
+ */
+ public function getStartFilePos() : int {
+ return $this->attributes['startFilePos'] ?? -1;
+ }
+
+ /**
+ * Gets the file offset of the last character that is part of this node.
+ *
+ * Requires the 'endFilePos' attribute to be enabled in the lexer (DISABLED by default).
+ *
+ * @return int File end position (or -1 if not available)
+ */
+ public function getEndFilePos() : int {
+ return $this->attributes['endFilePos'] ?? -1;
+ }
+
+ /**
+ * Gets all comments directly preceding this node.
+ *
+ * The comments are also available through the "comments" attribute.
+ *
+ * @return Comment[]
+ */
+ public function getComments() : array {
+ return $this->attributes['comments'] ?? [];
+ }
+
+ /**
+ * Gets the doc comment of the node.
+ *
+ * @return null|Comment\Doc Doc comment object or null
+ */
+ public function getDocComment() {
+ $comments = $this->getComments();
+ for ($i = count($comments) - 1; $i >= 0; $i--) {
+ $comment = $comments[$i];
+ if ($comment instanceof Comment\Doc) {
+ return $comment;
+ }
+ }
+
+ return null;
+ }
+
+ /**
+ * Sets the doc comment of the node.
+ *
+ * This will either replace an existing doc comment or add it to the comments array.
+ *
+ * @param Comment\Doc $docComment Doc comment to set
+ */
+ public function setDocComment(Comment\Doc $docComment) {
+ $comments = $this->getComments();
+ for ($i = count($comments) - 1; $i >= 0; $i--) {
+ if ($comments[$i] instanceof Comment\Doc) {
+ // Replace existing doc comment.
+ $comments[$i] = $docComment;
+ $this->setAttribute('comments', $comments);
+ return;
+ }
+ }
+
+ // Append new doc comment.
+ $comments[] = $docComment;
+ $this->setAttribute('comments', $comments);
+ }
+
+ public function setAttribute(string $key, $value) {
+ $this->attributes[$key] = $value;
+ }
+
+ public function hasAttribute(string $key) : bool {
+ return array_key_exists($key, $this->attributes);
+ }
+
+ public function getAttribute(string $key, $default = null) {
+ if (array_key_exists($key, $this->attributes)) {
+ return $this->attributes[$key];
+ }
+
+ return $default;
+ }
+
+ public function getAttributes() : array {
+ return $this->attributes;
+ }
+
+ public function setAttributes(array $attributes) {
+ $this->attributes = $attributes;
+ }
+
+ /**
+ * @return 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
new file mode 100644
index 00000000..ba622efd
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/NodeDumper.php
@@ -0,0 +1,206 @@
+dumpComments = !empty($options['dumpComments']);
+ $this->dumpPositions = !empty($options['dumpPositions']);
+ }
+
+ /**
+ * Dumps a node or array.
+ *
+ * @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 {
+ $this->code = $code;
+ return $this->dumpRecursive($node);
+ }
+
+ protected function dumpRecursive($node) {
+ if ($node instanceof Node) {
+ $r = $node->getType();
+ if ($this->dumpPositions && null !== $p = $this->dumpPosition($node)) {
+ $r .= $p;
+ }
+ $r .= '(';
+
+ foreach ($node->getSubNodeNames() as $key) {
+ $r .= "\n " . $key . ': ';
+
+ $value = $node->$key;
+ if (null === $value) {
+ $r .= 'null';
+ } elseif (false === $value) {
+ $r .= 'false';
+ } elseif (true === $value) {
+ $r .= 'true';
+ } elseif (is_scalar($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;
+ }
+ } else {
+ $r .= str_replace("\n", "\n ", $this->dumpRecursive($value));
+ }
+ }
+
+ if ($this->dumpComments && $comments = $node->getComments()) {
+ $r .= "\n comments: " . str_replace("\n", "\n ", $this->dumpRecursive($comments));
+ }
+ } elseif (is_array($node)) {
+ $r = 'array(';
+
+ foreach ($node as $key => $value) {
+ $r .= "\n " . $key . ': ';
+
+ 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));
+ }
+ }
+ } elseif ($node instanceof Comment) {
+ return $node->getReformattedText();
+ } else {
+ throw new \InvalidArgumentException('Can only dump nodes and arrays.');
+ }
+
+ return $r . "\n)";
+ }
+
+ protected function dumpFlags($flags) {
+ $strs = [];
+ if ($flags & Class_::MODIFIER_PUBLIC) {
+ $strs[] = 'MODIFIER_PUBLIC';
+ }
+ if ($flags & Class_::MODIFIER_PROTECTED) {
+ $strs[] = 'MODIFIER_PROTECTED';
+ }
+ if ($flags & Class_::MODIFIER_PRIVATE) {
+ $strs[] = 'MODIFIER_PRIVATE';
+ }
+ if ($flags & Class_::MODIFIER_ABSTRACT) {
+ $strs[] = 'MODIFIER_ABSTRACT';
+ }
+ if ($flags & Class_::MODIFIER_STATIC) {
+ $strs[] = 'MODIFIER_STATIC';
+ }
+ if ($flags & Class_::MODIFIER_FINAL) {
+ $strs[] = 'MODIFIER_FINAL';
+ }
+ if ($flags & Class_::MODIFIER_READONLY) {
+ $strs[] = 'MODIFIER_READONLY';
+ }
+
+ if ($strs) {
+ return implode(' | ', $strs) . ' (' . $flags . ')';
+ } else {
+ return $flags;
+ }
+ }
+
+ protected function dumpIncludeType($type) {
+ $map = [
+ 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 = [
+ 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 . ')';
+ }
+
+ /**
+ * Dump node position, if possible.
+ *
+ * @param Node $node Node for which to dump position
+ *
+ * @return string|null Dump of position, or null if position information not available
+ */
+ protected function dumpPosition(Node $node) {
+ if (!$node->hasAttribute('startLine') || !$node->hasAttribute('endLine')) {
+ return null;
+ }
+
+ $start = $node->getStartLine();
+ $end = $node->getEndLine();
+ if ($node->hasAttribute('startFilePos') && $node->hasAttribute('endFilePos')
+ && null !== $this->code
+ ) {
+ $start .= ':' . $this->toColumn($this->code, $node->getStartFilePos());
+ $end .= ':' . $this->toColumn($this->code, $node->getEndFilePos());
+ }
+ return "[$start - $end]";
+ }
+
+ // Copied from Error class
+ private function toColumn($code, $pos) {
+ if ($pos > strlen($code)) {
+ throw new \RuntimeException('Invalid position information');
+ }
+
+ $lineStartPos = strrpos($code, "\n", $pos - strlen($code));
+ if (false === $lineStartPos) {
+ $lineStartPos = -1;
+ }
+
+ return $pos - $lineStartPos;
+ }
+}
diff --git a/vendor/nikic/php-parser/lib/PhpParser/NodeFinder.php b/vendor/nikic/php-parser/lib/PhpParser/NodeFinder.php
new file mode 100644
index 00000000..2e7cfdad
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/NodeFinder.php
@@ -0,0 +1,81 @@
+addVisitor($visitor);
+ $traverser->traverse($nodes);
+
+ return $visitor->getFoundNodes();
+ }
+
+ /**
+ * Find all nodes that are instances of a certain class.
+ *
+ * @param Node|Node[] $nodes Single node or array of nodes to search in
+ * @param string $class Class name
+ *
+ * @return Node[] Found nodes (all instances of $class)
+ */
+ public function findInstanceOf($nodes, string $class) : array {
+ return $this->find($nodes, function ($node) use ($class) {
+ return $node instanceof $class;
+ });
+ }
+
+ /**
+ * Find first node satisfying a filter callback.
+ *
+ * @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) {
+ if (!is_array($nodes)) {
+ $nodes = [$nodes];
+ }
+
+ $visitor = new FirstFindingVisitor($filter);
+
+ $traverser = new NodeTraverser;
+ $traverser->addVisitor($visitor);
+ $traverser->traverse($nodes);
+
+ return $visitor->getFoundNode();
+ }
+
+ /**
+ * 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
+ *
+ * @return null|Node Found node, which is an instance of $class (or null if none found)
+ */
+ public function findFirstInstanceOf($nodes, string $class) {
+ 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
new file mode 100644
index 00000000..97d45bda
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/NodeTraverser.php
@@ -0,0 +1,291 @@
+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;
+ }
+ }
+ }
+
+ /**
+ * Traverses an array of nodes using the registered visitors.
+ *
+ * @param Node[] $nodes Array of nodes
+ *
+ * @return Node[] Traversed array of nodes
+ */
+ public function traverse(array $nodes) : array {
+ $this->stopTraversal = false;
+
+ foreach ($this->visitors as $visitor) {
+ if (null !== $return = $visitor->beforeTraverse($nodes)) {
+ $nodes = $return;
+ }
+ }
+
+ $nodes = $this->traverseArray($nodes);
+
+ foreach ($this->visitors as $visitor) {
+ if (null !== $return = $visitor->afterTraverse($nodes)) {
+ $nodes = $return;
+ }
+ }
+
+ return $nodes;
+ }
+
+ /**
+ * 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 {
+ foreach ($node->getSubNodeNames() as $name) {
+ $subNode =& $node->$name;
+
+ if (\is_array($subNode)) {
+ $subNode = $this->traverseArray($subNode);
+ if ($this->stopTraversal) {
+ break;
+ }
+ } elseif ($subNode instanceof Node) {
+ $traverseChildren = true;
+ $breakVisitorIndex = null;
+
+ 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) {
+ $traverseChildren = false;
+ } elseif (self::DONT_TRAVERSE_CURRENT_AND_CHILDREN === $return) {
+ $traverseChildren = false;
+ $breakVisitorIndex = $visitorIndex;
+ break;
+ } elseif (self::STOP_TRAVERSAL === $return) {
+ $this->stopTraversal = true;
+ break 2;
+ } else {
+ throw new \LogicException(
+ 'enterNode() returned invalid value of type ' . gettype($return)
+ );
+ }
+ }
+ }
+
+ if ($traverseChildren) {
+ $subNode = $this->traverseNode($subNode);
+ if ($this->stopTraversal) {
+ break;
+ }
+ }
+
+ foreach ($this->visitors as $visitorIndex => $visitor) {
+ $return = $visitor->leaveNode($subNode);
+
+ if (null !== $return) {
+ if ($return instanceof Node) {
+ $this->ensureReplacementReasonable($subNode, $return);
+ $subNode = $return;
+ } elseif (self::STOP_TRAVERSAL === $return) {
+ $this->stopTraversal = true;
+ break 2;
+ } elseif (\is_array($return)) {
+ throw new \LogicException(
+ 'leaveNode() may only return an array ' .
+ 'if the parent structure is an array'
+ );
+ } else {
+ throw new \LogicException(
+ 'leaveNode() returned invalid value of type ' . gettype($return)
+ );
+ }
+ }
+
+ if ($breakVisitorIndex === $visitorIndex) {
+ break;
+ }
+ }
+ }
+ }
+
+ return $node;
+ }
+
+ /**
+ * Recursively traverse array (usually of nodes).
+ *
+ * @param array $nodes Array to traverse
+ *
+ * @return array Result of traversal (may be original array or changed one)
+ */
+ protected function traverseArray(array $nodes) : array {
+ $doNodes = [];
+
+ foreach ($nodes as $i => &$node) {
+ if ($node instanceof Node) {
+ $traverseChildren = true;
+ $breakVisitorIndex = null;
+
+ 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) {
+ $traverseChildren = false;
+ } elseif (self::DONT_TRAVERSE_CURRENT_AND_CHILDREN === $return) {
+ $traverseChildren = false;
+ $breakVisitorIndex = $visitorIndex;
+ break;
+ } elseif (self::STOP_TRAVERSAL === $return) {
+ $this->stopTraversal = true;
+ break 2;
+ } else {
+ throw new \LogicException(
+ 'enterNode() returned invalid value of type ' . gettype($return)
+ );
+ }
+ }
+ }
+
+ if ($traverseChildren) {
+ $node = $this->traverseNode($node);
+ if ($this->stopTraversal) {
+ break;
+ }
+ }
+
+ foreach ($this->visitors as $visitorIndex => $visitor) {
+ $return = $visitor->leaveNode($node);
+
+ if (null !== $return) {
+ if ($return instanceof Node) {
+ $this->ensureReplacementReasonable($node, $return);
+ $node = $return;
+ } elseif (\is_array($return)) {
+ $doNodes[] = [$i, $return];
+ break;
+ } elseif (self::REMOVE_NODE === $return) {
+ $doNodes[] = [$i, []];
+ break;
+ } elseif (self::STOP_TRAVERSAL === $return) {
+ $this->stopTraversal = true;
+ break 2;
+ } elseif (false === $return) {
+ throw new \LogicException(
+ 'bool(false) return from leaveNode() no longer supported. ' .
+ 'Return NodeTraverser::REMOVE_NODE instead'
+ );
+ } 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');
+ }
+ }
+
+ if (!empty($doNodes)) {
+ while (list($i, $replace) = array_pop($doNodes)) {
+ array_splice($nodes, $i, 1, $replace);
+ }
+ }
+
+ return $nodes;
+ }
+
+ private function ensureReplacementReasonable($old, $new) {
+ if ($old instanceof Node\Stmt && $new instanceof Node\Expr) {
+ throw new \LogicException(
+ "Trying to replace statement ({$old->getType()}) " .
+ "with expression ({$new->getType()}). Are you missing a " .
+ "Stmt_Expression wrapper?"
+ );
+ }
+
+ if ($old instanceof Node\Expr && $new instanceof Node\Stmt) {
+ throw new \LogicException(
+ "Trying to replace expression ({$old->getType()}) " .
+ "with statement ({$new->getType()})"
+ );
+ }
+ }
+}
diff --git a/vendor/nikic/php-parser/lib/PhpParser/NodeTraverserInterface.php b/vendor/nikic/php-parser/lib/PhpParser/NodeTraverserInterface.php
new file mode 100644
index 00000000..77ff3d27
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/NodeTraverserInterface.php
@@ -0,0 +1,29 @@
+ $node stays as-is
+ * * NodeTraverser::DONT_TRAVERSE_CHILDREN
+ * => Children of $node are not traversed. $node stays as-is
+ * * NodeTraverser::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)
+ */
+ public function enterNode(Node $node);
+
+ /**
+ * Called when leaving a node.
+ *
+ * Return value semantics:
+ * * null
+ * => $node stays as-is
+ * * NodeTraverser::REMOVE_NODE
+ * => $node is removed from the parent array
+ * * NodeTraverser::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)
+ * * otherwise
+ * => $node is set to the return value
+ *
+ * @param Node $node Node
+ *
+ * @return null|int|Node|Node[] Replacement node (or special return value)
+ */
+ public function leaveNode(Node $node);
+
+ /**
+ * Called once after traversal.
+ *
+ * Return value semantics:
+ * * null: $nodes stays as-is
+ * * otherwise: $nodes is set to the return value
+ *
+ * @param Node[] $nodes Array of nodes
+ *
+ * @return null|Node[] Array of nodes
+ */
+ public function afterTraverse(array $nodes);
+}
diff --git a/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/CloningVisitor.php b/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/CloningVisitor.php
new file mode 100644
index 00000000..a85fa493
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/CloningVisitor.php
@@ -0,0 +1,20 @@
+setAttribute('origNode', $origNode);
+ return $node;
+ }
+}
diff --git a/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/FindingVisitor.php b/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/FindingVisitor.php
new file mode 100644
index 00000000..9531edbc
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/FindingVisitor.php
@@ -0,0 +1,48 @@
+filterCallback = $filterCallback;
+ }
+
+ /**
+ * Get found nodes satisfying the filter callback.
+ *
+ * Nodes are returned in pre-order.
+ *
+ * @return Node[] Found nodes
+ */
+ public function getFoundNodes() : array {
+ return $this->foundNodes;
+ }
+
+ public function beforeTraverse(array $nodes) {
+ $this->foundNodes = [];
+
+ return null;
+ }
+
+ public function enterNode(Node $node) {
+ $filterCallback = $this->filterCallback;
+ if ($filterCallback($node)) {
+ $this->foundNodes[] = $node;
+ }
+
+ return null;
+ }
+}
diff --git a/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/FirstFindingVisitor.php b/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/FirstFindingVisitor.php
new file mode 100644
index 00000000..596a7d7f
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/FirstFindingVisitor.php
@@ -0,0 +1,50 @@
+filterCallback = $filterCallback;
+ }
+
+ /**
+ * Get found node satisfying the filter callback.
+ *
+ * Returns null if no node satisfies the filter callback.
+ *
+ * @return null|Node Found node (or null if not found)
+ */
+ public function getFoundNode() {
+ return $this->foundNode;
+ }
+
+ public function beforeTraverse(array $nodes) {
+ $this->foundNode = null;
+
+ return null;
+ }
+
+ public function enterNode(Node $node) {
+ $filterCallback = $this->filterCallback;
+ if ($filterCallback($node)) {
+ $this->foundNode = $node;
+ return NodeTraverser::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
new file mode 100644
index 00000000..d0e7de02
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/NameResolver.php
@@ -0,0 +1,257 @@
+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 {
+ return $this->nameContext;
+ }
+
+ public function beforeTraverse(array $nodes) {
+ $this->nameContext->startNamespace();
+ return null;
+ }
+
+ public function enterNode(Node $node) {
+ if ($node instanceof Stmt\Namespace_) {
+ $this->nameContext->startNamespace($node->name);
+ } elseif ($node instanceof Stmt\Use_) {
+ foreach ($node->uses as $use) {
+ $this->addAlias($use, $node->type, null);
+ }
+ } elseif ($node instanceof Stmt\GroupUse) {
+ foreach ($node->uses as $use) {
+ $this->addAlias($use, $node->type, $node->prefix);
+ }
+ } elseif ($node instanceof Stmt\Class_) {
+ if (null !== $node->extends) {
+ $node->extends = $this->resolveClassName($node->extends);
+ }
+
+ foreach ($node->implements as &$interface) {
+ $interface = $this->resolveClassName($interface);
+ }
+
+ $this->resolveAttrGroups($node);
+ if (null !== $node->name) {
+ $this->addNamespacedName($node);
+ }
+ } elseif ($node instanceof Stmt\Interface_) {
+ foreach ($node->extends as &$interface) {
+ $interface = $this->resolveClassName($interface);
+ }
+
+ $this->resolveAttrGroups($node);
+ $this->addNamespacedName($node);
+ } elseif ($node instanceof Stmt\Enum_) {
+ foreach ($node->implements as &$interface) {
+ $interface = $this->resolveClassName($interface);
+ }
+
+ $this->resolveAttrGroups($node);
+ if (null !== $node->name) {
+ $this->addNamespacedName($node);
+ }
+ } elseif ($node instanceof Stmt\Trait_) {
+ $this->resolveAttrGroups($node);
+ $this->addNamespacedName($node);
+ } elseif ($node instanceof Stmt\Function_) {
+ $this->resolveSignature($node);
+ $this->resolveAttrGroups($node);
+ $this->addNamespacedName($node);
+ } elseif ($node instanceof Stmt\ClassMethod
+ || $node instanceof Expr\Closure
+ || $node instanceof Expr\ArrowFunction
+ ) {
+ $this->resolveSignature($node);
+ $this->resolveAttrGroups($node);
+ } elseif ($node instanceof Stmt\Property) {
+ if (null !== $node->type) {
+ $node->type = $this->resolveType($node->type);
+ }
+ $this->resolveAttrGroups($node);
+ } elseif ($node instanceof Stmt\Const_) {
+ foreach ($node->consts as $const) {
+ $this->addNamespacedName($const);
+ }
+ } else if ($node instanceof Stmt\ClassConst) {
+ $this->resolveAttrGroups($node);
+ } else if ($node instanceof Stmt\EnumCase) {
+ $this->resolveAttrGroups($node);
+ } elseif ($node instanceof Expr\StaticCall
+ || $node instanceof Expr\StaticPropertyFetch
+ || $node instanceof Expr\ClassConstFetch
+ || $node instanceof Expr\New_
+ || $node instanceof Expr\Instanceof_
+ ) {
+ if ($node->class instanceof Name) {
+ $node->class = $this->resolveClassName($node->class);
+ }
+ } elseif ($node instanceof Stmt\Catch_) {
+ foreach ($node->types as &$type) {
+ $type = $this->resolveClassName($type);
+ }
+ } elseif ($node instanceof Expr\FuncCall) {
+ if ($node->name instanceof Name) {
+ $node->name = $this->resolveName($node->name, Stmt\Use_::TYPE_FUNCTION);
+ }
+ } elseif ($node instanceof Expr\ConstFetch) {
+ $node->name = $this->resolveName($node->name, Stmt\Use_::TYPE_CONSTANT);
+ } elseif ($node instanceof Stmt\TraitUse) {
+ foreach ($node->traits as &$trait) {
+ $trait = $this->resolveClassName($trait);
+ }
+
+ foreach ($node->adaptations as $adaptation) {
+ if (null !== $adaptation->trait) {
+ $adaptation->trait = $this->resolveClassName($adaptation->trait);
+ }
+
+ if ($adaptation instanceof Stmt\TraitUseAdaptation\Precedence) {
+ foreach ($adaptation->insteadof as &$insteadof) {
+ $insteadof = $this->resolveClassName($insteadof);
+ }
+ }
+ }
+ }
+
+ return null;
+ }
+
+ private function addAlias(Stmt\UseUse $use, int $type, Name $prefix = null) {
+ // Add prefix for group uses
+ $name = $prefix ? Name::concat($prefix, $use->name) : $use->name;
+ // Type is determined either by individual element or whole use declaration
+ $type |= $use->type;
+
+ $this->nameContext->addAlias(
+ $name, (string) $use->getAlias(), $type, $use->getAttributes()
+ );
+ }
+
+ /** @param Stmt\Function_|Stmt\ClassMethod|Expr\Closure $node */
+ private function resolveSignature($node) {
+ foreach ($node->params as $param) {
+ $param->type = $this->resolveType($param->type);
+ $this->resolveAttrGroups($param);
+ }
+ $node->returnType = $this->resolveType($node->returnType);
+ }
+
+ private function resolveType($node) {
+ if ($node instanceof Name) {
+ return $this->resolveClassName($node);
+ }
+ if ($node instanceof Node\NullableType) {
+ $node->type = $this->resolveType($node->type);
+ return $node;
+ }
+ if ($node instanceof Node\UnionType || $node instanceof Node\IntersectionType) {
+ foreach ($node->types as &$type) {
+ $type = $this->resolveType($type);
+ }
+ return $node;
+ }
+ return $node;
+ }
+
+ /**
+ * Resolve name, according to name resolver options.
+ *
+ * @param Name $name Function or constant name to resolve
+ * @param int $type One of Stmt\Use_::TYPE_*
+ *
+ * @return Name Resolved name, or original name with attribute
+ */
+ protected function resolveName(Name $name, int $type) : Name {
+ if (!$this->replaceNodes) {
+ $resolvedName = $this->nameContext->getResolvedName($name, $type);
+ if (null !== $resolvedName) {
+ $name->setAttribute('resolvedName', $resolvedName);
+ } else {
+ $name->setAttribute('namespacedName', FullyQualified::concat(
+ $this->nameContext->getNamespace(), $name, $name->getAttributes()));
+ }
+ return $name;
+ }
+
+ if ($this->preserveOriginalNames) {
+ // Save the original name
+ $originalName = $name;
+ $name = clone $originalName;
+ $name->setAttribute('originalName', $originalName);
+ }
+
+ $resolvedName = $this->nameContext->getResolvedName($name, $type);
+ if (null !== $resolvedName) {
+ return $resolvedName;
+ }
+
+ // unqualified names inside a namespace cannot be resolved at compile-time
+ // add the namespaced version of the name as an attribute
+ $name->setAttribute('namespacedName', FullyQualified::concat(
+ $this->nameContext->getNamespace(), $name, $name->getAttributes()));
+ return $name;
+ }
+
+ protected function resolveClassName(Name $name) {
+ return $this->resolveName($name, Stmt\Use_::TYPE_NORMAL);
+ }
+
+ protected function addNamespacedName(Node $node) {
+ $node->namespacedName = Name::concat(
+ $this->nameContext->getNamespace(), (string) $node->name);
+ }
+
+ protected function resolveAttrGroups(Node $node)
+ {
+ 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
new file mode 100644
index 00000000..ea372e5b
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/NodeConnectingVisitor.php
@@ -0,0 +1,52 @@
+$node->getAttribute('parent')
, the previous
+ * node can be accessed through $node->getAttribute('previous')
,
+ * and the next node can be accessed through $node->getAttribute('next')
.
+ */
+final class NodeConnectingVisitor extends NodeVisitorAbstract
+{
+ /**
+ * @var Node[]
+ */
+ private $stack = [];
+
+ /**
+ * @var ?Node
+ */
+ private $previous;
+
+ public function beforeTraverse(array $nodes) {
+ $this->stack = [];
+ $this->previous = null;
+ }
+
+ public function enterNode(Node $node) {
+ if (!empty($this->stack)) {
+ $node->setAttribute('parent', $this->stack[count($this->stack) - 1]);
+ }
+
+ if ($this->previous !== null && $this->previous->getAttribute('parent') === $node->getAttribute('parent')) {
+ $node->setAttribute('previous', $this->previous);
+ $this->previous->setAttribute('next', $node);
+ }
+
+ $this->stack[] = $node;
+ }
+
+ public function leaveNode(Node $node) {
+ $this->previous = $node;
+
+ array_pop($this->stack);
+ }
+}
diff --git a/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/ParentConnectingVisitor.php b/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/ParentConnectingVisitor.php
new file mode 100644
index 00000000..b98d2bfa
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/ParentConnectingVisitor.php
@@ -0,0 +1,41 @@
+$node->getAttribute('parent').
+ */
+final class ParentConnectingVisitor extends NodeVisitorAbstract
+{
+ /**
+ * @var Node[]
+ */
+ private $stack = [];
+
+ public function beforeTraverse(array $nodes)
+ {
+ $this->stack = [];
+ }
+
+ public function enterNode(Node $node)
+ {
+ if (!empty($this->stack)) {
+ $node->setAttribute('parent', $this->stack[count($this->stack) - 1]);
+ }
+
+ $this->stack[] = $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
new file mode 100644
index 00000000..d378d670
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/NodeVisitorAbstract.php
@@ -0,0 +1,25 @@
+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
new file mode 100644
index 00000000..351db9ed
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Parser/Php5.php
@@ -0,0 +1,2682 @@
+'",
+ "T_IS_GREATER_OR_EQUAL",
+ "T_SL",
+ "T_SR",
+ "'+'",
+ "'-'",
+ "'.'",
+ "'*'",
+ "'/'",
+ "'%'",
+ "'!'",
+ "T_INSTANCEOF",
+ "'~'",
+ "T_INC",
+ "T_DEC",
+ "T_INT_CAST",
+ "T_DOUBLE_CAST",
+ "T_STRING_CAST",
+ "T_ARRAY_CAST",
+ "T_OBJECT_CAST",
+ "T_BOOL_CAST",
+ "T_UNSET_CAST",
+ "'@'",
+ "T_POW",
+ "'['",
+ "T_NEW",
+ "T_CLONE",
+ "T_EXIT",
+ "T_IF",
+ "T_ELSEIF",
+ "T_ELSE",
+ "T_ENDIF",
+ "T_LNUMBER",
+ "T_DNUMBER",
+ "T_STRING",
+ "T_STRING_VARNAME",
+ "T_VARIABLE",
+ "T_NUM_STRING",
+ "T_INLINE_HTML",
+ "T_ENCAPSED_AND_WHITESPACE",
+ "T_CONSTANT_ENCAPSED_STRING",
+ "T_ECHO",
+ "T_DO",
+ "T_WHILE",
+ "T_ENDWHILE",
+ "T_FOR",
+ "T_ENDFOR",
+ "T_FOREACH",
+ "T_ENDFOREACH",
+ "T_DECLARE",
+ "T_ENDDECLARE",
+ "T_AS",
+ "T_SWITCH",
+ "T_MATCH",
+ "T_ENDSWITCH",
+ "T_CASE",
+ "T_DEFAULT",
+ "T_BREAK",
+ "T_CONTINUE",
+ "T_GOTO",
+ "T_FUNCTION",
+ "T_FN",
+ "T_CONST",
+ "T_RETURN",
+ "T_TRY",
+ "T_CATCH",
+ "T_FINALLY",
+ "T_USE",
+ "T_INSTEADOF",
+ "T_GLOBAL",
+ "T_STATIC",
+ "T_ABSTRACT",
+ "T_FINAL",
+ "T_PRIVATE",
+ "T_PROTECTED",
+ "T_PUBLIC",
+ "T_READONLY",
+ "T_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_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, 164, 168, 161, 55, 168, 168,
+ 159, 160, 53, 50, 8, 51, 52, 54, 168, 168,
+ 168, 168, 168, 168, 168, 168, 168, 168, 31, 156,
+ 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, 163, 36, 168, 162, 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, 157, 35, 158, 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, 122,
+ 123, 124, 125, 126, 127, 128, 129, 130, 165, 131,
+ 132, 133, 166, 134, 135, 136, 137, 138, 139, 140,
+ 141, 142, 143, 144, 145, 146, 147, 148, 149, 150,
+ 151, 152, 153, 154, 155, 167
+ );
+
+ protected $action = array(
+ 700, 670, 671, 672, 673, 674, 286, 675, 676, 677,
+ 713, 714, 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, 678,-32766,-32766,-32766,-32766,
+ -32766,-32766,-32766,-32766,-32766, 1229, 245, 246, 1230, 679,
+ 680, 681, 682, 683, 684, 685, 899, 900, 747,-32766,
+ -32766,-32766,-32766,-32766,-32766, 686, 687, 688, 689, 690,
+ 691, 692, 693, 694, 695, 696, 716, 739, 717, 718,
+ 719, 720, 708, 709, 710, 738, 711, 712, 697, 698,
+ 699, 701, 702, 703, 741, 742, 743, 744, 745, 746,
+ 875, 704, 705, 706, 707, 737, 728, 726, 727, 723,
+ 724, 1046, 715, 721, 722, 729, 730, 732, 731, 733,
+ 734, 55, 56, 425, 57, 58, 725, 736, 735, 755,
+ 59, 60, -226, 61,-32766,-32766,-32766,-32766,-32766,-32766,
+ -32766,-32766,-32766,-32766, 337,-32767,-32767,-32767,-32767, 29,
+ 107, 108, 109, 110, 111, 112, 113, 114, 115, 116,
+ 117, 118, 119, 620,-32766,-32766,-32766,-32766, 62, 63,
+ 1046,-32766,-32766,-32766, 64, 419, 65, 294, 295, 66,
+ 67, 68, 69, 70, 71, 72, 73, 823, 25, 302,
+ 74, 418, 984, 986, 669, 668, 1100, 1101, 1078, 755,
+ 755, 767, 1220, 768, 470,-32766,-32766,-32766, 341, 749,
+ 824, 54,-32767,-32767,-32767,-32767, 98, 99, 100, 101,
+ 102, 220, 221, 222, 362, 876,-32766, 27,-32766,-32766,
+ -32766,-32766,-32766, 1046, 493, 126, 1080, 1079, 1081, 370,
+ 1068, 930, 207, 478, 479, 952, 953, 954, 951, 950,
+ 949, 128, 480, 481, 803, 1106, 1107, 1108, 1109, 1103,
+ 1104, 319, 32, 297, 10, 211, -515, 1110, 1105, 669,
+ 668, 1080, 1079, 1081, 220, 221, 222, 41, 364, 341,
+ 334, 421, 336, 426, -128, -128, -128, 313, 1046, 469,
+ -4, 824, 54, 812, 770, 207, 40, 21, 427, -128,
+ 471, -128, 472, -128, 473, -128, 1046, 428, 220, 221,
+ 222,-32766, 33, 34, 429, 361, 327, 52, 35, 474,
+ -32766,-32766,-32766, 342, 357, 358, 475, 476, 48, 207,
+ 249, 669, 668, 477, 443, 300, 795, 846, 430, 431,
+ 28,-32766, 814,-32766,-32766,-32766,-32766,-32766,-32766,-32766,
+ -32767,-32767,-32767,-32767,-32767, 952, 953, 954, 951, 950,
+ 949, 422, 755, 424, 426, 826, 634, -128,-32766,-32766,
+ 469, 824, 54, 288, 812, 1151, 755, 40, 21, 427,
+ 317, 471, 345, 472, 129, 473, 9, 1186, 428, 769,
+ 360, 324, 905, 33, 34, 429, 361, 1046, 415, 35,
+ 474, 944, 1068, 315, 125, 357, 358, 475, 476,-32766,
+ -32766,-32766, 926, 302, 477, 121, 1068, 759, 846, 430,
+ 431, 669, 668, 423, 755, 1152, 809, 1046, 480, 766,
+ -32766, 805,-32766,-32766,-32766,-32766, -261, 127, 347, 436,
+ 841, 341, 1078, 1200, 426, 446, 826, 634, -4, 807,
+ 469, 824, 54, 436, 812, 341, 755, 40, 21, 427,
+ 444, 471, 130, 472, 1068, 473, 346, 767, 428, 768,
+ -211, -211, -211, 33, 34, 429, 361, 308, 1076, 35,
+ 474,-32766,-32766,-32766, 1046, 357, 358, 475, 476,-32766,
+ -32766,-32766, 906, 120, 477, 539, 1068, 795, 846, 430,
+ 431, 436,-32766, 341,-32766,-32766,-32766, 1046, 480, 810,
+ -32766, 925,-32766,-32766, 754, 1080, 1079, 1081, 49,-32766,
+ -32766,-32766, 749, 751, 426, 1201, 826, 634, -211, 30,
+ 469, 669, 668, 436, 812, 341, 75, 40, 21, 427,
+ -32766, 471, 1064, 472, 124, 473, 669, 668, 428, 212,
+ -210, -210, -210, 33, 34, 429, 361, 51, 1186, 35,
+ 474, 755,-32766,-32766,-32766, 357, 358, 475, 476, 213,
+ 824, 54, 221, 222, 477, 20, 581, 795, 846, 430,
+ 431, 220, 221, 222, 755, 222, 247, 78, 79, 80,
+ 81, 341, 207, 517, 103, 104, 105, 752, 307, 131,
+ 637, 1068, 207, 341, 207, 122, 826, 634, -210, 36,
+ 106, 82, 83, 84, 85, 86, 87, 88, 89, 90,
+ 91, 92, 93, 94, 95, 96, 97, 98, 99, 100,
+ 101, 102, 103, 104, 105, 1112, 307, 346, 436, 214,
+ 341, 824, 54, 426, 123, 250, 129, 134, 106, 469,
+ -32766, 572, 1112, 812, 245, 246, 40, 21, 427, 251,
+ 471, 252, 472, 341, 473, 453, 22, 428, 207, 899,
+ 900, 638, 33, 34, 429, 824, 54, -86, 35, 474,
+ 220, 221, 222, 314, 357, 358, 100, 101, 102, 239,
+ 240, 241, 645, 477, -230, 458, 589, 135, 374, 596,
+ 597, 207, 760, 640, 648, 642, 941, 654, 929, 662,
+ 822, 133, 307, 837, 426,-32766, 106, 749, 43, 44,
+ 469, 45, 442, 46, 812, 826, 634, 40, 21, 427,
+ 47, 471, 50, 472, 53, 473, 132, 608, 428, 302,
+ 604, -280,-32766, 33, 34, 429, 824, 54, 426, 35,
+ 474, 755, 957, -84, 469, 357, 358, 521, 812, 628,
+ 363, 40, 21, 427, 477, 471, 575, 472, -515, 473,
+ 847, 616, 428, -423,-32766, 11, 646, 33, 34, 429,
+ 824, 54, 445, 35, 474, 462, 285, 578, 1111, 357,
+ 358, 593, 369, 848, 594, 290, 826, 634, 477, 0,
+ 0, 532, 0, 0, 325, 0, 0, 0, 0, 0,
+ 651, 0, 0, 0, 322, 326, 0, 0, 0, 426,
+ 0, 0, 0, 0, 323, 469, 316, 318, -516, 812,
+ 862, 634, 40, 21, 427, 0, 471, 0, 472, 0,
+ 473, 1158, 0, 428, 0, -414, 6, 7, 33, 34,
+ 429, 824, 54, 426, 35, 474, 12, 14, 373, 469,
+ 357, 358, -424, 812, 563, 754, 40, 21, 427, 477,
+ 471, 248, 472, 839, 473, 38, 39, 428, 657, 658,
+ 765, 813, 33, 34, 429, 821, 800, 815, 35, 474,
+ 215, 216, 878, 869, 357, 358, 217, 870, 218, 798,
+ 863, 826, 634, 477, 860, 858, 936, 937, 934, 820,
+ 209, 804, 806, 808, 811, 933, 763, 764, 1100, 1101,
+ 935, 659, 78, 335, 426, 359, 1102, 635, 639, 641,
+ 469, 643, 644, 647, 812, 826, 634, 40, 21, 427,
+ 649, 471, 650, 472, 652, 473, 653, 636, 428, 796,
+ 1226, 1228, 762, 33, 34, 429, 215, 216, 845, 35,
+ 474, 761, 217, 844, 218, 357, 358, 1227, 843, 1060,
+ 831, 1048, 842, 1049, 477, 559, 209, 1106, 1107, 1108,
+ 1109, 1103, 1104, 398, 1100, 1101, 829, 942, 867, 1110,
+ 1105, 868, 1102, 457, 1225, 1194, 1192, 1177, 1157, 219,
+ 1190, 1091, 917, 1198, 1188, 0, 826, 634, 24, -433,
+ 26, 31, 37, 42, 76, 77, 210, 287, 292, 293,
+ 308, 309, 310, 311, 339, 356, 416, 0, -227, -226,
+ 16, 17, 18, 393, 454, 461, 463, 467, 553, 625,
+ 1051, 559, 1054, 1106, 1107, 1108, 1109, 1103, 1104, 398,
+ 907, 1116, 1050, 1026, 564, 1110, 1105, 1025, 1093, 1055,
+ 0, 1044, 0, 1057, 1056, 219, 1059, 1058, 1075, 0,
+ 1191, 1176, 1172, 1189, 1090, 1223, 1117, 1171, 600
+ );
+
+ 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, 116, 32, 33,
+ 34, 35, 36, 37, 38, 80, 69, 70, 83, 71,
+ 72, 73, 74, 75, 76, 77, 135, 136, 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,
+ 31, 123, 124, 125, 126, 127, 128, 129, 130, 131,
+ 132, 13, 134, 135, 136, 137, 138, 139, 140, 141,
+ 142, 3, 4, 5, 6, 7, 148, 149, 150, 82,
+ 12, 13, 160, 15, 33, 34, 35, 36, 37, 38,
+ 39, 40, 41, 42, 8, 44, 45, 46, 47, 16,
+ 17, 18, 19, 20, 21, 22, 23, 24, 25, 26,
+ 27, 28, 29, 80, 33, 34, 35, 36, 50, 51,
+ 13, 9, 10, 11, 56, 128, 58, 59, 60, 61,
+ 62, 63, 64, 65, 66, 67, 68, 1, 70, 71,
+ 72, 73, 59, 60, 37, 38, 78, 79, 80, 82,
+ 82, 106, 85, 108, 86, 9, 10, 11, 161, 80,
+ 1, 2, 44, 45, 46, 47, 48, 49, 50, 51,
+ 52, 9, 10, 11, 106, 156, 30, 8, 32, 33,
+ 34, 35, 36, 13, 116, 8, 153, 154, 155, 8,
+ 122, 158, 30, 125, 126, 116, 117, 118, 119, 120,
+ 121, 31, 134, 135, 156, 137, 138, 139, 140, 141,
+ 142, 143, 145, 146, 8, 8, 133, 149, 150, 37,
+ 38, 153, 154, 155, 9, 10, 11, 159, 8, 161,
+ 162, 8, 164, 74, 75, 76, 77, 8, 13, 80,
+ 0, 1, 2, 84, 158, 30, 87, 88, 89, 90,
+ 91, 92, 93, 94, 95, 96, 13, 98, 9, 10,
+ 11, 9, 103, 104, 105, 106, 8, 70, 109, 110,
+ 9, 10, 11, 8, 115, 116, 117, 118, 70, 30,
+ 31, 37, 38, 124, 31, 8, 127, 128, 129, 130,
+ 8, 30, 156, 32, 33, 34, 35, 36, 37, 38,
+ 39, 40, 41, 42, 43, 116, 117, 118, 119, 120,
+ 121, 8, 82, 8, 74, 156, 157, 158, 33, 34,
+ 80, 1, 2, 8, 84, 163, 82, 87, 88, 89,
+ 133, 91, 70, 93, 152, 95, 108, 82, 98, 158,
+ 8, 113, 160, 103, 104, 105, 106, 13, 108, 109,
+ 110, 123, 122, 113, 157, 115, 116, 117, 118, 9,
+ 10, 11, 156, 71, 124, 157, 122, 127, 128, 129,
+ 130, 37, 38, 8, 82, 160, 156, 13, 134, 156,
+ 30, 156, 32, 33, 34, 35, 158, 157, 148, 159,
+ 122, 161, 80, 1, 74, 133, 156, 157, 158, 156,
+ 80, 1, 2, 159, 84, 161, 82, 87, 88, 89,
+ 157, 91, 157, 93, 122, 95, 161, 106, 98, 108,
+ 100, 101, 102, 103, 104, 105, 106, 159, 116, 109,
+ 110, 9, 10, 11, 13, 115, 116, 117, 118, 9,
+ 10, 11, 160, 16, 124, 81, 122, 127, 128, 129,
+ 130, 159, 30, 161, 32, 33, 34, 13, 134, 156,
+ 30, 156, 32, 33, 153, 153, 154, 155, 70, 9,
+ 10, 11, 80, 80, 74, 160, 156, 157, 158, 14,
+ 80, 37, 38, 159, 84, 161, 152, 87, 88, 89,
+ 30, 91, 160, 93, 14, 95, 37, 38, 98, 16,
+ 100, 101, 102, 103, 104, 105, 106, 70, 82, 109,
+ 110, 82, 33, 34, 35, 115, 116, 117, 118, 16,
+ 1, 2, 10, 11, 124, 160, 85, 127, 128, 129,
+ 130, 9, 10, 11, 82, 11, 14, 157, 9, 10,
+ 11, 161, 30, 85, 53, 54, 55, 154, 57, 157,
+ 31, 122, 30, 161, 30, 157, 156, 157, 158, 30,
+ 69, 32, 33, 34, 35, 36, 37, 38, 39, 40,
+ 41, 42, 43, 44, 45, 46, 47, 48, 49, 50,
+ 51, 52, 53, 54, 55, 144, 57, 161, 159, 16,
+ 161, 1, 2, 74, 157, 16, 152, 157, 69, 80,
+ 116, 161, 144, 84, 69, 70, 87, 88, 89, 16,
+ 91, 16, 93, 161, 95, 75, 76, 98, 30, 135,
+ 136, 31, 103, 104, 105, 1, 2, 31, 109, 110,
+ 9, 10, 11, 31, 115, 116, 50, 51, 52, 50,
+ 51, 52, 31, 124, 160, 75, 76, 101, 102, 111,
+ 112, 30, 156, 157, 31, 31, 156, 157, 156, 157,
+ 31, 31, 57, 38, 74, 33, 69, 80, 70, 70,
+ 80, 70, 89, 70, 84, 156, 157, 87, 88, 89,
+ 70, 91, 70, 93, 70, 95, 70, 96, 98, 71,
+ 77, 82, 85, 103, 104, 105, 1, 2, 74, 109,
+ 110, 82, 82, 97, 80, 115, 116, 85, 84, 92,
+ 106, 87, 88, 89, 124, 91, 90, 93, 133, 95,
+ 128, 94, 98, 147, 116, 97, 31, 103, 104, 105,
+ 1, 2, 97, 109, 110, 97, 97, 100, 144, 115,
+ 116, 100, 106, 128, 113, 161, 156, 157, 124, -1,
+ -1, 151, -1, -1, 114, -1, -1, -1, -1, -1,
+ 31, -1, -1, -1, 131, 131, -1, -1, -1, 74,
+ -1, -1, -1, -1, 132, 80, 133, 133, 133, 84,
+ 156, 157, 87, 88, 89, -1, 91, -1, 93, -1,
+ 95, 144, -1, 98, -1, 147, 147, 147, 103, 104,
+ 105, 1, 2, 74, 109, 110, 147, 147, 147, 80,
+ 115, 116, 147, 84, 151, 153, 87, 88, 89, 124,
+ 91, 31, 93, 152, 95, 156, 156, 98, 156, 156,
+ 156, 156, 103, 104, 105, 156, 156, 156, 109, 110,
+ 50, 51, 156, 156, 115, 116, 56, 156, 58, 156,
+ 156, 156, 157, 124, 156, 156, 156, 156, 156, 156,
+ 70, 156, 156, 156, 156, 156, 156, 156, 78, 79,
+ 156, 158, 157, 157, 74, 157, 86, 157, 157, 157,
+ 80, 157, 157, 157, 84, 156, 157, 87, 88, 89,
+ 157, 91, 157, 93, 157, 95, 157, 157, 98, 158,
+ 158, 158, 158, 103, 104, 105, 50, 51, 158, 109,
+ 110, 158, 56, 158, 58, 115, 116, 158, 158, 158,
+ 158, 158, 158, 158, 124, 135, 70, 137, 138, 139,
+ 140, 141, 142, 143, 78, 79, 158, 158, 158, 149,
+ 150, 158, 86, 158, 158, 158, 158, 158, 164, 159,
+ 158, 158, 158, 158, 158, -1, 156, 157, 159, 162,
+ 159, 159, 159, 159, 159, 159, 159, 159, 159, 159,
+ 159, 159, 159, 159, 159, 159, 159, -1, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 135, 160, 137, 138, 139, 140, 141, 142, 143,
+ 160, 160, 160, 160, 160, 149, 150, 160, 160, 163,
+ -1, 162, -1, 163, 163, 159, 163, 163, 163, -1,
+ 163, 163, 163, 163, 163, 163, 163, 163, 163
+ );
+
+ protected $actionBase = array(
+ 0, 229, 310, 390, 470, 103, 325, 325, 784, -2,
+ -2, 149, -2, -2, -2, 660, 765, 799, 765, 589,
+ 694, 870, 870, 870, 252, 404, 404, 404, 514, 177,
+ 177, 918, 434, 118, 295, 313, 240, 491, 491, 491,
+ 491, 138, 138, 491, 491, 491, 491, 491, 491, 491,
+ 491, 491, 491, 491, 491, 491, 491, 491, 491, 491,
+ 491, 491, 491, 491, 491, 491, 491, 491, 491, 491,
+ 491, 491, 491, 491, 491, 491, 491, 491, 491, 491,
+ 491, 491, 491, 491, 491, 491, 491, 491, 491, 491,
+ 491, 491, 491, 491, 491, 491, 491, 491, 491, 491,
+ 491, 491, 491, 491, 491, 491, 491, 491, 491, 491,
+ 491, 491, 491, 491, 491, 491, 491, 491, 491, 491,
+ 491, 491, 491, 491, 491, 491, 491, 491, 491, 491,
+ 491, 491, 491, 491, 491, 491, 89, 206, 773, 550,
+ 535, 775, 776, 777, 912, 709, 913, 856, 857, 700,
+ 858, 859, 862, 863, 864, 855, 865, 935, 866, 599,
+ 599, 599, 599, 599, 599, 599, 599, 599, 599, 599,
+ 599, 322, 592, 285, 319, 232, 44, 691, 691, 691,
+ 691, 691, 691, 691, 182, 182, 182, 182, 182, 182,
+ 182, 182, 182, 182, 182, 182, 182, 182, 182, 182,
+ 182, 182, 582, 530, 530, 530, 594, 860, 658, 926,
+ 926, 926, 926, 926, 926, 926, 926, 926, 926, 926,
+ 926, 926, 926, 926, 926, 926, 926, 926, 926, 926,
+ 926, 926, 926, 926, 926, 926, 926, 926, 926, 926,
+ 926, 926, 926, 926, 926, 926, 926, 926, 926, 926,
+ 926, 926, 926, 500, -21, -21, 492, 702, 420, 355,
+ 216, 549, 151, 26, 26, 331, 331, 331, 331, 331,
+ 46, 46, 5, 5, 5, 5, 153, 188, 188, 188,
+ 188, 121, 121, 121, 121, 314, 314, 394, 394, 362,
+ 300, 298, 499, 499, 499, 499, 499, 499, 499, 499,
+ 499, 499, 67, 656, 656, 659, 659, 522, 554, 554,
+ 554, 554, 679, -59, -59, 381, 462, 462, 462, 528,
+ 717, 854, 382, 382, 382, 382, 382, 382, 561, 561,
+ 561, -3, -3, -3, 692, 115, 137, 115, 137, 678,
+ 732, 450, 732, 338, 677, -15, 510, 810, 468, 707,
+ 850, 711, 853, 572, 735, 267, 529, 654, 674, 463,
+ 529, 529, 529, 529, 654, 610, 640, 608, 463, 529,
+ 463, 718, 323, 496, 89, 570, 507, 675, 778, 293,
+ 670, 780, 290, 373, 332, 566, 278, 435, 733, 781,
+ 914, 917, 385, 715, 675, 675, 675, 352, 511, 278,
+ -8, 605, 605, 605, 605, 156, 605, 605, 605, 605,
+ 251, 276, 375, 402, 779, 657, 657, 690, 872, 869,
+ 869, 657, 689, 657, 690, 874, 874, 874, 874, 657,
+ 657, 657, 657, 869, 869, 869, 688, 869, 239, 703,
+ 704, 704, 874, 742, 743, 657, 657, 712, 869, 869,
+ 869, 712, 695, 874, 701, 741, 277, 869, 874, 672,
+ 689, 672, 657, 701, 672, 689, 689, 672, 22, 666,
+ 668, 873, 875, 887, 790, 662, 685, 879, 880, 876,
+ 878, 871, 699, 744, 745, 497, 669, 671, 673, 680,
+ 719, 682, 713, 674, 667, 667, 667, 655, 720, 655,
+ 667, 667, 667, 667, 667, 667, 667, 667, 916, 646,
+ 731, 714, 653, 749, 553, 573, 791, 664, 811, 900,
+ 893, 867, 919, 881, 898, 655, 920, 739, 247, 643,
+ 882, 783, 786, 655, 883, 655, 792, 655, 902, 812,
+ 686, 813, 814, 667, 910, 921, 923, 924, 925, 927,
+ 928, 929, 930, 684, 931, 750, 696, 894, 299, 877,
+ 718, 729, 705, 788, 751, 820, 328, 932, 823, 655,
+ 655, 794, 785, 655, 795, 756, 740, 890, 757, 895,
+ 933, 664, 708, 896, 655, 706, 825, 934, 328, 681,
+ 683, 888, 661, 761, 886, 911, 885, 796, 649, 663,
+ 829, 830, 831, 693, 763, 891, 892, 889, 764, 803,
+ 665, 805, 697, 832, 807, 884, 768, 833, 834, 899,
+ 676, 730, 710, 698, 687, 809, 835, 897, 769, 770,
+ 771, 848, 772, 849, 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, 138, 138, 138, 138, -2, -2,
+ -2, -2, 0, 0, -2, 0, 0, 0, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 0, 0, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 599,
+ 599, 599, 599, 599, 599, 599, 599, 599, 599, 599,
+ 599, 599, 599, 599, 599, 599, 599, 599, 599, 599,
+ 599, 599, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 599, -21, -21, -21, -21, 599,
+ -21, -21, -21, -21, -21, -21, -21, 599, 599, 599,
+ 599, 599, 599, 599, 599, 599, 599, 599, 599, 599,
+ 599, 599, 599, 599, 599, -21, 599, 599, 599, -21,
+ 382, -21, 382, 382, 382, 382, 382, 382, 382, 382,
+ 382, 382, 382, 382, 382, 382, 382, 382, 382, 382,
+ 382, 382, 382, 382, 382, 382, 382, 382, 382, 382,
+ 382, 382, 382, 382, 382, 382, 382, 382, 382, 382,
+ 382, 382, 382, 382, 382, 382, 599, 0, 0, 599,
+ -21, 599, -21, 599, -21, -21, 599, 599, 599, 599,
+ 599, 599, 599, -21, -21, -21, -21, -21, -21, 0,
+ 561, 561, 561, 561, -21, -21, -21, -21, 382, 382,
+ 382, 382, 382, 382, 259, 382, 382, 382, 382, 382,
+ 382, 382, 382, 382, 382, 382, 561, 561, -3, -3,
+ 382, 382, 382, 382, 382, 259, 382, 382, 463, 689,
+ 689, 689, 137, 137, 137, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 137, 463, 0,
+ 463, 0, 382, 463, 689, 463, 657, 137, 689, 689,
+ 463, 869, 616, 616, 616, 616, 328, 278, 0, 0,
+ 689, 689, 0, 0, 0, 0, 0, 689, 0, 0,
+ 0, 0, 0, 0, 869, 0, 0, 0, 0, 0,
+ 667, 247, 0, 705, 335, 0, 0, 0, 0, 0,
+ 0, 705, 335, 347, 347, 0, 684, 667, 667, 667,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 328
+ );
+
+ 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, 544, 544, 499,32767,32767,
+ 32767,32767,32767,32767,32767,32767,32767, 299, 299, 299,
+ 32767,32767,32767, 532, 532, 532, 532, 532, 532, 532,
+ 532, 532, 532, 532,32767,32767,32767,32767,32767,32767,
+ 383,32767,32767,32767,32767,32767,32767,32767,32767,32767,
+ 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,
+ 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,
+ 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,
+ 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,
+ 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,
+ 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,
+ 32767,32767,32767,32767,32767,32767,32767,32767,32767, 389,
+ 549,32767,32767,32767,32767,32767,32767,32767,32767,32767,
+ 32767,32767,32767,32767,32767,32767,32767,32767,32767, 364,
+ 365, 367, 368, 298, 552, 533, 247, 390, 548, 297,
+ 249, 327, 503,32767,32767,32767, 329, 122, 258, 203,
+ 502, 125, 296, 234, 382, 384, 328, 303, 308, 309,
+ 310, 311, 312, 313, 314, 315, 316, 317, 318, 319,
+ 320, 302, 458, 361, 360, 359, 460,32767, 459, 496,
+ 496, 499,32767,32767,32767,32767,32767,32767,32767,32767,
+ 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,
+ 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,
+ 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,
+ 32767,32767,32767, 325, 487, 486, 326, 456, 330, 457,
+ 333, 461, 464, 331, 332, 349, 350, 347, 348, 351,
+ 462, 463, 480, 481, 478, 479, 301, 352, 353, 354,
+ 355, 482, 483, 484, 485,32767,32767, 543, 543,32767,
+ 32767, 282,32767,32767,32767,32767,32767,32767,32767,32767,
+ 32767,32767,32767, 340, 341, 471, 472,32767, 238, 238,
+ 238, 238, 283, 238,32767,32767,32767,32767,32767,32767,
+ 32767,32767,32767,32767,32767,32767,32767,32767, 335, 336,
+ 334, 466, 467, 465, 432,32767,32767,32767, 434,32767,
+ 32767,32767,32767,32767,32767,32767,32767,32767, 504,32767,
+ 32767,32767,32767,32767, 517, 421, 171,32767, 413,32767,
+ 171, 171, 171, 171,32767, 222, 224, 167,32767, 171,
+ 32767, 490,32767,32767,32767,32767, 522, 345,32767,32767,
+ 116,32767,32767,32767, 559,32767, 517,32767, 116,32767,
+ 32767,32767,32767, 358, 337, 338, 339,32767,32767, 521,
+ 515, 474, 475, 476, 477,32767, 468, 469, 470, 473,
+ 32767,32767,32767,32767,32767,32767,32767,32767, 429, 435,
+ 435,32767,32767,32767,32767,32767,32767,32767,32767,32767,
+ 32767,32767,32767,32767, 520, 519,32767, 414, 498, 188,
+ 186, 186,32767, 208, 208,32767,32767, 190, 491, 510,
+ 32767, 190, 173,32767, 400, 175, 498,32767,32767, 240,
+ 32767, 240,32767, 400, 240,32767,32767, 240,32767, 415,
+ 439,32767,32767,32767,32767,32767,32767,32767,32767,32767,
+ 32767,32767,32767,32767,32767,32767, 379, 380, 493, 506,
+ 32767, 507,32767, 413, 343, 344, 346, 322,32767, 324,
+ 369, 370, 371, 372, 373, 374, 375, 377,32767, 419,
+ 32767, 422,32767,32767,32767, 257,32767, 557,32767,32767,
+ 306, 557,32767,32767,32767, 551,32767,32767, 300,32767,
+ 32767,32767,32767, 253,32767, 169,32767, 541,32767, 558,
+ 32767, 515,32767, 342,32767,32767,32767,32767,32767,32767,
+ 32767,32767,32767, 516,32767,32767,32767,32767, 229,32767,
+ 452,32767, 116,32767,32767,32767, 189,32767,32767, 304,
+ 248,32767,32767, 550,32767,32767,32767,32767,32767,32767,
+ 32767,32767, 114,32767, 170,32767,32767,32767, 191,32767,
+ 32767, 515,32767,32767,32767,32767,32767,32767,32767, 295,
+ 32767,32767,32767,32767,32767,32767,32767, 515,32767,32767,
+ 233,32767,32767,32767,32767,32767,32767,32767,32767,32767,
+ 415,32767, 276,32767,32767,32767,32767,32767,32767,32767,
+ 32767,32767,32767,32767, 127, 127, 3, 127, 127, 260,
+ 3, 260, 127, 260, 260, 127, 127, 127, 127, 127,
+ 127, 127, 127, 127, 127, 216, 219, 208, 208, 164,
+ 127, 127, 268
+ );
+
+ 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, 494, 495,
+ 377, 496, 500, 501, 502, 503, 504, 505, 506, 507,
+ 970, 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, 543, 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, 621, 561, 757, 561, 561, 561, 561, 561,
+ 561, 561, 561, 561, 561, 561, 561, 561, 561, 561,
+ 561, 561, 561, 561, 561, 561, 561, 561, 561, 561,
+ 561, 561, 561, 561, 561, 561, 561, 561, 561, 561,
+ 561, 561, 561, 561, 561, 561, 561, 561, 561, 1113,
+ 629, 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113,
+ 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113,
+ 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113,
+ 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113,
+ 1113, 1113, 1113, 1113, 1113, 758, 520, 531, 509, 656,
+ 556, 1183, 750, 509, 592, 786, 1183, 888, 612, 613,
+ 884, 617, 618, 624, 626, 631, 633, 817, 855, 855,
+ 855, 855, 850, 856, 174, 891, 891, 1205, 1205, 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,
+ 498, 498, 498, 498, 498, 498, 861, 498, 498, 498,
+ 498, 498, 498, 498, 498, 498, 498, 510, 586, 538,
+ 601, 602, 510, 545, 546, 547, 548, 549, 550, 551,
+ 552, 554, 587, 1209, 560, 350, 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,
+ 400, 607, 537, 537, 569, 533, 909, 535, 535, 497,
+ 499, 525, 541, 570, 573, 584, 591, 298, 296, 296,
+ 296, 298, 289, 299, 611, 378, 511, 614, 595, 947,
+ 375, 511, 437, 437, 437, 437, 437, 437, 1163, 437,
+ 437, 437, 437, 437, 437, 437, 437, 437, 437, 1077,
+ 948, 338, 1175, 321, 1077, 898, 898, 898, 898, 606,
+ 898, 898, 1217, 1217, 1202, 753, 576, 605, 756, 1077,
+ 1077, 1077, 1077, 1077, 1077, 1069, 384, 384, 384, 391,
+ 1217, 877, 859, 857, 859, 655, 466, 512, 886, 881,
+ 753, 384, 753, 384, 968, 384, 895, 385, 588, 353,
+ 414, 384, 1231, 1019, 542, 1197, 1197, 1197, 568, 1094,
+ 386, 386, 386, 904, 915, 515, 1029, 19, 15, 372,
+ 389, 915, 940, 448, 450, 632, 340, 1216, 1216, 1114,
+ 615, 938, 840, 555, 775, 386, 913, 1070, 1073, 1074,
+ 399, 1069, 1182, 660, 23, 1216, 773, 1182, 544, 603,
+ 1066, 1219, 1071, 1174, 1071, 519, 1199, 1199, 1199, 1089,
+ 1088, 1072, 343, 523, 534, 519, 519, 772, 351, 352,
+ 13, 579, 583, 627, 1061, 388, 782, 562, 771, 515,
+ 783, 1181, 3, 4, 918, 956, 865, 451, 574, 1160,
+ 464, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 514, 529, 0, 0, 0, 0,
+ 514, 0, 529, 0, 0, 0, 0, 610, 513, 516,
+ 439, 440, 1067, 619, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 780, 1224, 0, 0, 0, 0,
+ 0, 524, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 778, 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, 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, 69, 15, 69, 69, 69, 69, 69,
+ 69, 69, 69, 69, 69, 69, 69, 69, 69, 69,
+ 69, 69, 69, 69, 69, 69, 69, 69, 69, 69,
+ 69, 69, 69, 69, 69, 69, 69, 69, 69, 69,
+ 69, 69, 69, 69, 69, 69, 69, 69, 69, 128,
+ 9, 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, 128, 128, 128, 128, 128,
+ 128, 128, 128, 128, 128, 16, 102, 32, 69, 32,
+ 32, 120, 6, 69, 32, 29, 120, 32, 32, 32,
+ 32, 32, 32, 32, 32, 32, 32, 50, 69, 69,
+ 69, 69, 69, 69, 27, 77, 77, 77, 77, 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,
+ 119, 119, 119, 119, 119, 119, 33, 119, 119, 119,
+ 119, 119, 119, 119, 119, 119, 119, 119, 67, 110,
+ 67, 67, 119, 111, 111, 111, 111, 111, 111, 111,
+ 111, 111, 111, 142, 57, 72, 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,
+ 51, 51, 51, 51, 51, 51, 84, 51, 51, 51,
+ 51, 51, 51, 51, 51, 51, 51, 5, 5, 5,
+ 5, 5, 5, 5, 63, 46, 124, 63, 129, 98,
+ 63, 124, 57, 57, 57, 57, 57, 57, 133, 57,
+ 57, 57, 57, 57, 57, 57, 57, 57, 57, 57,
+ 98, 127, 82, 127, 57, 57, 57, 57, 57, 49,
+ 57, 57, 144, 144, 140, 11, 40, 40, 14, 57,
+ 57, 57, 57, 57, 57, 82, 13, 13, 13, 48,
+ 144, 14, 14, 14, 14, 14, 57, 14, 14, 14,
+ 11, 13, 11, 13, 102, 13, 79, 11, 70, 70,
+ 70, 13, 13, 103, 2, 9, 9, 9, 2, 34,
+ 125, 125, 125, 81, 13, 13, 34, 34, 34, 34,
+ 17, 13, 8, 8, 8, 8, 18, 143, 143, 8,
+ 8, 8, 9, 34, 25, 125, 85, 82, 82, 82,
+ 125, 82, 121, 74, 34, 143, 24, 121, 47, 34,
+ 116, 143, 82, 82, 82, 47, 121, 121, 121, 126,
+ 126, 82, 58, 58, 58, 47, 47, 23, 72, 72,
+ 58, 62, 62, 62, 114, 12, 23, 12, 23, 13,
+ 26, 121, 30, 30, 86, 100, 71, 65, 66, 132,
+ 109, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 9, 9, -1, -1, -1, -1,
+ 9, -1, 9, -1, -1, -1, -1, 13, 9, 9,
+ 9, 9, 13, 13, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 9, 9, -1, -1, -1, -1,
+ -1, 102, -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, -1, -1, -1, -1, -1, -1, -1, 5, 5
+ );
+
+ protected $gotoBase = array(
+ 0, 0, -172, 0, 0, 353, 201, 0, 477, 149,
+ 0, 110, 195, 117, 426, 112, 203, 140, 171, 0,
+ 0, 0, 0, 168, 164, 157, 119, 27, 0, 205,
+ -118, 0, -428, 266, 51, 0, 0, 0, 0, 0,
+ 388, 0, 0, -24, 0, 0, 345, 484, 146, 133,
+ 209, 75, 0, 0, 0, 0, 0, 107, 161, 0,
+ 0, 0, 222, -77, 0, 106, 97, -343, 0, -94,
+ 135, 123, -129, 0, 129, 0, 0, -50, 0, 143,
+ 0, 159, 64, 0, 338, 132, 122, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 98, 0,
+ 121, 0, 165, 156, 0, 0, 0, 0, 0, 87,
+ 273, 259, 0, 0, 114, 0, 150, 0, 0, -5,
+ -91, 200, 0, 0, 84, 154, 202, 77, -48, 178,
+ 0, 0, 93, 187, 0, 0, 0, 0, 0, 0,
+ 136, 0, 286, 167, 102, 0, 0
+ );
+
+ protected $gotoDefault = array(
+ -32768, 468, 664, 2, 665, 835, 740, 748, 598, 482,
+ 630, 582, 380, 1193, 792, 793, 794, 381, 368, 483,
+ 379, 410, 405, 781, 774, 776, 784, 172, 411, 787,
+ 1, 789, 518, 825, 1020, 365, 797, 366, 590, 799,
+ 527, 801, 802, 137, 382, 383, 528, 484, 390, 577,
+ 816, 276, 387, 818, 367, 819, 828, 371, 465, 455,
+ 460, 530, 557, 609, 432, 447, 571, 565, 536, 1086,
+ 566, 864, 349, 872, 661, 880, 883, 485, 558, 894,
+ 452, 902, 1099, 397, 908, 914, 919, 291, 922, 417,
+ 412, 585, 927, 928, 5, 932, 622, 623, 8, 312,
+ 955, 599, 969, 420, 1039, 1041, 486, 487, 522, 459,
+ 508, 526, 488, 1062, 441, 413, 1065, 433, 489, 490,
+ 434, 435, 1083, 355, 1168, 354, 449, 320, 1155, 580,
+ 1118, 456, 1208, 1164, 348, 491, 492, 376, 1187, 392,
+ 1203, 438, 1210, 1218, 344, 540, 567
+ );
+
+ 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, 61, 61, 15,
+ 16, 16, 16, 64, 64, 64, 65, 65, 68, 68,
+ 66, 66, 70, 70, 41, 41, 50, 50, 53, 53,
+ 53, 52, 52, 71, 42, 42, 42, 42, 72, 72,
+ 73, 73, 74, 74, 39, 39, 35, 35, 75, 37,
+ 37, 76, 36, 36, 38, 38, 49, 49, 49, 62,
+ 62, 78, 78, 79, 79, 81, 81, 81, 80, 80,
+ 63, 63, 82, 82, 82, 83, 83, 84, 84, 84,
+ 44, 44, 85, 85, 85, 45, 45, 86, 86, 87,
+ 87, 67, 88, 88, 88, 88, 93, 93, 94, 94,
+ 95, 95, 95, 95, 95, 96, 97, 97, 92, 92,
+ 89, 89, 91, 91, 99, 99, 98, 98, 98, 98,
+ 98, 98, 90, 90, 101, 100, 100, 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, 106, 106, 107, 107, 107, 107, 113, 102, 102,
+ 109, 109, 115, 115, 116, 117, 118, 118, 118, 118,
+ 118, 118, 118, 69, 69, 57, 57, 57, 57, 103,
+ 103, 122, 122, 119, 119, 123, 123, 123, 123, 104,
+ 104, 104, 108, 108, 108, 114, 114, 128, 128, 128,
+ 128, 128, 128, 128, 128, 128, 128, 128, 128, 128,
+ 27, 27, 27, 27, 27, 27, 130, 130, 130, 130,
+ 130, 130, 130, 130, 130, 130, 130, 130, 130, 130,
+ 130, 130, 130, 130, 130, 130, 130, 130, 130, 130,
+ 130, 130, 130, 130, 130, 130, 130, 130, 130, 130,
+ 112, 112, 105, 105, 105, 105, 129, 129, 132, 132,
+ 131, 131, 133, 133, 51, 51, 51, 51, 135, 135,
+ 134, 134, 134, 134, 134, 136, 136, 121, 121, 124,
+ 124, 120, 120, 138, 137, 137, 137, 137, 125, 125,
+ 125, 125, 111, 111, 126, 126, 126, 126, 77, 139,
+ 139, 140, 140, 140, 110, 110, 141, 141, 142, 142,
+ 142, 142, 142, 127, 127, 127, 127, 144, 145, 143,
+ 143, 143, 143, 143, 143, 143, 146, 146, 146
+ );
+
+ 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, 1, 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, 1, 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 = $this->semStack[$stackPos-(1-1)];
+ },
+ 178 => function ($stackPos) {
+ $this->semValue = new Node\Identifier($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes);
+ },
+ 179 => 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);
+ },
+ 180 => 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));
+ },
+ 181 => 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));
+ },
+ 182 => 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);
+ },
+ 183 => function ($stackPos) {
+ $this->semValue = 0;
+ },
+ 184 => function ($stackPos) {
+ $this->semValue = Stmt\Class_::MODIFIER_ABSTRACT;
+ },
+ 185 => function ($stackPos) {
+ $this->semValue = Stmt\Class_::MODIFIER_FINAL;
+ },
+ 186 => function ($stackPos) {
+ $this->semValue = null;
+ },
+ 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();
+ },
+ 191 => function ($stackPos) {
+ $this->semValue = $this->semStack[$stackPos-(2-2)];
+ },
+ 192 => function ($stackPos) {
+ $this->semValue = array($this->semStack[$stackPos-(1-1)]);
+ },
+ 193 => function ($stackPos) {
+ $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)];
+ },
+ 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 = $this->semStack[$stackPos-(4-2)];
+ },
+ 198 => function ($stackPos) {
+ $this->semValue = is_array($this->semStack[$stackPos-(1-1)]) ? $this->semStack[$stackPos-(1-1)] : array($this->semStack[$stackPos-(1-1)]);
+ },
+ 199 => function ($stackPos) {
+ $this->semValue = null;
+ },
+ 200 => function ($stackPos) {
+ $this->semValue = $this->semStack[$stackPos-(4-2)];
+ },
+ 201 => function ($stackPos) {
+ $this->semValue = array($this->semStack[$stackPos-(1-1)]);
+ },
+ 202 => function ($stackPos) {
+ $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)];
+ },
+ 203 => function ($stackPos) {
+ $this->semValue = new Stmt\DeclareDeclare($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes);
+ },
+ 204 => function ($stackPos) {
+ $this->semValue = $this->semStack[$stackPos-(3-2)];
+ },
+ 205 => function ($stackPos) {
+ $this->semValue = $this->semStack[$stackPos-(4-3)];
+ },
+ 206 => function ($stackPos) {
+ $this->semValue = $this->semStack[$stackPos-(4-2)];
+ },
+ 207 => function ($stackPos) {
+ $this->semValue = $this->semStack[$stackPos-(5-3)];
+ },
+ 208 => function ($stackPos) {
+ $this->semValue = array();
+ },
+ 209 => function ($stackPos) {
+ $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)];
+ },
+ 210 => function ($stackPos) {
+ $this->semValue = new Stmt\Case_($this->semStack[$stackPos-(4-2)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes);
+ },
+ 211 => function ($stackPos) {
+ $this->semValue = new Stmt\Case_(null, $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes);
+ },
+ 212 => function ($stackPos) {
+ $this->semValue = $this->semStack[$stackPos];
+ },
+ 213 => function ($stackPos) {
+ $this->semValue = $this->semStack[$stackPos];
+ },
+ 214 => function ($stackPos) {
+ $this->semValue = is_array($this->semStack[$stackPos-(1-1)]) ? $this->semStack[$stackPos-(1-1)] : array($this->semStack[$stackPos-(1-1)]);
+ },
+ 215 => function ($stackPos) {
+ $this->semValue = $this->semStack[$stackPos-(4-2)];
+ },
+ 216 => function ($stackPos) {
+ $this->semValue = array();
+ },
+ 217 => function ($stackPos) {
+ $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)];
+ },
+ 218 => 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);
+ },
+ 219 => function ($stackPos) {
+ $this->semValue = array();
+ },
+ 220 => function ($stackPos) {
+ $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)];
+ },
+ 221 => function ($stackPos) {
+ $this->semValue = new Stmt\ElseIf_($this->semStack[$stackPos-(4-2)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes);
+ },
+ 222 => function ($stackPos) {
+ $this->semValue = null;
+ },
+ 223 => 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);
+ },
+ 224 => function ($stackPos) {
+ $this->semValue = null;
+ },
+ 225 => function ($stackPos) {
+ $this->semValue = new Stmt\Else_($this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes);
+ },
+ 226 => function ($stackPos) {
+ $this->semValue = array($this->semStack[$stackPos-(1-1)], false);
+ },
+ 227 => function ($stackPos) {
+ $this->semValue = array($this->semStack[$stackPos-(2-2)], true);
+ },
+ 228 => function ($stackPos) {
+ $this->semValue = array($this->semStack[$stackPos-(1-1)], false);
+ },
+ 229 => function ($stackPos) {
+ $this->semValue = $this->semStack[$stackPos-(1-1)];
+ },
+ 230 => function ($stackPos) {
+ $this->semValue = array();
+ },
+ 231 => function ($stackPos) {
+ $this->semValue = array($this->semStack[$stackPos-(1-1)]);
+ },
+ 232 => function ($stackPos) {
+ $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)];
+ },
+ 233 => 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);
+ },
+ 234 => 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);
+ },
+ 235 => function ($stackPos) {
+ $this->semValue = $this->semStack[$stackPos-(1-1)];
+ },
+ 236 => function ($stackPos) {
+ $this->semValue = new Node\Identifier('array', $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes);
+ },
+ 237 => function ($stackPos) {
+ $this->semValue = new Node\Identifier('callable', $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes);
+ },
+ 238 => function ($stackPos) {
+ $this->semValue = null;
+ },
+ 239 => function ($stackPos) {
+ $this->semValue = $this->semStack[$stackPos-(1-1)];
+ },
+ 240 => function ($stackPos) {
+ $this->semValue = null;
+ },
+ 241 => function ($stackPos) {
+ $this->semValue = $this->semStack[$stackPos-(2-2)];
+ },
+ 242 => function ($stackPos) {
+ $this->semValue = array();
+ },
+ 243 => function ($stackPos) {
+ $this->semValue = $this->semStack[$stackPos-(3-2)];
+ },
+ 244 => function ($stackPos) {
+ $this->semValue = array(new Node\Arg($this->semStack[$stackPos-(3-2)], false, false, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes));
+ },
+ 245 => function ($stackPos) {
+ $this->semValue = array($this->semStack[$stackPos-(1-1)]);
+ },
+ 246 => function ($stackPos) {
+ $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)];
+ },
+ 247 => function ($stackPos) {
+ $this->semValue = new Node\Arg($this->semStack[$stackPos-(1-1)], false, false, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes);
+ },
+ 248 => function ($stackPos) {
+ $this->semValue = new Node\Arg($this->semStack[$stackPos-(2-2)], true, false, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes);
+ },
+ 249 => function ($stackPos) {
+ $this->semValue = new Node\Arg($this->semStack[$stackPos-(2-2)], false, true, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes);
+ },
+ 250 => function ($stackPos) {
+ $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)];
+ },
+ 251 => function ($stackPos) {
+ $this->semValue = array($this->semStack[$stackPos-(1-1)]);
+ },
+ 252 => function ($stackPos) {
+ $this->semValue = $this->semStack[$stackPos-(1-1)];
+ },
+ 253 => function ($stackPos) {
+ $this->semValue = new Expr\Variable($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes);
+ },
+ 254 => function ($stackPos) {
+ $this->semValue = new Expr\Variable($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes);
+ },
+ 255 => function ($stackPos) {
+ $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)];
+ },
+ 256 => function ($stackPos) {
+ $this->semValue = array($this->semStack[$stackPos-(1-1)]);
+ },
+ 257 => function ($stackPos) {
+ $this->semValue = new Stmt\StaticVar($this->semStack[$stackPos-(1-1)], null, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes);
+ },
+ 258 => function ($stackPos) {
+ $this->semValue = new Stmt\StaticVar($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes);
+ },
+ 259 => 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)]; }
+ },
+ 260 => function ($stackPos) {
+ $this->semValue = array();
+ },
+ 261 => 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)];
+ },
+ 262 => 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));
+ },
+ 263 => function ($stackPos) {
+ $this->semValue = new Stmt\ClassConst($this->semStack[$stackPos-(3-2)], 0, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes);
+ },
+ 264 => 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));
+ },
+ 265 => function ($stackPos) {
+ $this->semValue = new Stmt\TraitUse($this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes);
+ },
+ 266 => function ($stackPos) {
+ $this->semValue = array();
+ },
+ 267 => function ($stackPos) {
+ $this->semValue = $this->semStack[$stackPos-(3-2)];
+ },
+ 268 => function ($stackPos) {
+ $this->semValue = array();
+ },
+ 269 => function ($stackPos) {
+ $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)];
+ },
+ 270 => 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);
+ },
+ 271 => 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);
+ },
+ 272 => 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);
+ },
+ 273 => 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);
+ },
+ 274 => 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);
+ },
+ 275 => function ($stackPos) {
+ $this->semValue = array($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)]);
+ },
+ 276 => function ($stackPos) {
+ $this->semValue = $this->semStack[$stackPos-(1-1)];
+ },
+ 277 => function ($stackPos) {
+ $this->semValue = array(null, $this->semStack[$stackPos-(1-1)]);
+ },
+ 278 => function ($stackPos) {
+ $this->semValue = null;
+ },
+ 279 => function ($stackPos) {
+ $this->semValue = $this->semStack[$stackPos-(3-2)];
+ },
+ 280 => function ($stackPos) {
+ $this->semValue = $this->semStack[$stackPos-(1-1)];
+ },
+ 281 => function ($stackPos) {
+ $this->semValue = 0;
+ },
+ 282 => function ($stackPos) {
+ $this->semValue = 0;
+ },
+ 283 => function ($stackPos) {
+ $this->semValue = $this->semStack[$stackPos-(1-1)];
+ },
+ 284 => function ($stackPos) {
+ $this->semValue = $this->semStack[$stackPos-(1-1)];
+ },
+ 285 => 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)];
+ },
+ 286 => function ($stackPos) {
+ $this->semValue = Stmt\Class_::MODIFIER_PUBLIC;
+ },
+ 287 => function ($stackPos) {
+ $this->semValue = Stmt\Class_::MODIFIER_PROTECTED;
+ },
+ 288 => function ($stackPos) {
+ $this->semValue = Stmt\Class_::MODIFIER_PRIVATE;
+ },
+ 289 => function ($stackPos) {
+ $this->semValue = Stmt\Class_::MODIFIER_STATIC;
+ },
+ 290 => function ($stackPos) {
+ $this->semValue = Stmt\Class_::MODIFIER_ABSTRACT;
+ },
+ 291 => function ($stackPos) {
+ $this->semValue = Stmt\Class_::MODIFIER_FINAL;
+ },
+ 292 => function ($stackPos) {
+ $this->semValue = array($this->semStack[$stackPos-(1-1)]);
+ },
+ 293 => function ($stackPos) {
+ $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)];
+ },
+ 294 => function ($stackPos) {
+ $this->semValue = new Node\VarLikeIdentifier(substr($this->semStack[$stackPos-(1-1)], 1), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes);
+ },
+ 295 => function ($stackPos) {
+ $this->semValue = new Stmt\PropertyProperty($this->semStack[$stackPos-(1-1)], null, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes);
+ },
+ 296 => function ($stackPos) {
+ $this->semValue = new Stmt\PropertyProperty($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes);
+ },
+ 297 => function ($stackPos) {
+ $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)];
+ },
+ 298 => function ($stackPos) {
+ $this->semValue = array($this->semStack[$stackPos-(1-1)]);
+ },
+ 299 => function ($stackPos) {
+ $this->semValue = array();
+ },
+ 300 => function ($stackPos) {
+ $this->semValue = $this->semStack[$stackPos-(1-1)];
+ },
+ 301 => function ($stackPos) {
+ $this->semValue = $this->semStack[$stackPos-(1-1)];
+ },
+ 302 => function ($stackPos) {
+ $this->semValue = new Expr\Assign($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes);
+ },
+ 303 => function ($stackPos) {
+ $this->semValue = new Expr\Assign($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes);
+ },
+ 304 => function ($stackPos) {
+ $this->semValue = new Expr\AssignRef($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes);
+ },
+ 305 => function ($stackPos) {
+ $this->semValue = new Expr\AssignRef($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes);
+ },
+ 306 => function ($stackPos) {
+ $this->semValue = $this->semStack[$stackPos-(1-1)];
+ },
+ 307 => function ($stackPos) {
+ $this->semValue = new Expr\Clone_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes);
+ },
+ 308 => 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);
+ },
+ 309 => 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);
+ },
+ 310 => 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);
+ },
+ 311 => 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);
+ },
+ 312 => 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);
+ },
+ 313 => 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);
+ },
+ 314 => 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);
+ },
+ 315 => 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);
+ },
+ 316 => 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);
+ },
+ 317 => 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);
+ },
+ 318 => 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);
+ },
+ 319 => 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);
+ },
+ 320 => 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);
+ },
+ 321 => function ($stackPos) {
+ $this->semValue = new Expr\PostInc($this->semStack[$stackPos-(2-1)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes);
+ },
+ 322 => function ($stackPos) {
+ $this->semValue = new Expr\PreInc($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes);
+ },
+ 323 => function ($stackPos) {
+ $this->semValue = new Expr\PostDec($this->semStack[$stackPos-(2-1)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes);
+ },
+ 324 => function ($stackPos) {
+ $this->semValue = new Expr\PreDec($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes);
+ },
+ 325 => 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);
+ },
+ 326 => 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);
+ },
+ 327 => 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);
+ },
+ 328 => 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);
+ },
+ 329 => 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);
+ },
+ 330 => 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);
+ },
+ 331 => 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);
+ },
+ 332 => 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);
+ },
+ 333 => 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);
+ },
+ 334 => 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);
+ },
+ 335 => 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);
+ },
+ 336 => 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);
+ },
+ 337 => 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);
+ },
+ 338 => 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);
+ },
+ 339 => 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);
+ },
+ 340 => 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);
+ },
+ 341 => 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);
+ },
+ 342 => 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);
+ },
+ 343 => function ($stackPos) {
+ $this->semValue = new Expr\UnaryPlus($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes);
+ },
+ 344 => function ($stackPos) {
+ $this->semValue = new Expr\UnaryMinus($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes);
+ },
+ 345 => function ($stackPos) {
+ $this->semValue = new Expr\BooleanNot($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes);
+ },
+ 346 => function ($stackPos) {
+ $this->semValue = new Expr\BitwiseNot($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes);
+ },
+ 347 => 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);
+ },
+ 348 => 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);
+ },
+ 349 => 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);
+ },
+ 350 => 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);
+ },
+ 351 => 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);
+ },
+ 352 => 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);
+ },
+ 353 => 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);
+ },
+ 354 => 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);
+ },
+ 355 => 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);
+ },
+ 356 => function ($stackPos) {
+ $this->semValue = new Expr\Instanceof_($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes);
+ },
+ 357 => function ($stackPos) {
+ $this->semValue = $this->semStack[$stackPos-(1-1)];
+ },
+ 358 => function ($stackPos) {
+ $this->semValue = $this->semStack[$stackPos-(3-2)];
+ },
+ 359 => 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);
+ },
+ 360 => 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);
+ },
+ 361 => 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);
+ },
+ 362 => function ($stackPos) {
+ $this->semValue = new Expr\Isset_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes);
+ },
+ 363 => function ($stackPos) {
+ $this->semValue = new Expr\Empty_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes);
+ },
+ 364 => function ($stackPos) {
+ $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_INCLUDE, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes);
+ },
+ 365 => function ($stackPos) {
+ $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_INCLUDE_ONCE, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes);
+ },
+ 366 => function ($stackPos) {
+ $this->semValue = new Expr\Eval_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes);
+ },
+ 367 => function ($stackPos) {
+ $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_REQUIRE, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes);
+ },
+ 368 => function ($stackPos) {
+ $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_REQUIRE_ONCE, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes);
+ },
+ 369 => function ($stackPos) {
+ $this->semValue = new Expr\Cast\Int_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes);
+ },
+ 370 => 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);
+ },
+ 371 => function ($stackPos) {
+ $this->semValue = new Expr\Cast\String_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes);
+ },
+ 372 => function ($stackPos) {
+ $this->semValue = new Expr\Cast\Array_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes);
+ },
+ 373 => function ($stackPos) {
+ $this->semValue = new Expr\Cast\Object_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes);
+ },
+ 374 => function ($stackPos) {
+ $this->semValue = new Expr\Cast\Bool_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes);
+ },
+ 375 => function ($stackPos) {
+ $this->semValue = new Expr\Cast\Unset_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes);
+ },
+ 376 => 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);
+ },
+ 377 => function ($stackPos) {
+ $this->semValue = new Expr\ErrorSuppress($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes);
+ },
+ 378 => function ($stackPos) {
+ $this->semValue = $this->semStack[$stackPos-(1-1)];
+ },
+ 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\ShellExec($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes);
+ },
+ 382 => function ($stackPos) {
+ $this->semValue = new Expr\Print_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes);
+ },
+ 383 => function ($stackPos) {
+ $this->semValue = new Expr\Yield_(null, null, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes);
+ },
+ 384 => function ($stackPos) {
+ $this->semValue = new Expr\YieldFrom($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes);
+ },
+ 385 => 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);
+ },
+ 386 => 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);
+ },
+ 387 => function ($stackPos) {
+ $this->semValue = $this->semStack[$stackPos-(3-2)];
+ },
+ 388 => function ($stackPos) {
+ $this->semValue = $this->semStack[$stackPos-(3-2)];
+ },
+ 389 => function ($stackPos) {
+ $this->semValue = new Expr\Yield_($this->semStack[$stackPos-(2-2)], null, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes);
+ },
+ 390 => function ($stackPos) {
+ $this->semValue = new Expr\Yield_($this->semStack[$stackPos-(4-4)], $this->semStack[$stackPos-(4-2)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes);
+ },
+ 391 => 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);
+ },
+ 392 => 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);
+ },
+ 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(Scalar\String_::fromString($this->semStack[$stackPos-(4-1)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes), $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes);
+ },
+ 395 => function ($stackPos) {
+ $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes);
+ },
+ 396 => function ($stackPos) {
+ $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes);
+ },
+ 397 => 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);
+ },
+ 398 => function ($stackPos) {
+ $this->semValue = new Expr\New_($this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes);
+ },
+ 399 => function ($stackPos) {
+ list($class, $ctorArgs) = $this->semStack[$stackPos-(2-2)]; $this->semValue = new Expr\New_($class, $ctorArgs, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes);
+ },
+ 400 => function ($stackPos) {
+ $this->semValue = array();
+ },
+ 401 => function ($stackPos) {
+ $this->semValue = $this->semStack[$stackPos-(4-3)];
+ },
+ 402 => function ($stackPos) {
+ $this->semValue = array($this->semStack[$stackPos-(1-1)]);
+ },
+ 403 => function ($stackPos) {
+ $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)];
+ },
+ 404 => function ($stackPos) {
+ $this->semValue = new Expr\ClosureUse($this->semStack[$stackPos-(2-2)], $this->semStack[$stackPos-(2-1)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes);
+ },
+ 405 => function ($stackPos) {
+ $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes);
+ },
+ 406 => function ($stackPos) {
+ $this->semValue = new Expr\FuncCall($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\StaticCall($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes);
+ },
+ 409 => 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);
+ },
+ 410 => function ($stackPos) {
+ $this->semValue = $this->fixupPhp5StaticPropCall($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes);
+ },
+ 411 => function ($stackPos) {
+ $this->semValue = new Expr\FuncCall($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes);
+ },
+ 412 => function ($stackPos) {
+ $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes);
+ },
+ 413 => function ($stackPos) {
+ $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes);
+ },
+ 414 => function ($stackPos) {
+ $this->semValue = $this->semStack[$stackPos-(1-1)];
+ },
+ 415 => function ($stackPos) {
+ $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes);
+ },
+ 416 => function ($stackPos) {
+ $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes);
+ },
+ 417 => function ($stackPos) {
+ $this->semValue = new Name\FullyQualified(substr($this->semStack[$stackPos-(1-1)], 1), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes);
+ },
+ 418 => function ($stackPos) {
+ $this->semValue = new Name\Relative(substr($this->semStack[$stackPos-(1-1)], 10), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes);
+ },
+ 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 = $this->semStack[$stackPos-(1-1)];
+ },
+ 422 => function ($stackPos) {
+ $this->semValue = $this->semStack[$stackPos-(1-1)];
+ },
+ 423 => function ($stackPos) {
+ $this->semValue = $this->semStack[$stackPos-(1-1)];
+ },
+ 424 => function ($stackPos) {
+ $this->semValue = $this->semStack[$stackPos-(1-1)];
+ },
+ 425 => function ($stackPos) {
+ $this->semValue = new Expr\PropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes);
+ },
+ 426 => function ($stackPos) {
+ $this->semValue = new Expr\PropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes);
+ },
+ 427 => function ($stackPos) {
+ $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes);
+ },
+ 428 => function ($stackPos) {
+ $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes);
+ },
+ 429 => function ($stackPos) {
+ $this->semValue = null;
+ },
+ 430 => function ($stackPos) {
+ $this->semValue = null;
+ },
+ 431 => function ($stackPos) {
+ $this->semValue = $this->semStack[$stackPos-(1-1)];
+ },
+ 432 => function ($stackPos) {
+ $this->semValue = array();
+ },
+ 433 => function ($stackPos) {
+ $this->semValue = array(new Scalar\EncapsedStringPart(Scalar\String_::parseEscapeSequences($this->semStack[$stackPos-(1-1)], '`', false), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes));
+ },
+ 434 => 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)];
+ },
+ 435 => function ($stackPos) {
+ $this->semValue = array();
+ },
+ 436 => function ($stackPos) {
+ $this->semValue = $this->semStack[$stackPos-(1-1)];
+ },
+ 437 => function ($stackPos) {
+ $this->semValue = $this->parseLNumber($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes, true);
+ },
+ 438 => function ($stackPos) {
+ $this->semValue = Scalar\DNumber::fromString($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes);
+ },
+ 439 => function ($stackPos) {
+ $this->semValue = Scalar\String_::fromString($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes, false);
+ },
+ 440 => function ($stackPos) {
+ $this->semValue = new Scalar\MagicConst\Line($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes);
+ },
+ 441 => function ($stackPos) {
+ $this->semValue = new Scalar\MagicConst\File($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes);
+ },
+ 442 => function ($stackPos) {
+ $this->semValue = new Scalar\MagicConst\Dir($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes);
+ },
+ 443 => function ($stackPos) {
+ $this->semValue = new Scalar\MagicConst\Class_($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes);
+ },
+ 444 => function ($stackPos) {
+ $this->semValue = new Scalar\MagicConst\Trait_($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes);
+ },
+ 445 => function ($stackPos) {
+ $this->semValue = new Scalar\MagicConst\Method($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes);
+ },
+ 446 => function ($stackPos) {
+ $this->semValue = new Scalar\MagicConst\Function_($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes);
+ },
+ 447 => function ($stackPos) {
+ $this->semValue = new Scalar\MagicConst\Namespace_($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes);
+ },
+ 448 => 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);
+ },
+ 449 => 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);
+ },
+ 450 => function ($stackPos) {
+ $this->semValue = $this->semStack[$stackPos-(1-1)];
+ },
+ 451 => function ($stackPos) {
+ $this->semValue = new Expr\ClassConstFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes);
+ },
+ 452 => function ($stackPos) {
+ $this->semValue = new Expr\ConstFetch($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes);
+ },
+ 453 => function ($stackPos) {
+ $this->semValue = new Expr\Array_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes);
+ },
+ 454 => function ($stackPos) {
+ $this->semValue = new Expr\Array_($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes);
+ },
+ 455 => function ($stackPos) {
+ $this->semValue = $this->semStack[$stackPos-(1-1)];
+ },
+ 456 => 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);
+ },
+ 457 => 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);
+ },
+ 458 => 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);
+ },
+ 459 => 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);
+ },
+ 460 => 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);
+ },
+ 461 => 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);
+ },
+ 462 => 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);
+ },
+ 463 => 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);
+ },
+ 464 => 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);
+ },
+ 465 => 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);
+ },
+ 466 => 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);
+ },
+ 467 => 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);
+ },
+ 468 => 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);
+ },
+ 469 => 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);
+ },
+ 470 => 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);
+ },
+ 471 => 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);
+ },
+ 472 => 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);
+ },
+ 473 => 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);
+ },
+ 474 => function ($stackPos) {
+ $this->semValue = new Expr\UnaryPlus($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes);
+ },
+ 475 => function ($stackPos) {
+ $this->semValue = new Expr\UnaryMinus($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes);
+ },
+ 476 => function ($stackPos) {
+ $this->semValue = new Expr\BooleanNot($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes);
+ },
+ 477 => function ($stackPos) {
+ $this->semValue = new Expr\BitwiseNot($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes);
+ },
+ 478 => 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);
+ },
+ 479 => 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);
+ },
+ 480 => 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);
+ },
+ 481 => 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);
+ },
+ 482 => 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);
+ },
+ 483 => 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);
+ },
+ 484 => 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);
+ },
+ 485 => 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);
+ },
+ 486 => 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);
+ },
+ 487 => 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);
+ },
+ 488 => function ($stackPos) {
+ $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes);
+ },
+ 489 => function ($stackPos) {
+ $this->semValue = $this->semStack[$stackPos-(3-2)];
+ },
+ 490 => function ($stackPos) {
+ $this->semValue = new Expr\ConstFetch($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes);
+ },
+ 491 => function ($stackPos) {
+ $this->semValue = new Expr\ClassConstFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes);
+ },
+ 492 => function ($stackPos) {
+ $this->semValue = $this->semStack[$stackPos-(1-1)];
+ },
+ 493 => function ($stackPos) {
+ $this->semValue = $this->semStack[$stackPos-(1-1)];
+ },
+ 494 => 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);
+ },
+ 495 => 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);
+ },
+ 496 => function ($stackPos) {
+ $this->semValue = array();
+ },
+ 497 => function ($stackPos) {
+ $this->semValue = $this->semStack[$stackPos-(2-1)];
+ },
+ 498 => function ($stackPos) {
+ $this->semValue = $this->semStack[$stackPos];
+ },
+ 499 => function ($stackPos) {
+ $this->semValue = $this->semStack[$stackPos];
+ },
+ 500 => function ($stackPos) {
+ $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)];
+ },
+ 501 => function ($stackPos) {
+ $this->semValue = array($this->semStack[$stackPos-(1-1)]);
+ },
+ 502 => 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);
+ },
+ 503 => function ($stackPos) {
+ $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(1-1)], null, false, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes);
+ },
+ 504 => function ($stackPos) {
+ $this->semValue = $this->semStack[$stackPos-(1-1)];
+ },
+ 505 => function ($stackPos) {
+ $this->semValue = $this->semStack[$stackPos-(1-1)];
+ },
+ 506 => function ($stackPos) {
+ $this->semValue = $this->semStack[$stackPos-(1-1)];
+ },
+ 507 => function ($stackPos) {
+ $this->semValue = $this->semStack[$stackPos-(1-1)];
+ },
+ 508 => function ($stackPos) {
+ $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(6-2)], $this->semStack[$stackPos-(6-5)], $this->startAttributeStack[$stackPos-(6-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\PropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes);
+ },
+ 511 => 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);
+ },
+ 512 => function ($stackPos) {
+ $this->semValue = new Expr\FuncCall($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes);
+ },
+ 513 => function ($stackPos) {
+ $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes);
+ },
+ 514 => function ($stackPos) {
+ $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes);
+ },
+ 515 => function ($stackPos) {
+ $this->semValue = $this->semStack[$stackPos-(1-1)];
+ },
+ 516 => function ($stackPos) {
+ $this->semValue = $this->semStack[$stackPos-(3-2)];
+ },
+ 517 => function ($stackPos) {
+ $this->semValue = $this->semStack[$stackPos-(1-1)];
+ },
+ 518 => function ($stackPos) {
+ $this->semValue = new Expr\Variable($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes);
+ },
+ 519 => function ($stackPos) {
+ $this->semValue = $this->semStack[$stackPos-(1-1)];
+ },
+ 520 => function ($stackPos) {
+ $this->semValue = $this->semStack[$stackPos-(1-1)];
+ },
+ 521 => function ($stackPos) {
+ $this->semValue = new Expr\StaticPropertyFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes);
+ },
+ 522 => function ($stackPos) {
+ $this->semValue = $this->semStack[$stackPos-(1-1)];
+ },
+ 523 => 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;
+ },
+ 524 => function ($stackPos) {
+ $this->semValue = new Expr\StaticPropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes);
+ },
+ 525 => function ($stackPos) {
+ $this->semValue = new Expr\StaticPropertyFetch($this->semStack[$stackPos-(6-1)], $this->semStack[$stackPos-(6-5)], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes);
+ },
+ 526 => function ($stackPos) {
+ $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes);
+ },
+ 527 => function ($stackPos) {
+ $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes);
+ },
+ 528 => function ($stackPos) {
+ $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes);
+ },
+ 529 => function ($stackPos) {
+ $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes);
+ },
+ 530 => function ($stackPos) {
+ $this->semValue = $this->semStack[$stackPos-(1-1)];
+ },
+ 531 => function ($stackPos) {
+ $this->semValue = new Expr\Variable($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes);
+ },
+ 532 => function ($stackPos) {
+ $this->semValue = null;
+ },
+ 533 => function ($stackPos) {
+ $this->semValue = $this->semStack[$stackPos-(1-1)];
+ },
+ 534 => function ($stackPos) {
+ $this->semValue = $this->semStack[$stackPos-(1-1)];
+ },
+ 535 => function ($stackPos) {
+ $this->semValue = $this->semStack[$stackPos-(3-2)];
+ },
+ 536 => function ($stackPos) {
+ $this->semValue = $this->semStack[$stackPos-(1-1)];
+ },
+ 537 => function ($stackPos) {
+ $this->semValue = new Expr\Error($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); $this->errorState = 2;
+ },
+ 538 => function ($stackPos) {
+ $this->semValue = new Expr\List_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes);
+ },
+ 539 => function ($stackPos) {
+ $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)];
+ },
+ 540 => function ($stackPos) {
+ $this->semValue = array($this->semStack[$stackPos-(1-1)]);
+ },
+ 541 => function ($stackPos) {
+ $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(1-1)], null, false, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes);
+ },
+ 542 => function ($stackPos) {
+ $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(1-1)], null, false, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes);
+ },
+ 543 => function ($stackPos) {
+ $this->semValue = null;
+ },
+ 544 => function ($stackPos) {
+ $this->semValue = array();
+ },
+ 545 => function ($stackPos) {
+ $this->semValue = $this->semStack[$stackPos-(2-1)];
+ },
+ 546 => function ($stackPos) {
+ $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)];
+ },
+ 547 => function ($stackPos) {
+ $this->semValue = array($this->semStack[$stackPos-(1-1)]);
+ },
+ 548 => 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);
+ },
+ 549 => function ($stackPos) {
+ $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(1-1)], null, false, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes);
+ },
+ 550 => 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);
+ },
+ 551 => function ($stackPos) {
+ $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(2-2)], null, true, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes);
+ },
+ 552 => 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);
+ },
+ 553 => function ($stackPos) {
+ $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)];
+ },
+ 554 => function ($stackPos) {
+ $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)];
+ },
+ 555 => function ($stackPos) {
+ $this->semValue = array($this->semStack[$stackPos-(1-1)]);
+ },
+ 556 => function ($stackPos) {
+ $this->semValue = array($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)]);
+ },
+ 557 => function ($stackPos) {
+ $this->semValue = new Scalar\EncapsedStringPart($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes);
+ },
+ 558 => function ($stackPos) {
+ $this->semValue = new Expr\Variable($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes);
+ },
+ 559 => function ($stackPos) {
+ $this->semValue = $this->semStack[$stackPos-(1-1)];
+ },
+ 560 => function ($stackPos) {
+ $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes);
+ },
+ 561 => function ($stackPos) {
+ $this->semValue = new Expr\PropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes);
+ },
+ 562 => function ($stackPos) {
+ $this->semValue = new Expr\Variable($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes);
+ },
+ 563 => function ($stackPos) {
+ $this->semValue = new Expr\Variable($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes);
+ },
+ 564 => function ($stackPos) {
+ $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(6-2)], $this->semStack[$stackPos-(6-4)], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes);
+ },
+ 565 => function ($stackPos) {
+ $this->semValue = $this->semStack[$stackPos-(3-2)];
+ },
+ 566 => function ($stackPos) {
+ $this->semValue = new Scalar\String_($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes);
+ },
+ 567 => function ($stackPos) {
+ $this->semValue = $this->parseNumString($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes);
+ },
+ 568 => 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
new file mode 100644
index 00000000..48deff23
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Parser/Php7.php
@@ -0,0 +1,2882 @@
+'",
+ "T_IS_GREATER_OR_EQUAL",
+ "T_SL",
+ "T_SR",
+ "'+'",
+ "'-'",
+ "'.'",
+ "'*'",
+ "'/'",
+ "'%'",
+ "'!'",
+ "T_INSTANCEOF",
+ "'~'",
+ "T_INC",
+ "T_DEC",
+ "T_INT_CAST",
+ "T_DOUBLE_CAST",
+ "T_STRING_CAST",
+ "T_ARRAY_CAST",
+ "T_OBJECT_CAST",
+ "T_BOOL_CAST",
+ "T_UNSET_CAST",
+ "'@'",
+ "T_POW",
+ "'['",
+ "T_NEW",
+ "T_CLONE",
+ "T_EXIT",
+ "T_IF",
+ "T_ELSEIF",
+ "T_ELSE",
+ "T_ENDIF",
+ "T_LNUMBER",
+ "T_DNUMBER",
+ "T_STRING",
+ "T_STRING_VARNAME",
+ "T_VARIABLE",
+ "T_NUM_STRING",
+ "T_INLINE_HTML",
+ "T_ENCAPSED_AND_WHITESPACE",
+ "T_CONSTANT_ENCAPSED_STRING",
+ "T_ECHO",
+ "T_DO",
+ "T_WHILE",
+ "T_ENDWHILE",
+ "T_FOR",
+ "T_ENDFOR",
+ "T_FOREACH",
+ "T_ENDFOREACH",
+ "T_DECLARE",
+ "T_ENDDECLARE",
+ "T_AS",
+ "T_SWITCH",
+ "T_MATCH",
+ "T_ENDSWITCH",
+ "T_CASE",
+ "T_DEFAULT",
+ "T_BREAK",
+ "T_CONTINUE",
+ "T_GOTO",
+ "T_FUNCTION",
+ "T_FN",
+ "T_CONST",
+ "T_RETURN",
+ "T_TRY",
+ "T_CATCH",
+ "T_FINALLY",
+ "T_USE",
+ "T_INSTEADOF",
+ "T_GLOBAL",
+ "T_STATIC",
+ "T_ABSTRACT",
+ "T_FINAL",
+ "T_PRIVATE",
+ "T_PROTECTED",
+ "T_PUBLIC",
+ "T_READONLY",
+ "T_VAR",
+ "T_UNSET",
+ "T_ISSET",
+ "T_EMPTY",
+ "T_HALT_COMPILER",
+ "T_CLASS",
+ "T_TRAIT",
+ "T_INTERFACE",
+ "T_ENUM",
+ "T_EXTENDS",
+ "T_IMPLEMENTS",
+ "T_OBJECT_OPERATOR",
+ "T_NULLSAFE_OBJECT_OPERATOR",
+ "T_LIST",
+ "T_ARRAY",
+ "T_CALLABLE",
+ "T_CLASS_C",
+ "T_TRAIT_C",
+ "T_METHOD_C",
+ "T_FUNC_C",
+ "T_LINE",
+ "T_FILE",
+ "T_START_HEREDOC",
+ "T_END_HEREDOC",
+ "T_DOLLAR_OPEN_CURLY_BRACES",
+ "T_CURLY_OPEN",
+ "T_PAAMAYIM_NEKUDOTAYIM",
+ "T_NAMESPACE",
+ "T_NS_C",
+ "T_DIR",
+ "T_NS_SEPARATOR",
+ "T_ELLIPSIS",
+ "T_NAME_FULLY_QUALIFIED",
+ "T_NAME_QUALIFIED",
+ "T_NAME_RELATIVE",
+ "T_ATTRIBUTE",
+ "';'",
+ "']'",
+ "'{'",
+ "'}'",
+ "'('",
+ "')'",
+ "'`'",
+ "'\"'",
+ "'$'"
+ );
+
+ protected $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, 166, 168, 167, 55, 168, 168,
+ 163, 164, 53, 50, 8, 51, 52, 54, 168, 168,
+ 168, 168, 168, 168, 168, 168, 168, 168, 31, 159,
+ 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, 160, 36, 168, 165, 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, 161, 35, 162, 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, 122,
+ 123, 124, 125, 126, 127, 128, 129, 130, 131, 132,
+ 133, 134, 135, 136, 137, 138, 139, 140, 141, 142,
+ 143, 144, 145, 146, 147, 148, 149, 150, 151, 152,
+ 153, 154, 155, 156, 157, 158
+ );
+
+ protected $action = array(
+ 132, 133, 134, 575, 135, 136, 0, 738, 739, 740,
+ 137, 37, 850, 825, 851, 476,-32766,-32766,-32766,-32767,
+ -32767,-32767,-32767, 101, 102, 103, 104, 105, 1097, 1098,
+ 1099, 1096, 1095, 1094, 1100, 732, 731,-32766, 1289,-32766,
+ -32766,-32766,-32766,-32766,-32766,-32766,-32767,-32767,-32767,-32767,
+ -32767, 1022, 377, 376, 2, 741,-32766,-32766,-32766,-32766,
+ -32766, 822, 417,-32766,-32766,-32766,-32766,-32766,-32766, 267,
+ 138, 399, 745, 746, 747, 748, 287,-32766, 423,-32766,
+ -32766,-32766,-32766,-32766,-32766, 749, 750, 751, 752, 753,
+ 754, 755, 756, 757, 758, 759, 779, 576, 780, 781,
+ 782, 783, 771, 772, 340, 341, 774, 775, 760, 761,
+ 762, 764, 765, 766, 351, 806, 807, 808, 809, 810,
+ 577, 767, 768, 578, 579, 800, 791, 789, 790, 803,
+ 786, 787, -327, 423, 580, 581, 785, 582, 583, 584,
+ 585, 586, 587, 605, -590, 477, -86, 814, 788, 588,
+ 589, -590, 139,-32766,-32766,-32766, 132, 133, 134, 575,
+ 135, 136, 1046, 738, 739, 740, 137, 37, 323, 1013,
+ 823, 824, 1334, 1324,-32766, 1335,-32766,-32766,-32766,-32766,
+ -32766,-32766,-32766, 1097, 1098, 1099, 1096, 1095, 1094, 1100,
+ -587, 732, 731,-32766,-32766,-32766, 12, -587, 81,-32766,
+ -32766,-32766, 945, 946, 322, 927, 34, 947, 1224, 1223,
+ 1225, 741, -86, 942,-32766, 1075,-32766,-32766,-32766,-32766,
+ -32766, 239,-32766,-32766,-32766, 267, 138, 399, 745, 746,
+ 747, 748, 461, 462, 423, 35, 247, 103, 104, 105,
+ 128, 749, 750, 751, 752, 753, 754, 755, 756, 757,
+ 758, 759, 779, 576, 780, 781, 782, 783, 771, 772,
+ 340, 341, 774, 775, 760, 761, 762, 764, 765, 766,
+ 351, 806, 807, 808, 809, 810, 577, 767, 768, 578,
+ 579, 800, 791, 789, 790, 803, 786, 787, -327, 144,
+ 580, 581, 785, 582, 583, 584, 585, 586, 587, 1222,
+ 82, 83, 84, -590, 788, 588, 589, -590, 148, 763,
+ 733, 734, 735, 736, 737, 1309, 738, 739, 740, 776,
+ 777, 36, 1308, 85, 86, 87, 88, 89, 90, 91,
+ 92, 93, 94, 95, 96, 97, 98, 99, 100, 101,
+ 102, 103, 104, 105, 106, 107, 108, 288, 271, -587,
+ -193, 375, 376, -587, 976,-32766, 1021, 453, 454, 455,
+ 109, 417, 945, 946, 741, 712, 819, 947,-32766,-32766,
+ -32766, -271, 1073, 941, 1224, 1223, 1225, 288, 742, 743,
+ 744, 745, 746, 747, 748, -192, -365, 812, -365,-32766,
+ 599,-32766,-32766, 549, 749, 750, 751, 752, 753, 754,
+ 755, 756, 757, 758, 759, 779, 802, 780, 781, 782,
+ 783, 771, 772, 773, 801, 774, 775, 760, 761, 762,
+ 764, 765, 766, 805, 806, 807, 808, 809, 810, 811,
+ 767, 768, 769, 770, 800, 791, 789, 790, 803, 786,
+ 787, 251, 820, 778, 784, 785, 792, 793, 795, 794,
+ 796, 797, 732, 731, 1261, 1022, 1019, 788, 799, 798,
+ 49, 50, 51, 507, 52, 53, 1009, 1008, 1007, 1010,
+ 54, 55, -111, 56, 816, 1045, 14, -111, 1022, -111,
+ 287, 1305, 977, 306, 302, 1022, 238, -111, -111, -111,
+ -111, -111, -111, -111, -111, 106, 107, 108, 1089, 271,
+ -32766,-32766,-32766, 280, 284, 126, -193, 929, 57, 58,
+ 287, 109, 1019, -541, 59, 308, 60, 244, 245, 61,
+ 62, 63, 64, 65, 66, 67, 68, 1229, 27, 269,
+ 69, 439, 508, -341, 1022, 929, 1255, 1256, 509, 907,
+ 823, -192, 150, 907, 1253, 41, 24, 510, 352, 511,
+ 818, 512, 386, 513, 11, 699, 514, 515, 648, 25,
+ 814, 43, 44, 440, 372, 371, 907, 45, 516, 702,
+ 1220, 667, 668, 363, 334, -540, 357, -541, -541, 320,
+ 1215, 1249, 518, 519, 520, -581, 1074, 335, 724, -581,
+ 1019,-32766, -541, 336, 521, 522, 703, 1243, 1244, 1245,
+ 1246, 1240, 1241, 294, -541, 850, -547, 851, 823, 1247,
+ 1242, 365, 1022, 1224, 1223, 1225, 295, -153, -153, -153,
+ 369, 70, 897, 318, 319, 322, 897, 384, 149, 402,
+ 373, 374, -153, 435, -153, 436, -153, 280, -153, -540,
+ -540, 141, 1220, 378, 379, 639, 640, 322, 370, 897,
+ 907, 437, 438, 829, -540, -88, 151, 732, 731, 945,
+ 946, 153, 823,-32766, 517, -51, -540, 154, -546, 883,
+ 941, -111, -111, -111, 31, 110, 111, 112, 113, 114,
+ 115, 116, 117, 118, 119, 120, 121, 122, 155, 74,
+ 27, 157, 32, 322, -85, 123, 124, 909, 129, 697,
+ 130, 909, 823, 697, -153, 143, 1253, 158,-32766, -544,
+ 1229, -542, 159, 160, 1222, 161, -79, 1134, 1136, -75,
+ 285,-32766,-32766,-32766, 909,-32766, 697,-32766, -539,-32766,
+ -301, -73,-32766, 897, -72, -71, 1220,-32766,-32766,-32766,
+ -16, 140, 1215,-32766,-32766, 732, 731, 322, -70,-32766,
+ 414, -69, -4, 907, -68, -67, 521, 522,-32766, 1243,
+ 1244, 1245, 1246, 1240, 1241, -66, -47, -18, 147, 270,
+ 281, 1247, 1242, -544, -544, -542, -542, 732, 731, 713,
+ 716, 906,-32766, 72, 146, 907, 319, 322, 1222, -297,
+ -542, 823, -539, -539, 276,-32766,-32766,-32766, 277,-32766,
+ -544,-32766, -542,-32766, 282, 283,-32766, -539, 909, 328,
+ 697,-32766,-32766,-32766,-32766, 704, 286,-32766,-32766, -539,
+ 1222, 923, 289,-32766, 414, 1220, 290,-32766,-32766,-32766,
+ 271,-32766,-32766,-32766, 47,-32766, 897, -111,-32766, 677,
+ 109, 814, 145,-32766,-32766,-32766,-32766, 823, 131,-32766,
+ -32766, 1336,-32766, 654, 670,-32766, 414, 1104, 370, 637,
+ 430, 551, 73, 13,-32766, 293, 555, 295, 897, 945,
+ 946, 649, 74, 434, 517, 458, 322, 487, 690, 842,
+ 941, -111, -111, -111, 301, 1022, 561, 655, 671, 1260,
+ 300,-32766, -539,-32766, 907, 603, 303, 1222, 296, 297,
+ 39, 1262, 9, 40,-32766,-32766,-32766, 0,-32766, 907,
+ -32766, 909,-32766, 697, -4,-32766, 0, 1229, 907, 0,
+ -32766,-32766,-32766,-32766, 307, 125,-32766,-32766, 0, 1222,
+ 907, 0,-32766, 414, 0, 0,-32766,-32766,-32766, 707,
+ -32766,-32766,-32766, 962,-32766, 697, -505,-32766, 714, -495,
+ 7, 482,-32766,-32766,-32766,-32766, -539, -539,-32766,-32766,
+ 16, 1222, 567, 367,-32766, 414, 925, 295,-32766,-32766,
+ -32766, -539,-32766,-32766,-32766, 822,-32766, 897, 721,-32766,
+ 722, -575, 888, -539,-32766,-32766,-32766, 986, 963, 970,
+ -32766,-32766, 897, -249, -249, -249,-32766, 414, 823, 370,
+ 960, 897, 971, 886, 958,-32766, 1078, 1081, 718, 1082,
+ 945, 946, 1079, 897, 1080, 517, 1086, 33, 1250, 834,
+ 883, 941, -111, -111, -111, 27, 1275, 1293, 1327, -248,
+ -248, -248, 1220, 642, 884, 370, 317, 823, 366, 698,
+ 701, 1253, 1331, 705, -111, 706, 945, 946, 708, 709,
+ 710, 517, 909,-32766, 697, -249, 883, 941, -111, -111,
+ -111, 711, 715, 700, -509, 1333, 845, 909, 48, 697,
+ -573, 1220, 844, 853, 295, 935, 909, 1215, 697, 74,
+ 978, 852, 1332, 322, 934, 932, 933, 936, 909, 1206,
+ 697, -248, 522, 916, 1243, 1244, 1245, 1246, 1240, 1241,
+ 926, 914, 968, 969, 1330, 1287, 1247, 1242, 1276, 1294,
+ -32766, 1300, 1303, 1191, -547, -546, 1222, -545, 72, -489,
+ 1, 319, 322,-32766,-32766,-32766, 28,-32766, 29,-32766,
+ 38,-32766, 298, 299,-32766, 42, 46, 71, 75,-32766,
+ -32766,-32766, 76, 77, 78,-32766,-32766, 368, 79, 80,
+ 142,-32766, 414, 152, 156, 243, 324, 352, 353, 127,
+ -32766, -274, 354, 355, 356, 357, 358, 359, 360, 361,
+ 362, 364, 431, 0, -272, -271, 18, 19, 20, 21,
+ 23, 401, 478, 479, 486, 489, 490, 491, 492, 496,
+ 497, 498, 505, 684, 1233, 1174, 1251, 1048, 1047, 1028,
+ 0, 1210, 1024, -276, -103, 17, 22, 26, 292, 400,
+ 596, 600, 628, 689, 1178, 1228, 1175, 1306, 0, 0,
+ 1254, 0, 322
+ );
+
+ protected $actionCheck = array(
+ 2, 3, 4, 5, 6, 7, 0, 9, 10, 11,
+ 12, 13, 106, 1, 108, 31, 9, 10, 11, 44,
+ 45, 46, 47, 48, 49, 50, 51, 52, 116, 117,
+ 118, 119, 120, 121, 122, 37, 38, 30, 1, 32,
+ 33, 34, 35, 36, 37, 38, 39, 40, 41, 42,
+ 43, 138, 106, 107, 8, 57, 9, 10, 11, 9,
+ 10, 155, 116, 9, 10, 11, 9, 10, 11, 71,
+ 72, 73, 74, 75, 76, 77, 163, 30, 80, 32,
+ 33, 34, 35, 36, 30, 87, 88, 89, 90, 91,
+ 92, 93, 94, 95, 96, 97, 98, 99, 100, 101,
+ 102, 103, 104, 105, 106, 107, 108, 109, 110, 111,
+ 112, 113, 114, 115, 116, 117, 118, 119, 120, 121,
+ 122, 123, 124, 125, 126, 127, 128, 129, 130, 131,
+ 132, 133, 8, 80, 136, 137, 138, 139, 140, 141,
+ 142, 143, 144, 51, 1, 161, 31, 80, 150, 151,
+ 152, 8, 154, 9, 10, 11, 2, 3, 4, 5,
+ 6, 7, 164, 9, 10, 11, 12, 13, 70, 1,
+ 82, 159, 80, 85, 30, 83, 32, 33, 34, 35,
+ 36, 37, 38, 116, 117, 118, 119, 120, 121, 122,
+ 1, 37, 38, 9, 10, 11, 8, 8, 161, 9,
+ 10, 11, 117, 118, 167, 1, 8, 122, 155, 156,
+ 157, 57, 97, 128, 30, 162, 32, 33, 34, 35,
+ 30, 14, 32, 33, 34, 71, 72, 73, 74, 75,
+ 76, 77, 134, 135, 80, 147, 148, 50, 51, 52,
+ 8, 87, 88, 89, 90, 91, 92, 93, 94, 95,
+ 96, 97, 98, 99, 100, 101, 102, 103, 104, 105,
+ 106, 107, 108, 109, 110, 111, 112, 113, 114, 115,
+ 116, 117, 118, 119, 120, 121, 122, 123, 124, 125,
+ 126, 127, 128, 129, 130, 131, 132, 133, 164, 8,
+ 136, 137, 138, 139, 140, 141, 142, 143, 144, 80,
+ 9, 10, 11, 160, 150, 151, 152, 164, 154, 2,
+ 3, 4, 5, 6, 7, 1, 9, 10, 11, 12,
+ 13, 30, 8, 32, 33, 34, 35, 36, 37, 38,
+ 39, 40, 41, 42, 43, 44, 45, 46, 47, 48,
+ 49, 50, 51, 52, 53, 54, 55, 30, 57, 160,
+ 8, 106, 107, 164, 31, 9, 137, 129, 130, 131,
+ 69, 116, 117, 118, 57, 161, 80, 122, 9, 10,
+ 11, 164, 1, 128, 155, 156, 157, 30, 71, 72,
+ 73, 74, 75, 76, 77, 8, 106, 80, 108, 30,
+ 1, 32, 33, 85, 87, 88, 89, 90, 91, 92,
+ 93, 94, 95, 96, 97, 98, 99, 100, 101, 102,
+ 103, 104, 105, 106, 107, 108, 109, 110, 111, 112,
+ 113, 114, 115, 116, 117, 118, 119, 120, 121, 122,
+ 123, 124, 125, 126, 127, 128, 129, 130, 131, 132,
+ 133, 8, 156, 136, 137, 138, 139, 140, 141, 142,
+ 143, 144, 37, 38, 146, 138, 116, 150, 151, 152,
+ 2, 3, 4, 5, 6, 7, 119, 120, 121, 122,
+ 12, 13, 101, 15, 80, 1, 101, 106, 138, 108,
+ 163, 1, 159, 8, 113, 138, 97, 116, 117, 118,
+ 119, 120, 121, 122, 123, 53, 54, 55, 123, 57,
+ 9, 10, 11, 163, 30, 14, 164, 122, 50, 51,
+ 163, 69, 116, 70, 56, 8, 58, 59, 60, 61,
+ 62, 63, 64, 65, 66, 67, 68, 1, 70, 71,
+ 72, 73, 74, 162, 138, 122, 78, 79, 80, 1,
+ 82, 164, 14, 1, 86, 87, 88, 89, 163, 91,
+ 156, 93, 106, 95, 108, 161, 98, 99, 75, 76,
+ 80, 103, 104, 105, 106, 107, 1, 109, 110, 31,
+ 116, 75, 76, 115, 116, 70, 163, 134, 135, 8,
+ 122, 1, 124, 125, 126, 160, 159, 8, 161, 164,
+ 116, 137, 149, 8, 136, 137, 31, 139, 140, 141,
+ 142, 143, 144, 145, 161, 106, 163, 108, 82, 151,
+ 152, 8, 138, 155, 156, 157, 158, 75, 76, 77,
+ 8, 163, 84, 165, 166, 167, 84, 8, 101, 102,
+ 106, 107, 90, 8, 92, 8, 94, 163, 96, 134,
+ 135, 161, 116, 106, 107, 111, 112, 167, 106, 84,
+ 1, 8, 8, 8, 149, 31, 14, 37, 38, 117,
+ 118, 14, 82, 137, 122, 31, 161, 14, 163, 127,
+ 128, 129, 130, 131, 16, 17, 18, 19, 20, 21,
+ 22, 23, 24, 25, 26, 27, 28, 29, 14, 163,
+ 70, 14, 14, 167, 31, 16, 16, 159, 16, 161,
+ 16, 159, 82, 161, 162, 16, 86, 16, 74, 70,
+ 1, 70, 16, 16, 80, 16, 31, 59, 60, 31,
+ 37, 87, 88, 89, 159, 91, 161, 93, 70, 95,
+ 35, 31, 98, 84, 31, 31, 116, 103, 104, 105,
+ 31, 161, 122, 109, 110, 37, 38, 167, 31, 115,
+ 116, 31, 0, 1, 31, 31, 136, 137, 124, 139,
+ 140, 141, 142, 143, 144, 31, 31, 31, 31, 31,
+ 31, 151, 152, 134, 135, 134, 135, 37, 38, 31,
+ 31, 31, 74, 163, 31, 1, 166, 167, 80, 35,
+ 149, 82, 134, 135, 35, 87, 88, 89, 35, 91,
+ 161, 93, 161, 95, 35, 35, 98, 149, 159, 35,
+ 161, 103, 104, 105, 74, 31, 37, 109, 110, 161,
+ 80, 38, 37, 115, 116, 116, 37, 87, 88, 89,
+ 57, 91, 124, 93, 70, 95, 84, 128, 98, 77,
+ 69, 80, 70, 103, 104, 105, 137, 82, 31, 109,
+ 110, 83, 85, 96, 94, 115, 116, 82, 106, 113,
+ 108, 85, 154, 97, 124, 113, 89, 158, 84, 117,
+ 118, 90, 163, 128, 122, 97, 167, 97, 92, 127,
+ 128, 129, 130, 131, 133, 138, 153, 100, 100, 146,
+ 132, 74, 70, 137, 1, 153, 114, 80, 134, 135,
+ 159, 146, 150, 159, 87, 88, 89, -1, 91, 1,
+ 93, 159, 95, 161, 162, 98, -1, 1, 1, -1,
+ 103, 104, 105, 74, 132, 161, 109, 110, -1, 80,
+ 1, -1, 115, 116, -1, -1, 87, 88, 89, 31,
+ 91, 124, 93, 159, 95, 161, 149, 98, 31, 149,
+ 149, 102, 103, 104, 105, 74, 134, 135, 109, 110,
+ 149, 80, 81, 149, 115, 116, 154, 158, 87, 88,
+ 89, 149, 91, 124, 93, 155, 95, 84, 159, 98,
+ 159, 163, 159, 161, 103, 104, 105, 159, 159, 159,
+ 109, 110, 84, 100, 101, 102, 115, 116, 82, 106,
+ 159, 84, 159, 159, 159, 124, 159, 159, 162, 159,
+ 117, 118, 159, 84, 159, 122, 159, 161, 160, 160,
+ 127, 128, 129, 130, 131, 70, 160, 160, 160, 100,
+ 101, 102, 116, 160, 162, 106, 161, 82, 161, 161,
+ 161, 86, 162, 161, 128, 161, 117, 118, 161, 161,
+ 161, 122, 159, 137, 161, 162, 127, 128, 129, 130,
+ 131, 161, 161, 161, 165, 162, 162, 159, 70, 161,
+ 163, 116, 162, 162, 158, 162, 159, 122, 161, 163,
+ 162, 162, 162, 167, 162, 162, 162, 162, 159, 162,
+ 161, 162, 137, 162, 139, 140, 141, 142, 143, 144,
+ 162, 162, 162, 162, 162, 162, 151, 152, 162, 162,
+ 74, 162, 162, 165, 163, 163, 80, 163, 163, 163,
+ 163, 166, 167, 87, 88, 89, 163, 91, 163, 93,
+ 163, 95, 134, 135, 98, 163, 163, 163, 163, 103,
+ 104, 105, 163, 163, 163, 109, 110, 149, 163, 163,
+ 163, 115, 116, 163, 163, 163, 163, 163, 163, 161,
+ 124, 164, 163, 163, 163, 163, 163, 163, 163, 163,
+ 163, 163, 163, -1, 164, 164, 164, 164, 164, 164,
+ 164, 164, 164, 164, 164, 164, 164, 164, 164, 164,
+ 164, 164, 164, 164, 164, 164, 164, 164, 164, 164,
+ -1, 164, 164, 164, 164, 164, 164, 164, 164, 164,
+ 164, 164, 164, 164, 164, 164, 164, 164, -1, -1,
+ 166, -1, 167
+ );
+
+ protected $actionBase = array(
+ 0, -2, 154, 542, 752, 893, 929, 580, 53, 394,
+ 855, 307, 307, 67, 307, 307, 307, 565, 908, 908,
+ 917, 908, 538, 784, 649, 649, 649, 708, 708, 708,
+ 708, 740, 740, 849, 849, 881, 817, 634, 1036, 1036,
+ 1036, 1036, 1036, 1036, 1036, 1036, 1036, 1036, 1036, 1036,
+ 1036, 1036, 1036, 1036, 1036, 1036, 1036, 1036, 1036, 1036,
+ 1036, 1036, 1036, 1036, 1036, 1036, 1036, 1036, 1036, 1036,
+ 1036, 1036, 1036, 1036, 1036, 1036, 1036, 1036, 1036, 1036,
+ 1036, 1036, 1036, 1036, 1036, 1036, 1036, 1036, 1036, 1036,
+ 1036, 1036, 1036, 1036, 1036, 1036, 1036, 1036, 1036, 1036,
+ 1036, 1036, 1036, 1036, 1036, 1036, 1036, 1036, 1036, 1036,
+ 1036, 1036, 1036, 1036, 1036, 1036, 1036, 1036, 1036, 1036,
+ 1036, 1036, 1036, 1036, 1036, 1036, 1036, 1036, 1036, 1036,
+ 1036, 1036, 1036, 1036, 1036, 1036, 1036, 1036, 1036, 1036,
+ 1036, 1036, 1036, 1036, 1036, 1036, 1036, 1036, 1036, 1036,
+ 1036, 1036, 1036, 1036, 1036, 1036, 1036, 1036, 1036, 1036,
+ 1036, 1036, 12, 323, 389, 678, 1044, 1050, 1046, 1051,
+ 1042, 1041, 1045, 1047, 1052, 942, 943, 753, 946, 947,
+ 949, 950, 1048, 873, 1043, 1049, 291, 291, 291, 291,
+ 291, 291, 291, 291, 291, 291, 291, 291, 291, 291,
+ 291, 291, 291, 291, 291, 291, 291, 291, 291, 291,
+ 291, 291, 346, 491, 50, 57, 57, 57, 57, 57,
+ 57, 57, 57, 57, 57, 57, 57, 57, 57, 57,
+ 57, 57, 57, 57, 57, 54, 54, 54, 620, 620,
+ 359, 190, 184, 955, 955, 955, 955, 955, 955, 955,
+ 955, 955, 955, 658, 47, 144, 144, 7, 7, 7,
+ 7, 7, 371, -25, -25, -25, -25, 709, 347, 916,
+ 474, 526, 375, 280, 317, 245, 340, 340, 187, 187,
+ 396, 396, -87, -87, 396, 396, 396, 747, 747, 747,
+ 747, 443, 505, -94, 308, 454, 480, 480, 480, 480,
+ 454, 454, 454, 454, 755, 1054, 454, 454, 454, 641,
+ 822, 822, 998, 442, 442, 442, 822, 499, 776, 88,
+ 499, 88, 37, 92, 756, 85, -54, 425, 756, 639,
+ 764, 189, 143, 820, 524, 820, 1040, 385, 767, 413,
+ 735, 688, 857, 902, 1053, 787, 940, 788, 941, 228,
+ 98, 685, 1039, 1039, 1039, 1039, 1039, 1039, 1039, 1039,
+ 1039, 1039, 1039, 1055, 415, 1040, 286, 1055, 1055, 1055,
+ 415, 415, 415, 415, 415, 415, 415, 415, 415, 415,
+ 534, 286, 483, 496, 286, 774, 415, 12, 800, 12,
+ 12, 12, 12, 12, 12, 12, 12, 12, 12, 736,
+ -16, 12, 323, 204, 204, 427, 168, 204, 204, 204,
+ 204, 12, 12, 12, 524, 773, 733, 537, 742, 377,
+ 773, 773, 773, 115, 124, 207, 342, 695, 754, 446,
+ 761, 761, 775, 957, 957, 761, 765, 761, 775, 973,
+ 761, 761, 957, 957, 809, 232, 625, 579, 612, 627,
+ 957, 475, 761, 761, 761, 761, 792, 643, 761, 433,
+ 281, 761, 761, 792, 758, 739, 46, 751, 957, 957,
+ 957, 792, 603, 751, 751, 751, 819, 821, 746, 738,
+ 571, 507, 645, 198, 783, 738, 738, 761, 619, 746,
+ 738, 746, 738, 812, 738, 738, 738, 746, 738, 765,
+ 585, 738, 691, 644, 188, 738, 6, 974, 975, 624,
+ 979, 967, 980, 1009, 981, 985, 878, 956, 992, 972,
+ 986, 965, 963, 750, 679, 680, 801, 797, 954, 771,
+ 771, 771, 951, 771, 771, 771, 771, 771, 771, 771,
+ 771, 679, 858, 814, 745, 777, 995, 682, 684, 743,
+ 872, 899, 948, 994, 1030, 987, 741, 689, 1016, 999,
+ 846, 875, 1000, 1001, 1017, 1031, 1032, 880, 772, 903,
+ 904, 859, 1003, 879, 771, 974, 985, 663, 972, 986,
+ 965, 963, 734, 724, 720, 723, 717, 704, 700, 703,
+ 737, 1033, 907, 818, 866, 1002, 952, 679, 867, 1012,
+ 856, 1018, 1019, 877, 778, 768, 868, 910, 1004, 1005,
+ 1006, 882, 1034, 884, 744, 1013, 997, 1020, 780, 911,
+ 1021, 1022, 1023, 1024, 887, 913, 888, 889, 823, 781,
+ 1010, 757, 918, 528, 769, 770, 789, 1008, 642, 993,
+ 900, 919, 920, 1025, 1026, 1027, 922, 923, 990, 828,
+ 1014, 760, 1015, 1011, 829, 830, 647, 785, 1035, 759,
+ 763, 779, 653, 674, 924, 925, 927, 991, 748, 762,
+ 841, 843, 1037, 683, 1038, 931, 677, 844, 696, 938,
+ 1029, 697, 699, 786, 901, 811, 782, 766, 1007, 749,
+ 845, 939, 847, 848, 850, 1028, 853, 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, 458, 458, 458,
+ 458, 458, 458, 307, 307, 307, 307, 0, 0, 307,
+ 0, 0, 0, 458, 458, 458, 458, 458, 458, 458,
+ 458, 458, 458, 458, 458, 458, 458, 458, 458, 458,
+ 458, 458, 458, 458, 458, 458, 458, 458, 458, 458,
+ 458, 458, 458, 458, 458, 458, 458, 458, 458, 458,
+ 458, 458, 458, 458, 458, 458, 458, 458, 458, 458,
+ 458, 458, 458, 458, 458, 458, 458, 458, 458, 458,
+ 458, 458, 458, 458, 458, 458, 458, 458, 458, 458,
+ 458, 458, 458, 458, 458, 458, 458, 458, 458, 458,
+ 458, 458, 458, 458, 458, 458, 458, 458, 458, 458,
+ 458, 458, 458, 458, 458, 458, 458, 458, 458, 458,
+ 458, 458, 458, 458, 458, 458, 458, 458, 458, 458,
+ 458, 458, 458, 458, 458, 458, 458, 458, 458, 458,
+ 458, 458, 458, 458, 458, 458, 458, 458, 458, 458,
+ 458, 458, 458, 458, 458, 458, 458, 458, 458, 458,
+ 458, 458, 458, 458, 458, 458, 458, 458, 291, 291,
+ 291, 291, 291, 291, 291, 291, 291, 291, 291, 291,
+ 291, 291, 291, 291, 291, 291, 291, 291, 291, 291,
+ 291, 291, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 291, 291,
+ 291, 291, 291, 291, 291, 291, 291, 291, 291, 291,
+ 291, 291, 291, 291, 291, 291, 291, 291, 291, 291,
+ 291, 291, 291, 291, 219, 219, 291, 291, 291, 219,
+ 219, 219, 219, 219, 219, 219, 219, 219, 219, 0,
+ 291, 291, 291, 291, 291, 291, 291, 291, 809, 442,
+ 442, 442, 442, 219, 219, 219, 219, 219, -88, -88,
+ 219, 809, 219, 219, 442, 442, 219, 219, 219, 219,
+ 219, 219, 219, 219, 219, 219, 219, 0, 0, 286,
+ 88, 219, 765, 765, 765, 765, 219, 219, 219, 219,
+ 88, 88, 219, 219, 219, 0, 0, 0, 0, 0,
+ 0, 0, 0, 286, 88, 0, 286, 0, 765, 765,
+ 219, 0, 809, 314, 219, 0, 0, 0, 0, 286,
+ 765, 286, 415, 761, 88, 761, 415, 415, 204, 12,
+ 314, 527, 527, 527, 527, 0, 0, 524, 809, 809,
+ 809, 809, 809, 809, 809, 809, 809, 809, 809, 765,
+ 0, 809, 0, 765, 765, 765, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 765, 0, 0, 957, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 973, 0, 0, 0, 0,
+ 0, 0, 765, 0, 0, 0, 0, 0, 0, 0,
+ 0, 771, 778, 0, 778, 0, 771, 771, 771, 0,
+ 0, 0, 0, 785, 683
+ );
+
+ protected $actionDefault = array(
+ 3,32767, 103,32767,32767,32767,32767,32767,32767,32767,
+ 32767,32767, 101,32767,32767,32767,32767,32767,32767,32767,
+ 32767,32767,32767,32767,32767,32767,32767, 593, 593, 593,
+ 593,32767,32767, 253, 103,32767,32767, 467, 385, 385,
+ 385,32767,32767, 537, 537, 537, 537, 537, 537,32767,
+ 32767,32767,32767,32767,32767, 467,32767,32767,32767,32767,
+ 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,
+ 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,
+ 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,
+ 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,
+ 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,
+ 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,
+ 32767,32767,32767,32767,32767,32767,32767,32767, 101,32767,
+ 32767,32767, 37, 7, 8, 10, 11, 50, 17, 323,
+ 32767,32767,32767,32767, 103,32767,32767,32767,32767,32767,
+ 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,
+ 32767,32767,32767,32767,32767, 586,32767,32767,32767,32767,
+ 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,
+ 32767,32767,32767,32767,32767,32767, 471, 450, 451, 453,
+ 454, 384, 538, 592, 326, 589, 383, 146, 338, 328,
+ 241, 329, 257, 472, 258, 473, 476, 477, 214, 286,
+ 380, 150, 414, 468, 416, 466, 470, 415, 390, 395,
+ 396, 397, 398, 399, 400, 401, 402, 403, 404, 405,
+ 406, 407, 388, 389, 469, 447, 446, 445,32767,32767,
+ 412, 413, 417,32767,32767,32767,32767,32767,32767,32767,
+ 32767, 103,32767, 387, 420, 418, 419, 436, 437, 434,
+ 435, 438,32767, 439, 440, 441, 442,32767, 315,32767,
+ 32767,32767, 364, 362, 315, 112,32767,32767, 427, 428,
+ 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,
+ 32767, 531, 444,32767,32767,32767,32767,32767,32767,32767,
+ 32767,32767,32767,32767,32767,32767, 103,32767, 101, 533,
+ 409, 411, 501, 422, 423, 421, 391,32767, 508,32767,
+ 103, 510,32767,32767,32767,32767,32767,32767,32767, 532,
+ 32767, 539, 539,32767, 494, 101, 194,32767,32767,32767,
+ 194, 194,32767,32767,32767,32767,32767,32767,32767,32767,
+ 600, 494, 111, 111, 111, 111, 111, 111, 111, 111,
+ 111, 111, 111,32767, 194, 111,32767,32767,32767, 101,
+ 194, 194, 194, 194, 194, 194, 194, 194, 194, 194,
+ 189,32767, 267, 269, 103, 554, 194,32767, 513,32767,
+ 32767,32767,32767,32767,32767,32767,32767,32767,32767, 506,
+ 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,
+ 32767,32767,32767,32767, 494, 432, 139,32767, 139, 539,
+ 424, 425, 426, 496, 539, 539, 539, 311, 288,32767,
+ 32767,32767,32767, 511, 511, 101, 101, 101, 101, 506,
+ 32767,32767,32767,32767, 112, 100, 100, 100, 100, 100,
+ 104, 102,32767,32767,32767,32767, 222, 100,32767, 102,
+ 102,32767,32767, 222, 224, 211, 102, 226,32767, 558,
+ 559, 222, 102, 226, 226, 226, 246, 246, 483, 317,
+ 102, 100, 102, 102, 196, 317, 317,32767, 102, 483,
+ 317, 483, 317, 198, 317, 317, 317, 483, 317,32767,
+ 102, 317, 213, 100, 100, 317,32767,32767,32767, 496,
+ 32767,32767,32767,32767,32767,32767,32767, 221,32767,32767,
+ 32767,32767,32767,32767,32767, 526,32767, 543, 556, 430,
+ 431, 433, 541, 455, 456, 457, 458, 459, 460, 461,
+ 463, 588,32767, 500,32767,32767,32767,32767, 337, 598,
+ 32767, 598,32767,32767,32767,32767,32767,32767,32767,32767,
+ 32767,32767,32767,32767,32767,32767,32767, 599,32767, 539,
+ 32767,32767,32767,32767, 429, 9, 76, 489, 43, 44,
+ 52, 58, 517, 518, 519, 520, 514, 515, 521, 516,
+ 32767,32767, 522, 564,32767,32767, 540, 591,32767,32767,
+ 32767,32767,32767,32767, 139,32767,32767,32767,32767,32767,
+ 32767,32767,32767,32767,32767,32767, 526,32767, 137,32767,
+ 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,
+ 539,32767,32767,32767,32767, 313, 310,32767,32767,32767,
+ 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,
+ 32767,32767,32767, 539,32767,32767,32767,32767,32767, 290,
+ 32767, 307,32767,32767,32767,32767,32767,32767,32767,32767,
+ 32767,32767,32767,32767,32767,32767,32767,32767, 285,32767,
+ 32767, 379,32767,32767,32767,32767, 358,32767,32767,32767,
+ 32767,32767,32767,32767,32767,32767,32767, 152, 152, 3,
+ 3, 340, 152, 152, 152, 340, 340, 152, 340, 340,
+ 340, 152, 152, 152, 152, 152, 152, 279, 184, 261,
+ 264, 246, 246, 152, 350, 152
+ );
+
+ protected $goto = array(
+ 194, 194, 685, 425, 653, 346, 614, 650, 419, 310,
+ 311, 331, 569, 316, 424, 332, 426, 630, 1200, 930,
+ 693, 1051, 1201, 1204, 931, 1205, 165, 165, 165, 165,
+ 218, 195, 191, 191, 175, 177, 213, 191, 191, 191,
+ 191, 191, 192, 192, 192, 192, 192, 192, 186, 187,
+ 188, 189, 190, 215, 213, 216, 529, 530, 415, 531,
+ 533, 534, 535, 536, 537, 538, 539, 540, 1120, 166,
+ 167, 168, 193, 169, 170, 171, 164, 172, 173, 174,
+ 176, 212, 214, 217, 235, 240, 241, 242, 254, 255,
+ 256, 257, 258, 259, 260, 261, 263, 264, 265, 266,
+ 278, 279, 313, 314, 315, 420, 421, 422, 574, 219,
+ 220, 221, 222, 223, 224, 225, 226, 227, 228, 229,
+ 230, 231, 232, 233, 178, 234, 179, 196, 197, 198,
+ 236, 186, 187, 188, 189, 190, 215, 1120, 199, 180,
+ 181, 182, 200, 196, 183, 237, 201, 199, 163, 202,
+ 203, 184, 204, 205, 206, 185, 207, 208, 209, 210,
+ 211, 275, 275, 275, 275, 843, 593, 646, 647, 560,
+ 664, 665, 666, 720, 629, 631, 840, 418, 651, 604,
+ 841, 350, 675, 679, 996, 683, 691, 992, 616, 616,
+ 817, 350, 350, 1252, 1252, 1252, 1252, 1252, 1252, 1252,
+ 1252, 1252, 1252, 1092, 1093, 350, 350, 874, 350, 848,
+ 1337, 896, 891, 892, 905, 849, 893, 846, 894, 895,
+ 847, 548, 900, 899, 901, 350, 391, 394, 554, 594,
+ 598, 1270, 1270, 1072, 1068, 1069, 1270, 1270, 1270, 1270,
+ 1270, 1270, 1270, 1270, 1270, 1270, 1268, 1268, 815, 347,
+ 348, 1268, 1268, 1268, 1268, 1268, 1268, 1268, 1268, 1268,
+ 1268, 1221, 1020, 1221, 1020, 1221, 836, 5, 1020, 6,
+ 1020, 1020, 1281, 961, 1020, 1020, 1020, 1020, 1020, 1020,
+ 1020, 1020, 1020, 1020, 1020, 349, 349, 349, 349, 1221,
+ 460, 460, 566, 678, 1221, 1221, 1221, 1221, 344, 460,
+ 1221, 1221, 1221, 1302, 1302, 1302, 1302, 602, 617, 620,
+ 621, 622, 623, 643, 644, 645, 695, 836, 912, 553,
+ 546, 1310, 913, 548, 532, 532, 821, 856, 982, 532,
+ 532, 532, 532, 532, 532, 532, 532, 532, 532, 543,
+ 473, 543, 868, 543, 928, 855, 928, 389, 475, 337,
+ 546, 553, 562, 563, 339, 572, 595, 609, 610, 1320,
+ 1320, 249, 249, 1026, 1025, 15, 821, 450, 821, 494,
+ 565, 495, 955, 955, 955, 955, 1320, 501, 450, 949,
+ 956, 839, 652, 1321, 1321, 1169, 1214, 246, 246, 246,
+ 246, 248, 250, 1323, 985, 959, 959, 957, 959, 719,
+ 1321, 545, 994, 989, 470, 1295, 1296, 953, 405, 692,
+ 917, 1108, 432, 541, 541, 541, 541, 612, 597, 452,
+ 444, 1029, 1030, 1001, 658, 444, 1292, 444, 1292, 674,
+ 1292, 860, 833, 656, 980, 836, 861, 547, 557, 854,
+ 321, 305, 547, 333, 557, 1297, 1298, 392, 456, 570,
+ 607, 1211, 944, 398, 858, 1304, 1304, 1304, 1304, 463,
+ 573, 464, 465, 608, 1004, 866, 403, 404, 1328, 1329,
+ 1057, 662, 1212, 663, 471, 407, 408, 409, 723, 676,
+ 870, 1288, 410, 624, 626, 627, 342, 427, 1216, 869,
+ 857, 1056, 1060, 427, 864, 1061, 1103, 966, 0, 0,
+ 964, 1027, 1027, 0, 0, 0, 657, 1038, 1034, 1035,
+ 444, 444, 444, 444, 444, 444, 444, 444, 444, 444,
+ 444, 0, 1059, 444, 954, 0, 1290, 1290, 1059, 592,
+ 1085, 0, 696, 682, 682, 0, 502, 688, 1083, 0,
+ 0, 0, 1217, 1218, 272, 428, 1101, 873, 0, 544,
+ 831, 544, 0, 0, 0, 673, 938, 0, 0, 1015,
+ 1031, 1032, 0, 0, 0, 0, 0, 0, 1219, 1278,
+ 1279, 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, 252, 252,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 999, 999
+ );
+
+ protected $gotoCheck = array(
+ 42, 42, 72, 65, 65, 96, 55, 55, 65, 65,
+ 65, 65, 65, 65, 65, 65, 65, 65, 78, 78,
+ 9, 126, 78, 78, 78, 78, 42, 42, 42, 42,
+ 42, 42, 42, 42, 42, 42, 42, 42, 42, 42,
+ 42, 42, 42, 42, 42, 42, 42, 42, 42, 42,
+ 42, 42, 42, 42, 42, 42, 42, 42, 42, 42,
+ 42, 42, 42, 42, 42, 42, 42, 42, 42, 42,
+ 42, 42, 42, 42, 42, 42, 42, 42, 42, 42,
+ 42, 42, 42, 42, 42, 42, 42, 42, 42, 42,
+ 42, 42, 42, 42, 42, 42, 42, 42, 42, 42,
+ 42, 42, 42, 42, 42, 42, 42, 42, 42, 42,
+ 42, 42, 42, 42, 42, 42, 42, 42, 42, 42,
+ 42, 42, 42, 42, 42, 42, 42, 42, 42, 42,
+ 42, 42, 42, 42, 42, 42, 42, 42, 42, 42,
+ 42, 42, 42, 42, 42, 42, 42, 42, 42, 42,
+ 42, 42, 42, 42, 42, 42, 42, 42, 42, 42,
+ 42, 23, 23, 23, 23, 15, 129, 85, 85, 48,
+ 85, 85, 85, 48, 48, 48, 26, 13, 48, 13,
+ 27, 14, 48, 48, 48, 48, 48, 48, 107, 107,
+ 7, 14, 14, 107, 107, 107, 107, 107, 107, 107,
+ 107, 107, 107, 143, 143, 14, 14, 45, 14, 15,
+ 14, 15, 15, 15, 15, 15, 15, 15, 15, 15,
+ 15, 14, 64, 15, 64, 14, 58, 58, 58, 58,
+ 58, 168, 168, 15, 15, 15, 168, 168, 168, 168,
+ 168, 168, 168, 168, 168, 168, 169, 169, 6, 96,
+ 96, 169, 169, 169, 169, 169, 169, 169, 169, 169,
+ 169, 72, 72, 72, 72, 72, 22, 46, 72, 46,
+ 72, 72, 14, 49, 72, 72, 72, 72, 72, 72,
+ 72, 72, 72, 72, 72, 24, 24, 24, 24, 72,
+ 148, 148, 170, 14, 72, 72, 72, 72, 177, 148,
+ 72, 72, 72, 9, 9, 9, 9, 80, 80, 80,
+ 80, 80, 80, 80, 80, 80, 80, 22, 72, 75,
+ 75, 179, 72, 14, 171, 171, 12, 35, 102, 171,
+ 171, 171, 171, 171, 171, 171, 171, 171, 171, 19,
+ 83, 19, 35, 19, 9, 35, 9, 61, 83, 75,
+ 75, 75, 75, 75, 75, 75, 75, 75, 75, 180,
+ 180, 5, 5, 117, 117, 75, 12, 19, 12, 154,
+ 103, 154, 19, 19, 19, 19, 180, 154, 19, 19,
+ 19, 25, 63, 181, 181, 150, 14, 5, 5, 5,
+ 5, 5, 5, 180, 25, 25, 25, 25, 25, 25,
+ 181, 25, 25, 25, 174, 174, 174, 92, 92, 92,
+ 17, 17, 112, 106, 106, 106, 106, 17, 106, 82,
+ 23, 118, 118, 17, 119, 23, 129, 23, 129, 115,
+ 129, 17, 18, 17, 17, 22, 39, 9, 9, 17,
+ 167, 167, 9, 29, 9, 176, 176, 9, 9, 2,
+ 2, 17, 91, 28, 37, 129, 129, 129, 129, 9,
+ 9, 9, 9, 79, 109, 9, 81, 81, 9, 9,
+ 128, 81, 159, 81, 156, 81, 81, 81, 98, 81,
+ 41, 129, 81, 84, 84, 84, 81, 116, 20, 16,
+ 16, 16, 16, 116, 9, 131, 146, 95, -1, -1,
+ 16, 116, 116, -1, -1, -1, 116, 116, 116, 116,
+ 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
+ 23, -1, 129, 23, 16, -1, 129, 129, 129, 8,
+ 8, -1, 8, 8, 8, -1, 8, 8, 8, -1,
+ -1, -1, 20, 20, 24, 88, 16, 16, -1, 24,
+ 20, 24, -1, -1, -1, 88, 88, -1, -1, 88,
+ 88, 88, -1, -1, -1, -1, -1, -1, 20, 20,
+ 20, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 5, 5,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 106, 106
+ );
+
+ protected $gotoBase = array(
+ 0, 0, -250, 0, 0, 360, 235, 181, 522, 7,
+ 0, 0, 33, -156, -113, -178, 43, -49, 126, 72,
+ 100, 0, -9, 158, 282, 377, 172, 176, 120, 150,
+ 0, 0, 0, 0, 0, -39, 0, 119, 0, 116,
+ 0, 45, -1, 0, 0, 195, -456, 0, -529, 250,
+ 0, 0, 0, 0, 0, -33, 0, 0, 182, 0,
+ 0, 306, 0, 143, 203, -235, 0, 0, 0, 0,
+ 0, 0, -6, 0, 0, -21, 0, 0, -385, 124,
+ -46, -19, 144, -123, 10, -538, 0, 0, 275, 0,
+ 0, 127, 106, 0, 0, 60, -472, 0, 76, 0,
+ 0, 0, 294, 328, 0, 0, 386, -50, 0, 99,
+ 0, 0, 138, 0, 0, 149, 219, 87, 139, 137,
+ 0, 0, 0, 0, 0, 0, 19, 0, 101, 159,
+ 0, 59, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, -69, 0, 0, 58, 0, 257, 0,
+ 114, 0, 0, 0, -120, 0, 40, 0, 0, 108,
+ 0, 0, 0, 0, 0, 0, 0, 122, -7, 8,
+ 264, 86, 0, 0, 107, 0, 78, 269, 0, 291,
+ 55, 79, 0, 0
+ );
+
+ protected $gotoDefault = array(
+ -32768, 506, 727, 4, 728, 921, 804, 813, 590, 523,
+ 694, 343, 618, 416, 1286, 898, 1107, 571, 832, 1230,
+ 1238, 451, 835, 326, 717, 880, 881, 882, 395, 381,
+ 387, 393, 641, 619, 488, 867, 447, 859, 480, 862,
+ 446, 871, 162, 413, 504, 875, 3, 877, 550, 908,
+ 382, 885, 383, 669, 887, 556, 889, 890, 390, 396,
+ 397, 1112, 564, 615, 902, 253, 558, 903, 380, 904,
+ 911, 385, 388, 680, 459, 499, 493, 406, 1087, 559,
+ 601, 638, 441, 467, 613, 625, 611, 474, 1023, 411,
+ 325, 943, 951, 481, 457, 965, 345, 973, 725, 1119,
+ 632, 483, 981, 633, 988, 991, 524, 525, 472, 1003,
+ 268, 1006, 484, 1044, 659, 1017, 1018, 660, 634, 1040,
+ 635, 661, 636, 1042, 466, 591, 1050, 448, 1058, 1274,
+ 449, 1062, 262, 1065, 274, 412, 429, 1070, 1071, 8,
+ 1077, 686, 687, 10, 273, 503, 1102, 681, 445, 1118,
+ 433, 1188, 1190, 552, 485, 1208, 1207, 672, 500, 1213,
+ 442, 1277, 443, 526, 468, 312, 527, 304, 329, 309,
+ 542, 291, 330, 528, 469, 1283, 1291, 327, 30, 1311,
+ 1322, 338, 568, 606
+ );
+
+ 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, 6, 7, 7,
+ 7, 7, 7, 7, 7, 7, 8, 8, 9, 10,
+ 11, 11, 11, 12, 12, 13, 13, 14, 15, 15,
+ 16, 16, 17, 17, 18, 18, 21, 21, 22, 23,
+ 23, 24, 24, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 29, 29, 30, 30, 32, 34,
+ 34, 28, 36, 36, 33, 38, 38, 35, 35, 37,
+ 37, 39, 39, 31, 40, 40, 41, 43, 44, 44,
+ 45, 46, 46, 48, 47, 47, 47, 47, 49, 49,
+ 49, 49, 49, 49, 49, 49, 49, 49, 49, 49,
+ 49, 49, 49, 49, 49, 49, 49, 49, 49, 49,
+ 49, 49, 25, 25, 68, 68, 71, 71, 70, 69,
+ 69, 62, 74, 74, 75, 75, 76, 76, 77, 77,
+ 78, 78, 79, 79, 26, 26, 27, 27, 27, 27,
+ 27, 87, 87, 89, 89, 82, 82, 90, 90, 91,
+ 91, 91, 83, 83, 86, 86, 84, 84, 92, 93,
+ 93, 56, 56, 64, 64, 67, 67, 67, 66, 94,
+ 94, 95, 57, 57, 57, 57, 96, 96, 97, 97,
+ 98, 98, 99, 100, 100, 101, 101, 102, 102, 54,
+ 54, 50, 50, 104, 52, 52, 105, 51, 51, 53,
+ 53, 63, 63, 63, 63, 80, 80, 108, 108, 110,
+ 110, 111, 111, 111, 111, 109, 109, 109, 113, 113,
+ 113, 113, 88, 88, 116, 116, 116, 117, 117, 114,
+ 114, 118, 118, 120, 120, 121, 121, 115, 122, 122,
+ 119, 123, 123, 123, 123, 112, 112, 81, 81, 81,
+ 20, 20, 20, 125, 124, 124, 126, 126, 126, 126,
+ 59, 127, 127, 128, 60, 130, 130, 131, 131, 132,
+ 132, 85, 133, 133, 133, 133, 133, 133, 138, 138,
+ 139, 139, 140, 140, 140, 140, 140, 141, 142, 142,
+ 137, 137, 134, 134, 136, 136, 144, 144, 143, 143,
+ 143, 143, 143, 143, 143, 135, 145, 145, 147, 146,
+ 146, 61, 103, 148, 148, 55, 55, 42, 42, 42,
+ 42, 42, 42, 42, 42, 42, 42, 42, 42, 42,
+ 42, 42, 42, 42, 42, 42, 42, 42, 42, 42,
+ 42, 42, 42, 42, 42, 42, 42, 42, 42, 42,
+ 42, 42, 42, 42, 42, 42, 42, 42, 42, 42,
+ 42, 42, 42, 42, 42, 42, 42, 42, 42, 42,
+ 42, 42, 42, 42, 42, 42, 42, 42, 42, 42,
+ 42, 42, 42, 42, 42, 42, 42, 42, 42, 42,
+ 42, 42, 42, 42, 42, 42, 42, 42, 42, 42,
+ 42, 42, 42, 42, 42, 42, 42, 42, 42, 42,
+ 155, 149, 149, 154, 154, 157, 158, 158, 159, 160,
+ 161, 161, 161, 161, 19, 19, 72, 72, 72, 72,
+ 150, 150, 150, 150, 163, 163, 151, 151, 153, 153,
+ 153, 156, 156, 168, 168, 168, 168, 168, 168, 168,
+ 168, 168, 169, 169, 107, 171, 171, 171, 171, 152,
+ 152, 152, 152, 152, 152, 152, 152, 58, 58, 166,
+ 166, 166, 166, 172, 172, 162, 162, 162, 173, 173,
+ 173, 173, 173, 173, 73, 73, 65, 65, 65, 65,
+ 129, 129, 129, 129, 176, 175, 165, 165, 165, 165,
+ 165, 165, 165, 164, 164, 164, 174, 174, 174, 174,
+ 106, 170, 178, 178, 177, 177, 179, 179, 179, 179,
+ 179, 179, 179, 179, 167, 167, 167, 167, 181, 182,
+ 180, 180, 180, 180, 180, 180, 180, 180, 183, 183,
+ 183, 183
+ );
+
+ protected $ruleToLength = array(
+ 1, 1, 2, 0, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 0, 1, 0, 1, 1, 2, 1, 3, 4, 1,
+ 2, 0, 1, 1, 1, 1, 1, 3, 5, 4,
+ 3, 4, 2, 3, 1, 1, 7, 6, 2, 3,
+ 1, 2, 3, 1, 2, 3, 1, 1, 3, 1,
+ 3, 1, 2, 2, 3, 1, 3, 2, 3, 1,
+ 3, 2, 0, 1, 1, 1, 1, 1, 3, 7,
+ 10, 5, 7, 9, 5, 3, 3, 3, 3, 3,
+ 3, 1, 2, 5, 7, 9, 6, 5, 6, 3,
+ 2, 1, 1, 1, 0, 2, 1, 3, 8, 0,
+ 4, 2, 1, 3, 0, 1, 0, 1, 0, 1,
+ 3, 1, 1, 1, 8, 9, 7, 8, 7, 6,
+ 8, 0, 2, 0, 2, 1, 2, 1, 2, 1,
+ 1, 1, 0, 2, 0, 2, 0, 2, 2, 1,
+ 3, 1, 4, 1, 4, 1, 1, 4, 2, 1,
+ 3, 3, 3, 4, 4, 5, 0, 2, 4, 3,
+ 1, 1, 7, 0, 2, 1, 3, 3, 4, 1,
+ 4, 0, 2, 5, 0, 2, 6, 0, 2, 0,
+ 3, 1, 2, 1, 1, 2, 0, 1, 3, 0,
+ 2, 1, 1, 1, 1, 6, 8, 6, 1, 2,
+ 1, 1, 1, 1, 1, 1, 1, 1, 3, 3,
+ 3, 1, 3, 3, 3, 3, 3, 1, 3, 3,
+ 1, 1, 2, 1, 1, 0, 1, 0, 2, 2,
+ 2, 4, 3, 1, 1, 3, 1, 2, 2, 3,
+ 2, 3, 1, 1, 2, 3, 1, 1, 3, 2,
+ 0, 1, 5, 5, 10, 3, 5, 1, 1, 3,
+ 0, 2, 4, 5, 4, 4, 4, 3, 1, 1,
+ 1, 1, 1, 1, 0, 1, 1, 2, 1, 1,
+ 1, 1, 1, 1, 1, 2, 1, 3, 1, 1,
+ 3, 2, 2, 3, 1, 0, 1, 1, 3, 3,
+ 3, 4, 1, 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, 3, 5, 4, 3, 4, 4,
+ 2, 2, 4, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 1, 3, 2, 1, 2, 4,
+ 2, 2, 8, 9, 8, 9, 9, 10, 9, 10,
+ 8, 3, 2, 0, 4, 2, 1, 3, 2, 1,
+ 2, 2, 2, 4, 1, 1, 1, 1, 1, 1,
+ 1, 1, 3, 1, 1, 1, 0, 3, 0, 1,
+ 1, 0, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 3, 3, 3, 4, 1, 1, 3, 1,
+ 1, 1, 1, 1, 3, 2, 3, 0, 1, 1,
+ 3, 1, 1, 1, 1, 1, 3, 1, 1, 4,
+ 4, 1, 4, 4, 0, 1, 1, 1, 3, 3,
+ 1, 4, 2, 2, 1, 3, 1, 4, 4, 3,
+ 3, 3, 3, 1, 3, 1, 1, 3, 1, 1,
+ 4, 1, 1, 1, 3, 1, 1, 2, 1, 3,
+ 4, 3, 2, 0, 2, 2, 1, 2, 1, 1,
+ 1, 4, 3, 3, 3, 3, 6, 3, 1, 1,
+ 2, 1
+ );
+
+ protected function initReduceCallbacks() {
+ $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 = $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) {
+ /* nothing */
+ },
+ 99 => function ($stackPos) {
+ /* nothing */
+ },
+ 100 => function ($stackPos) {
+ /* nothing */
+ },
+ 101 => function ($stackPos) {
+ $this->emitError(new Error('A trailing comma is not allowed here', $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes));
+ },
+ 102 => function ($stackPos) {
+ $this->semValue = $this->semStack[$stackPos];
+ },
+ 103 => function ($stackPos) {
+ $this->semValue = $this->semStack[$stackPos];
+ },
+ 104 => function ($stackPos) {
+ $this->semValue = new Node\Attribute($this->semStack[$stackPos-(1-1)], [], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes);
+ },
+ 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 => function ($stackPos) {
+ $this->semValue = array($this->semStack[$stackPos-(1-1)]);
+ },
+ 107 => function ($stackPos) {
+ $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)];
+ },
+ 108 => function ($stackPos) {
+ $this->semValue = new Node\AttributeGroup($this->semStack[$stackPos-(4-2)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes);
+ },
+ 109 => function ($stackPos) {
+ $this->semValue = array($this->semStack[$stackPos-(1-1)]);
+ },
+ 110 => function ($stackPos) {
+ $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)];
+ },
+ 111 => function ($stackPos) {
+ $this->semValue = [];
+ },
+ 112 => function ($stackPos) {
+ $this->semValue = $this->semStack[$stackPos-(1-1)];
+ },
+ 113 => function ($stackPos) {
+ $this->semValue = $this->semStack[$stackPos-(1-1)];
+ },
+ 114 => function ($stackPos) {
+ $this->semValue = $this->semStack[$stackPos-(1-1)];
+ },
+ 115 => function ($stackPos) {
+ $this->semValue = $this->semStack[$stackPos-(1-1)];
+ },
+ 116 => function ($stackPos) {
+ $this->semValue = new Stmt\HaltCompiler($this->lexer->handleHaltCompiler(), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes);
+ },
+ 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);
+ },
+ 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);
+ },
+ 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);
+ },
+ 120 => function ($stackPos) {
+ $this->semValue = new Stmt\Use_($this->semStack[$stackPos-(3-2)], Stmt\Use_::TYPE_NORMAL, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes);
+ },
+ 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);
+ },
+ 122 => function ($stackPos) {
+ $this->semValue = $this->semStack[$stackPos-(2-1)];
+ },
+ 123 => function ($stackPos) {
+ $this->semValue = new Stmt\Const_($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes);
+ },
+ 124 => function ($stackPos) {
+ $this->semValue = Stmt\Use_::TYPE_FUNCTION;
+ },
+ 125 => function ($stackPos) {
+ $this->semValue = Stmt\Use_::TYPE_CONSTANT;
+ },
+ 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);
+ },
+ 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);
+ },
+ 128 => function ($stackPos) {
+ $this->semValue = $this->semStack[$stackPos-(2-1)];
+ },
+ 129 => function ($stackPos) {
+ $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)];
+ },
+ 130 => function ($stackPos) {
+ $this->semValue = array($this->semStack[$stackPos-(1-1)]);
+ },
+ 131 => function ($stackPos) {
+ $this->semValue = $this->semStack[$stackPos-(2-1)];
+ },
+ 132 => function ($stackPos) {
+ $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)];
+ },
+ 133 => function ($stackPos) {
+ $this->semValue = array($this->semStack[$stackPos-(1-1)]);
+ },
+ 134 => function ($stackPos) {
+ $this->semValue = $this->semStack[$stackPos-(2-1)];
+ },
+ 135 => function ($stackPos) {
+ $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)];
+ },
+ 136 => function ($stackPos) {
+ $this->semValue = array($this->semStack[$stackPos-(1-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));
+ },
+ 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));
+ },
+ 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));
+ },
+ 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));
+ },
+ 141 => function ($stackPos) {
+ $this->semValue = $this->semStack[$stackPos-(1-1)]; $this->semValue->type = Stmt\Use_::TYPE_NORMAL;
+ },
+ 142 => function ($stackPos) {
+ $this->semValue = $this->semStack[$stackPos-(2-2)]; $this->semValue->type = $this->semStack[$stackPos-(2-1)];
+ },
+ 143 => function ($stackPos) {
+ $this->semValue = $this->semStack[$stackPos-(2-1)];
+ },
+ 144 => function ($stackPos) {
+ $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)];
+ },
+ 145 => function ($stackPos) {
+ $this->semValue = array($this->semStack[$stackPos-(1-1)]);
+ },
+ 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);
+ },
+ 147 => function ($stackPos) {
+ $this->semValue = $this->semStack[$stackPos-(2-1)];
+ },
+ 148 => function ($stackPos) {
+ $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)];
+ },
+ 149 => function ($stackPos) {
+ $this->semValue = array($this->semStack[$stackPos-(1-1)]);
+ },
+ 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);
+ },
+ 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)]; };
+ },
+ 152 => function ($stackPos) {
+ $this->semValue = array();
+ },
+ 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)];
+ },
+ 154 => function ($stackPos) {
+ $this->semValue = $this->semStack[$stackPos-(1-1)];
+ },
+ 155 => function ($stackPos) {
+ $this->semValue = $this->semStack[$stackPos-(1-1)];
+ },
+ 156 => function ($stackPos) {
+ $this->semValue = $this->semStack[$stackPos-(1-1)];
+ },
+ 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) {
+
+ 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(); }
+ }
+
+ },
+ 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);
+ },
+ 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);
+ },
+ 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);
+ },
+ 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);
+ },
+ 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);
+ },
+ 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);
+ },
+ 165 => function ($stackPos) {
+ $this->semValue = new Stmt\Break_($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes);
+ },
+ 166 => function ($stackPos) {
+ $this->semValue = new Stmt\Continue_($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes);
+ },
+ 167 => function ($stackPos) {
+ $this->semValue = new Stmt\Return_($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes);
+ },
+ 168 => function ($stackPos) {
+ $this->semValue = new Stmt\Global_($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes);
+ },
+ 169 => function ($stackPos) {
+ $this->semValue = new Stmt\Static_($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes);
+ },
+ 170 => function ($stackPos) {
+ $this->semValue = new Stmt\Echo_($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes);
+ },
+ 171 => function ($stackPos) {
+ $this->semValue = new Stmt\InlineHTML($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes);
+ },
+ 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);
+ }
+
+ },
+ 173 => function ($stackPos) {
+ $this->semValue = new Stmt\Unset_($this->semStack[$stackPos-(5-3)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes);
+ },
+ 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);
+ },
+ 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);
+ },
+ 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);
+ },
+ 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);
+ },
+ 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);
+ },
+ 179 => function ($stackPos) {
+ $this->semValue = new Stmt\Goto_($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes);
+ },
+ 180 => function ($stackPos) {
+ $this->semValue = new Stmt\Label($this->semStack[$stackPos-(2-1)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes);
+ },
+ 181 => function ($stackPos) {
+ $this->semValue = array(); /* means: no statement */
+ },
+ 182 => function ($stackPos) {
+ $this->semValue = $this->semStack[$stackPos-(1-1)];
+ },
+ 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 */
+ },
+ 184 => function ($stackPos) {
+ $this->semValue = array();
+ },
+ 185 => function ($stackPos) {
+ $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)];
+ },
+ 186 => function ($stackPos) {
+ $this->semValue = array($this->semStack[$stackPos-(1-1)]);
+ },
+ 187 => function ($stackPos) {
+ $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)];
+ },
+ 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);
+ },
+ 189 => function ($stackPos) {
+ $this->semValue = null;
+ },
+ 190 => function ($stackPos) {
+ $this->semValue = new Stmt\Finally_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes);
+ },
+ 191 => function ($stackPos) {
+ $this->semValue = $this->semStack[$stackPos-(2-1)];
+ },
+ 192 => function ($stackPos) {
+ $this->semValue = array($this->semStack[$stackPos-(1-1)]);
+ },
+ 193 => function ($stackPos) {
+ $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)];
+ },
+ 194 => function ($stackPos) {
+ $this->semValue = false;
+ },
+ 195 => function ($stackPos) {
+ $this->semValue = true;
+ },
+ 196 => function ($stackPos) {
+ $this->semValue = false;
+ },
+ 197 => function ($stackPos) {
+ $this->semValue = true;
+ },
+ 198 => function ($stackPos) {
+ $this->semValue = false;
+ },
+ 199 => function ($stackPos) {
+ $this->semValue = true;
+ },
+ 200 => function ($stackPos) {
+ $this->semValue = $this->semStack[$stackPos-(3-2)];
+ },
+ 201 => function ($stackPos) {
+ $this->semValue = [];
+ },
+ 202 => function ($stackPos) {
+ $this->semValue = $this->semStack[$stackPos-(1-1)];
+ },
+ 203 => function ($stackPos) {
+ $this->semValue = new Node\Identifier($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes);
+ },
+ 204 => 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);
+ },
+ 205 => 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);
+ },
+ 206 => 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)], 'attrGroups' => []], $this->startAttributeStack[$stackPos-(7-1)] + $this->endAttributes);
+ $this->checkClass($this->semValue, $stackPos-(7-2));
+ },
+ 207 => 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));
+ },
+ 208 => 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));
+ },
+ 209 => 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);
+ },
+ 210 => 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));
+ },
+ 211 => function ($stackPos) {
+ $this->semValue = null;
+ },
+ 212 => function ($stackPos) {
+ $this->semValue = $this->semStack[$stackPos-(2-2)];
+ },
+ 213 => function ($stackPos) {
+ $this->semValue = null;
+ },
+ 214 => function ($stackPos) {
+ $this->semValue = $this->semStack[$stackPos-(2-2)];
+ },
+ 215 => function ($stackPos) {
+ $this->semValue = 0;
+ },
+ 216 => function ($stackPos) {
+ $this->semValue = $this->semStack[$stackPos-(2-1)];
+ },
+ 217 => function ($stackPos) {
+ $this->semValue = $this->semStack[$stackPos-(1-1)];
+ },
+ 218 => function ($stackPos) {
+ $this->checkClassModifier($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $stackPos-(2-2)); $this->semValue = $this->semStack[$stackPos-(2-1)] | $this->semStack[$stackPos-(2-2)];
+ },
+ 219 => function ($stackPos) {
+ $this->semValue = Stmt\Class_::MODIFIER_ABSTRACT;
+ },
+ 220 => function ($stackPos) {
+ $this->semValue = Stmt\Class_::MODIFIER_FINAL;
+ },
+ 221 => function ($stackPos) {
+ $this->semValue = Stmt\Class_::MODIFIER_READONLY;
+ },
+ 222 => function ($stackPos) {
+ $this->semValue = null;
+ },
+ 223 => function ($stackPos) {
+ $this->semValue = $this->semStack[$stackPos-(2-2)];
+ },
+ 224 => function ($stackPos) {
+ $this->semValue = array();
+ },
+ 225 => function ($stackPos) {
+ $this->semValue = $this->semStack[$stackPos-(2-2)];
+ },
+ 226 => function ($stackPos) {
+ $this->semValue = array();
+ },
+ 227 => function ($stackPos) {
+ $this->semValue = $this->semStack[$stackPos-(2-2)];
+ },
+ 228 => function ($stackPos) {
+ $this->semValue = $this->semStack[$stackPos-(2-1)];
+ },
+ 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 = is_array($this->semStack[$stackPos-(1-1)]) ? $this->semStack[$stackPos-(1-1)] : array($this->semStack[$stackPos-(1-1)]);
+ },
+ 232 => function ($stackPos) {
+ $this->semValue = $this->semStack[$stackPos-(4-2)];
+ },
+ 233 => function ($stackPos) {
+ $this->semValue = is_array($this->semStack[$stackPos-(1-1)]) ? $this->semStack[$stackPos-(1-1)] : array($this->semStack[$stackPos-(1-1)]);
+ },
+ 234 => function ($stackPos) {
+ $this->semValue = $this->semStack[$stackPos-(4-2)];
+ },
+ 235 => function ($stackPos) {
+ $this->semValue = is_array($this->semStack[$stackPos-(1-1)]) ? $this->semStack[$stackPos-(1-1)] : array($this->semStack[$stackPos-(1-1)]);
+ },
+ 236 => function ($stackPos) {
+ $this->semValue = null;
+ },
+ 237 => function ($stackPos) {
+ $this->semValue = $this->semStack[$stackPos-(4-2)];
+ },
+ 238 => function ($stackPos) {
+ $this->semValue = $this->semStack[$stackPos-(2-1)];
+ },
+ 239 => function ($stackPos) {
+ $this->semValue = array($this->semStack[$stackPos-(1-1)]);
+ },
+ 240 => function ($stackPos) {
+ $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)];
+ },
+ 241 => function ($stackPos) {
+ $this->semValue = new Stmt\DeclareDeclare($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes);
+ },
+ 242 => function ($stackPos) {
+ $this->semValue = $this->semStack[$stackPos-(3-2)];
+ },
+ 243 => function ($stackPos) {
+ $this->semValue = $this->semStack[$stackPos-(4-3)];
+ },
+ 244 => function ($stackPos) {
+ $this->semValue = $this->semStack[$stackPos-(4-2)];
+ },
+ 245 => function ($stackPos) {
+ $this->semValue = $this->semStack[$stackPos-(5-3)];
+ },
+ 246 => function ($stackPos) {
+ $this->semValue = array();
+ },
+ 247 => function ($stackPos) {
+ $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)];
+ },
+ 248 => function ($stackPos) {
+ $this->semValue = new Stmt\Case_($this->semStack[$stackPos-(4-2)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes);
+ },
+ 249 => function ($stackPos) {
+ $this->semValue = new Stmt\Case_(null, $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes);
+ },
+ 250 => function ($stackPos) {
+ $this->semValue = $this->semStack[$stackPos];
+ },
+ 251 => function ($stackPos) {
+ $this->semValue = $this->semStack[$stackPos];
+ },
+ 252 => function ($stackPos) {
+ $this->semValue = new Expr\Match_($this->semStack[$stackPos-(7-3)], $this->semStack[$stackPos-(7-6)], $this->startAttributeStack[$stackPos-(7-1)] + $this->endAttributes);
+ },
+ 253 => function ($stackPos) {
+ $this->semValue = [];
+ },
+ 254 => function ($stackPos) {
+ $this->semValue = $this->semStack[$stackPos-(2-1)];
+ },
+ 255 => function ($stackPos) {
+ $this->semValue = array($this->semStack[$stackPos-(1-1)]);
+ },
+ 256 => function ($stackPos) {
+ $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)];
+ },
+ 257 => function ($stackPos) {
+ $this->semValue = new Node\MatchArm($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes);
+ },
+ 258 => function ($stackPos) {
+ $this->semValue = new Node\MatchArm(null, $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes);
+ },
+ 259 => function ($stackPos) {
+ $this->semValue = is_array($this->semStack[$stackPos-(1-1)]) ? $this->semStack[$stackPos-(1-1)] : array($this->semStack[$stackPos-(1-1)]);
+ },
+ 260 => function ($stackPos) {
+ $this->semValue = $this->semStack[$stackPos-(4-2)];
+ },
+ 261 => function ($stackPos) {
+ $this->semValue = array();
+ },
+ 262 => function ($stackPos) {
+ $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)];
+ },
+ 263 => function ($stackPos) {
+ $this->semValue = new Stmt\ElseIf_($this->semStack[$stackPos-(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);
+ },
+ 264 => function ($stackPos) {
+ $this->semValue = array();
+ },
+ 265 => function ($stackPos) {
+ $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)];
+ },
+ 266 => function ($stackPos) {
+ $this->semValue = new Stmt\ElseIf_($this->semStack[$stackPos-(6-3)], $this->semStack[$stackPos-(6-6)], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes);
+ },
+ 267 => function ($stackPos) {
+ $this->semValue = null;
+ },
+ 268 => 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);
+ },
+ 269 => function ($stackPos) {
+ $this->semValue = null;
+ },
+ 270 => function ($stackPos) {
+ $this->semValue = new Stmt\Else_($this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes);
+ },
+ 271 => function ($stackPos) {
+ $this->semValue = array($this->semStack[$stackPos-(1-1)], false);
+ },
+ 272 => function ($stackPos) {
+ $this->semValue = array($this->semStack[$stackPos-(2-2)], true);
+ },
+ 273 => function ($stackPos) {
+ $this->semValue = array($this->semStack[$stackPos-(1-1)], false);
+ },
+ 274 => function ($stackPos) {
+ $this->semValue = array($this->semStack[$stackPos-(1-1)], false);
+ },
+ 275 => function ($stackPos) {
+ $this->semValue = $this->semStack[$stackPos-(2-1)];
+ },
+ 276 => function ($stackPos) {
+ $this->semValue = array();
+ },
+ 277 => function ($stackPos) {
+ $this->semValue = array($this->semStack[$stackPos-(1-1)]);
+ },
+ 278 => function ($stackPos) {
+ $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)];
+ },
+ 279 => function ($stackPos) {
+ $this->semValue = 0;
+ },
+ 280 => 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)];
+ },
+ 281 => function ($stackPos) {
+ $this->semValue = Stmt\Class_::MODIFIER_PUBLIC;
+ },
+ 282 => function ($stackPos) {
+ $this->semValue = Stmt\Class_::MODIFIER_PROTECTED;
+ },
+ 283 => function ($stackPos) {
+ $this->semValue = Stmt\Class_::MODIFIER_PRIVATE;
+ },
+ 284 => function ($stackPos) {
+ $this->semValue = Stmt\Class_::MODIFIER_READONLY;
+ },
+ 285 => 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);
+ },
+ 286 => 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);
+ },
+ 287 => 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)]);
+ },
+ 288 => function ($stackPos) {
+ $this->semValue = $this->semStack[$stackPos-(1-1)];
+ },
+ 289 => function ($stackPos) {
+ $this->semValue = new Node\NullableType($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes);
+ },
+ 290 => function ($stackPos) {
+ $this->semValue = new Node\UnionType($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes);
+ },
+ 291 => function ($stackPos) {
+ $this->semValue = $this->semStack[$stackPos-(1-1)];
+ },
+ 292 => function ($stackPos) {
+ $this->semValue = $this->semStack[$stackPos-(1-1)];
+ },
+ 293 => function ($stackPos) {
+ $this->semValue = new Node\Name('static', $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes);
+ },
+ 294 => function ($stackPos) {
+ $this->semValue = $this->handleBuiltinTypes($this->semStack[$stackPos-(1-1)]);
+ },
+ 295 => function ($stackPos) {
+ $this->semValue = new Node\Identifier('array', $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes);
+ },
+ 296 => function ($stackPos) {
+ $this->semValue = new Node\Identifier('callable', $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes);
+ },
+ 297 => function ($stackPos) {
+ $this->semValue = $this->semStack[$stackPos-(1-1)];
+ },
+ 298 => function ($stackPos) {
+ $this->semValue = $this->semStack[$stackPos-(3-2)];
+ },
+ 299 => function ($stackPos) {
+ $this->semValue = array($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)]);
+ },
+ 300 => function ($stackPos) {
+ $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)];
+ },
+ 301 => function ($stackPos) {
+ $this->semValue = $this->semStack[$stackPos-(1-1)];
+ },
+ 302 => function ($stackPos) {
+ $this->semValue = $this->semStack[$stackPos-(3-2)];
+ },
+ 303 => function ($stackPos) {
+ $this->semValue = array($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)]);
+ },
+ 304 => function ($stackPos) {
+ $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)];
+ },
+ 305 => function ($stackPos) {
+ $this->semValue = array($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)]);
+ },
+ 306 => function ($stackPos) {
+ $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)];
+ },
+ 307 => function ($stackPos) {
+ $this->semValue = new Node\IntersectionType($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes);
+ },
+ 308 => function ($stackPos) {
+ $this->semValue = array($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)]);
+ },
+ 309 => function ($stackPos) {
+ $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)];
+ },
+ 310 => function ($stackPos) {
+ $this->semValue = new Node\IntersectionType($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes);
+ },
+ 311 => function ($stackPos) {
+ $this->semValue = $this->semStack[$stackPos-(1-1)];
+ },
+ 312 => function ($stackPos) {
+ $this->semValue = new Node\NullableType($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes);
+ },
+ 313 => function ($stackPos) {
+ $this->semValue = new Node\UnionType($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes);
+ },
+ 314 => function ($stackPos) {
+ $this->semValue = $this->semStack[$stackPos-(1-1)];
+ },
+ 315 => function ($stackPos) {
+ $this->semValue = null;
+ },
+ 316 => function ($stackPos) {
+ $this->semValue = $this->semStack[$stackPos-(1-1)];
+ },
+ 317 => function ($stackPos) {
+ $this->semValue = null;
+ },
+ 318 => function ($stackPos) {
+ $this->semValue = $this->semStack[$stackPos-(2-2)];
+ },
+ 319 => function ($stackPos) {
+ $this->semValue = null;
+ },
+ 320 => function ($stackPos) {
+ $this->semValue = array();
+ },
+ 321 => function ($stackPos) {
+ $this->semValue = $this->semStack[$stackPos-(4-2)];
+ },
+ 322 => function ($stackPos) {
+ $this->semValue = array($this->semStack[$stackPos-(3-2)]);
+ },
+ 323 => function ($stackPos) {
+ $this->semValue = new Node\VariadicPlaceholder($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes);
+ },
+ 324 => function ($stackPos) {
+ $this->semValue = array($this->semStack[$stackPos-(1-1)]);
+ },
+ 325 => function ($stackPos) {
+ $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)];
+ },
+ 326 => function ($stackPos) {
+ $this->semValue = new Node\Arg($this->semStack[$stackPos-(1-1)], false, false, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes);
+ },
+ 327 => function ($stackPos) {
+ $this->semValue = new Node\Arg($this->semStack[$stackPos-(2-2)], true, false, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes);
+ },
+ 328 => function ($stackPos) {
+ $this->semValue = new Node\Arg($this->semStack[$stackPos-(2-2)], false, true, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes);
+ },
+ 329 => 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)]);
+ },
+ 330 => function ($stackPos) {
+ $this->semValue = $this->semStack[$stackPos-(2-1)];
+ },
+ 331 => function ($stackPos) {
+ $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)];
+ },
+ 332 => function ($stackPos) {
+ $this->semValue = array($this->semStack[$stackPos-(1-1)]);
+ },
+ 333 => function ($stackPos) {
+ $this->semValue = $this->semStack[$stackPos-(1-1)];
+ },
+ 334 => function ($stackPos) {
+ $this->semValue = $this->semStack[$stackPos-(2-1)];
+ },
+ 335 => function ($stackPos) {
+ $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)];
+ },
+ 336 => function ($stackPos) {
+ $this->semValue = array($this->semStack[$stackPos-(1-1)]);
+ },
+ 337 => function ($stackPos) {
+ $this->semValue = new Stmt\StaticVar($this->semStack[$stackPos-(1-1)], null, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes);
+ },
+ 338 => function ($stackPos) {
+ $this->semValue = new Stmt\StaticVar($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes);
+ },
+ 339 => 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)]; }
+ },
+ 340 => function ($stackPos) {
+ $this->semValue = array();
+ },
+ 341 => 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)];
+ },
+ 342 => 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));
+ },
+ 343 => 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));
+ },
+ 344 => 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));
+ },
+ 345 => function ($stackPos) {
+ $this->semValue = new Stmt\TraitUse($this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes);
+ },
+ 346 => 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);
+ },
+ 347 => function ($stackPos) {
+ $this->semValue = null; /* will be skipped */
+ },
+ 348 => function ($stackPos) {
+ $this->semValue = array();
+ },
+ 349 => function ($stackPos) {
+ $this->semValue = $this->semStack[$stackPos-(3-2)];
+ },
+ 350 => function ($stackPos) {
+ $this->semValue = array();
+ },
+ 351 => function ($stackPos) {
+ $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)];
+ },
+ 352 => 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);
+ },
+ 353 => 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);
+ },
+ 354 => 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);
+ },
+ 355 => 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);
+ },
+ 356 => 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);
+ },
+ 357 => function ($stackPos) {
+ $this->semValue = array($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)]);
+ },
+ 358 => function ($stackPos) {
+ $this->semValue = $this->semStack[$stackPos-(1-1)];
+ },
+ 359 => function ($stackPos) {
+ $this->semValue = array(null, $this->semStack[$stackPos-(1-1)]);
+ },
+ 360 => function ($stackPos) {
+ $this->semValue = null;
+ },
+ 361 => function ($stackPos) {
+ $this->semValue = $this->semStack[$stackPos-(1-1)];
+ },
+ 362 => function ($stackPos) {
+ $this->semValue = $this->semStack[$stackPos-(1-1)];
+ },
+ 363 => function ($stackPos) {
+ $this->semValue = 0;
+ },
+ 364 => function ($stackPos) {
+ $this->semValue = 0;
+ },
+ 365 => function ($stackPos) {
+ $this->semValue = $this->semStack[$stackPos-(1-1)];
+ },
+ 366 => function ($stackPos) {
+ $this->semValue = $this->semStack[$stackPos-(1-1)];
+ },
+ 367 => 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)];
+ },
+ 368 => function ($stackPos) {
+ $this->semValue = Stmt\Class_::MODIFIER_PUBLIC;
+ },
+ 369 => function ($stackPos) {
+ $this->semValue = Stmt\Class_::MODIFIER_PROTECTED;
+ },
+ 370 => function ($stackPos) {
+ $this->semValue = Stmt\Class_::MODIFIER_PRIVATE;
+ },
+ 371 => function ($stackPos) {
+ $this->semValue = Stmt\Class_::MODIFIER_STATIC;
+ },
+ 372 => function ($stackPos) {
+ $this->semValue = Stmt\Class_::MODIFIER_ABSTRACT;
+ },
+ 373 => function ($stackPos) {
+ $this->semValue = Stmt\Class_::MODIFIER_FINAL;
+ },
+ 374 => function ($stackPos) {
+ $this->semValue = Stmt\Class_::MODIFIER_READONLY;
+ },
+ 375 => function ($stackPos) {
+ $this->semValue = $this->semStack[$stackPos-(2-1)];
+ },
+ 376 => function ($stackPos) {
+ $this->semValue = array($this->semStack[$stackPos-(1-1)]);
+ },
+ 377 => function ($stackPos) {
+ $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)];
+ },
+ 378 => function ($stackPos) {
+ $this->semValue = new Node\VarLikeIdentifier(substr($this->semStack[$stackPos-(1-1)], 1), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes);
+ },
+ 379 => function ($stackPos) {
+ $this->semValue = new Stmt\PropertyProperty($this->semStack[$stackPos-(1-1)], null, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes);
+ },
+ 380 => function ($stackPos) {
+ $this->semValue = new Stmt\PropertyProperty($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes);
+ },
+ 381 => function ($stackPos) {
+ $this->semValue = $this->semStack[$stackPos-(2-1)];
+ },
+ 382 => function ($stackPos) {
+ $this->semValue = $this->semStack[$stackPos-(2-1)];
+ },
+ 383 => function ($stackPos) {
+ $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)];
+ },
+ 384 => function ($stackPos) {
+ $this->semValue = array($this->semStack[$stackPos-(1-1)]);
+ },
+ 385 => function ($stackPos) {
+ $this->semValue = array();
+ },
+ 386 => function ($stackPos) {
+ $this->semValue = $this->semStack[$stackPos-(1-1)];
+ },
+ 387 => function ($stackPos) {
+ $this->semValue = $this->semStack[$stackPos-(1-1)];
+ },
+ 388 => function ($stackPos) {
+ $this->semValue = new Expr\Assign($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes);
+ },
+ 389 => function ($stackPos) {
+ $this->semValue = new Expr\Assign($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes);
+ },
+ 390 => function ($stackPos) {
+ $this->semValue = new Expr\Assign($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes);
+ },
+ 391 => function ($stackPos) {
+ $this->semValue = new Expr\AssignRef($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes);
+ },
+ 392 => function ($stackPos) {
+ $this->semValue = $this->semStack[$stackPos-(1-1)];
+ },
+ 393 => function ($stackPos) {
+ $this->semValue = $this->semStack[$stackPos-(1-1)];
+ },
+ 394 => function ($stackPos) {
+ $this->semValue = new Expr\Clone_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes);
+ },
+ 395 => 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);
+ },
+ 396 => 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);
+ },
+ 397 => 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);
+ },
+ 398 => 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);
+ },
+ 399 => 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);
+ },
+ 400 => 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);
+ },
+ 401 => 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);
+ },
+ 402 => 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);
+ },
+ 403 => 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);
+ },
+ 404 => 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);
+ },
+ 405 => 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);
+ },
+ 406 => 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);
+ },
+ 407 => 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);
+ },
+ 408 => function ($stackPos) {
+ $this->semValue = new Expr\PostInc($this->semStack[$stackPos-(2-1)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes);
+ },
+ 409 => function ($stackPos) {
+ $this->semValue = new Expr\PreInc($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes);
+ },
+ 410 => function ($stackPos) {
+ $this->semValue = new Expr\PostDec($this->semStack[$stackPos-(2-1)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes);
+ },
+ 411 => function ($stackPos) {
+ $this->semValue = new Expr\PreDec($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes);
+ },
+ 412 => 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);
+ },
+ 413 => 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);
+ },
+ 414 => 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);
+ },
+ 415 => 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);
+ },
+ 416 => 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);
+ },
+ 417 => 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);
+ },
+ 418 => 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);
+ },
+ 419 => 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);
+ },
+ 420 => 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);
+ },
+ 421 => 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);
+ },
+ 422 => 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);
+ },
+ 423 => 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);
+ },
+ 424 => 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);
+ },
+ 425 => 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);
+ },
+ 426 => 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);
+ },
+ 427 => 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);
+ },
+ 428 => 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);
+ },
+ 429 => 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);
+ },
+ 430 => function ($stackPos) {
+ $this->semValue = new Expr\UnaryPlus($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes);
+ },
+ 431 => function ($stackPos) {
+ $this->semValue = new Expr\UnaryMinus($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes);
+ },
+ 432 => function ($stackPos) {
+ $this->semValue = new Expr\BooleanNot($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes);
+ },
+ 433 => function ($stackPos) {
+ $this->semValue = new Expr\BitwiseNot($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes);
+ },
+ 434 => 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);
+ },
+ 435 => 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);
+ },
+ 436 => 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);
+ },
+ 437 => 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);
+ },
+ 438 => 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);
+ },
+ 439 => 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);
+ },
+ 440 => 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);
+ },
+ 441 => 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);
+ },
+ 442 => 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);
+ },
+ 443 => function ($stackPos) {
+ $this->semValue = new Expr\Instanceof_($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes);
+ },
+ 444 => function ($stackPos) {
+ $this->semValue = $this->semStack[$stackPos-(3-2)];
+ },
+ 445 => 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);
+ },
+ 446 => 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);
+ },
+ 447 => 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);
+ },
+ 448 => function ($stackPos) {
+ $this->semValue = new Expr\Isset_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes);
+ },
+ 449 => function ($stackPos) {
+ $this->semValue = new Expr\Empty_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes);
+ },
+ 450 => function ($stackPos) {
+ $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_INCLUDE, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes);
+ },
+ 451 => function ($stackPos) {
+ $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_INCLUDE_ONCE, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes);
+ },
+ 452 => function ($stackPos) {
+ $this->semValue = new Expr\Eval_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes);
+ },
+ 453 => function ($stackPos) {
+ $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_REQUIRE, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes);
+ },
+ 454 => function ($stackPos) {
+ $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_REQUIRE_ONCE, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes);
+ },
+ 455 => function ($stackPos) {
+ $this->semValue = new Expr\Cast\Int_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes);
+ },
+ 456 => 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);
+ },
+ 457 => function ($stackPos) {
+ $this->semValue = new Expr\Cast\String_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes);
+ },
+ 458 => function ($stackPos) {
+ $this->semValue = new Expr\Cast\Array_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes);
+ },
+ 459 => function ($stackPos) {
+ $this->semValue = new Expr\Cast\Object_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes);
+ },
+ 460 => function ($stackPos) {
+ $this->semValue = new Expr\Cast\Bool_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes);
+ },
+ 461 => function ($stackPos) {
+ $this->semValue = new Expr\Cast\Unset_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes);
+ },
+ 462 => 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);
+ },
+ 463 => function ($stackPos) {
+ $this->semValue = new Expr\ErrorSuppress($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes);
+ },
+ 464 => function ($stackPos) {
+ $this->semValue = $this->semStack[$stackPos-(1-1)];
+ },
+ 465 => function ($stackPos) {
+ $this->semValue = new Expr\ShellExec($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes);
+ },
+ 466 => function ($stackPos) {
+ $this->semValue = new Expr\Print_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes);
+ },
+ 467 => function ($stackPos) {
+ $this->semValue = new Expr\Yield_(null, null, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes);
+ },
+ 468 => function ($stackPos) {
+ $this->semValue = new Expr\Yield_($this->semStack[$stackPos-(2-2)], null, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes);
+ },
+ 469 => function ($stackPos) {
+ $this->semValue = new Expr\Yield_($this->semStack[$stackPos-(4-4)], $this->semStack[$stackPos-(4-2)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes);
+ },
+ 470 => function ($stackPos) {
+ $this->semValue = new Expr\YieldFrom($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes);
+ },
+ 471 => function ($stackPos) {
+ $this->semValue = new Expr\Throw_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes);
+ },
+ 472 => 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);
+ },
+ 473 => 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);
+ },
+ 474 => 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);
+ },
+ 475 => 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);
+ },
+ 476 => 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);
+ },
+ 477 => 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);
+ },
+ 478 => 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);
+ },
+ 479 => 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);
+ },
+ 480 => 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);
+ },
+ 481 => function ($stackPos) {
+ $this->semValue = new Expr\New_($this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes);
+ },
+ 482 => function ($stackPos) {
+ list($class, $ctorArgs) = $this->semStack[$stackPos-(2-2)]; $this->semValue = new Expr\New_($class, $ctorArgs, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes);
+ },
+ 483 => function ($stackPos) {
+ $this->semValue = array();
+ },
+ 484 => function ($stackPos) {
+ $this->semValue = $this->semStack[$stackPos-(4-3)];
+ },
+ 485 => function ($stackPos) {
+ $this->semValue = $this->semStack[$stackPos-(2-1)];
+ },
+ 486 => function ($stackPos) {
+ $this->semValue = array($this->semStack[$stackPos-(1-1)]);
+ },
+ 487 => function ($stackPos) {
+ $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)];
+ },
+ 488 => function ($stackPos) {
+ $this->semValue = new Expr\ClosureUse($this->semStack[$stackPos-(2-2)], $this->semStack[$stackPos-(2-1)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes);
+ },
+ 489 => function ($stackPos) {
+ $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes);
+ },
+ 490 => function ($stackPos) {
+ $this->semValue = new Expr\FuncCall($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes);
+ },
+ 491 => function ($stackPos) {
+ $this->semValue = new Expr\FuncCall($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes);
+ },
+ 492 => function ($stackPos) {
+ $this->semValue = new Expr\FuncCall($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes);
+ },
+ 493 => 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);
+ },
+ 494 => function ($stackPos) {
+ $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes);
+ },
+ 495 => function ($stackPos) {
+ $this->semValue = $this->semStack[$stackPos-(1-1)];
+ },
+ 496 => function ($stackPos) {
+ $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes);
+ },
+ 497 => function ($stackPos) {
+ $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes);
+ },
+ 498 => function ($stackPos) {
+ $this->semValue = new Name\FullyQualified(substr($this->semStack[$stackPos-(1-1)], 1), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes);
+ },
+ 499 => function ($stackPos) {
+ $this->semValue = new Name\Relative(substr($this->semStack[$stackPos-(1-1)], 10), $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-(3-2)];
+ },
+ 503 => function ($stackPos) {
+ $this->semValue = new Expr\Error($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); $this->errorState = 2;
+ },
+ 504 => function ($stackPos) {
+ $this->semValue = $this->semStack[$stackPos-(1-1)];
+ },
+ 505 => function ($stackPos) {
+ $this->semValue = $this->semStack[$stackPos-(1-1)];
+ },
+ 506 => function ($stackPos) {
+ $this->semValue = null;
+ },
+ 507 => function ($stackPos) {
+ $this->semValue = $this->semStack[$stackPos-(3-2)];
+ },
+ 508 => function ($stackPos) {
+ $this->semValue = array();
+ },
+ 509 => function ($stackPos) {
+ $this->semValue = array(new Scalar\EncapsedStringPart(Scalar\String_::parseEscapeSequences($this->semStack[$stackPos-(1-1)], '`'), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes));
+ },
+ 510 => 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)];
+ },
+ 511 => function ($stackPos) {
+ $this->semValue = array();
+ },
+ 512 => function ($stackPos) {
+ $this->semValue = $this->semStack[$stackPos-(1-1)];
+ },
+ 513 => function ($stackPos) {
+ $this->semValue = new Expr\ConstFetch($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes);
+ },
+ 514 => function ($stackPos) {
+ $this->semValue = new Scalar\MagicConst\Line($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes);
+ },
+ 515 => function ($stackPos) {
+ $this->semValue = new Scalar\MagicConst\File($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes);
+ },
+ 516 => function ($stackPos) {
+ $this->semValue = new Scalar\MagicConst\Dir($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes);
+ },
+ 517 => function ($stackPos) {
+ $this->semValue = new Scalar\MagicConst\Class_($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes);
+ },
+ 518 => function ($stackPos) {
+ $this->semValue = new Scalar\MagicConst\Trait_($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes);
+ },
+ 519 => function ($stackPos) {
+ $this->semValue = new Scalar\MagicConst\Method($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes);
+ },
+ 520 => function ($stackPos) {
+ $this->semValue = new Scalar\MagicConst\Function_($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes);
+ },
+ 521 => function ($stackPos) {
+ $this->semValue = new Scalar\MagicConst\Namespace_($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes);
+ },
+ 522 => function ($stackPos) {
+ $this->semValue = new Expr\ClassConstFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes);
+ },
+ 523 => 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;
+ },
+ 524 => 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);
+ },
+ 525 => 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);
+ },
+ 526 => function ($stackPos) {
+ $this->semValue = $this->semStack[$stackPos-(1-1)];
+ },
+ 527 => function ($stackPos) {
+ $this->semValue = Scalar\String_::fromString($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes);
+ },
+ 528 => 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);
+ },
+ 529 => function ($stackPos) {
+ $this->semValue = $this->parseLNumber($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes);
+ },
+ 530 => function ($stackPos) {
+ $this->semValue = Scalar\DNumber::fromString($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes);
+ },
+ 531 => function ($stackPos) {
+ $this->semValue = $this->semStack[$stackPos-(1-1)];
+ },
+ 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 = $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);
+ },
+ 535 => 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);
+ },
+ 536 => 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);
+ },
+ 537 => function ($stackPos) {
+ $this->semValue = null;
+ },
+ 538 => function ($stackPos) {
+ $this->semValue = $this->semStack[$stackPos-(1-1)];
+ },
+ 539 => function ($stackPos) {
+ $this->semValue = $this->semStack[$stackPos-(1-1)];
+ },
+ 540 => function ($stackPos) {
+ $this->semValue = $this->semStack[$stackPos-(3-2)];
+ },
+ 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 = $this->semStack[$stackPos-(1-1)];
+ },
+ 544 => function ($stackPos) {
+ $this->semValue = $this->semStack[$stackPos-(1-1)];
+ },
+ 545 => function ($stackPos) {
+ $this->semValue = $this->semStack[$stackPos-(1-1)];
+ },
+ 546 => function ($stackPos) {
+ $this->semValue = $this->semStack[$stackPos-(3-2)];
+ },
+ 547 => function ($stackPos) {
+ $this->semValue = $this->semStack[$stackPos-(1-1)];
+ },
+ 548 => function ($stackPos) {
+ $this->semValue = $this->semStack[$stackPos-(1-1)];
+ },
+ 549 => function ($stackPos) {
+ $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes);
+ },
+ 550 => function ($stackPos) {
+ $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes);
+ },
+ 551 => function ($stackPos) {
+ $this->semValue = $this->semStack[$stackPos-(1-1)];
+ },
+ 552 => 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);
+ },
+ 553 => 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);
+ },
+ 554 => function ($stackPos) {
+ $this->semValue = null;
+ },
+ 555 => function ($stackPos) {
+ $this->semValue = $this->semStack[$stackPos-(1-1)];
+ },
+ 556 => function ($stackPos) {
+ $this->semValue = $this->semStack[$stackPos-(1-1)];
+ },
+ 557 => function ($stackPos) {
+ $this->semValue = $this->semStack[$stackPos-(1-1)];
+ },
+ 558 => function ($stackPos) {
+ $this->semValue = new Expr\PropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes);
+ },
+ 559 => function ($stackPos) {
+ $this->semValue = new Expr\NullsafePropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes);
+ },
+ 560 => function ($stackPos) {
+ $this->semValue = $this->semStack[$stackPos-(1-1)];
+ },
+ 561 => function ($stackPos) {
+ $this->semValue = new Expr\Variable($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes);
+ },
+ 562 => function ($stackPos) {
+ $this->semValue = new Expr\Variable($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes);
+ },
+ 563 => 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;
+ },
+ 564 => 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;
+ },
+ 565 => function ($stackPos) {
+ $this->semValue = new Expr\StaticPropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes);
+ },
+ 566 => function ($stackPos) {
+ $this->semValue = $this->semStack[$stackPos-(1-1)];
+ },
+ 567 => function ($stackPos) {
+ $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes);
+ },
+ 568 => function ($stackPos) {
+ $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes);
+ },
+ 569 => function ($stackPos) {
+ $this->semValue = new Expr\PropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes);
+ },
+ 570 => function ($stackPos) {
+ $this->semValue = new Expr\NullsafePropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes);
+ },
+ 571 => function ($stackPos) {
+ $this->semValue = new Expr\StaticPropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes);
+ },
+ 572 => function ($stackPos) {
+ $this->semValue = new Expr\StaticPropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes);
+ },
+ 573 => function ($stackPos) {
+ $this->semValue = $this->semStack[$stackPos-(1-1)];
+ },
+ 574 => function ($stackPos) {
+ $this->semValue = $this->semStack[$stackPos-(3-2)];
+ },
+ 575 => function ($stackPos) {
+ $this->semValue = $this->semStack[$stackPos-(1-1)];
+ },
+ 576 => function ($stackPos) {
+ $this->semValue = $this->semStack[$stackPos-(1-1)];
+ },
+ 577 => function ($stackPos) {
+ $this->semValue = $this->semStack[$stackPos-(3-2)];
+ },
+ 578 => function ($stackPos) {
+ $this->semValue = $this->semStack[$stackPos-(1-1)];
+ },
+ 579 => function ($stackPos) {
+ $this->semValue = new Expr\Error($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); $this->errorState = 2;
+ },
+ 580 => function ($stackPos) {
+ $this->semValue = new Expr\List_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes);
+ },
+ 581 => function ($stackPos) {
+ $this->semValue = $this->semStack[$stackPos-(1-1)]; $end = count($this->semValue)-1; if ($this->semValue[$end] === null) array_pop($this->semValue);
+ },
+ 582 => function ($stackPos) {
+ $this->semValue = $this->semStack[$stackPos];
+ },
+ 583 => function ($stackPos) {
+ /* do nothing -- prevent default action of $$=$this->semStack[$1]. See $551. */
+ },
+ 584 => function ($stackPos) {
+ $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)];
+ },
+ 585 => function ($stackPos) {
+ $this->semValue = array($this->semStack[$stackPos-(1-1)]);
+ },
+ 586 => function ($stackPos) {
+ $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(1-1)], null, false, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes);
+ },
+ 587 => function ($stackPos) {
+ $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(2-2)], null, true, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes);
+ },
+ 588 => function ($stackPos) {
+ $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(1-1)], null, false, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes);
+ },
+ 589 => 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);
+ },
+ 590 => 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);
+ },
+ 591 => 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);
+ },
+ 592 => 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);
+ },
+ 593 => function ($stackPos) {
+ $this->semValue = null;
+ },
+ 594 => function ($stackPos) {
+ $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)];
+ },
+ 595 => function ($stackPos) {
+ $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)];
+ },
+ 596 => function ($stackPos) {
+ $this->semValue = array($this->semStack[$stackPos-(1-1)]);
+ },
+ 597 => function ($stackPos) {
+ $this->semValue = array($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)]);
+ },
+ 598 => function ($stackPos) {
+ $this->semValue = new Scalar\EncapsedStringPart($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes);
+ },
+ 599 => function ($stackPos) {
+ $this->semValue = new Expr\Variable($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes);
+ },
+ 600 => function ($stackPos) {
+ $this->semValue = $this->semStack[$stackPos-(1-1)];
+ },
+ 601 => function ($stackPos) {
+ $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes);
+ },
+ 602 => function ($stackPos) {
+ $this->semValue = new Expr\PropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes);
+ },
+ 603 => function ($stackPos) {
+ $this->semValue = new Expr\NullsafePropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes);
+ },
+ 604 => function ($stackPos) {
+ $this->semValue = new Expr\Variable($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes);
+ },
+ 605 => function ($stackPos) {
+ $this->semValue = new Expr\Variable($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes);
+ },
+ 606 => function ($stackPos) {
+ $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(6-2)], $this->semStack[$stackPos-(6-4)], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes);
+ },
+ 607 => function ($stackPos) {
+ $this->semValue = $this->semStack[$stackPos-(3-2)];
+ },
+ 608 => function ($stackPos) {
+ $this->semValue = new Scalar\String_($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes);
+ },
+ 609 => function ($stackPos) {
+ $this->semValue = $this->parseNumString($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes);
+ },
+ 610 => function ($stackPos) {
+ $this->semValue = $this->parseNumString('-' . $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes);
+ },
+ 611 => function ($stackPos) {
+ $this->semValue = $this->semStack[$stackPos-(1-1)];
+ },
+ ];
+ }
+}
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Parser/Tokens.php b/vendor/nikic/php-parser/lib/PhpParser/Parser/Tokens.php
new file mode 100644
index 00000000..b76a5d94
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Parser/Tokens.php
@@ -0,0 +1,148 @@
+lexer = $lexer;
+
+ if (isset($options['throwOnError'])) {
+ throw new \LogicException(
+ '"throwOnError" is no longer supported, use "errorHandler" instead');
+ }
+
+ $this->initReduceCallbacks();
+ }
+
+ /**
+ * Parses PHP code into a node tree.
+ *
+ * If a non-throwing error handler is used, the parser will continue parsing after an error
+ * occurred and attempt to build a partial AST.
+ *
+ * @param string $code The source code to parse
+ * @param ErrorHandler|null $errorHandler Error handler to use for lexer/parser errors, defaults
+ * to ErrorHandler\Throwing.
+ *
+ * @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;
+
+ $this->lexer->startLexing($code, $this->errorHandler);
+ $result = $this->doParse();
+
+ // 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->semStack = [];
+ $this->semValue = null;
+
+ return $result;
+ }
+
+ protected function doParse() {
+ // 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;
+
+ // Keep stack of start and end attributes
+ $this->startAttributeStack = [];
+ $this->endAttributeStack = [$endAttributes];
+
+ // Start off in the initial state and keep a stack of previous states
+ $state = 0;
+ $stateStack = [$state];
+
+ // Semantic value stack (contains values of tokens and semantic action results)
+ $this->semStack = [];
+
+ // Current position in the stack(s)
+ $stackPos = 0;
+
+ $this->errorState = 0;
+
+ for (;;) {
+ //$this->traceNewState($state, $symbol);
+
+ if ($this->actionBase[$state] === 0) {
+ $rule = $this->actionDefault[$state];
+ } else {
+ 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);
+
+ // 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) {
+ 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;
+
+ //$this->traceRead($symbol);
+ }
+
+ $idx = $this->actionBase[$state] + $symbol;
+ if ((($idx >= 0 && $idx < $this->actionTableSize && $this->actionCheck[$idx] === $symbol)
+ || ($state < $this->YY2TBLSTATE
+ && ($idx = $this->actionBase[$state + $this->numNonLeafStates] + $symbol) >= 0
+ && $idx < $this->actionTableSize && $this->actionCheck[$idx] === $symbol))
+ && ($action = $this->action[$idx]) !== $this->defaultAction) {
+ /*
+ * >= numNonLeafStates: shift and reduce
+ * > 0: shift
+ * = 0: accept
+ * < 0: reduce
+ * = -YYUNEXPECTED: error
+ */
+ if ($action > 0) {
+ /* shift */
+ //$this->traceShift($symbol);
+
+ ++$stackPos;
+ $stateStack[$stackPos] = $state = $action;
+ $this->semStack[$stackPos] = $tokenValue;
+ $this->startAttributeStack[$stackPos] = $startAttributes;
+ $this->endAttributeStack[$stackPos] = $endAttributes;
+ $this->endAttributes = $endAttributes;
+ $symbol = self::SYMBOL_NONE;
+
+ if ($this->errorState) {
+ --$this->errorState;
+ }
+
+ if ($action < $this->numNonLeafStates) {
+ continue;
+ }
+
+ /* $yyn >= numNonLeafStates means shift-and-reduce */
+ $rule = $action - $this->numNonLeafStates;
+ } else {
+ $rule = -$action;
+ }
+ } else {
+ $rule = $this->actionDefault[$state];
+ }
+ }
+
+ for (;;) {
+ if ($rule === 0) {
+ /* accept */
+ //$this->traceAccept();
+ return $this->semValue;
+ } elseif ($rule !== $this->unexpectedTokenRule) {
+ /* reduce */
+ //$this->traceReduce($rule);
+
+ try {
+ $this->reduceCallbacks[$rule]($stackPos);
+ } catch (Error $e) {
+ if (-1 === $e->getStartLine() && isset($startAttributes['startLine'])) {
+ $e->setStartLine($startAttributes['startLine']);
+ }
+
+ $this->emitError($e);
+ // Can't recover from this type of error
+ return null;
+ }
+
+ /* Goto - shift nonterminal */
+ $lastEndAttributes = $this->endAttributeStack[$stackPos];
+ $ruleLength = $this->ruleToLength[$rule];
+ $stackPos -= $ruleLength;
+ $nonTerminal = $this->ruleToNonTerminal[$rule];
+ $idx = $this->gotoBase[$nonTerminal] + $stateStack[$stackPos];
+ if ($idx >= 0 && $idx < $this->gotoTableSize && $this->gotoCheck[$idx] === $nonTerminal) {
+ $state = $this->goto[$idx];
+ } else {
+ $state = $this->gotoDefault[$nonTerminal];
+ }
+
+ ++$stackPos;
+ $stateStack[$stackPos] = $state;
+ $this->semStack[$stackPos] = $this->semValue;
+ $this->endAttributeStack[$stackPos] = $lastEndAttributes;
+ if ($ruleLength === 0) {
+ // Empty productions use the start attributes of the lookahead token.
+ $this->startAttributeStack[$stackPos] = $this->lookaheadStartAttributes;
+ }
+ } else {
+ /* error */
+ switch ($this->errorState) {
+ case 0:
+ $msg = $this->getErrorMessage($symbol, $state);
+ $this->emitError(new Error($msg, $startAttributes + $endAttributes));
+ // Break missing intentionally
+ case 1:
+ case 2:
+ $this->errorState = 3;
+
+ // Pop until error-expecting state uncovered
+ while (!(
+ (($idx = $this->actionBase[$state] + $this->errorSymbol) >= 0
+ && $idx < $this->actionTableSize && $this->actionCheck[$idx] === $this->errorSymbol)
+ || ($state < $this->YY2TBLSTATE
+ && ($idx = $this->actionBase[$state + $this->numNonLeafStates] + $this->errorSymbol) >= 0
+ && $idx < $this->actionTableSize && $this->actionCheck[$idx] === $this->errorSymbol)
+ ) || ($action = $this->action[$idx]) === $this->defaultAction) { // Not totally sure about this
+ if ($stackPos <= 0) {
+ // Could not recover from error
+ return null;
+ }
+ $state = $stateStack[--$stackPos];
+ //$this->tracePop($state);
+ }
+
+ //$this->traceShift($this->errorSymbol);
+ ++$stackPos;
+ $stateStack[$stackPos] = $state = $action;
+
+ // We treat the error symbol as being empty, so we reset the end attributes
+ // to the end attributes of the last non-error symbol
+ $this->startAttributeStack[$stackPos] = $this->lookaheadStartAttributes;
+ $this->endAttributeStack[$stackPos] = $this->endAttributeStack[$stackPos - 1];
+ $this->endAttributes = $this->endAttributeStack[$stackPos - 1];
+ break;
+
+ case 3:
+ if ($symbol === 0) {
+ // Reached EOF without recovering from error
+ return null;
+ }
+
+ //$this->traceDiscard($symbol);
+ $symbol = self::SYMBOL_NONE;
+ break 2;
+ }
+ }
+
+ if ($state < $this->numNonLeafStates) {
+ break;
+ }
+
+ /* >= numNonLeafStates means shift-and-reduce */
+ $rule = $state - $this->numNonLeafStates;
+ }
+ }
+
+ throw new \RuntimeException('Reached end of parser loop');
+ }
+
+ protected function emitError(Error $error) {
+ $this->errorHandler->handleError($error);
+ }
+
+ /**
+ * Format error message including expected tokens.
+ *
+ * @param int $symbol Unexpected symbol
+ * @param int $state State at time of error
+ *
+ * @return string Formatted error message
+ */
+ protected function getErrorMessage(int $symbol, int $state) : string {
+ $expectedString = '';
+ if ($expected = $this->getExpectedTokens($state)) {
+ $expectedString = ', expecting ' . implode(' or ', $expected);
+ }
+
+ return 'Syntax error, unexpected ' . $this->symbolToName[$symbol] . $expectedString;
+ }
+
+ /**
+ * Get limited number of expected tokens in given state.
+ *
+ * @param int $state State
+ *
+ * @return string[] Expected tokens. If too many, an empty array is returned.
+ */
+ protected function getExpectedTokens(int $state) : array {
+ $expected = [];
+
+ $base = $this->actionBase[$state];
+ foreach ($this->symbolToName as $symbol => $name) {
+ $idx = $base + $symbol;
+ if ($idx >= 0 && $idx < $this->actionTableSize && $this->actionCheck[$idx] === $symbol
+ || $state < $this->YY2TBLSTATE
+ && ($idx = $this->actionBase[$state + $this->numNonLeafStates] + $symbol) >= 0
+ && $idx < $this->actionTableSize && $this->actionCheck[$idx] === $symbol
+ ) {
+ if ($this->action[$idx] !== $this->unexpectedTokenRule
+ && $this->action[$idx] !== $this->defaultAction
+ && $symbol !== $this->errorSymbol
+ ) {
+ if (count($expected) === 4) {
+ /* Too many expected tokens */
+ return [];
+ }
+
+ $expected[] = $name;
+ }
+ }
+ }
+
+ return $expected;
+ }
+
+ /*
+ * Tracing functions used for debugging the parser.
+ */
+
+ /*
+ protected function traceNewState($state, $symbol) {
+ echo '% State ' . $state
+ . ', Lookahead ' . ($symbol == self::SYMBOL_NONE ? '--none--' : $this->symbolToName[$symbol]) . "\n";
+ }
+
+ protected function traceRead($symbol) {
+ echo '% Reading ' . $this->symbolToName[$symbol] . "\n";
+ }
+
+ protected function traceShift($symbol) {
+ echo '% Shift ' . $this->symbolToName[$symbol] . "\n";
+ }
+
+ protected function traceAccept() {
+ echo "% Accepted.\n";
+ }
+
+ protected function traceReduce($n) {
+ echo '% Reduce by (' . $n . ') ' . $this->productions[$n] . "\n";
+ }
+
+ protected function tracePop($state) {
+ echo '% Recovering, uncovered state ' . $state . "\n";
+ }
+
+ protected function traceDiscard($symbol) {
+ echo '% Discard ' . $this->symbolToName[$symbol] . "\n";
+ }
+ */
+
+ /*
+ * Helper functions invoked by semantic actions
+ */
+
+ /**
+ * Moves statements of semicolon-style namespaces into $ns->stmts and checks various error conditions.
+ *
+ * @param Node\Stmt[] $stmts
+ * @return Node\Stmt[]
+ */
+ protected function handleNamespaces(array $stmts) : array {
+ $hasErrored = false;
+ $style = $this->getNamespacingStyle($stmts);
+ if (null === $style) {
+ // not namespaced, nothing to do
+ return $stmts;
+ } elseif ('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) {
+ if ($stmt instanceof Node\Stmt\Namespace_) {
+ $afterFirstNamespace = true;
+ } elseif (!$stmt instanceof Node\Stmt\HaltCompiler
+ && !$stmt instanceof Node\Stmt\Nop
+ && $afterFirstNamespace && !$hasErrored) {
+ $this->emitError(new Error(
+ 'No code may exist outside of namespace {}', $stmt->getAttributes()));
+ $hasErrored = true; // Avoid one error for every statement
+ }
+ }
+ return $stmts;
+ } else {
+ // For semicolon namespaces we have to move the statements after a namespace declaration into ->stmts
+ $resultStmts = [];
+ $targetStmts =& $resultStmts;
+ $lastNs = null;
+ foreach ($stmts as $stmt) {
+ if ($stmt instanceof Node\Stmt\Namespace_) {
+ if ($lastNs !== null) {
+ $this->fixupNamespaceAttributes($lastNs);
+ }
+ if ($stmt->stmts === null) {
+ $stmt->stmts = [];
+ $targetStmts =& $stmt->stmts;
+ $resultStmts[] = $stmt;
+ } else {
+ // This handles the invalid case of mixed style namespaces
+ $resultStmts[] = $stmt;
+ $targetStmts =& $resultStmts;
+ }
+ $lastNs = $stmt;
+ } elseif ($stmt instanceof Node\Stmt\HaltCompiler) {
+ // __halt_compiler() is not moved into the namespace
+ $resultStmts[] = $stmt;
+ } else {
+ $targetStmts[] = $stmt;
+ }
+ }
+ if ($lastNs !== null) {
+ $this->fixupNamespaceAttributes($lastNs);
+ }
+ return $resultStmts;
+ }
+ }
+
+ private function fixupNamespaceAttributes(Node\Stmt\Namespace_ $stmt) {
+ // We moved the statements into the namespace node, as such the end of the namespace node
+ // needs to be extended to the end of the statements.
+ if (empty($stmt->stmts)) {
+ return;
+ }
+
+ // We only move the builtin end attributes here. This is the best we can do with the
+ // knowledge we have.
+ $endAttributes = ['endLine', 'endFilePos', 'endTokenPos'];
+ $lastStmt = $stmt->stmts[count($stmt->stmts) - 1];
+ foreach ($endAttributes as $endAttribute) {
+ if ($lastStmt->hasAttribute($endAttribute)) {
+ $stmt->setAttribute($endAttribute, $lastStmt->getAttribute($endAttribute));
+ }
+ }
+ }
+
+ /**
+ * Determine namespacing style (semicolon or brace)
+ *
+ * @param Node[] $stmts Top-level statements.
+ *
+ * @return null|string One of "semicolon", "brace" or null (no namespaces)
+ */
+ private function getNamespacingStyle(array $stmts) {
+ $style = null;
+ $hasNotAllowedStmts = false;
+ foreach ($stmts as $i => $stmt) {
+ if ($stmt instanceof Node\Stmt\Namespace_) {
+ $currentStyle = null === $stmt->stmts ? 'semicolon' : 'brace';
+ if (null === $style) {
+ $style = $currentStyle;
+ if ($hasNotAllowedStmts) {
+ $this->emitError(new Error(
+ 'Namespace declaration statement has to be the very first statement in the script',
+ $stmt->getLine() // Avoid marking the entire namespace as an error
+ ));
+ }
+ } 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
+ ));
+ // Treat like semicolon style for namespace normalization
+ return 'semicolon';
+ }
+ continue;
+ }
+
+ /* declare(), __halt_compiler() and nops can be used before a namespace declaration */
+ if ($stmt instanceof Node\Stmt\Declare_
+ || $stmt instanceof Node\Stmt\HaltCompiler
+ || $stmt instanceof Node\Stmt\Nop) {
+ continue;
+ }
+
+ /* There may be a hashbang line at the very start of the file */
+ if ($i === 0 && $stmt instanceof Node\Stmt\InlineHTML && preg_match('/\A#!.*\r?\n\z/', $stmt->value)) {
+ continue;
+ }
+
+ /* Everything else if forbidden before namespace declarations */
+ $hasNotAllowedStmts = true;
+ }
+ 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));
+ }
+ }
+ }
+
+ 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,
+ 'true' => true,
+ ];
+
+ if (!$name->isUnqualified()) {
+ return $name;
+ }
+
+ $lowerName = $name->toLowerString();
+ if (!isset($builtinTypes[$lowerName])) {
+ return $name;
+ }
+
+ return new Node\Identifier($lowerName, $name->getAttributes());
+ }
+
+ /**
+ * Get combined start and end attributes at a stack location
+ *
+ * @param int $pos Stack location
+ *
+ * @return array Combined start and end attributes
+ */
+ protected function getAttributesAt(int $pos) : array {
+ return $this->startAttributeStack[$pos] + $this->endAttributeStack[$pos];
+ }
+
+ protected function getFloatCastKind(string $cast): int
+ {
+ $cast = strtolower($cast);
+ if (strpos($cast, 'float') !== false) {
+ return Double::KIND_FLOAT;
+ }
+
+ if (strpos($cast, 'real') !== false) {
+ return Double::KIND_REAL;
+ }
+
+ return Double::KIND_DOUBLE;
+ }
+
+ protected function parseLNumber($str, $attributes, $allowInvalidOctal = false) {
+ try {
+ return LNumber::fromString($str, $attributes, $allowInvalidOctal);
+ } catch (Error $error) {
+ $this->emitError($error);
+ // Use dummy value
+ return new LNumber(0, $attributes);
+ }
+ }
+
+ /**
+ * Parse a T_NUM_STRING token into either an integer or string node.
+ *
+ * @param string $str Number string
+ * @param array $attributes Attributes
+ *
+ * @return LNumber|String_ Integer or string node.
+ */
+ protected function parseNumString(string $str, array $attributes) {
+ if (!preg_match('/^(?:0|-?[1-9][0-9]*)$/', $str)) {
+ return new String_($str, $attributes);
+ }
+
+ $num = +$str;
+ if (!is_int($num)) {
+ return new String_($str, $attributes);
+ }
+
+ return new LNumber($num, $attributes);
+ }
+
+ protected function stripIndentation(
+ string $string, int $indentLen, string $indentChar,
+ bool $newlineAtStart, bool $newlineAtEnd, array $attributes
+ ) {
+ if ($indentLen === 0) {
+ return $string;
+ }
+
+ $start = $newlineAtStart ? '(?:(?<=\n)|\A)' : '(?<=\n)';
+ $end = $newlineAtEnd ? '(?:(?=[\r\n])|\z)' : '(?=[\r\n])';
+ $regex = '/' . $start . '([ \t]*)(' . $end . ')?/';
+ return preg_replace_callback(
+ $regex,
+ function ($matches) use ($indentLen, $indentChar, $attributes) {
+ $prefix = substr($matches[1], 0, $indentLen);
+ if (false !== strpos($prefix, $indentChar === " " ? "\t" : " ")) {
+ $this->emitError(new Error(
+ 'Invalid indentation - tabs and spaces cannot be mixed', $attributes
+ ));
+ } elseif (strlen($prefix) < $indentLen && !isset($matches[2])) {
+ $this->emitError(new Error(
+ 'Invalid body indentation level ' .
+ '(expecting an indentation level of at least ' . $indentLen . ')',
+ $attributes
+ ));
+ }
+ return substr($matches[0], strlen($prefix));
+ },
+ $string
+ );
+ }
+
+ protected function parseDocString(
+ string $startToken, $contents, string $endToken,
+ array $attributes, array $endTokenAttributes, bool $parseUnicodeEscape
+ ) {
+ $kind = strpos($startToken, "'") === false
+ ? String_::KIND_HEREDOC : String_::KIND_NOWDOC;
+
+ $regex = '/\A[bB]?<<<[ \t]*[\'"]?([a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*)[\'"]?(?:\r\n|\n|\r)\z/';
+ $result = preg_match($regex, $startToken, $matches);
+ assert($result === 1);
+ $label = $matches[1];
+
+ $result = preg_match('/\A[ \t]*/', $endToken, $matches);
+ assert($result === 1);
+ $indentation = $matches[0];
+
+ $attributes['kind'] = $kind;
+ $attributes['docLabel'] = $label;
+ $attributes['docIndentation'] = $indentation;
+
+ $indentHasSpaces = false !== strpos($indentation, " ");
+ $indentHasTabs = false !== strpos($indentation, "\t");
+ if ($indentHasSpaces && $indentHasTabs) {
+ $this->emitError(new Error(
+ 'Invalid indentation - tabs and spaces cannot be mixed',
+ $endTokenAttributes
+ ));
+
+ // Proceed processing as if this doc string is not indented
+ $indentation = '';
+ }
+
+ $indentLen = \strlen($indentation);
+ $indentChar = $indentHasSpaces ? " " : "\t";
+
+ if (\is_string($contents)) {
+ if ($contents === '') {
+ return new String_('', $attributes);
+ }
+
+ $contents = $this->stripIndentation(
+ $contents, $indentLen, $indentChar, true, true, $attributes
+ );
+ $contents = preg_replace('~(\r\n|\n|\r)\z~', '', $contents);
+
+ if ($kind === String_::KIND_HEREDOC) {
+ $contents = String_::parseEscapeSequences($contents, null, $parseUnicodeEscape);
+ }
+
+ return new String_($contents, $attributes);
+ } else {
+ assert(count($contents) > 0);
+ if (!$contents[0] instanceof Node\Scalar\EncapsedStringPart) {
+ // If there is no leading encapsed string part, pretend there is an empty one
+ $this->stripIndentation(
+ '', $indentLen, $indentChar, true, false, $contents[0]->getAttributes()
+ );
+ }
+
+ $newContents = [];
+ foreach ($contents as $i => $part) {
+ if ($part instanceof Node\Scalar\EncapsedStringPart) {
+ $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);
+ }
+ if ('' === $part->value) {
+ continue;
+ }
+ }
+ $newContents[] = $part;
+ }
+ return new Encapsed($newContents, $attributes);
+ }
+ }
+
+ /**
+ * Create attributes for a zero-length common-capturing nop.
+ *
+ * @param Comment[] $comments
+ * @return array
+ */
+ protected function createCommentNopAttributes(array $comments) {
+ $comment = $comments[count($comments) - 1];
+ $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;
+ }
+
+ protected function checkClassModifier($a, $b, $modifierPos) {
+ try {
+ Class_::verifyClassModifier($a, $b);
+ } catch (Error $error) {
+ $error->setAttributes($this->getAttributesAt($modifierPos));
+ $this->emitError($error);
+ }
+ }
+
+ protected function checkModifier($a, $b, $modifierPos) {
+ // Jumping through some hoops here because verifyModifier() is also used elsewhere
+ try {
+ Class_::verifyModifier($a, $b);
+ } catch (Error $error) {
+ $error->setAttributes($this->getAttributesAt($modifierPos));
+ $this->emitError($error);
+ }
+ }
+
+ protected function checkParam(Param $node) {
+ if ($node->variadic && null !== $node->default) {
+ $this->emitError(new Error(
+ 'Variadic parameter cannot have a default value',
+ $node->default->getAttributes()
+ ));
+ }
+ }
+
+ protected function checkTryCatch(TryCatch $node) {
+ if (empty($node->catches) && null === $node->finally) {
+ $this->emitError(new Error(
+ 'Cannot use try without catch or finally', $node->getAttributes()
+ ));
+ }
+ }
+
+ protected function checkNamespace(Namespace_ $node) {
+ if (null !== $node->stmts) {
+ foreach ($node->stmts as $stmt) {
+ if ($stmt instanceof Namespace_) {
+ $this->emitError(new Error(
+ 'Namespace declarations cannot be nested', $stmt->getAttributes()
+ ));
+ }
+ }
+ }
+ }
+
+ private function checkClassName($name, $namePos) {
+ if (null !== $name && $name->isSpecialClassName()) {
+ $this->emitError(new Error(
+ sprintf('Cannot use \'%s\' as class name as it is reserved', $name),
+ $this->getAttributesAt($namePos)
+ ));
+ }
+ }
+
+ private function checkImplementedInterfaces(array $interfaces) {
+ foreach ($interfaces as $interface) {
+ if ($interface->isSpecialClassName()) {
+ $this->emitError(new Error(
+ sprintf('Cannot use \'%s\' as interface name as it is reserved', $interface),
+ $interface->getAttributes()
+ ));
+ }
+ }
+ }
+
+ protected function checkClass(Class_ $node, $namePos) {
+ $this->checkClassName($node->name, $namePos);
+
+ if ($node->extends && $node->extends->isSpecialClassName()) {
+ $this->emitError(new Error(
+ sprintf('Cannot use \'%s\' as class name as it is reserved', $node->extends),
+ $node->extends->getAttributes()
+ ));
+ }
+
+ $this->checkImplementedInterfaces($node->implements);
+ }
+
+ protected function checkInterface(Interface_ $node, $namePos) {
+ $this->checkClassName($node->name, $namePos);
+ $this->checkImplementedInterfaces($node->extends);
+ }
+
+ protected function checkEnum(Enum_ $node, $namePos) {
+ $this->checkClassName($node->name, $namePos);
+ $this->checkImplementedInterfaces($node->implements);
+ }
+
+ protected function checkClassMethod(ClassMethod $node, $modifierPos) {
+ if ($node->flags & Class_::MODIFIER_STATIC) {
+ switch ($node->name->toLowerString()) {
+ case '__construct':
+ $this->emitError(new Error(
+ sprintf('Constructor %s() cannot be static', $node->name),
+ $this->getAttributesAt($modifierPos)));
+ break;
+ case '__destruct':
+ $this->emitError(new Error(
+ sprintf('Destructor %s() cannot be static', $node->name),
+ $this->getAttributesAt($modifierPos)));
+ break;
+ case '__clone':
+ $this->emitError(new Error(
+ sprintf('Clone method %s() cannot be static', $node->name),
+ $this->getAttributesAt($modifierPos)));
+ break;
+ }
+ }
+
+ if ($node->flags & Class_::MODIFIER_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) {
+ $this->emitError(new Error(
+ "Cannot use 'static' as constant modifier",
+ $this->getAttributesAt($modifierPos)));
+ }
+ if ($node->flags & Class_::MODIFIER_ABSTRACT) {
+ $this->emitError(new Error(
+ "Cannot use 'abstract' as constant modifier",
+ $this->getAttributesAt($modifierPos)));
+ }
+ if ($node->flags & Class_::MODIFIER_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) {
+ $this->emitError(new Error('Properties cannot be declared abstract',
+ $this->getAttributesAt($modifierPos)));
+ }
+
+ if ($node->flags & Class_::MODIFIER_FINAL) {
+ $this->emitError(new Error('Properties cannot be declared final',
+ $this->getAttributesAt($modifierPos)));
+ }
+ }
+
+ protected function checkUseUse(UseUse $node, $namePos) {
+ if ($node->alias && $node->alias->isSpecialClassName()) {
+ $this->emitError(new Error(
+ sprintf(
+ 'Cannot use %s as %s because \'%2$s\' is a special class name',
+ $node->name, $node->alias
+ ),
+ $this->getAttributesAt($namePos)
+ ));
+ }
+ }
+}
diff --git a/vendor/nikic/php-parser/lib/PhpParser/ParserFactory.php b/vendor/nikic/php-parser/lib/PhpParser/ParserFactory.php
new file mode 100644
index 00000000..f041e7ff
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/ParserFactory.php
@@ -0,0 +1,44 @@
+pAttrGroups($node->attrGroups, true)
+ . $this->pModifiers($node->flags)
+ . ($node->type ? $this->p($node->type) . ' ' : '')
+ . ($node->byRef ? '&' : '')
+ . ($node->variadic ? '...' : '')
+ . $this->p($node->var)
+ . ($node->default ? ' = ' . $this->p($node->default) : '');
+ }
+
+ protected function pArg(Node\Arg $node) {
+ return ($node->name ? $node->name->toString() . ': ' : '')
+ . ($node->byRef ? '&' : '') . ($node->unpack ? '...' : '')
+ . $this->p($node->value);
+ }
+
+ protected function pVariadicPlaceholder(Node\VariadicPlaceholder $node) {
+ return '...';
+ }
+
+ protected function pConst(Node\Const_ $node) {
+ return $node->name . ' = ' . $this->p($node->value);
+ }
+
+ protected function pNullableType(Node\NullableType $node) {
+ return '?' . $this->p($node->type);
+ }
+
+ protected function pUnionType(Node\UnionType $node) {
+ $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) {
+ return $this->pImplode($node->types, '&');
+ }
+
+ protected function pIdentifier(Node\Identifier $node) {
+ return $node->name;
+ }
+
+ protected function pVarLikeIdentifier(Node\VarLikeIdentifier $node) {
+ return '$' . $node->name;
+ }
+
+ protected function pAttribute(Node\Attribute $node) {
+ return $this->p($node->name)
+ . ($node->args ? '(' . $this->pCommaSeparated($node->args) . ')' : '');
+ }
+
+ protected function pAttributeGroup(Node\AttributeGroup $node) {
+ return '#[' . $this->pCommaSeparated($node->attrs) . ']';
+ }
+
+ // Names
+
+ protected function pName(Name $node) {
+ return implode('\\', $node->parts);
+ }
+
+ protected function pName_FullyQualified(Name\FullyQualified $node) {
+ return '\\' . implode('\\', $node->parts);
+ }
+
+ protected function pName_Relative(Name\Relative $node) {
+ return 'namespace\\' . implode('\\', $node->parts);
+ }
+
+ // Magic Constants
+
+ protected function pScalar_MagicConst_Class(MagicConst\Class_ $node) {
+ return '__CLASS__';
+ }
+
+ protected function pScalar_MagicConst_Dir(MagicConst\Dir $node) {
+ return '__DIR__';
+ }
+
+ protected function pScalar_MagicConst_File(MagicConst\File $node) {
+ return '__FILE__';
+ }
+
+ protected function pScalar_MagicConst_Function(MagicConst\Function_ $node) {
+ return '__FUNCTION__';
+ }
+
+ protected function pScalar_MagicConst_Line(MagicConst\Line $node) {
+ return '__LINE__';
+ }
+
+ protected function pScalar_MagicConst_Method(MagicConst\Method $node) {
+ return '__METHOD__';
+ }
+
+ protected function pScalar_MagicConst_Namespace(MagicConst\Namespace_ $node) {
+ return '__NAMESPACE__';
+ }
+
+ protected function pScalar_MagicConst_Trait(MagicConst\Trait_ $node) {
+ return '__TRAIT__';
+ }
+
+ // Scalars
+
+ protected function pScalar_String(Scalar\String_ $node) {
+ $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)) {
+ if ($node->value === '') {
+ return "<<<'$label'\n$label" . $this->docStringEndToken;
+ }
+
+ return "<<<'$label'\n$node->value\n$label"
+ . $this->docStringEndToken;
+ }
+ /* break missing intentionally */
+ 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);
+ return "<<<$label\n" . $escaped . "\n$label"
+ . $this->docStringEndToken;
+ }
+ /* break missing intentionally */
+ case Scalar\String_::KIND_DOUBLE_QUOTED:
+ return '"' . $this->escapeString($node->value, '"') . '"';
+ }
+ throw new \Exception('Invalid string kind');
+ }
+
+ protected function pScalar_Encapsed(Scalar\Encapsed $node) {
+ if ($node->getAttribute('kind') === Scalar\String_::KIND_HEREDOC) {
+ $label = $node->getAttribute('docLabel');
+ if ($label && !$this->encapsedContainsEndLabel($node->parts, $label)) {
+ if (count($node->parts) === 1
+ && $node->parts[0] instanceof Scalar\EncapsedStringPart
+ && $node->parts[0]->value === ''
+ ) {
+ return "<<<$label\n$label" . $this->docStringEndToken;
+ }
+
+ return "<<<$label\n" . $this->pEncapsList($node->parts, null) . "\n$label"
+ . $this->docStringEndToken;
+ }
+ }
+ return '"' . $this->pEncapsList($node->parts, '"') . '"';
+ }
+
+ protected function pScalar_LNumber(Scalar\LNumber $node) {
+ 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) {
+ return (string) $node->value;
+ }
+
+ if ($node->value < 0) {
+ $sign = '-';
+ $str = (string) -$node->value;
+ } else {
+ $sign = '';
+ $str = (string) $node->value;
+ }
+ switch ($kind) {
+ case Scalar\LNumber::KIND_BIN:
+ return $sign . '0b' . base_convert($str, 10, 2);
+ case Scalar\LNumber::KIND_OCT:
+ return $sign . '0' . base_convert($str, 10, 8);
+ case Scalar\LNumber::KIND_HEX:
+ return $sign . '0x' . base_convert($str, 10, 16);
+ }
+ throw new \Exception('Invalid number kind');
+ }
+
+ protected function pScalar_DNumber(Scalar\DNumber $node) {
+ if (!is_finite($node->value)) {
+ if ($node->value === \INF) {
+ return '\INF';
+ } elseif ($node->value === -\INF) {
+ return '-\INF';
+ } else {
+ return '\NAN';
+ }
+ }
+
+ // Try to find a short full-precision representation
+ $stringValue = sprintf('%.16G', $node->value);
+ if ($node->value !== (double) $stringValue) {
+ $stringValue = sprintf('%.17G', $node->value);
+ }
+
+ // %G is locale dependent and there exists no locale-independent alternative. We don't want
+ // mess with switching locales here, so let's assume that a comma is the only non-standard
+ // decimal separator we may encounter...
+ $stringValue = str_replace(',', '.', $stringValue);
+
+ // ensure that number is really printed as float
+ return preg_match('/^-?[0-9]+$/', $stringValue) ? $stringValue . '.0' : $stringValue;
+ }
+
+ 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_AssignRef(Expr\AssignRef $node) {
+ return $this->pInfixOp(Expr\AssignRef::class, $node->var, ' =& ', $node->expr);
+ }
+
+ protected function pExpr_AssignOp_Plus(AssignOp\Plus $node) {
+ return $this->pInfixOp(AssignOp\Plus::class, $node->var, ' += ', $node->expr);
+ }
+
+ protected function pExpr_AssignOp_Minus(AssignOp\Minus $node) {
+ return $this->pInfixOp(AssignOp\Minus::class, $node->var, ' -= ', $node->expr);
+ }
+
+ protected function pExpr_AssignOp_Mul(AssignOp\Mul $node) {
+ return $this->pInfixOp(AssignOp\Mul::class, $node->var, ' *= ', $node->expr);
+ }
+
+ protected function pExpr_AssignOp_Div(AssignOp\Div $node) {
+ return $this->pInfixOp(AssignOp\Div::class, $node->var, ' /= ', $node->expr);
+ }
+
+ protected function pExpr_AssignOp_Concat(AssignOp\Concat $node) {
+ return $this->pInfixOp(AssignOp\Concat::class, $node->var, ' .= ', $node->expr);
+ }
+
+ protected function pExpr_AssignOp_Mod(AssignOp\Mod $node) {
+ return $this->pInfixOp(AssignOp\Mod::class, $node->var, ' %= ', $node->expr);
+ }
+
+ protected function pExpr_AssignOp_BitwiseAnd(AssignOp\BitwiseAnd $node) {
+ return $this->pInfixOp(AssignOp\BitwiseAnd::class, $node->var, ' &= ', $node->expr);
+ }
+
+ protected function pExpr_AssignOp_BitwiseOr(AssignOp\BitwiseOr $node) {
+ return $this->pInfixOp(AssignOp\BitwiseOr::class, $node->var, ' |= ', $node->expr);
+ }
+
+ protected function pExpr_AssignOp_BitwiseXor(AssignOp\BitwiseXor $node) {
+ return $this->pInfixOp(AssignOp\BitwiseXor::class, $node->var, ' ^= ', $node->expr);
+ }
+
+ protected function pExpr_AssignOp_ShiftLeft(AssignOp\ShiftLeft $node) {
+ return $this->pInfixOp(AssignOp\ShiftLeft::class, $node->var, ' <<= ', $node->expr);
+ }
+
+ protected function pExpr_AssignOp_ShiftRight(AssignOp\ShiftRight $node) {
+ return $this->pInfixOp(AssignOp\ShiftRight::class, $node->var, ' >>= ', $node->expr);
+ }
+
+ protected function pExpr_AssignOp_Pow(AssignOp\Pow $node) {
+ return $this->pInfixOp(AssignOp\Pow::class, $node->var, ' **= ', $node->expr);
+ }
+
+ protected function pExpr_AssignOp_Coalesce(AssignOp\Coalesce $node) {
+ return $this->pInfixOp(AssignOp\Coalesce::class, $node->var, ' ??= ', $node->expr);
+ }
+
+ // Binary expressions
+
+ protected function pExpr_BinaryOp_Plus(BinaryOp\Plus $node) {
+ return $this->pInfixOp(BinaryOp\Plus::class, $node->left, ' + ', $node->right);
+ }
+
+ protected function pExpr_BinaryOp_Minus(BinaryOp\Minus $node) {
+ return $this->pInfixOp(BinaryOp\Minus::class, $node->left, ' - ', $node->right);
+ }
+
+ protected function pExpr_BinaryOp_Mul(BinaryOp\Mul $node) {
+ return $this->pInfixOp(BinaryOp\Mul::class, $node->left, ' * ', $node->right);
+ }
+
+ protected function pExpr_BinaryOp_Div(BinaryOp\Div $node) {
+ return $this->pInfixOp(BinaryOp\Div::class, $node->left, ' / ', $node->right);
+ }
+
+ protected function pExpr_BinaryOp_Concat(BinaryOp\Concat $node) {
+ return $this->pInfixOp(BinaryOp\Concat::class, $node->left, ' . ', $node->right);
+ }
+
+ protected function pExpr_BinaryOp_Mod(BinaryOp\Mod $node) {
+ return $this->pInfixOp(BinaryOp\Mod::class, $node->left, ' % ', $node->right);
+ }
+
+ protected function pExpr_BinaryOp_BooleanAnd(BinaryOp\BooleanAnd $node) {
+ return $this->pInfixOp(BinaryOp\BooleanAnd::class, $node->left, ' && ', $node->right);
+ }
+
+ protected function pExpr_BinaryOp_BooleanOr(BinaryOp\BooleanOr $node) {
+ return $this->pInfixOp(BinaryOp\BooleanOr::class, $node->left, ' || ', $node->right);
+ }
+
+ protected function pExpr_BinaryOp_BitwiseAnd(BinaryOp\BitwiseAnd $node) {
+ return $this->pInfixOp(BinaryOp\BitwiseAnd::class, $node->left, ' & ', $node->right);
+ }
+
+ protected function pExpr_BinaryOp_BitwiseOr(BinaryOp\BitwiseOr $node) {
+ return $this->pInfixOp(BinaryOp\BitwiseOr::class, $node->left, ' | ', $node->right);
+ }
+
+ protected function pExpr_BinaryOp_BitwiseXor(BinaryOp\BitwiseXor $node) {
+ return $this->pInfixOp(BinaryOp\BitwiseXor::class, $node->left, ' ^ ', $node->right);
+ }
+
+ protected function pExpr_BinaryOp_ShiftLeft(BinaryOp\ShiftLeft $node) {
+ return $this->pInfixOp(BinaryOp\ShiftLeft::class, $node->left, ' << ', $node->right);
+ }
+
+ protected function pExpr_BinaryOp_ShiftRight(BinaryOp\ShiftRight $node) {
+ return $this->pInfixOp(BinaryOp\ShiftRight::class, $node->left, ' >> ', $node->right);
+ }
+
+ protected function pExpr_BinaryOp_Pow(BinaryOp\Pow $node) {
+ return $this->pInfixOp(BinaryOp\Pow::class, $node->left, ' ** ', $node->right);
+ }
+
+ protected function pExpr_BinaryOp_LogicalAnd(BinaryOp\LogicalAnd $node) {
+ return $this->pInfixOp(BinaryOp\LogicalAnd::class, $node->left, ' and ', $node->right);
+ }
+
+ protected function pExpr_BinaryOp_LogicalOr(BinaryOp\LogicalOr $node) {
+ return $this->pInfixOp(BinaryOp\LogicalOr::class, $node->left, ' or ', $node->right);
+ }
+
+ protected function pExpr_BinaryOp_LogicalXor(BinaryOp\LogicalXor $node) {
+ return $this->pInfixOp(BinaryOp\LogicalXor::class, $node->left, ' xor ', $node->right);
+ }
+
+ protected function pExpr_BinaryOp_Equal(BinaryOp\Equal $node) {
+ return $this->pInfixOp(BinaryOp\Equal::class, $node->left, ' == ', $node->right);
+ }
+
+ protected function pExpr_BinaryOp_NotEqual(BinaryOp\NotEqual $node) {
+ return $this->pInfixOp(BinaryOp\NotEqual::class, $node->left, ' != ', $node->right);
+ }
+
+ protected function pExpr_BinaryOp_Identical(BinaryOp\Identical $node) {
+ return $this->pInfixOp(BinaryOp\Identical::class, $node->left, ' === ', $node->right);
+ }
+
+ protected function pExpr_BinaryOp_NotIdentical(BinaryOp\NotIdentical $node) {
+ return $this->pInfixOp(BinaryOp\NotIdentical::class, $node->left, ' !== ', $node->right);
+ }
+
+ protected function pExpr_BinaryOp_Spaceship(BinaryOp\Spaceship $node) {
+ return $this->pInfixOp(BinaryOp\Spaceship::class, $node->left, ' <=> ', $node->right);
+ }
+
+ protected function pExpr_BinaryOp_Greater(BinaryOp\Greater $node) {
+ return $this->pInfixOp(BinaryOp\Greater::class, $node->left, ' > ', $node->right);
+ }
+
+ protected function pExpr_BinaryOp_GreaterOrEqual(BinaryOp\GreaterOrEqual $node) {
+ return $this->pInfixOp(BinaryOp\GreaterOrEqual::class, $node->left, ' >= ', $node->right);
+ }
+
+ protected function pExpr_BinaryOp_Smaller(BinaryOp\Smaller $node) {
+ return $this->pInfixOp(BinaryOp\Smaller::class, $node->left, ' < ', $node->right);
+ }
+
+ protected function pExpr_BinaryOp_SmallerOrEqual(BinaryOp\SmallerOrEqual $node) {
+ return $this->pInfixOp(BinaryOp\SmallerOrEqual::class, $node->left, ' <= ', $node->right);
+ }
+
+ protected function pExpr_BinaryOp_Coalesce(BinaryOp\Coalesce $node) {
+ return $this->pInfixOp(BinaryOp\Coalesce::class, $node->left, ' ?? ', $node->right);
+ }
+
+ 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);
+ }
+
+ // Unary expressions
+
+ protected function pExpr_BooleanNot(Expr\BooleanNot $node) {
+ return $this->pPrefixOp(Expr\BooleanNot::class, '!', $node->expr);
+ }
+
+ protected function pExpr_BitwiseNot(Expr\BitwiseNot $node) {
+ return $this->pPrefixOp(Expr\BitwiseNot::class, '~', $node->expr);
+ }
+
+ 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_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_PreInc(Expr\PreInc $node) {
+ return $this->pPrefixOp(Expr\PreInc::class, '++', $node->var);
+ }
+
+ protected function pExpr_PreDec(Expr\PreDec $node) {
+ return $this->pPrefixOp(Expr\PreDec::class, '--', $node->var);
+ }
+
+ protected function pExpr_PostInc(Expr\PostInc $node) {
+ return $this->pPostfixOp(Expr\PostInc::class, $node->var, '++');
+ }
+
+ protected function pExpr_PostDec(Expr\PostDec $node) {
+ return $this->pPostfixOp(Expr\PostDec::class, $node->var, '--');
+ }
+
+ protected function pExpr_ErrorSuppress(Expr\ErrorSuppress $node) {
+ return $this->pPrefixOp(Expr\ErrorSuppress::class, '@', $node->expr);
+ }
+
+ protected function pExpr_YieldFrom(Expr\YieldFrom $node) {
+ return $this->pPrefixOp(Expr\YieldFrom::class, 'yield from ', $node->expr);
+ }
+
+ protected function pExpr_Print(Expr\Print_ $node) {
+ return $this->pPrefixOp(Expr\Print_::class, 'print ', $node->expr);
+ }
+
+ // Casts
+
+ protected function pExpr_Cast_Int(Cast\Int_ $node) {
+ return $this->pPrefixOp(Cast\Int_::class, '(int) ', $node->expr);
+ }
+
+ protected function pExpr_Cast_Double(Cast\Double $node) {
+ $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) {
+ $cast = '(real)';
+ }
+ return $this->pPrefixOp(Cast\Double::class, $cast . ' ', $node->expr);
+ }
+
+ protected function pExpr_Cast_String(Cast\String_ $node) {
+ return $this->pPrefixOp(Cast\String_::class, '(string) ', $node->expr);
+ }
+
+ protected function pExpr_Cast_Array(Cast\Array_ $node) {
+ return $this->pPrefixOp(Cast\Array_::class, '(array) ', $node->expr);
+ }
+
+ protected function pExpr_Cast_Object(Cast\Object_ $node) {
+ return $this->pPrefixOp(Cast\Object_::class, '(object) ', $node->expr);
+ }
+
+ protected function pExpr_Cast_Bool(Cast\Bool_ $node) {
+ return $this->pPrefixOp(Cast\Bool_::class, '(bool) ', $node->expr);
+ }
+
+ protected function pExpr_Cast_Unset(Cast\Unset_ $node) {
+ return $this->pPrefixOp(Cast\Unset_::class, '(unset) ', $node->expr);
+ }
+
+ // Function calls and similar constructs
+
+ protected function pExpr_FuncCall(Expr\FuncCall $node) {
+ return $this->pCallLhs($node->name)
+ . '(' . $this->pMaybeMultiline($node->args) . ')';
+ }
+
+ protected function pExpr_MethodCall(Expr\MethodCall $node) {
+ return $this->pDereferenceLhs($node->var) . '->' . $this->pObjectProperty($node->name)
+ . '(' . $this->pMaybeMultiline($node->args) . ')';
+ }
+
+ protected function pExpr_NullsafeMethodCall(Expr\NullsafeMethodCall $node) {
+ 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) . '::'
+ . ($node->name instanceof Expr
+ ? ($node->name instanceof Expr\Variable
+ ? $this->p($node->name)
+ : '{' . $this->p($node->name) . '}')
+ : $node->name)
+ . '(' . $this->pMaybeMultiline($node->args) . ')';
+ }
+
+ protected function pExpr_Empty(Expr\Empty_ $node) {
+ return 'empty(' . $this->p($node->expr) . ')';
+ }
+
+ protected function pExpr_Isset(Expr\Isset_ $node) {
+ return 'isset(' . $this->pCommaSeparated($node->vars) . ')';
+ }
+
+ protected function pExpr_Eval(Expr\Eval_ $node) {
+ return 'eval(' . $this->p($node->expr) . ')';
+ }
+
+ protected function pExpr_Include(Expr\Include_ $node) {
+ static $map = [
+ Expr\Include_::TYPE_INCLUDE => 'include',
+ Expr\Include_::TYPE_INCLUDE_ONCE => 'include_once',
+ Expr\Include_::TYPE_REQUIRE => 'require',
+ Expr\Include_::TYPE_REQUIRE_ONCE => 'require_once',
+ ];
+
+ return $map[$node->type] . ' ' . $this->p($node->expr);
+ }
+
+ protected function pExpr_List(Expr\List_ $node) {
+ return 'list(' . $this->pCommaSeparated($node->items) . ')';
+ }
+
+ // Other
+
+ protected function pExpr_Error(Expr\Error $node) {
+ throw new \LogicException('Cannot pretty-print AST with Error nodes');
+ }
+
+ protected function pExpr_Variable(Expr\Variable $node) {
+ if ($node->name instanceof Expr) {
+ return '${' . $this->p($node->name) . '}';
+ } else {
+ return '$' . $node->name;
+ }
+ }
+
+ protected function pExpr_Array(Expr\Array_ $node) {
+ $syntax = $node->getAttribute('kind',
+ $this->options['shortArraySyntax'] ? Expr\Array_::KIND_SHORT : Expr\Array_::KIND_LONG);
+ if ($syntax === Expr\Array_::KIND_SHORT) {
+ return '[' . $this->pMaybeMultiline($node->items, true) . ']';
+ } else {
+ return 'array(' . $this->pMaybeMultiline($node->items, true) . ')';
+ }
+ }
+
+ protected function pExpr_ArrayItem(Expr\ArrayItem $node) {
+ return (null !== $node->key ? $this->p($node->key) . ' => ' : '')
+ . ($node->byRef ? '&' : '')
+ . ($node->unpack ? '...' : '')
+ . $this->p($node->value);
+ }
+
+ protected function pExpr_ArrayDimFetch(Expr\ArrayDimFetch $node) {
+ return $this->pDereferenceLhs($node->var)
+ . '[' . (null !== $node->dim ? $this->p($node->dim) : '') . ']';
+ }
+
+ protected function pExpr_ConstFetch(Expr\ConstFetch $node) {
+ return $this->p($node->name);
+ }
+
+ protected function pExpr_ClassConstFetch(Expr\ClassConstFetch $node) {
+ return $this->pDereferenceLhs($node->class) . '::' . $this->p($node->name);
+ }
+
+ protected function pExpr_PropertyFetch(Expr\PropertyFetch $node) {
+ return $this->pDereferenceLhs($node->var) . '->' . $this->pObjectProperty($node->name);
+ }
+
+ protected function pExpr_NullsafePropertyFetch(Expr\NullsafePropertyFetch $node) {
+ 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_ShellExec(Expr\ShellExec $node) {
+ return '`' . $this->pEncapsList($node->parts, '`') . '`';
+ }
+
+ protected function pExpr_Closure(Expr\Closure $node) {
+ return $this->pAttrGroups($node->attrGroups, true)
+ . ($node->static ? 'static ' : '')
+ . 'function ' . ($node->byRef ? '&' : '')
+ . '(' . $this->pCommaSeparated($node->params) . ')'
+ . (!empty($node->uses) ? ' use(' . $this->pCommaSeparated($node->uses) . ')' : '')
+ . (null !== $node->returnType ? ' : ' . $this->p($node->returnType) : '')
+ . ' {' . $this->pStmts($node->stmts) . $this->nl . '}';
+ }
+
+ protected function pExpr_Match(Expr\Match_ $node) {
+ 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 pExpr_ArrowFunction(Expr\ArrowFunction $node) {
+ return $this->pAttrGroups($node->attrGroups, true)
+ . ($node->static ? 'static ' : '')
+ . 'fn' . ($node->byRef ? '&' : '')
+ . '(' . $this->pCommaSeparated($node->params) . ')'
+ . (null !== $node->returnType ? ': ' . $this->p($node->returnType) : '')
+ . ' => '
+ . $this->p($node->expr);
+ }
+
+ protected function pExpr_ClosureUse(Expr\ClosureUse $node) {
+ return ($node->byRef ? '&' : '') . $this->p($node->var);
+ }
+
+ protected function pExpr_New(Expr\New_ $node) {
+ 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)
+ . '(' . $this->pMaybeMultiline($node->args) . ')';
+ }
+
+ protected function pExpr_Clone(Expr\Clone_ $node) {
+ return 'clone ' . $this->p($node->expr);
+ }
+
+ protected function pExpr_Ternary(Expr\Ternary $node) {
+ // 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
+ );
+ }
+
+ protected function pExpr_Exit(Expr\Exit_ $node) {
+ $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_Yield(Expr\Yield_ $node) {
+ if ($node->value === null) {
+ return '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)
+ . ')';
+ }
+ }
+
+ // Declarations
+
+ protected function pStmt_Namespace(Stmt\Namespace_ $node) {
+ if ($this->canUseSemicolonNamespaces) {
+ return 'namespace ' . $this->p($node->name) . ';'
+ . $this->nl . $this->pStmts($node->stmts, false);
+ } else {
+ return 'namespace' . (null !== $node->name ? ' ' . $this->p($node->name) : '')
+ . ' {' . $this->pStmts($node->stmts) . $this->nl . '}';
+ }
+ }
+
+ protected function pStmt_Use(Stmt\Use_ $node) {
+ return 'use ' . $this->pUseType($node->type)
+ . $this->pCommaSeparated($node->uses) . ';';
+ }
+
+ protected function pStmt_GroupUse(Stmt\GroupUse $node) {
+ return 'use ' . $this->pUseType($node->type) . $this->pName($node->prefix)
+ . '\{' . $this->pCommaSeparated($node->uses) . '};';
+ }
+
+ protected function pStmt_UseUse(Stmt\UseUse $node) {
+ return $this->pUseType($node->type) . $this->p($node->name)
+ . (null !== $node->alias ? ' as ' . $node->alias : '');
+ }
+
+ protected function pUseType($type) {
+ return $type === Stmt\Use_::TYPE_FUNCTION ? 'function '
+ : ($type === Stmt\Use_::TYPE_CONSTANT ? 'const ' : '');
+ }
+
+ protected function pStmt_Interface(Stmt\Interface_ $node) {
+ 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) {
+ return $this->pAttrGroups($node->attrGroups)
+ . 'enum ' . $node->name
+ . ($node->scalarType ? " : $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) {
+ return $this->pClassCommon($node, ' ' . $node->name);
+ }
+
+ protected function pStmt_Trait(Stmt\Trait_ $node) {
+ return $this->pAttrGroups($node->attrGroups)
+ . 'trait ' . $node->name
+ . $this->nl . '{' . $this->pStmts($node->stmts) . $this->nl . '}';
+ }
+
+ protected function pStmt_EnumCase(Stmt\EnumCase $node) {
+ return $this->pAttrGroups($node->attrGroups)
+ . 'case ' . $node->name
+ . ($node->expr ? ' = ' . $this->p($node->expr) : '')
+ . ';';
+ }
+
+ protected function pStmt_TraitUse(Stmt\TraitUse $node) {
+ return 'use ' . $this->pCommaSeparated($node->traits)
+ . (empty($node->adaptations)
+ ? ';'
+ : ' {' . $this->pStmts($node->adaptations) . $this->nl . '}');
+ }
+
+ protected function pStmt_TraitUseAdaptation_Precedence(Stmt\TraitUseAdaptation\Precedence $node) {
+ return $this->p($node->trait) . '::' . $node->method
+ . ' insteadof ' . $this->pCommaSeparated($node->insteadof) . ';';
+ }
+
+ protected function pStmt_TraitUseAdaptation_Alias(Stmt\TraitUseAdaptation\Alias $node) {
+ return (null !== $node->trait ? $this->p($node->trait) . '::' : '')
+ . $node->method . ' as'
+ . (null !== $node->newModifier ? ' ' . rtrim($this->pModifiers($node->newModifier), ' ') : '')
+ . (null !== $node->newName ? ' ' . $node->newName : '')
+ . ';';
+ }
+
+ protected function pStmt_Property(Stmt\Property $node) {
+ 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) {
+ return '$' . $node->name
+ . (null !== $node->default ? ' = ' . $this->p($node->default) : '');
+ }
+
+ protected function pStmt_ClassMethod(Stmt\ClassMethod $node) {
+ 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) : '')
+ . (null !== $node->stmts
+ ? $this->nl . '{' . $this->pStmts($node->stmts) . $this->nl . '}'
+ : ';');
+ }
+
+ protected function pStmt_ClassConst(Stmt\ClassConst $node) {
+ return $this->pAttrGroups($node->attrGroups)
+ . $this->pModifiers($node->flags)
+ . 'const ' . $this->pCommaSeparated($node->consts) . ';';
+ }
+
+ protected function pStmt_Function(Stmt\Function_ $node) {
+ return $this->pAttrGroups($node->attrGroups)
+ . 'function ' . ($node->byRef ? '&' : '') . $node->name
+ . '(' . $this->pCommaSeparated($node->params) . ')'
+ . (null !== $node->returnType ? ' : ' . $this->p($node->returnType) : '')
+ . $this->nl . '{' . $this->pStmts($node->stmts) . $this->nl . '}';
+ }
+
+ protected function pStmt_Const(Stmt\Const_ $node) {
+ return 'const ' . $this->pCommaSeparated($node->consts) . ';';
+ }
+
+ protected function pStmt_Declare(Stmt\Declare_ $node) {
+ return 'declare (' . $this->pCommaSeparated($node->declares) . ')'
+ . (null !== $node->stmts ? ' {' . $this->pStmts($node->stmts) . $this->nl . '}' : ';');
+ }
+
+ protected function pStmt_DeclareDeclare(Stmt\DeclareDeclare $node) {
+ return $node->key . '=' . $this->p($node->value);
+ }
+
+ // Control flow
+
+ protected function pStmt_If(Stmt\If_ $node) {
+ 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) {
+ return 'elseif (' . $this->p($node->cond) . ') {'
+ . $this->pStmts($node->stmts) . $this->nl . '}';
+ }
+
+ protected function pStmt_Else(Stmt\Else_ $node) {
+ return 'else {' . $this->pStmts($node->stmts) . $this->nl . '}';
+ }
+
+ protected function pStmt_For(Stmt\For_ $node) {
+ return 'for ('
+ . $this->pCommaSeparated($node->init) . ';' . (!empty($node->cond) ? ' ' : '')
+ . $this->pCommaSeparated($node->cond) . ';' . (!empty($node->loop) ? ' ' : '')
+ . $this->pCommaSeparated($node->loop)
+ . ') {' . $this->pStmts($node->stmts) . $this->nl . '}';
+ }
+
+ protected function pStmt_Foreach(Stmt\Foreach_ $node) {
+ 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) {
+ return 'while (' . $this->p($node->cond) . ') {'
+ . $this->pStmts($node->stmts) . $this->nl . '}';
+ }
+
+ protected function pStmt_Do(Stmt\Do_ $node) {
+ return 'do {' . $this->pStmts($node->stmts) . $this->nl
+ . '} while (' . $this->p($node->cond) . ');';
+ }
+
+ protected function pStmt_Switch(Stmt\Switch_ $node) {
+ return 'switch (' . $this->p($node->cond) . ') {'
+ . $this->pStmts($node->cases) . $this->nl . '}';
+ }
+
+ protected function pStmt_Case(Stmt\Case_ $node) {
+ return (null !== $node->cond ? 'case ' . $this->p($node->cond) : 'default') . ':'
+ . $this->pStmts($node->stmts);
+ }
+
+ protected function pStmt_TryCatch(Stmt\TryCatch $node) {
+ 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) {
+ 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) {
+ return 'finally {' . $this->pStmts($node->stmts) . $this->nl . '}';
+ }
+
+ protected function pStmt_Break(Stmt\Break_ $node) {
+ return 'break' . ($node->num !== null ? ' ' . $this->p($node->num) : '') . ';';
+ }
+
+ protected function pStmt_Continue(Stmt\Continue_ $node) {
+ return 'continue' . ($node->num !== null ? ' ' . $this->p($node->num) : '') . ';';
+ }
+
+ protected function pStmt_Return(Stmt\Return_ $node) {
+ 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) {
+ return $node->name . ':';
+ }
+
+ protected function pStmt_Goto(Stmt\Goto_ $node) {
+ return 'goto ' . $node->name . ';';
+ }
+
+ // Other
+
+ protected function pStmt_Expression(Stmt\Expression $node) {
+ return $this->p($node->expr) . ';';
+ }
+
+ protected function pStmt_Echo(Stmt\Echo_ $node) {
+ return 'echo ' . $this->pCommaSeparated($node->exprs) . ';';
+ }
+
+ protected function pStmt_Static(Stmt\Static_ $node) {
+ return 'static ' . $this->pCommaSeparated($node->vars) . ';';
+ }
+
+ protected function pStmt_Global(Stmt\Global_ $node) {
+ return 'global ' . $this->pCommaSeparated($node->vars) . ';';
+ }
+
+ protected function pStmt_StaticVar(Stmt\StaticVar $node) {
+ return $this->p($node->var)
+ . (null !== $node->default ? ' = ' . $this->p($node->default) : '');
+ }
+
+ protected function pStmt_Unset(Stmt\Unset_ $node) {
+ return 'unset(' . $this->pCommaSeparated($node->vars) . ');';
+ }
+
+ protected function pStmt_InlineHTML(Stmt\InlineHTML $node) {
+ $newline = $node->getAttribute('hasLeadingNewline', true) ? "\n" : '';
+ return '?>' . $newline . $node->value . 'remaining;
+ }
+
+ protected function pStmt_Nop(Stmt\Nop $node) {
+ return '';
+ }
+
+ // Helpers
+
+ protected function pClassCommon(Stmt\Class_ $node, $afterClassToken) {
+ return $this->pAttrGroups($node->attrGroups, $node->name === null)
+ . $this->pModifiers($node->flags)
+ . 'class' . $afterClassToken
+ . (null !== $node->extends ? ' extends ' . $this->p($node->extends) : '')
+ . (!empty($node->implements) ? ' implements ' . $this->pCommaSeparated($node->implements) : '')
+ . $this->nl . '{' . $this->pStmts($node->stmts) . $this->nl . '}';
+ }
+
+ protected function pObjectProperty($node) {
+ if ($node instanceof Expr) {
+ return '{' . $this->p($node) . '}';
+ } else {
+ return $node;
+ }
+ }
+
+ protected function pEncapsList(array $encapsList, $quote) {
+ $return = '';
+ foreach ($encapsList as $element) {
+ if ($element instanceof Scalar\EncapsedStringPart) {
+ $return .= $this->escapeString($element->value, $quote);
+ } else {
+ $return .= '{' . $this->p($element) . '}';
+ }
+ }
+
+ return $return;
+ }
+
+ protected function pSingleQuotedString(string $string) {
+ return '\'' . addcslashes($string, '\'\\') . '\'';
+ }
+
+ protected function escapeString($string, $quote) {
+ if (null === $quote) {
+ // For doc strings, don't escape newlines
+ $escaped = addcslashes($string, "\t\f\v$\\");
+ } else {
+ $escaped = addcslashes($string, "\n\r\t\f\v$" . $quote . "\\");
+ }
+
+ // Escape control characters and non-UTF-8 characters.
+ // Regex based on https://stackoverflow.com/a/11709412/385378.
+ $regex = '/(
+ [\x00-\x08\x0E-\x1F] # Control characters
+ | [\xC0-\xC1] # Invalid UTF-8 Bytes
+ | [\xF5-\xFF] # Invalid UTF-8 Bytes
+ | \xE0(?=[\x80-\x9F]) # Overlong encoding of prior code point
+ | \xF0(?=[\x80-\x8F]) # Overlong encoding of prior code point
+ | [\xC2-\xDF](?![\x80-\xBF]) # Invalid UTF-8 Sequence Start
+ | [\xE0-\xEF](?![\x80-\xBF]{2}) # Invalid UTF-8 Sequence Start
+ | [\xF0-\xF4](?![\x80-\xBF]{3}) # Invalid UTF-8 Sequence Start
+ | (?<=[\x00-\x7F\xF5-\xFF])[\x80-\xBF] # Invalid UTF-8 Sequence Middle
+ | (? $part) {
+ $atStart = $i === 0;
+ $atEnd = $i === count($parts) - 1;
+ if ($part instanceof Scalar\EncapsedStringPart
+ && $this->containsEndLabel($part->value, $label, $atStart, $atEnd)
+ ) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ protected function pDereferenceLhs(Node $node) {
+ if (!$this->dereferenceLhsRequiresParens($node)) {
+ return $this->p($node);
+ } else {
+ return '(' . $this->p($node) . ')';
+ }
+ }
+
+ protected function pCallLhs(Node $node) {
+ if (!$this->callLhsRequiresParens($node)) {
+ return $this->p($node);
+ } else {
+ return '(' . $this->p($node) . ')';
+ }
+ }
+
+ protected function pNewVariable(Node $node) {
+ // TODO: This is not fully accurate.
+ return $this->pDereferenceLhs($node);
+ }
+
+ /**
+ * @param Node[] $nodes
+ * @return bool
+ */
+ protected function hasNodeWithComments(array $nodes) {
+ foreach ($nodes as $node) {
+ if ($node && $node->getComments()) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ protected function pMaybeMultiline(array $nodes, bool $trailingComma = false) {
+ if (!$this->hasNodeWithComments($nodes)) {
+ return $this->pCommaSeparated($nodes);
+ } else {
+ return $this->pCommaSeparatedMultiline($nodes, $trailingComma) . $this->nl;
+ }
+ }
+
+ protected function pAttrGroups(array $nodes, bool $inline = false): string {
+ $result = '';
+ $sep = $inline ? ' ' : $this->nl;
+ foreach ($nodes as $node) {
+ $result .= $this->p($node) . $sep;
+ }
+
+ return $result;
+ }
+}
diff --git a/vendor/nikic/php-parser/lib/PhpParser/PrettyPrinterAbstract.php b/vendor/nikic/php-parser/lib/PhpParser/PrettyPrinterAbstract.php
new file mode 100644
index 00000000..6ed936fe
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/PrettyPrinterAbstract.php
@@ -0,0 +1,1521 @@
+ [ 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],
+ ];
+
+ /** @var int Current indentation level. */
+ protected $indentLevel;
+ /** @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;
+ /** @var bool Whether semicolon namespaces can be used (i.e. no global namespace is used) */
+ protected $canUseSemicolonNamespaces;
+ /** @var array Pretty printer options */
+ protected $options;
+
+ /** @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 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.
+ */
+ protected $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.
+ */
+ protected $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.
+ */
+ protected $insertionMap;
+ /**
+ * @var string[] Map From "{$node->getType()}->{$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;
+
+ /**
+ * 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.
+ *
+ * @param array $options Dictionary of formatting options
+ */
+ public function __construct(array $options = []) {
+ $this->docStringEndToken = '_DOC_STRING_END_' . mt_rand();
+
+ $defaultOptions = ['shortArraySyntax' => false];
+ $this->options = $options + $defaultOptions;
+ }
+
+ /**
+ * Reset pretty printing state.
+ */
+ protected function resetState() {
+ $this->indentLevel = 0;
+ $this->nl = "\n";
+ $this->origTokens = null;
+ }
+
+ /**
+ * Set indentation level
+ *
+ * @param int $level Level in number of spaces
+ */
+ protected function setIndentLevel(int $level) {
+ $this->indentLevel = $level;
+ $this->nl = "\n" . \str_repeat(' ', $level);
+ }
+
+ /**
+ * Increase indentation level.
+ */
+ protected function indent() {
+ $this->indentLevel += 4;
+ $this->nl .= ' ';
+ }
+
+ /**
+ * Decrease indentation level.
+ */
+ protected function outdent() {
+ assert($this->indentLevel >= 4);
+ $this->indentLevel -= 4;
+ $this->nl = "\n" . str_repeat(' ', $this->indentLevel);
+ }
+
+ /**
+ * Pretty prints an array of statements.
+ *
+ * @param Node[] $stmts Array of statements
+ *
+ * @return string Pretty printed statements
+ */
+ public function prettyPrint(array $stmts) : string {
+ $this->resetState();
+ $this->preprocessNodes($stmts);
+
+ return ltrim($this->handleMagicTokens($this->pStmts($stmts, false)));
+ }
+
+ /**
+ * Pretty prints an expression.
+ *
+ * @param Expr $node Expression node
+ *
+ * @return string Pretty printed node
+ */
+ public function prettyPrintExpr(Expr $node) : string {
+ $this->resetState();
+ return $this->handleMagicTokens($this->p($node));
+ }
+
+ /**
+ * Pretty prints a file of statements (includes the opening prettyPrint($stmts);
+
+ if ($stmts[0] instanceof Stmt\InlineHTML) {
+ $p = preg_replace('/^<\?php\s+\?>\n?/', '', $p);
+ }
+ if ($stmts[count($stmts) - 1] instanceof Stmt\InlineHTML) {
+ $p = preg_replace('/<\?php$/', '', rtrim($p));
+ }
+
+ return $p;
+ }
+
+ /**
+ * Preprocesses the top-level nodes to initialize pretty printer state.
+ *
+ * @param Node[] $nodes Array of nodes
+ */
+ protected function preprocessNodes(array $nodes) {
+ /* We can use semicolon-namespaces unless there is a global namespace declaration */
+ $this->canUseSemicolonNamespaces = true;
+ foreach ($nodes as $node) {
+ if ($node instanceof Stmt\Namespace_ && null === $node->name) {
+ $this->canUseSemicolonNamespaces = false;
+ break;
+ }
+ }
+ }
+
+ /**
+ * Handles (and removes) no-indent and doc-string-end tokens.
+ *
+ * @param string $str
+ * @return string
+ */
+ 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);
+
+ return $str;
+ }
+
+ /**
+ * 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
+ *
+ * @return string Pretty printed statements
+ */
+ protected function pStmts(array $nodes, bool $indent = true) : string {
+ if ($indent) {
+ $this->indent();
+ }
+
+ $result = '';
+ foreach ($nodes as $node) {
+ $comments = $node->getComments();
+ if ($comments) {
+ $result .= $this->nl . $this->pComments($comments);
+ if ($node instanceof Stmt\Nop) {
+ continue;
+ }
+ }
+
+ $result .= $this->nl . $this->p($node);
+ }
+
+ if ($indent) {
+ $this->outdent();
+ }
+
+ return $result;
+ }
+
+ /**
+ * 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 $operatorString String representation of the operator
+ * @param Node $rightNode Right-hand side node
+ *
+ * @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);
+ }
+
+ /**
+ * Pretty-print a prefix operation while taking precedence into account.
+ *
+ * @param string $class Node class of operator
+ * @param string $operatorString String representation of the operator
+ * @param Node $node Node
+ *
+ * @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);
+ }
+
+ /**
+ * Pretty-print a postfix operation while taking precedence into account.
+ *
+ * @param string $class Node class of operator
+ * @param string $operatorString String representation of the operator
+ * @param Node $node Node
+ *
+ * @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) . ')';
+ }
+ }
+
+ return $this->p($node);
+ }
+
+ /**
+ * 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
+ *
+ * @return string Imploded pretty printed nodes
+ */
+ protected function pImplode(array $nodes, string $glue = '') : string {
+ $pNodes = [];
+ foreach ($nodes as $node) {
+ if (null === $node) {
+ $pNodes[] = '';
+ } else {
+ $pNodes[] = $this->p($node);
+ }
+ }
+
+ return implode($glue, $pNodes);
+ }
+
+ /**
+ * Pretty prints an array of nodes and implodes the printed values with commas.
+ *
+ * @param Node[] $nodes Array of Nodes to be printed
+ *
+ * @return string Comma separated pretty printed nodes
+ */
+ protected function pCommaSeparated(array $nodes) : string {
+ return $this->pImplode($nodes, ', ');
+ }
+
+ /**
+ * Pretty prints a comma-separated list of nodes in multiline style, including comments.
+ *
+ * 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
+ *
+ * @return string Comma separated pretty printed nodes in multiline style
+ */
+ protected function pCommaSeparatedMultiline(array $nodes, bool $trailingComma) : string {
+ $this->indent();
+
+ $result = '';
+ $lastIdx = count($nodes) - 1;
+ foreach ($nodes as $idx => $node) {
+ if ($node !== null) {
+ $comments = $node->getComments();
+ if ($comments) {
+ $result .= $this->nl . $this->pComments($comments);
+ }
+
+ $result .= $this->nl . $this->p($node);
+ } else {
+ $result .= $this->nl;
+ }
+ if ($trailingComma || $idx !== $lastIdx) {
+ $result .= ',';
+ }
+ }
+
+ $this->outdent();
+ return $result;
+ }
+
+ /**
+ * Prints reformatted text of the passed comments.
+ *
+ * @param Comment[] $comments List of comments
+ *
+ * @return string Reformatted text of comments
+ */
+ protected function pComments(array $comments) : string {
+ $formattedComments = [];
+
+ foreach ($comments as $comment) {
+ $formattedComments[] = str_replace("\n", $this->nl, $comment->getReformattedText());
+ }
+
+ return implode($this->nl, $formattedComments);
+ }
+
+ /**
+ * Perform a format-preserving pretty print of an AST.
+ *
+ * The format preservation is best effort. For some changes to the AST the formatting will not
+ * be preserved (at least not locally).
+ *
+ * In order to use this method a number of prerequisites must be satisfied:
+ * * The startTokenPos and endTokenPos attributes in the lexer must be enabled.
+ * * 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
+ */
+ public function printFormatPreserving(array $stmts, array $origStmts, array $origTokens) : string {
+ $this->initializeNodeListDiffer();
+ $this->initializeLabelCharMap();
+ $this->initializeFixupMap();
+ $this->initializeRemovalMap();
+ $this->initializeInsertionMap();
+ $this->initializeListInsertionMap();
+ $this->initializeEmptyListInsertionMap();
+ $this->initializeModifierChangeMap();
+
+ $this->resetState();
+ $this->origTokens = new TokenStream($origTokens);
+
+ $this->preprocessNodes($stmts);
+
+ $pos = 0;
+ $result = $this->pArray($stmts, $origStmts, $pos, 0, 'File', 'stmts', null);
+ if (null !== $result) {
+ $result .= $this->origTokens->getTokenCode($pos, count($origTokens), 0);
+ } else {
+ // Fallback
+ // TODO Add pStmts($stmts, false);
+ }
+
+ return ltrim($this->handleMagicTokens($result));
+ }
+
+ protected function pFallback(Node $node) {
+ return $this->{'p' . $node->getType()}($node);
+ }
+
+ /**
+ * Pretty prints a node.
+ *
+ * This method also handles formatting preservation for nodes.
+ *
+ * @param Node $node Node to be pretty printed
+ * @param bool $parentFormatPreserved Whether parent node has preserved formatting
+ *
+ * @return string Pretty printed node
+ */
+ protected function p(Node $node, $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);
+ }
+
+ /** @var Node $origNode */
+ $origNode = $node->getAttribute('origNode');
+ if (null === $origNode) {
+ return $this->pFallback($node);
+ }
+
+ $class = \get_class($node);
+ \assert($class === \get_class($origNode));
+
+ $startPos = $origNode->getStartTokenPos();
+ $endPos = $origNode->getEndTokenPos();
+ \assert($startPos >= 0 && $endPos >= 0);
+
+ $fallbackNode = $node;
+ if ($node instanceof Expr\New_ && $node->class instanceof Stmt\Class_) {
+ // Normalize node structure of anonymous classes
+ $node = PrintableNewAnonClassNode::fromNewNode($node);
+ $origNode = PrintableNewAnonClassNode::fromNewNode($origNode);
+ }
+
+ // 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);
+ }
+
+ $indentAdjustment = $this->indentLevel - $this->origTokens->getIndentationBefore($startPos);
+
+ $type = $node->getType();
+ $fixupInfo = $this->fixupMap[$class] ?? null;
+
+ $result = '';
+ $pos = $startPos;
+ foreach ($node->getSubNodeNames() as $subNodeName) {
+ $subNode = $node->$subNodeName;
+ $origSubNode = $origNode->$subNodeName;
+
+ if ((!$subNode instanceof Node && $subNode !== null)
+ || (!$origSubNode instanceof Node && $origSubNode !== null)
+ ) {
+ if ($subNode === $origSubNode) {
+ // Unchanged, can reuse old code
+ continue;
+ }
+
+ if (is_array($subNode) && is_array($origSubNode)) {
+ // Array subnode changed, we might be able to reconstruct it
+ $listResult = $this->pArray(
+ $subNode, $origSubNode, $pos, $indentAdjustment, $type, $subNodeName,
+ $fixupInfo[$subNodeName] ?? null
+ );
+ if (null === $listResult) {
+ return $this->pFallback($fallbackNode);
+ }
+
+ $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;
+ }
+
+ // 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);
+ }
+
+ $extraLeft = '';
+ $extraRight = '';
+ if ($origSubNode !== null) {
+ $subStartPos = $origSubNode->getStartTokenPos();
+ $subEndPos = $origSubNode->getEndTokenPos();
+ \assert($subStartPos >= 0 && $subEndPos >= 0);
+ } else {
+ if ($subNode === null) {
+ // Both null, nothing to do
+ continue;
+ }
+
+ // A node has been inserted, check if we have insertion information for it
+ $key = $type . '->' . $subNodeName;
+ if (!isset($this->insertionMap[$key])) {
+ return $this->pFallback($fallbackNode);
+ }
+
+ list($findToken, $beforeToken, $extraLeft, $extraRight) = $this->insertionMap[$key];
+ if (null !== $findToken) {
+ $subStartPos = $this->origTokens->findRight($pos, $findToken)
+ + (int) !$beforeToken;
+ } else {
+ $subStartPos = $pos;
+ }
+
+ if (null === $extraLeft && null !== $extraRight) {
+ // If inserting on the right only, skipping whitespace looks better
+ $subStartPos = $this->origTokens->skipRightWhitespace($subStartPos);
+ }
+ $subEndPos = $subStartPos - 1;
+ }
+
+ if (null === $subNode) {
+ // A node has been removed, check if we have removal information for it
+ $key = $type . '->' . $subNodeName;
+ if (!isset($this->removalMap[$key])) {
+ return $this->pFallback($fallbackNode);
+ }
+
+ // Adjust positions to account for additional tokens that must be skipped
+ $removalInfo = $this->removalMap[$key];
+ if (isset($removalInfo['left'])) {
+ $subStartPos = $this->origTokens->skipLeft($subStartPos - 1, $removalInfo['left']) + 1;
+ }
+ if (isset($removalInfo['right'])) {
+ $subEndPos = $this->origTokens->skipRight($subEndPos + 1, $removalInfo['right']) - 1;
+ }
+ }
+
+ $result .= $this->origTokens->getTokenCode($pos, $subStartPos, $indentAdjustment);
+
+ if (null !== $subNode) {
+ $result .= $extraLeft;
+
+ $origIndentLevel = $this->indentLevel;
+ $this->setIndentLevel($this->origTokens->getIndentationBefore($subStartPos) + $indentAdjustment);
+
+ // If it's the same node that was previously in this position, it certainly doesn't
+ // need fixup. It's important to check this here, because our fixup checks are more
+ // conservative than strictly necessary.
+ if (isset($fixupInfo[$subNodeName])
+ && $subNode->getAttribute('origNode') !== $origSubNode
+ ) {
+ $fixup = $fixupInfo[$subNodeName];
+ $res = $this->pFixup($fixup, $subNode, $class, $subStartPos, $subEndPos);
+ } else {
+ $res = $this->p($subNode, true);
+ }
+
+ $this->safeAppend($result, $res);
+ $this->setIndentLevel($origIndentLevel);
+
+ $result .= $extraRight;
+ }
+
+ $pos = $subEndPos + 1;
+ }
+
+ $result .= $this->origTokens->getTokenCode($pos, $endPos + 1, $indentAdjustment);
+ return $result;
+ }
+
+ /**
+ * Perform a format-preserving pretty print of an array.
+ *
+ * @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
+ *
+ * @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
+ ) {
+ $diff = $this->nodeListDiffer->diffWithReplacements($origNodes, $nodes);
+
+ $mapKey = $parentNodeType . '->' . $subNodeName;
+ $insertStr = $this->listInsertionMap[$mapKey] ?? null;
+ $isStmtList = $subNodeName === 'stmts';
+
+ $beforeFirstKeepOrReplace = true;
+ $skipRemovedNode = false;
+ $delayedAdd = [];
+ $lastElemIndentLevel = $this->indentLevel;
+
+ $insertNewline = false;
+ if ($insertStr === "\n") {
+ $insertStr = '';
+ $insertNewline = true;
+ }
+
+ if ($isStmtList && \count($origNodes) === 1 && \count($nodes) !== 1) {
+ $startPos = $origNodes[0]->getStartTokenPos();
+ $endPos = $origNodes[0]->getEndTokenPos();
+ \assert($startPos >= 0 && $endPos >= 0);
+ if (!$this->origTokens->haveBraces($startPos, $endPos)) {
+ // This was a single statement without braces, but either additional statements
+ // have been added, or the single statement has been removed. This requires the
+ // addition of braces. For now fall back.
+ // TODO: Try to preserve formatting
+ return null;
+ }
+ }
+
+ $result = '';
+ foreach ($diff as $i => $diffElem) {
+ $diffType = $diffElem->type;
+ /** @var Node|null $arrItem */
+ $arrItem = $diffElem->new;
+ /** @var Node|null $origArrItem */
+ $origArrItem = $diffElem->old;
+
+ if ($diffType === DiffElem::TYPE_KEEP || $diffType === DiffElem::TYPE_REPLACE) {
+ $beforeFirstKeepOrReplace = false;
+
+ if ($origArrItem === null || $arrItem === null) {
+ // We can only handle the case where both are null
+ if ($origArrItem === $arrItem) {
+ continue;
+ }
+ return null;
+ }
+
+ if (!$arrItem instanceof Node || !$origArrItem instanceof Node) {
+ // We can only deal with nodes. This can occur for Names, which use string arrays.
+ return null;
+ }
+
+ $itemStartPos = $origArrItem->getStartTokenPos();
+ $itemEndPos = $origArrItem->getEndTokenPos();
+ \assert($itemStartPos >= 0 && $itemEndPos >= 0 && $itemStartPos >= $pos);
+
+ $origIndentLevel = $this->indentLevel;
+ $lastElemIndentLevel = $this->origTokens->getIndentationBefore($itemStartPos) + $indentAdjustment;
+ $this->setIndentLevel($lastElemIndentLevel);
+
+ $comments = $arrItem->getComments();
+ $origComments = $origArrItem->getComments();
+ $commentStartPos = $origComments ? $origComments[0]->getStartTokenPos() : $itemStartPos;
+ \assert($commentStartPos >= 0);
+
+ if ($commentStartPos < $pos) {
+ // Comments may be assigned to multiple nodes if they start at the same position.
+ // Make sure we don't try to print them multiple times.
+ $commentStartPos = $itemStartPos;
+ }
+
+ if ($skipRemovedNode) {
+ if ($isStmtList && ($this->origTokens->haveBracesInRange($pos, $itemStartPos) ||
+ $this->origTokens->haveTagInRange($pos, $itemStartPos))) {
+ // We'd remove the brace of a code block.
+ // TODO: Preserve formatting.
+ $this->setIndentLevel($origIndentLevel);
+ return null;
+ }
+ } else {
+ $result .= $this->origTokens->getTokenCode(
+ $pos, $commentStartPos, $indentAdjustment);
+ }
+
+ if (!empty($delayedAdd)) {
+ /** @var Node $delayedAddNode */
+ foreach ($delayedAdd as $delayedAddNode) {
+ if ($insertNewline) {
+ $delayedAddComments = $delayedAddNode->getComments();
+ if ($delayedAddComments) {
+ $result .= $this->pComments($delayedAddComments) . $this->nl;
+ }
+ }
+
+ $this->safeAppend($result, $this->p($delayedAddNode, true));
+
+ if ($insertNewline) {
+ $result .= $insertStr . $this->nl;
+ } else {
+ $result .= $insertStr;
+ }
+ }
+
+ $delayedAdd = [];
+ }
+
+ if ($comments !== $origComments) {
+ if ($comments) {
+ $result .= $this->pComments($comments) . $this->nl;
+ }
+ } else {
+ $result .= $this->origTokens->getTokenCode(
+ $commentStartPos, $itemStartPos, $indentAdjustment);
+ }
+
+ // If we had to remove anything, we have done so now.
+ $skipRemovedNode = false;
+ } elseif ($diffType === DiffElem::TYPE_ADD) {
+ if (null === $insertStr) {
+ // We don't have insertion information for this list type
+ return null;
+ }
+
+ // We go multiline if the original code was multiline,
+ // or if it's an array item with a comment above it.
+ if ($insertStr === ', ' &&
+ ($this->isMultiline($origNodes) || $arrItem->getComments())
+ ) {
+ $insertStr = ',';
+ $insertNewline = true;
+ }
+
+ if ($beforeFirstKeepOrReplace) {
+ // Will be inserted at the next "replace" or "keep" element
+ $delayedAdd[] = $arrItem;
+ continue;
+ }
+
+ $itemStartPos = $pos;
+ $itemEndPos = $pos - 1;
+
+ $origIndentLevel = $this->indentLevel;
+ $this->setIndentLevel($lastElemIndentLevel);
+
+ if ($insertNewline) {
+ $result .= $insertStr . $this->nl;
+ $comments = $arrItem->getComments();
+ if ($comments) {
+ $result .= $this->pComments($comments) . $this->nl;
+ }
+ } else {
+ $result .= $insertStr;
+ }
+ } elseif ($diffType === DiffElem::TYPE_REMOVE) {
+ if (!$origArrItem instanceof Node) {
+ // We only support removal for nodes
+ return null;
+ }
+
+ $itemStartPos = $origArrItem->getStartTokenPos();
+ $itemEndPos = $origArrItem->getEndTokenPos();
+ \assert($itemStartPos >= 0 && $itemEndPos >= 0);
+
+ // Consider comments part of the node.
+ $origComments = $origArrItem->getComments();
+ if ($origComments) {
+ $itemStartPos = $origComments[0]->getStartTokenPos();
+ }
+
+ if ($i === 0) {
+ // If we're removing from the start, keep the tokens before the node and drop those after it,
+ // instead of the other way around.
+ $result .= $this->origTokens->getTokenCode(
+ $pos, $itemStartPos, $indentAdjustment);
+ $skipRemovedNode = true;
+ } else {
+ if ($isStmtList && ($this->origTokens->haveBracesInRange($pos, $itemStartPos) ||
+ $this->origTokens->haveTagInRange($pos, $itemStartPos))) {
+ // We'd remove the brace of a code block.
+ // TODO: Preserve formatting.
+ return null;
+ }
+ }
+
+ $pos = $itemEndPos + 1;
+ continue;
+ } else {
+ throw new \Exception("Shouldn't happen");
+ }
+
+ if (null !== $fixup && $arrItem->getAttribute('origNode') !== $origArrItem) {
+ $res = $this->pFixup($fixup, $arrItem, null, $itemStartPos, $itemEndPos);
+ } else {
+ $res = $this->p($arrItem, true);
+ }
+ $this->safeAppend($result, $res);
+
+ $this->setIndentLevel($origIndentLevel);
+ $pos = $itemEndPos + 1;
+ }
+
+ if ($skipRemovedNode) {
+ // TODO: Support removing single node.
+ return null;
+ }
+
+ if (!empty($delayedAdd)) {
+ if (!isset($this->emptyListInsertionMap[$mapKey])) {
+ return null;
+ }
+
+ list($findToken, $extraLeft, $extraRight) = $this->emptyListInsertionMap[$mapKey];
+ if (null !== $findToken) {
+ $insertPos = $this->origTokens->findRight($pos, $findToken) + 1;
+ $result .= $this->origTokens->getTokenCode($pos, $insertPos, $indentAdjustment);
+ $pos = $insertPos;
+ }
+
+ $first = true;
+ $result .= $extraLeft;
+ foreach ($delayedAdd as $delayedAddNode) {
+ if (!$first) {
+ $result .= $insertStr;
+ if ($insertNewline) {
+ $result .= $this->nl;
+ }
+ }
+ $result .= $this->p($delayedAddNode, true);
+ $first = false;
+ }
+ $result .= $extraRight === "\n" ? $this->nl : $extraRight;
+ }
+
+ return $result;
+ }
+
+ /**
+ * Print node with fixups.
+ *
+ * Fixups here refer to the addition of extra parentheses, braces or other characters, that
+ * 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 string|null $parentClass Class of parent node
+ * @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 {
+ switch ($fixup) {
+ case self::FIXUP_PREC_LEFT:
+ 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);
+ }
+ break;
+ case self::FIXUP_CALL_LHS:
+ if ($this->callLhsRequiresParens($subNode)
+ && !$this->origTokens->haveParens($subStartPos, $subEndPos)
+ ) {
+ return '(' . $this->p($subNode) . ')';
+ }
+ break;
+ case self::FIXUP_DEREF_LHS:
+ if ($this->dereferenceLhsRequiresParens($subNode)
+ && !$this->origTokens->haveParens($subStartPos, $subEndPos)
+ ) {
+ return '(' . $this->p($subNode) . ')';
+ }
+ break;
+ case self::FIXUP_BRACED_NAME:
+ case self::FIXUP_VAR_BRACED_NAME:
+ if ($subNode instanceof Expr
+ && !$this->origTokens->haveBraces($subStartPos, $subEndPos)
+ ) {
+ return ($fixup === self::FIXUP_VAR_BRACED_NAME ? '$' : '')
+ . '{' . $this->p($subNode) . '}';
+ }
+ break;
+ case self::FIXUP_ENCAPSED:
+ if (!$subNode instanceof Scalar\EncapsedStringPart
+ && !$this->origTokens->haveBraces($subStartPos, $subEndPos)
+ ) {
+ return '{' . $this->p($subNode) . '}';
+ }
+ break;
+ default:
+ throw new \Exception('Cannot happen');
+ }
+
+ // Nothing special to do
+ return $this->p($subNode);
+ }
+
+ /**
+ * Appends to a string, ensuring whitespace between label characters.
+ *
+ * Example: "echo" and "$x" result in "echo$x", but "echo" and "x" result in "echo x".
+ * Without safeAppend the result would be "echox", which does not preserve semantics.
+ *
+ * @param string $str
+ * @param string $append
+ */
+ protected function safeAppend(string &$str, string $append) {
+ if ($str === "") {
+ $str = $append;
+ return;
+ }
+
+ if ($append === "") {
+ return;
+ }
+
+ if (!$this->labelCharMap[$append[0]]
+ || !$this->labelCharMap[$str[\strlen($str) - 1]]) {
+ $str .= $append;
+ } else {
+ $str .= " " . $append;
+ }
+ }
+
+ /**
+ * Determines whether the LHS of a call must be wrapped in parenthesis.
+ *
+ * @param Node $node LHS of a call
+ *
+ * @return bool Whether parentheses are required
+ */
+ protected function callLhsRequiresParens(Node $node) : bool {
+ return !($node instanceof Node\Name
+ || $node instanceof Expr\Variable
+ || $node instanceof Expr\ArrayDimFetch
+ || $node instanceof Expr\FuncCall
+ || $node instanceof Expr\MethodCall
+ || $node instanceof Expr\NullsafeMethodCall
+ || $node instanceof Expr\StaticCall
+ || $node instanceof Expr\Array_);
+ }
+
+ /**
+ * Determines whether the LHS of a dereferencing operation must be wrapped in parenthesis.
+ *
+ * @param Node $node LHS of dereferencing operation
+ *
+ * @return bool Whether parentheses are required
+ */
+ protected function dereferenceLhsRequiresParens(Node $node) : bool {
+ return !($node instanceof Expr\Variable
+ || $node instanceof Node\Name
+ || $node instanceof Expr\ArrayDimFetch
+ || $node instanceof Expr\PropertyFetch
+ || $node instanceof Expr\NullsafePropertyFetch
+ || $node instanceof Expr\StaticPropertyFetch
+ || $node instanceof Expr\FuncCall
+ || $node instanceof Expr\MethodCall
+ || $node instanceof Expr\NullsafeMethodCall
+ || $node instanceof Expr\StaticCall
+ || $node instanceof Expr\Array_
+ || $node instanceof Scalar\String_
+ || $node instanceof Expr\ConstFetch
+ || $node instanceof Expr\ClassConstFetch);
+ }
+
+ /**
+ * Print modifiers, including trailing whitespace.
+ *
+ * @param int $modifiers Modifier mask to print
+ *
+ * @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 ' : '');
+ }
+
+ /**
+ * Determine whether a list of nodes uses multiline formatting.
+ *
+ * @param (Node|null)[] $nodes Node list
+ *
+ * @return bool Whether multiline formatting is used
+ */
+ protected function isMultiline(array $nodes) : bool {
+ if (\count($nodes) < 2) {
+ return false;
+ }
+
+ $pos = -1;
+ foreach ($nodes as $node) {
+ if (null === $node) {
+ continue;
+ }
+
+ $endPos = $node->getEndTokenPos() + 1;
+ if ($pos >= 0) {
+ $text = $this->origTokens->getTokenCode($pos, $endPos, 0);
+ if (false === strpos($text, "\n")) {
+ // We require that a newline is present between *every* item. If the formatting
+ // is inconsistent, with only some items having newlines, we don't consider it
+ // as multiline
+ return false;
+ }
+ }
+ $pos = $endPos;
+ }
+
+ return true;
+ }
+
+ /**
+ * Lazily initializes label char map.
+ *
+ * The label char map determines whether a certain character may occur in a label.
+ */
+ protected function initializeLabelCharMap() {
+ if ($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);
+ }
+ }
+
+ /**
+ * Lazily initializes node list differ.
+ *
+ * The node list differ is used to determine differences between two array subnodes.
+ */
+ protected function initializeNodeListDiffer() {
+ if ($this->nodeListDiffer) return;
+
+ $this->nodeListDiffer = new Internal\Differ(function ($a, $b) {
+ if ($a instanceof Node && $b instanceof Node) {
+ return $a === $b->getAttribute('origNode');
+ }
+ // Can happen for array destructuring
+ return $a === null && $b === null;
+ });
+ }
+
+ /**
+ * Lazily initializes fixup map.
+ *
+ * The fixup map is used to determine whether a certain subnode of a certain node may require
+ * some kind of "fixup" operation, e.g. the addition of parenthesis or braces.
+ */
+ protected function initializeFixupMap() {
+ if ($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\Ternary::class => [
+ 'cond' => self::FIXUP_PREC_LEFT,
+ 'else' => self::FIXUP_PREC_RIGHT,
+ ],
+
+ Expr\FuncCall::class => ['name' => self::FIXUP_CALL_LHS],
+ Expr\StaticCall::class => ['class' => self::FIXUP_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\MethodCall::class => [
+ 'var' => self::FIXUP_DEREF_LHS,
+ 'name' => self::FIXUP_BRACED_NAME,
+ ],
+ Expr\NullsafeMethodCall::class => [
+ 'var' => self::FIXUP_DEREF_LHS,
+ 'name' => self::FIXUP_BRACED_NAME,
+ ],
+ Expr\StaticPropertyFetch::class => [
+ 'class' => self::FIXUP_DEREF_LHS,
+ 'name' => self::FIXUP_VAR_BRACED_NAME,
+ ],
+ Expr\PropertyFetch::class => [
+ 'var' => self::FIXUP_DEREF_LHS,
+ 'name' => self::FIXUP_BRACED_NAME,
+ ],
+ Expr\NullsafePropertyFetch::class => [
+ 'var' => self::FIXUP_DEREF_LHS,
+ 'name' => self::FIXUP_BRACED_NAME,
+ ],
+ Scalar\Encapsed::class => [
+ 'parts' => self::FIXUP_ENCAPSED,
+ ],
+ ];
+
+ $binaryOps = [
+ BinaryOp\Pow::class, BinaryOp\Mul::class, BinaryOp\Div::class, BinaryOp\Mod::class,
+ BinaryOp\Plus::class, BinaryOp\Minus::class, BinaryOp\Concat::class,
+ BinaryOp\ShiftLeft::class, BinaryOp\ShiftRight::class, BinaryOp\Smaller::class,
+ BinaryOp\SmallerOrEqual::class, BinaryOp\Greater::class, BinaryOp\GreaterOrEqual::class,
+ BinaryOp\Equal::class, BinaryOp\NotEqual::class, BinaryOp\Identical::class,
+ BinaryOp\NotIdentical::class, BinaryOp\Spaceship::class, BinaryOp\BitwiseAnd::class,
+ BinaryOp\BitwiseXor::class, BinaryOp\BitwiseOr::class, BinaryOp\BooleanAnd::class,
+ BinaryOp\BooleanOr::class, BinaryOp\Coalesce::class, BinaryOp\LogicalAnd::class,
+ BinaryOp\LogicalXor::class, BinaryOp\LogicalOr::class,
+ ];
+ foreach ($binaryOps as $binaryOp) {
+ $this->fixupMap[$binaryOp] = [
+ 'left' => self::FIXUP_PREC_LEFT,
+ 'right' => self::FIXUP_PREC_RIGHT
+ ];
+ }
+
+ $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,
+ 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,
+ ];
+ foreach ($prefixOps as $prefixOp) {
+ $this->fixupMap[$prefixOp] = ['expr' => self::FIXUP_PREC_RIGHT];
+ }
+ }
+
+ /**
+ * Lazily initializes the removal map.
+ *
+ * The removal map is used to determine which additional tokens should be removed when a
+ * certain node is replaced by null.
+ */
+ protected function initializeRemovalMap() {
+ if ($this->removalMap) return;
+
+ $stripBoth = ['left' => \T_WHITESPACE, 'right' => \T_WHITESPACE];
+ $stripLeft = ['left' => \T_WHITESPACE];
+ $stripRight = ['right' => \T_WHITESPACE];
+ $stripDoubleArrow = ['right' => \T_DOUBLE_ARROW];
+ $stripColon = ['left' => ':'];
+ $stripEquals = ['left' => '='];
+ $this->removalMap = [
+ 'Expr_ArrayDimFetch->dim' => $stripBoth,
+ 'Expr_ArrayItem->key' => $stripDoubleArrow,
+ 'Expr_ArrowFunction->returnType' => $stripColon,
+ 'Expr_Closure->returnType' => $stripColon,
+ 'Expr_Exit->expr' => $stripBoth,
+ 'Expr_Ternary->if' => $stripBoth,
+ 'Expr_Yield->key' => $stripDoubleArrow,
+ 'Expr_Yield->value' => $stripBoth,
+ 'Param->type' => $stripRight,
+ 'Param->default' => $stripEquals,
+ 'Stmt_Break->num' => $stripBoth,
+ 'Stmt_Catch->var' => $stripLeft,
+ 'Stmt_ClassMethod->returnType' => $stripColon,
+ 'Stmt_Class->extends' => ['left' => \T_EXTENDS],
+ 'Stmt_Enum->scalarType' => $stripColon,
+ 'Stmt_EnumCase->expr' => $stripEquals,
+ 'Expr_PrintableNewAnonClass->extends' => ['left' => \T_EXTENDS],
+ 'Stmt_Continue->num' => $stripBoth,
+ 'Stmt_Foreach->keyVar' => $stripDoubleArrow,
+ 'Stmt_Function->returnType' => $stripColon,
+ 'Stmt_If->else' => $stripLeft,
+ 'Stmt_Namespace->name' => $stripLeft,
+ 'Stmt_Property->type' => $stripRight,
+ 'Stmt_PropertyProperty->default' => $stripEquals,
+ 'Stmt_Return->expr' => $stripBoth,
+ 'Stmt_StaticVar->default' => $stripEquals,
+ 'Stmt_TraitUseAdaptation_Alias->newName' => $stripLeft,
+ 'Stmt_TryCatch->finally' => $stripLeft,
+ // 'Stmt_Case->cond': Replace with "default"
+ // 'Stmt_Class->name': Unclear what to do
+ // 'Stmt_Declare->stmts': Not a plain node
+ // 'Stmt_TraitUseAdaptation_Alias->newModifier': Not a plain node
+ ];
+ }
+
+ protected function initializeInsertionMap() {
+ if ($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],
+ 'Expr_Ternary->if' => ['?', false, ' ', ' '],
+ 'Expr_Yield->key' => [\T_YIELD, false, null, ' => '],
+ 'Expr_Yield->value' => [\T_YIELD, false, ' ', null],
+ 'Param->type' => [null, false, null, ' '],
+ 'Param->default' => [null, false, ' = ', null],
+ 'Stmt_Break->num' => [\T_BREAK, false, ' ', null],
+ 'Stmt_Catch->var' => [null, false, ' ', null],
+ 'Stmt_ClassMethod->returnType' => [')', false, ' : ', null],
+ 'Stmt_Class->extends' => [null, false, ' extends ', null],
+ 'Stmt_Enum->scalarType' => [null, false, ' : ', null],
+ 'Stmt_EnumCase->expr' => [null, false, ' = ', null],
+ 'Expr_PrintableNewAnonClass->extends' => [null, ' extends ', null],
+ 'Stmt_Continue->num' => [\T_CONTINUE, false, ' ', null],
+ 'Stmt_Foreach->keyVar' => [\T_AS, false, null, ' => '],
+ 'Stmt_Function->returnType' => [')', false, ' : ', null],
+ 'Stmt_If->else' => [null, false, ' ', null],
+ 'Stmt_Namespace->name' => [\T_NAMESPACE, false, ' ', null],
+ 'Stmt_Property->type' => [\T_VARIABLE, true, null, ' '],
+ 'Stmt_PropertyProperty->default' => [null, false, ' = ', null],
+ 'Stmt_Return->expr' => [\T_RETURN, false, ' ', null],
+ 'Stmt_StaticVar->default' => [null, false, ' = ', null],
+ //'Stmt_TraitUseAdaptation_Alias->newName' => [T_AS, false, ' ', null], // TODO
+ 'Stmt_TryCatch->finally' => [null, false, ' ', null],
+
+ // 'Expr_Exit->expr': Complicated due to optional ()
+ // 'Stmt_Case->cond': Conversion from default to case
+ // 'Stmt_Class->name': Unclear
+ // 'Stmt_Declare->stmts': Not a proper node
+ // 'Stmt_TraitUseAdaptation_Alias->newModifier': Not a proper node
+ ];
+ }
+
+ protected function initializeListInsertionMap() {
+ if ($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' => ' ',
+
+ // 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' => ', ',
+
+ // 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",
+
+ // dummy for top-level context
+ 'File->stmts' => "\n",
+ ];
+ }
+
+ protected function initializeEmptyListInsertionMap() {
+ if ($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' => ['(', '', ''],
+ 'Stmt_Interface->attrGroups' => [null, '', "\n"],
+ 'Stmt_Class->attrGroups' => [null, '', "\n"],
+ 'Stmt_ClassConst->attrGroups' => [null, '', "\n"],
+ 'Stmt_ClassMethod->attrGroups' => [null, '', "\n"],
+ 'Stmt_Function->attrGroups' => [null, '', "\n"],
+ 'Stmt_Property->attrGroups' => [null, '', "\n"],
+ 'Stmt_Trait->attrGroups' => [null, '', "\n"],
+ 'Expr_ArrowFunction->attrGroups' => [null, '', ' '],
+ 'Expr_Closure->attrGroups' => [null, '', ' '],
+ 'Expr_PrintableNewAnonClass->attrGroups' => [\T_NEW, ' ', ''],
+
+ /* These cannot be empty to start with:
+ * Expr_Isset->vars
+ * Stmt_Catch->types
+ * Stmt_Const->consts
+ * Stmt_ClassConst->consts
+ * Stmt_Declare->declares
+ * Stmt_Echo->exprs
+ * Stmt_Global->vars
+ * Stmt_GroupUse->uses
+ * Stmt_Property->props
+ * Stmt_StaticVar->vars
+ * Stmt_TraitUse->traits
+ * Stmt_TraitUseAdaptation_Precedence->insteadof
+ * Stmt_Unset->vars
+ * Stmt_Use->uses
+ * UnionType->types
+ */
+
+ /* TODO
+ * Stmt_If->elseifs
+ * Stmt_TryCatch->catches
+ * Expr_Array->items
+ * Expr_List->items
+ * Stmt_For->init
+ * Stmt_For->cond
+ * Stmt_For->loop
+ */
+ ];
+ }
+
+ protected function initializeModifierChangeMap() {
+ if ($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
+ ];
+
+ // List of integer subnodes that are not modifiers:
+ // Expr_Include->type
+ // Stmt_GroupUse->type
+ // Stmt_Use->type
+ // Stmt_UseUse->type
+ }
+}
diff --git a/vendor/phar-io/manifest/CHANGELOG.md b/vendor/phar-io/manifest/CHANGELOG.md
new file mode 100644
index 00000000..a403e093
--- /dev/null
+++ b/vendor/phar-io/manifest/CHANGELOG.md
@@ -0,0 +1,36 @@
+# Changelog
+
+All notable changes to phar-io/manifest are documented in this file using the [Keep a CHANGELOG](http://keepachangelog.com/) principles.
+
+## [2.0.3] - 20.07.2021
+
+- Fixed PHP 7.2 / PHP 7.3 incompatibility introduced in previous release
+
+## [2.0.2] - 20.07.2021
+
+- Fixed PHP 8.1 deprecation notice
+
+## [2.0.1] - 27.06.2020
+
+This release now supports the use of PHP 7.2+ and ^8.0
+
+## [2.0.0] - 10.05.2020
+
+This release now requires PHP 7.2+
+
+### Changed
+
+- Upgraded to phar-io/version 3.0
+ - Version strings `v1.2.3` will now be converted to valid semantic version strings `1.2.3`
+ - Abreviated strings like `1.0` will get expaneded to `1.0.0`
+
+### Unreleased
+
+[Unreleased]: https://github.com/phar-io/manifest/compare/2.0.3...HEAD
+[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
+[2.0.0]: https://github.com/phar-io/manifest/compare/1.0.1...2.0.0
+[1.0.3]: https://github.com/phar-io/manifest/compare/1.0.2...1.0.3
+[1.0.2]: https://github.com/phar-io/manifest/compare/1.0.1...1.0.2
+[1.0.1]: https://github.com/phar-io/manifest/compare/1.0.0...1.0.1
diff --git a/vendor/phar-io/manifest/LICENSE b/vendor/phar-io/manifest/LICENSE
new file mode 100644
index 00000000..64690cf2
--- /dev/null
+++ b/vendor/phar-io/manifest/LICENSE
@@ -0,0 +1,31 @@
+Phar.io - Manifest
+
+Copyright (c) 2016-2019 Arne Blankerts , Sebastian Heuer , Sebastian Bergmann , and contributors
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+* Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+* Neither the name of Arne Blankerts nor the names of 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 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/phar-io/manifest/README.md b/vendor/phar-io/manifest/README.md
new file mode 100644
index 00000000..e6d0b055
--- /dev/null
+++ b/vendor/phar-io/manifest/README.md
@@ -0,0 +1,30 @@
+# Manifest
+
+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/):
+
+ composer require phar-io/manifest
+
+If you only need this library during development, for instance to run your project's test suite, then you should add it as a development-time dependency:
+
+ composer require --dev phar-io/manifest
+
+## Usage
+
+```php
+use PharIo\Manifest\ManifestLoader;
+use PharIo\Manifest\ManifestSerializer;
+
+$manifest = ManifestLoader::fromFile('manifest.xml');
+
+var_dump($manifest);
+
+echo (new ManifestSerializer)->serializeToString($manifest);
+```
diff --git a/vendor/phar-io/manifest/composer.json b/vendor/phar-io/manifest/composer.json
new file mode 100644
index 00000000..a2521193
--- /dev/null
+++ b/vendor/phar-io/manifest/composer.json
@@ -0,0 +1,42 @@
+{
+ "name": "phar-io/manifest",
+ "description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)",
+ "license": "BSD-3-Clause",
+ "authors": [
+ {
+ "name": "Arne Blankerts",
+ "email": "arne@blankerts.de",
+ "role": "Developer"
+ },
+ {
+ "name": "Sebastian Heuer",
+ "email": "sebastian@phpeople.de",
+ "role": "Developer"
+ },
+ {
+ "name": "Sebastian Bergmann",
+ "email": "sebastian@phpunit.de",
+ "role": "Developer"
+ }
+ ],
+ "support": {
+ "issues": "https://github.com/phar-io/manifest/issues"
+ },
+ "require": {
+ "php": "^7.2 || ^8.0",
+ "ext-dom": "*",
+ "ext-phar": "*",
+ "ext-xmlwriter": "*",
+ "phar-io/version": "^3.0.1"
+ },
+ "autoload": {
+ "classmap": [
+ "src/"
+ ]
+ },
+ "extra": {
+ "branch-alias": {
+ "dev-master": "2.0.x-dev"
+ }
+ }
+}
diff --git a/vendor/phar-io/manifest/composer.lock b/vendor/phar-io/manifest/composer.lock
new file mode 100644
index 00000000..e0e6db76
--- /dev/null
+++ b/vendor/phar-io/manifest/composer.lock
@@ -0,0 +1,70 @@
+{
+ "_readme": [
+ "This file locks the dependencies of your project to a known state",
+ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
+ "This file is @generated automatically"
+ ],
+ "content-hash": "f2ac4614ce4f7273fd54a64b65fd047a",
+ "packages": [
+ {
+ "name": "phar-io/version",
+ "version": "3.0.1",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/phar-io/version.git",
+ "reference": "d06a5000ac1a258a7d035295f0bd4ae7c859bc4f"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/phar-io/version/zipball/d06a5000ac1a258a7d035295f0bd4ae7c859bc4f",
+ "reference": "d06a5000ac1a258a7d035295f0bd4ae7c859bc4f",
+ "shasum": ""
+ },
+ "require": {
+ "php": "^7.2"
+ },
+ "type": "library",
+ "autoload": {
+ "classmap": [
+ "src/"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "BSD-3-Clause"
+ ],
+ "authors": [
+ {
+ "name": "Arne Blankerts",
+ "email": "arne@blankerts.de",
+ "role": "Developer"
+ },
+ {
+ "name": "Sebastian Heuer",
+ "email": "sebastian@phpeople.de",
+ "role": "Developer"
+ },
+ {
+ "name": "Sebastian Bergmann",
+ "email": "sebastian@phpunit.de",
+ "role": "Developer"
+ }
+ ],
+ "description": "Library for handling version information and constraints",
+ "time": "2020-05-09T21:27:55+00:00"
+ }
+ ],
+ "packages-dev": [],
+ "aliases": [],
+ "minimum-stability": "stable",
+ "stability-flags": [],
+ "prefer-stable": false,
+ "prefer-lowest": false,
+ "platform": {
+ "php": "^7.2",
+ "ext-dom": "*",
+ "ext-phar": "*",
+ "ext-xmlwriter": "*"
+ },
+ "platform-dev": []
+}
diff --git a/vendor/phar-io/manifest/src/ManifestDocumentMapper.php b/vendor/phar-io/manifest/src/ManifestDocumentMapper.php
new file mode 100644
index 00000000..8e539d5f
--- /dev/null
+++ b/vendor/phar-io/manifest/src/ManifestDocumentMapper.php
@@ -0,0 +1,150 @@
+, Sebastian Heuer , Sebastian Bergmann
+ *
+ * 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;
+
+class ManifestDocumentMapper {
+ public function map(ManifestDocument $document): Manifest {
+ try {
+ $contains = $document->getContainsElement();
+ $type = $this->mapType($contains);
+ $copyright = $this->mapCopyright($document->getCopyrightElement());
+ $requirements = $this->mapRequirements($document->getRequiresElement());
+ $bundledComponents = $this->mapBundledComponents($document);
+
+ return new Manifest(
+ new ApplicationName($contains->getName()),
+ new Version($contains->getVersion()),
+ $type,
+ $copyright,
+ $requirements,
+ $bundledComponents
+ );
+ } catch (VersionException $e) {
+ throw new ManifestDocumentMapperException($e->getMessage(), (int)$e->getCode(), $e);
+ } catch (Exception $e) {
+ throw new ManifestDocumentMapperException($e->getMessage(), (int)$e->getCode(), $e);
+ }
+ }
+
+ private function mapType(ContainsElement $contains): Type {
+ switch ($contains->getType()) {
+ case 'application':
+ return Type::application();
+ case 'library':
+ return Type::library();
+ case 'extension':
+ return $this->mapExtension($contains->getExtensionElement());
+ }
+
+ throw new ManifestDocumentMapperException(
+ \sprintf('Unsupported type %s', $contains->getType())
+ );
+ }
+
+ private function mapCopyright(CopyrightElement $copyright): CopyrightInformation {
+ $authors = new AuthorCollection();
+
+ foreach ($copyright->getAuthorElements() as $authorElement) {
+ $authors->add(
+ new Author(
+ $authorElement->getName(),
+ new Email($authorElement->getEmail())
+ )
+ );
+ }
+
+ $licenseElement = $copyright->getLicenseElement();
+ $license = new License(
+ $licenseElement->getType(),
+ new Url($licenseElement->getUrl())
+ );
+
+ return new CopyrightInformation(
+ $authors,
+ $license
+ );
+ }
+
+ private function mapRequirements(RequiresElement $requires): RequirementCollection {
+ $collection = new RequirementCollection();
+ $phpElement = $requires->getPHPElement();
+ $parser = new VersionConstraintParser;
+
+ try {
+ $versionConstraint = $parser->parse($phpElement->getVersion());
+ } catch (VersionException $e) {
+ throw new ManifestDocumentMapperException(
+ \sprintf('Unsupported version constraint - %s', $e->getMessage()),
+ (int)$e->getCode(),
+ $e
+ );
+ }
+
+ $collection->add(
+ new PhpVersionRequirement(
+ $versionConstraint
+ )
+ );
+
+ if (!$phpElement->hasExtElements()) {
+ return $collection;
+ }
+
+ foreach ($phpElement->getExtElements() as $extElement) {
+ $collection->add(
+ new PhpExtensionRequirement($extElement->getName())
+ );
+ }
+
+ return $collection;
+ }
+
+ private function mapBundledComponents(ManifestDocument $document): BundledComponentCollection {
+ $collection = new BundledComponentCollection();
+
+ if (!$document->hasBundlesElement()) {
+ return $collection;
+ }
+
+ foreach ($document->getBundlesElement()->getComponentElements() as $componentElement) {
+ $collection->add(
+ new BundledComponent(
+ $componentElement->getName(),
+ new Version(
+ $componentElement->getVersion()
+ )
+ )
+ );
+ }
+
+ return $collection;
+ }
+
+ private function mapExtension(ExtensionElement $extension): Extension {
+ try {
+ $versionConstraint = (new VersionConstraintParser)->parse($extension->getCompatible());
+
+ return Type::extension(
+ new ApplicationName($extension->getFor()),
+ $versionConstraint
+ );
+ } catch (VersionException $e) {
+ throw new ManifestDocumentMapperException(
+ \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
new file mode 100644
index 00000000..ae884e49
--- /dev/null
+++ b/vendor/phar-io/manifest/src/ManifestLoader.php
@@ -0,0 +1,44 @@
+, Sebastian Heuer , Sebastian Bergmann
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+namespace PharIo\Manifest;
+
+class ManifestLoader {
+ public static function fromFile(string $filename): Manifest {
+ try {
+ return (new ManifestDocumentMapper())->map(
+ ManifestDocument::fromFile($filename)
+ );
+ } catch (Exception $e) {
+ throw new ManifestLoaderException(
+ \sprintf('Loading %s failed.', $filename),
+ (int)$e->getCode(),
+ $e
+ );
+ }
+ }
+
+ public static function fromPhar(string $filename): Manifest {
+ return self::fromFile('phar://' . $filename . '/manifest.xml');
+ }
+
+ public static function fromString(string $manifest): Manifest {
+ try {
+ return (new ManifestDocumentMapper())->map(
+ ManifestDocument::fromString($manifest)
+ );
+ } catch (Exception $e) {
+ throw new ManifestLoaderException(
+ 'Processing string failed',
+ (int)$e->getCode(),
+ $e
+ );
+ }
+ }
+}
diff --git a/vendor/phar-io/manifest/src/ManifestSerializer.php b/vendor/phar-io/manifest/src/ManifestSerializer.php
new file mode 100644
index 00000000..e236b598
--- /dev/null
+++ b/vendor/phar-io/manifest/src/ManifestSerializer.php
@@ -0,0 +1,168 @@
+, Sebastian Heuer , Sebastian Bergmann
+ *
+ * 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\AnyVersionConstraint;
+use PharIo\Version\Version;
+use PharIo\Version\VersionConstraint;
+use XMLWriter;
+
+/** @psalm-suppress MissingConstructor */
+class ManifestSerializer {
+ /** @var XMLWriter */
+ private $xmlWriter;
+
+ public function serializeToFile(Manifest $manifest, string $filename): void {
+ \file_put_contents(
+ $filename,
+ $this->serializeToString($manifest)
+ );
+ }
+
+ public function serializeToString(Manifest $manifest): string {
+ $this->startDocument();
+
+ $this->addContains($manifest->getName(), $manifest->getVersion(), $manifest->getType());
+ $this->addCopyright($manifest->getCopyrightInformation());
+ $this->addRequirements($manifest->getRequirements());
+ $this->addBundles($manifest->getBundledComponents());
+
+ return $this->finishDocument();
+ }
+
+ private function startDocument(): void {
+ $xmlWriter = new XMLWriter();
+ $xmlWriter->openMemory();
+ $xmlWriter->setIndent(true);
+ $xmlWriter->setIndentString(\str_repeat(' ', 4));
+ $xmlWriter->startDocument('1.0', 'UTF-8');
+ $xmlWriter->startElement('phar');
+ $xmlWriter->writeAttribute('xmlns', 'https://phar.io/xml/manifest/1.0');
+
+ $this->xmlWriter = $xmlWriter;
+ }
+
+ private function finishDocument(): string {
+ $this->xmlWriter->endElement();
+ $this->xmlWriter->endDocument();
+
+ return $this->xmlWriter->outputMemory();
+ }
+
+ private function addContains(ApplicationName $name, Version $version, Type $type): void {
+ $this->xmlWriter->startElement('contains');
+ $this->xmlWriter->writeAttribute('name', $name->asString());
+ $this->xmlWriter->writeAttribute('version', $version->getVersionString());
+
+ switch (true) {
+ case $type->isApplication(): {
+ $this->xmlWriter->writeAttribute('type', 'application');
+
+ break;
+ }
+
+ case $type->isLibrary(): {
+ $this->xmlWriter->writeAttribute('type', 'library');
+
+ break;
+ }
+
+ case $type->isExtension(): {
+ $this->xmlWriter->writeAttribute('type', 'extension');
+ /* @var $type Extension */
+ $this->addExtension(
+ $type->getApplicationName(),
+ $type->getVersionConstraint()
+ );
+
+ break;
+ }
+
+ default: {
+ $this->xmlWriter->writeAttribute('type', 'custom');
+ }
+ }
+
+ $this->xmlWriter->endElement();
+ }
+
+ private function addCopyright(CopyrightInformation $copyrightInformation): void {
+ $this->xmlWriter->startElement('copyright');
+
+ foreach ($copyrightInformation->getAuthors() as $author) {
+ $this->xmlWriter->startElement('author');
+ $this->xmlWriter->writeAttribute('name', $author->getName());
+ $this->xmlWriter->writeAttribute('email', $author->getEmail()->asString());
+ $this->xmlWriter->endElement();
+ }
+
+ $license = $copyrightInformation->getLicense();
+
+ $this->xmlWriter->startElement('license');
+ $this->xmlWriter->writeAttribute('type', $license->getName());
+ $this->xmlWriter->writeAttribute('url', $license->getUrl()->asString());
+ $this->xmlWriter->endElement();
+
+ $this->xmlWriter->endElement();
+ }
+
+ private function addRequirements(RequirementCollection $requirementCollection): void {
+ $phpRequirement = new AnyVersionConstraint();
+ $extensions = [];
+
+ foreach ($requirementCollection as $requirement) {
+ if ($requirement instanceof PhpVersionRequirement) {
+ $phpRequirement = $requirement->getVersionConstraint();
+
+ continue;
+ }
+
+ if ($requirement instanceof PhpExtensionRequirement) {
+ $extensions[] = $requirement->asString();
+ }
+ }
+
+ $this->xmlWriter->startElement('requires');
+ $this->xmlWriter->startElement('php');
+ $this->xmlWriter->writeAttribute('version', $phpRequirement->asString());
+
+ foreach ($extensions as $extension) {
+ $this->xmlWriter->startElement('ext');
+ $this->xmlWriter->writeAttribute('name', $extension);
+ $this->xmlWriter->endElement();
+ }
+
+ $this->xmlWriter->endElement();
+ $this->xmlWriter->endElement();
+ }
+
+ private function addBundles(BundledComponentCollection $bundledComponentCollection): void {
+ if (\count($bundledComponentCollection) === 0) {
+ return;
+ }
+ $this->xmlWriter->startElement('bundles');
+
+ foreach ($bundledComponentCollection as $bundledComponent) {
+ $this->xmlWriter->startElement('component');
+ $this->xmlWriter->writeAttribute('name', $bundledComponent->getName());
+ $this->xmlWriter->writeAttribute('version', $bundledComponent->getVersion()->getVersionString());
+ $this->xmlWriter->endElement();
+ }
+
+ $this->xmlWriter->endElement();
+ }
+
+ private function addExtension(ApplicationName $applicationName, VersionConstraint $versionConstraint): void {
+ $this->xmlWriter->startElement('extension');
+ $this->xmlWriter->writeAttribute('for', $applicationName->asString());
+ $this->xmlWriter->writeAttribute('compatible', $versionConstraint->asString());
+ $this->xmlWriter->endElement();
+ }
+}
diff --git a/vendor/phar-io/manifest/src/exceptions/ElementCollectionException.php b/vendor/phar-io/manifest/src/exceptions/ElementCollectionException.php
new file mode 100644
index 00000000..766fc0e6
--- /dev/null
+++ b/vendor/phar-io/manifest/src/exceptions/ElementCollectionException.php
@@ -0,0 +1,13 @@
+, Sebastian Heuer , Sebastian Bergmann
+ *
+ * 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 {
+}
diff --git a/vendor/phar-io/manifest/src/exceptions/Exception.php b/vendor/phar-io/manifest/src/exceptions/Exception.php
new file mode 100644
index 00000000..e7f12209
--- /dev/null
+++ b/vendor/phar-io/manifest/src/exceptions/Exception.php
@@ -0,0 +1,13 @@
+, Sebastian Heuer , Sebastian Bergmann
+ *
+ * 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 {
+}
diff --git a/vendor/phar-io/manifest/src/exceptions/InvalidApplicationNameException.php b/vendor/phar-io/manifest/src/exceptions/InvalidApplicationNameException.php
new file mode 100644
index 00000000..952901eb
--- /dev/null
+++ b/vendor/phar-io/manifest/src/exceptions/InvalidApplicationNameException.php
@@ -0,0 +1,14 @@
+, Sebastian Heuer , Sebastian Bergmann
+ *
+ * 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 {
+ public const InvalidFormat = 2;
+}
diff --git a/vendor/phar-io/manifest/src/exceptions/InvalidEmailException.php b/vendor/phar-io/manifest/src/exceptions/InvalidEmailException.php
new file mode 100644
index 00000000..3cbe0822
--- /dev/null
+++ b/vendor/phar-io/manifest/src/exceptions/InvalidEmailException.php
@@ -0,0 +1,13 @@
+, Sebastian Heuer , Sebastian Bergmann
+ *
+ * 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 {
+}
diff --git a/vendor/phar-io/manifest/src/exceptions/InvalidUrlException.php b/vendor/phar-io/manifest/src/exceptions/InvalidUrlException.php
new file mode 100644
index 00000000..8f77e294
--- /dev/null
+++ b/vendor/phar-io/manifest/src/exceptions/InvalidUrlException.php
@@ -0,0 +1,13 @@
+, Sebastian Heuer , Sebastian Bergmann
+ *
+ * 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 {
+}
diff --git a/vendor/phar-io/manifest/src/exceptions/ManifestDocumentException.php b/vendor/phar-io/manifest/src/exceptions/ManifestDocumentException.php
new file mode 100644
index 00000000..cf1c314c
--- /dev/null
+++ b/vendor/phar-io/manifest/src/exceptions/ManifestDocumentException.php
@@ -0,0 +1,5 @@
+, Sebastian Heuer , Sebastian Bergmann
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+namespace PharIo\Manifest;
+
+use LibXMLError;
+
+class ManifestDocumentLoadingException extends \Exception implements Exception {
+ /** @var LibXMLError[] */
+ private $libxmlErrors;
+
+ /**
+ * ManifestDocumentLoadingException constructor.
+ *
+ * @param LibXMLError[] $libxmlErrors
+ */
+ public function __construct(array $libxmlErrors) {
+ $this->libxmlErrors = $libxmlErrors;
+ $first = $this->libxmlErrors[0];
+
+ parent::__construct(
+ \sprintf(
+ '%s (Line: %d / Column: %d / File: %s)',
+ $first->message,
+ $first->line,
+ $first->column,
+ $first->file
+ ),
+ $first->code
+ );
+ }
+
+ /**
+ * @return LibXMLError[]
+ */
+ public function getLibxmlErrors(): array {
+ return $this->libxmlErrors;
+ }
+}
diff --git a/vendor/phar-io/manifest/src/exceptions/ManifestDocumentMapperException.php b/vendor/phar-io/manifest/src/exceptions/ManifestDocumentMapperException.php
new file mode 100644
index 00000000..43373bd3
--- /dev/null
+++ b/vendor/phar-io/manifest/src/exceptions/ManifestDocumentMapperException.php
@@ -0,0 +1,5 @@
+, Sebastian Heuer , Sebastian Bergmann
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+namespace PharIo\Manifest;
+
+class Application extends Type {
+ public function isApplication(): bool {
+ return true;
+ }
+}
diff --git a/vendor/phar-io/manifest/src/values/ApplicationName.php b/vendor/phar-io/manifest/src/values/ApplicationName.php
new file mode 100644
index 00000000..d71744ab
--- /dev/null
+++ b/vendor/phar-io/manifest/src/values/ApplicationName.php
@@ -0,0 +1,37 @@
+, Sebastian Heuer , Sebastian Bergmann
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+namespace PharIo\Manifest;
+
+class ApplicationName {
+ /** @var string */
+ private $name;
+
+ public function __construct(string $name) {
+ $this->ensureValidFormat($name);
+ $this->name = $name;
+ }
+
+ public function asString(): string {
+ return $this->name;
+ }
+
+ public function isEqual(ApplicationName $name): bool {
+ return $this->name === $name->name;
+ }
+
+ private function ensureValidFormat(string $name): void {
+ if (!\preg_match('#\w/\w#', $name)) {
+ throw new InvalidApplicationNameException(
+ \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
new file mode 100644
index 00000000..82b666e7
--- /dev/null
+++ b/vendor/phar-io/manifest/src/values/Author.php
@@ -0,0 +1,39 @@
+, Sebastian Heuer , Sebastian Bergmann
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+namespace PharIo\Manifest;
+
+class Author {
+ /** @var string */
+ private $name;
+
+ /** @var Email */
+ private $email;
+
+ public function __construct(string $name, Email $email) {
+ $this->name = $name;
+ $this->email = $email;
+ }
+
+ public function asString(): string {
+ return \sprintf(
+ '%s <%s>',
+ $this->name,
+ $this->email->asString()
+ );
+ }
+
+ public function getName(): string {
+ return $this->name;
+ }
+
+ public function getEmail(): Email {
+ return $this->email;
+ }
+}
diff --git a/vendor/phar-io/manifest/src/values/AuthorCollection.php b/vendor/phar-io/manifest/src/values/AuthorCollection.php
new file mode 100644
index 00000000..27e50ad8
--- /dev/null
+++ b/vendor/phar-io/manifest/src/values/AuthorCollection.php
@@ -0,0 +1,34 @@
+, Sebastian Heuer , Sebastian Bergmann
+ *
+ * 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 {
+ /** @var Author[] */
+ private $authors = [];
+
+ public function add(Author $author): void {
+ $this->authors[] = $author;
+ }
+
+ /**
+ * @return Author[]
+ */
+ public function getAuthors(): array {
+ return $this->authors;
+ }
+
+ public function count(): int {
+ return \count($this->authors);
+ }
+
+ public function getIterator(): AuthorCollectionIterator {
+ return new AuthorCollectionIterator($this);
+ }
+}
diff --git a/vendor/phar-io/manifest/src/values/AuthorCollectionIterator.php b/vendor/phar-io/manifest/src/values/AuthorCollectionIterator.php
new file mode 100644
index 00000000..4ff3c394
--- /dev/null
+++ b/vendor/phar-io/manifest/src/values/AuthorCollectionIterator.php
@@ -0,0 +1,42 @@
+, Sebastian Heuer , Sebastian Bergmann
+ *
+ * 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 {
+ /** @var Author[] */
+ private $authors;
+
+ /** @var int */
+ private $position = 0;
+
+ public function __construct(AuthorCollection $authors) {
+ $this->authors = $authors->getAuthors();
+ }
+
+ public function rewind(): void {
+ $this->position = 0;
+ }
+
+ public function valid(): bool {
+ return $this->position < \count($this->authors);
+ }
+
+ public function key(): int {
+ return $this->position;
+ }
+
+ public function current(): Author {
+ return $this->authors[$this->position];
+ }
+
+ public function next(): void {
+ $this->position++;
+ }
+}
diff --git a/vendor/phar-io/manifest/src/values/BundledComponent.php b/vendor/phar-io/manifest/src/values/BundledComponent.php
new file mode 100644
index 00000000..ea77b440
--- /dev/null
+++ b/vendor/phar-io/manifest/src/values/BundledComponent.php
@@ -0,0 +1,33 @@
+, Sebastian Heuer , Sebastian Bergmann
+ *
+ * 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\Version;
+
+class BundledComponent {
+ /** @var string */
+ private $name;
+
+ /** @var Version */
+ private $version;
+
+ public function __construct(string $name, Version $version) {
+ $this->name = $name;
+ $this->version = $version;
+ }
+
+ public function getName(): string {
+ return $this->name;
+ }
+
+ public function getVersion(): Version {
+ return $this->version;
+ }
+}
diff --git a/vendor/phar-io/manifest/src/values/BundledComponentCollection.php b/vendor/phar-io/manifest/src/values/BundledComponentCollection.php
new file mode 100644
index 00000000..b628eaa3
--- /dev/null
+++ b/vendor/phar-io/manifest/src/values/BundledComponentCollection.php
@@ -0,0 +1,34 @@
+, Sebastian Heuer , Sebastian Bergmann
+ *
+ * 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 {
+ /** @var BundledComponent[] */
+ private $bundledComponents = [];
+
+ public function add(BundledComponent $bundledComponent): void {
+ $this->bundledComponents[] = $bundledComponent;
+ }
+
+ /**
+ * @return BundledComponent[]
+ */
+ public function getBundledComponents(): array {
+ return $this->bundledComponents;
+ }
+
+ public function count(): int {
+ return \count($this->bundledComponents);
+ }
+
+ public function getIterator(): BundledComponentCollectionIterator {
+ return new BundledComponentCollectionIterator($this);
+ }
+}
diff --git a/vendor/phar-io/manifest/src/values/BundledComponentCollectionIterator.php b/vendor/phar-io/manifest/src/values/BundledComponentCollectionIterator.php
new file mode 100644
index 00000000..462db45a
--- /dev/null
+++ b/vendor/phar-io/manifest/src/values/BundledComponentCollectionIterator.php
@@ -0,0 +1,42 @@
+, Sebastian Heuer , Sebastian Bergmann
+ *
+ * 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 {
+ /** @var BundledComponent[] */
+ private $bundledComponents;
+
+ /** @var int */
+ private $position = 0;
+
+ public function __construct(BundledComponentCollection $bundledComponents) {
+ $this->bundledComponents = $bundledComponents->getBundledComponents();
+ }
+
+ public function rewind(): void {
+ $this->position = 0;
+ }
+
+ public function valid(): bool {
+ return $this->position < \count($this->bundledComponents);
+ }
+
+ public function key(): int {
+ return $this->position;
+ }
+
+ public function current(): BundledComponent {
+ return $this->bundledComponents[$this->position];
+ }
+
+ public function next(): void {
+ $this->position++;
+ }
+}
diff --git a/vendor/phar-io/manifest/src/values/CopyrightInformation.php b/vendor/phar-io/manifest/src/values/CopyrightInformation.php
new file mode 100644
index 00000000..d26f9472
--- /dev/null
+++ b/vendor/phar-io/manifest/src/values/CopyrightInformation.php
@@ -0,0 +1,31 @@
+, Sebastian Heuer , Sebastian Bergmann
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+namespace PharIo\Manifest;
+
+class CopyrightInformation {
+ /** @var AuthorCollection */
+ private $authors;
+
+ /** @var License */
+ private $license;
+
+ public function __construct(AuthorCollection $authors, License $license) {
+ $this->authors = $authors;
+ $this->license = $license;
+ }
+
+ public function getAuthors(): AuthorCollection {
+ return $this->authors;
+ }
+
+ public function getLicense(): License {
+ return $this->license;
+ }
+}
diff --git a/vendor/phar-io/manifest/src/values/Email.php b/vendor/phar-io/manifest/src/values/Email.php
new file mode 100644
index 00000000..588348d8
--- /dev/null
+++ b/vendor/phar-io/manifest/src/values/Email.php
@@ -0,0 +1,31 @@
+, Sebastian Heuer , Sebastian Bergmann
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+namespace PharIo\Manifest;
+
+class Email {
+ /** @var string */
+ private $email;
+
+ public function __construct(string $email) {
+ $this->ensureEmailIsValid($email);
+
+ $this->email = $email;
+ }
+
+ public function asString(): string {
+ return $this->email;
+ }
+
+ private function ensureEmailIsValid(string $url): void {
+ 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
new file mode 100644
index 00000000..4c5726f8
--- /dev/null
+++ b/vendor/phar-io/manifest/src/values/Extension.php
@@ -0,0 +1,46 @@
+, Sebastian Heuer , Sebastian Bergmann
+ *
+ * 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\Version;
+use PharIo\Version\VersionConstraint;
+
+class Extension extends Type {
+ /** @var ApplicationName */
+ private $application;
+
+ /** @var VersionConstraint */
+ private $versionConstraint;
+
+ public function __construct(ApplicationName $application, VersionConstraint $versionConstraint) {
+ $this->application = $application;
+ $this->versionConstraint = $versionConstraint;
+ }
+
+ public function getApplicationName(): ApplicationName {
+ return $this->application;
+ }
+
+ public function getVersionConstraint(): VersionConstraint {
+ return $this->versionConstraint;
+ }
+
+ public function isExtension(): bool {
+ return true;
+ }
+
+ public function isExtensionFor(ApplicationName $name): bool {
+ return $this->application->isEqual($name);
+ }
+
+ public function isCompatibleWith(ApplicationName $name, Version $version): bool {
+ return $this->isExtensionFor($name) && $this->versionConstraint->complies($version);
+ }
+}
diff --git a/vendor/phar-io/manifest/src/values/Library.php b/vendor/phar-io/manifest/src/values/Library.php
new file mode 100644
index 00000000..21849e13
--- /dev/null
+++ b/vendor/phar-io/manifest/src/values/Library.php
@@ -0,0 +1,16 @@
+, Sebastian Heuer , Sebastian Bergmann
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+namespace PharIo\Manifest;
+
+class Library extends Type {
+ public function isLibrary(): bool {
+ return true;
+ }
+}
diff --git a/vendor/phar-io/manifest/src/values/License.php b/vendor/phar-io/manifest/src/values/License.php
new file mode 100644
index 00000000..39542fe8
--- /dev/null
+++ b/vendor/phar-io/manifest/src/values/License.php
@@ -0,0 +1,31 @@
+, Sebastian Heuer , Sebastian Bergmann
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+namespace PharIo\Manifest;
+
+class License {
+ /** @var string */
+ private $name;
+
+ /** @var Url */
+ private $url;
+
+ public function __construct(string $name, Url $url) {
+ $this->name = $name;
+ $this->url = $url;
+ }
+
+ public function getName(): string {
+ return $this->name;
+ }
+
+ public function getUrl(): Url {
+ return $this->url;
+ }
+}
diff --git a/vendor/phar-io/manifest/src/values/Manifest.php b/vendor/phar-io/manifest/src/values/Manifest.php
new file mode 100644
index 00000000..0140b842
--- /dev/null
+++ b/vendor/phar-io/manifest/src/values/Manifest.php
@@ -0,0 +1,92 @@
+, Sebastian Heuer , Sebastian Bergmann
+ *
+ * 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\Version;
+
+class Manifest {
+ /** @var ApplicationName */
+ private $name;
+
+ /** @var Version */
+ private $version;
+
+ /** @var Type */
+ private $type;
+
+ /** @var CopyrightInformation */
+ private $copyrightInformation;
+
+ /** @var RequirementCollection */
+ private $requirements;
+
+ /** @var BundledComponentCollection */
+ private $bundledComponents;
+
+ public function __construct(ApplicationName $name, Version $version, Type $type, CopyrightInformation $copyrightInformation, RequirementCollection $requirements, BundledComponentCollection $bundledComponents) {
+ $this->name = $name;
+ $this->version = $version;
+ $this->type = $type;
+ $this->copyrightInformation = $copyrightInformation;
+ $this->requirements = $requirements;
+ $this->bundledComponents = $bundledComponents;
+ }
+
+ public function getName(): ApplicationName {
+ return $this->name;
+ }
+
+ public function getVersion(): Version {
+ return $this->version;
+ }
+
+ public function getType(): Type {
+ return $this->type;
+ }
+
+ public function getCopyrightInformation(): CopyrightInformation {
+ return $this->copyrightInformation;
+ }
+
+ public function getRequirements(): RequirementCollection {
+ return $this->requirements;
+ }
+
+ public function getBundledComponents(): BundledComponentCollection {
+ return $this->bundledComponents;
+ }
+
+ public function isApplication(): bool {
+ return $this->type->isApplication();
+ }
+
+ public function isLibrary(): bool {
+ return $this->type->isLibrary();
+ }
+
+ public function isExtension(): bool {
+ return $this->type->isExtension();
+ }
+
+ public function isExtensionFor(ApplicationName $application, Version $version = null): bool {
+ if (!$this->isExtension()) {
+ return false;
+ }
+
+ /** @var Extension $type */
+ $type = $this->type;
+
+ if ($version !== null) {
+ return $type->isCompatibleWith($application, $version);
+ }
+
+ return $type->isExtensionFor($application);
+ }
+}
diff --git a/vendor/phar-io/manifest/src/values/PhpExtensionRequirement.php b/vendor/phar-io/manifest/src/values/PhpExtensionRequirement.php
new file mode 100644
index 00000000..088f3858
--- /dev/null
+++ b/vendor/phar-io/manifest/src/values/PhpExtensionRequirement.php
@@ -0,0 +1,23 @@
+, Sebastian Heuer , Sebastian Bergmann
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+namespace PharIo\Manifest;
+
+class PhpExtensionRequirement implements Requirement {
+ /** @var string */
+ private $extension;
+
+ public function __construct(string $extension) {
+ $this->extension = $extension;
+ }
+
+ public function asString(): string {
+ return $this->extension;
+ }
+}
diff --git a/vendor/phar-io/manifest/src/values/PhpVersionRequirement.php b/vendor/phar-io/manifest/src/values/PhpVersionRequirement.php
new file mode 100644
index 00000000..f8d6f6d1
--- /dev/null
+++ b/vendor/phar-io/manifest/src/values/PhpVersionRequirement.php
@@ -0,0 +1,25 @@
+, Sebastian Heuer , Sebastian Bergmann
+ *
+ * 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\VersionConstraint;
+
+class PhpVersionRequirement implements Requirement {
+ /** @var VersionConstraint */
+ private $versionConstraint;
+
+ public function __construct(VersionConstraint $versionConstraint) {
+ $this->versionConstraint = $versionConstraint;
+ }
+
+ public function getVersionConstraint(): VersionConstraint {
+ return $this->versionConstraint;
+ }
+}
diff --git a/vendor/phar-io/manifest/src/values/Requirement.php b/vendor/phar-io/manifest/src/values/Requirement.php
new file mode 100644
index 00000000..8b845d6a
--- /dev/null
+++ b/vendor/phar-io/manifest/src/values/Requirement.php
@@ -0,0 +1,13 @@
+, Sebastian Heuer , Sebastian Bergmann
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+namespace PharIo\Manifest;
+
+interface Requirement {
+}
diff --git a/vendor/phar-io/manifest/src/values/RequirementCollection.php b/vendor/phar-io/manifest/src/values/RequirementCollection.php
new file mode 100644
index 00000000..b82cd955
--- /dev/null
+++ b/vendor/phar-io/manifest/src/values/RequirementCollection.php
@@ -0,0 +1,34 @@
+, Sebastian Heuer , Sebastian Bergmann
+ *
+ * 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 {
+ /** @var Requirement[] */
+ private $requirements = [];
+
+ public function add(Requirement $requirement): void {
+ $this->requirements[] = $requirement;
+ }
+
+ /**
+ * @return Requirement[]
+ */
+ public function getRequirements(): array {
+ return $this->requirements;
+ }
+
+ public function count(): int {
+ return \count($this->requirements);
+ }
+
+ public function getIterator(): RequirementCollectionIterator {
+ return new RequirementCollectionIterator($this);
+ }
+}
diff --git a/vendor/phar-io/manifest/src/values/RequirementCollectionIterator.php b/vendor/phar-io/manifest/src/values/RequirementCollectionIterator.php
new file mode 100644
index 00000000..5614eaf7
--- /dev/null
+++ b/vendor/phar-io/manifest/src/values/RequirementCollectionIterator.php
@@ -0,0 +1,42 @@
+, Sebastian Heuer , Sebastian Bergmann
+ *
+ * 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 {
+ /** @var Requirement[] */
+ private $requirements;
+
+ /** @var int */
+ private $position = 0;
+
+ public function __construct(RequirementCollection $requirements) {
+ $this->requirements = $requirements->getRequirements();
+ }
+
+ public function rewind(): void {
+ $this->position = 0;
+ }
+
+ public function valid(): bool {
+ return $this->position < \count($this->requirements);
+ }
+
+ public function key(): int {
+ return $this->position;
+ }
+
+ public function current(): Requirement {
+ return $this->requirements[$this->position];
+ }
+
+ public function next(): void {
+ $this->position++;
+ }
+}
diff --git a/vendor/phar-io/manifest/src/values/Type.php b/vendor/phar-io/manifest/src/values/Type.php
new file mode 100644
index 00000000..23b28980
--- /dev/null
+++ b/vendor/phar-io/manifest/src/values/Type.php
@@ -0,0 +1,41 @@
+, Sebastian Heuer , Sebastian Bergmann
+ *
+ * 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\VersionConstraint;
+
+abstract class Type {
+ public static function application(): Application {
+ return new Application;
+ }
+
+ public static function library(): Library {
+ return new Library;
+ }
+
+ public static function extension(ApplicationName $application, VersionConstraint $versionConstraint): Extension {
+ return new Extension($application, $versionConstraint);
+ }
+
+ /** @psalm-assert-if-true Application $this */
+ public function isApplication(): bool {
+ return false;
+ }
+
+ /** @psalm-assert-if-true Library $this */
+ public function isLibrary(): bool {
+ return false;
+ }
+
+ /** @psalm-assert-if-true Extension $this */
+ public function isExtension(): bool {
+ return false;
+ }
+}
diff --git a/vendor/phar-io/manifest/src/values/Url.php b/vendor/phar-io/manifest/src/values/Url.php
new file mode 100644
index 00000000..63952533
--- /dev/null
+++ b/vendor/phar-io/manifest/src/values/Url.php
@@ -0,0 +1,36 @@
+, Sebastian Heuer , Sebastian Bergmann
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+namespace PharIo\Manifest;
+
+class Url {
+ /** @var string */
+ private $url;
+
+ public function __construct(string $url) {
+ $this->ensureUrlIsValid($url);
+
+ $this->url = $url;
+ }
+
+ public function asString(): string {
+ return $this->url;
+ }
+
+ /**
+ * @param string $url
+ *
+ * @throws InvalidUrlException
+ */
+ private function ensureUrlIsValid($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
new file mode 100644
index 00000000..c454b271
--- /dev/null
+++ b/vendor/phar-io/manifest/src/xml/AuthorElement.php
@@ -0,0 +1,20 @@
+, Sebastian Heuer , Sebastian Bergmann
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+namespace PharIo\Manifest;
+
+class AuthorElement extends ManifestElement {
+ public function getName(): string {
+ return $this->getAttributeValue('name');
+ }
+
+ public function getEmail(): string {
+ return $this->getAttributeValue('email');
+ }
+}
diff --git a/vendor/phar-io/manifest/src/xml/AuthorElementCollection.php b/vendor/phar-io/manifest/src/xml/AuthorElementCollection.php
new file mode 100644
index 00000000..a54147eb
--- /dev/null
+++ b/vendor/phar-io/manifest/src/xml/AuthorElementCollection.php
@@ -0,0 +1,18 @@
+, Sebastian Heuer , Sebastian Bergmann
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+namespace PharIo\Manifest;
+
+class AuthorElementCollection extends ElementCollection {
+ public function current(): AuthorElement {
+ return new AuthorElement(
+ $this->getCurrentElement()
+ );
+ }
+}
diff --git a/vendor/phar-io/manifest/src/xml/BundlesElement.php b/vendor/phar-io/manifest/src/xml/BundlesElement.php
new file mode 100644
index 00000000..eb2105ac
--- /dev/null
+++ b/vendor/phar-io/manifest/src/xml/BundlesElement.php
@@ -0,0 +1,18 @@
+, Sebastian Heuer , Sebastian Bergmann
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+namespace PharIo\Manifest;
+
+class BundlesElement extends ManifestElement {
+ public function getComponentElements(): ComponentElementCollection {
+ return new ComponentElementCollection(
+ $this->getChildrenByName('component')
+ );
+ }
+}
diff --git a/vendor/phar-io/manifest/src/xml/ComponentElement.php b/vendor/phar-io/manifest/src/xml/ComponentElement.php
new file mode 100644
index 00000000..7f6a5ec9
--- /dev/null
+++ b/vendor/phar-io/manifest/src/xml/ComponentElement.php
@@ -0,0 +1,20 @@
+, Sebastian Heuer , Sebastian Bergmann
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+namespace PharIo\Manifest;
+
+class ComponentElement extends ManifestElement {
+ public function getName(): string {
+ return $this->getAttributeValue('name');
+ }
+
+ public function getVersion(): string {
+ return $this->getAttributeValue('version');
+ }
+}
diff --git a/vendor/phar-io/manifest/src/xml/ComponentElementCollection.php b/vendor/phar-io/manifest/src/xml/ComponentElementCollection.php
new file mode 100644
index 00000000..23bcbd2f
--- /dev/null
+++ b/vendor/phar-io/manifest/src/xml/ComponentElementCollection.php
@@ -0,0 +1,18 @@
+, Sebastian Heuer , Sebastian Bergmann
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+namespace PharIo\Manifest;
+
+class ComponentElementCollection extends ElementCollection {
+ public function current(): ComponentElement {
+ return new ComponentElement(
+ $this->getCurrentElement()
+ );
+ }
+}
diff --git a/vendor/phar-io/manifest/src/xml/ContainsElement.php b/vendor/phar-io/manifest/src/xml/ContainsElement.php
new file mode 100644
index 00000000..ebef49d9
--- /dev/null
+++ b/vendor/phar-io/manifest/src/xml/ContainsElement.php
@@ -0,0 +1,30 @@
+, Sebastian Heuer , Sebastian Bergmann
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+namespace PharIo\Manifest;
+
+class ContainsElement extends ManifestElement {
+ public function getName(): string {
+ return $this->getAttributeValue('name');
+ }
+
+ public function getVersion(): string {
+ return $this->getAttributeValue('version');
+ }
+
+ public function getType(): string {
+ return $this->getAttributeValue('type');
+ }
+
+ public function getExtensionElement(): ExtensionElement {
+ return new ExtensionElement(
+ $this->getChildByName('extension')
+ );
+ }
+}
diff --git a/vendor/phar-io/manifest/src/xml/CopyrightElement.php b/vendor/phar-io/manifest/src/xml/CopyrightElement.php
new file mode 100644
index 00000000..3debe7dc
--- /dev/null
+++ b/vendor/phar-io/manifest/src/xml/CopyrightElement.php
@@ -0,0 +1,24 @@
+, Sebastian Heuer , Sebastian Bergmann
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+namespace PharIo\Manifest;
+
+class CopyrightElement extends ManifestElement {
+ public function getAuthorElements(): AuthorElementCollection {
+ return new AuthorElementCollection(
+ $this->getChildrenByName('author')
+ );
+ }
+
+ public function getLicenseElement(): LicenseElement {
+ return new LicenseElement(
+ $this->getChildByName('license')
+ );
+ }
+}
diff --git a/vendor/phar-io/manifest/src/xml/ElementCollection.php b/vendor/phar-io/manifest/src/xml/ElementCollection.php
new file mode 100644
index 00000000..26d9250f
--- /dev/null
+++ b/vendor/phar-io/manifest/src/xml/ElementCollection.php
@@ -0,0 +1,61 @@
+, Sebastian Heuer , Sebastian Bergmann
+ *
+ * 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;
+
+abstract class ElementCollection implements \Iterator {
+ /** @var DOMElement[] */
+ private $nodes = [];
+
+ /** @var int */
+ private $position;
+
+ public function __construct(DOMNodeList $nodeList) {
+ $this->position = 0;
+ $this->importNodes($nodeList);
+ }
+
+ #[\ReturnTypeWillChange]
+ abstract public function current();
+
+ public function next(): void {
+ $this->position++;
+ }
+
+ public function key(): int {
+ return $this->position;
+ }
+
+ public function valid(): bool {
+ return $this->position < \count($this->nodes);
+ }
+
+ public function rewind(): void {
+ $this->position = 0;
+ }
+
+ protected function getCurrentElement(): DOMElement {
+ return $this->nodes[$this->position];
+ }
+
+ private function importNodes(DOMNodeList $nodeList): void {
+ foreach ($nodeList as $node) {
+ if (!$node instanceof DOMElement) {
+ throw new ElementCollectionException(
+ \sprintf('\DOMElement expected, got \%s', \get_class($node))
+ );
+ }
+
+ $this->nodes[] = $node;
+ }
+ }
+}
diff --git a/vendor/phar-io/manifest/src/xml/ExtElement.php b/vendor/phar-io/manifest/src/xml/ExtElement.php
new file mode 100644
index 00000000..257853c4
--- /dev/null
+++ b/vendor/phar-io/manifest/src/xml/ExtElement.php
@@ -0,0 +1,16 @@
+, Sebastian Heuer , Sebastian Bergmann
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+namespace PharIo\Manifest;
+
+class ExtElement extends ManifestElement {
+ public function getName(): string {
+ return $this->getAttributeValue('name');
+ }
+}
diff --git a/vendor/phar-io/manifest/src/xml/ExtElementCollection.php b/vendor/phar-io/manifest/src/xml/ExtElementCollection.php
new file mode 100644
index 00000000..05977349
--- /dev/null
+++ b/vendor/phar-io/manifest/src/xml/ExtElementCollection.php
@@ -0,0 +1,18 @@
+, Sebastian Heuer , Sebastian Bergmann
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+namespace PharIo\Manifest;
+
+class ExtElementCollection extends ElementCollection {
+ public function current(): ExtElement {
+ return new ExtElement(
+ $this->getCurrentElement()
+ );
+ }
+}
diff --git a/vendor/phar-io/manifest/src/xml/ExtensionElement.php b/vendor/phar-io/manifest/src/xml/ExtensionElement.php
new file mode 100644
index 00000000..db067f99
--- /dev/null
+++ b/vendor/phar-io/manifest/src/xml/ExtensionElement.php
@@ -0,0 +1,20 @@
+, Sebastian Heuer , Sebastian Bergmann
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+namespace PharIo\Manifest;
+
+class ExtensionElement extends ManifestElement {
+ public function getFor(): string {
+ return $this->getAttributeValue('for');
+ }
+
+ public function getCompatible(): string {
+ return $this->getAttributeValue('compatible');
+ }
+}
diff --git a/vendor/phar-io/manifest/src/xml/LicenseElement.php b/vendor/phar-io/manifest/src/xml/LicenseElement.php
new file mode 100644
index 00000000..658c3d1c
--- /dev/null
+++ b/vendor/phar-io/manifest/src/xml/LicenseElement.php
@@ -0,0 +1,20 @@
+, Sebastian Heuer , Sebastian Bergmann
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+namespace PharIo\Manifest;
+
+class LicenseElement extends ManifestElement {
+ public function getType(): string {
+ return $this->getAttributeValue('type');
+ }
+
+ public function getUrl(): string {
+ return $this->getAttributeValue('url');
+ }
+}
diff --git a/vendor/phar-io/manifest/src/xml/ManifestDocument.php b/vendor/phar-io/manifest/src/xml/ManifestDocument.php
new file mode 100644
index 00000000..f88b2829
--- /dev/null
+++ b/vendor/phar-io/manifest/src/xml/ManifestDocument.php
@@ -0,0 +1,103 @@
+, Sebastian Heuer , Sebastian Bergmann
+ *
+ * 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;
+
+class ManifestDocument {
+ public const XMLNS = 'https://phar.io/xml/manifest/1.0';
+
+ /** @var DOMDocument */
+ private $dom;
+
+ public static function fromFile(string $filename): ManifestDocument {
+ if (!\file_exists($filename)) {
+ throw new ManifestDocumentException(
+ \sprintf('File "%s" not found', $filename)
+ );
+ }
+
+ return self::fromString(
+ \file_get_contents($filename)
+ );
+ }
+
+ public static function fromString(string $xmlString): ManifestDocument {
+ $prev = \libxml_use_internal_errors(true);
+ \libxml_clear_errors();
+
+ $dom = new DOMDocument();
+ $dom->loadXML($xmlString);
+
+ $errors = \libxml_get_errors();
+ \libxml_use_internal_errors($prev);
+
+ if (\count($errors) !== 0) {
+ throw new ManifestDocumentLoadingException($errors);
+ }
+
+ return new self($dom);
+ }
+
+ private function __construct(DOMDocument $dom) {
+ $this->ensureCorrectDocumentType($dom);
+
+ $this->dom = $dom;
+ }
+
+ public function getContainsElement(): ContainsElement {
+ return new ContainsElement(
+ $this->fetchElementByName('contains')
+ );
+ }
+
+ public function getCopyrightElement(): CopyrightElement {
+ return new CopyrightElement(
+ $this->fetchElementByName('copyright')
+ );
+ }
+
+ public function getRequiresElement(): RequiresElement {
+ return new RequiresElement(
+ $this->fetchElementByName('requires')
+ );
+ }
+
+ public function hasBundlesElement(): bool {
+ return $this->dom->getElementsByTagNameNS(self::XMLNS, 'bundles')->length === 1;
+ }
+
+ public function getBundlesElement(): BundlesElement {
+ return new BundlesElement(
+ $this->fetchElementByName('bundles')
+ );
+ }
+
+ private function ensureCorrectDocumentType(DOMDocument $dom): void {
+ $root = $dom->documentElement;
+
+ if ($root->localName !== 'phar' || $root->namespaceURI !== self::XMLNS) {
+ throw new ManifestDocumentException('Not a phar.io manifest document');
+ }
+ }
+
+ private function fetchElementByName(string $elementName): DOMElement {
+ $element = $this->dom->getElementsByTagNameNS(self::XMLNS, $elementName)->item(0);
+
+ if (!$element instanceof DOMElement) {
+ throw new ManifestDocumentException(
+ \sprintf('Element %s missing', $elementName)
+ );
+ }
+
+ return $element;
+ }
+}
diff --git a/vendor/phar-io/manifest/src/xml/ManifestElement.php b/vendor/phar-io/manifest/src/xml/ManifestElement.php
new file mode 100644
index 00000000..1f57f547
--- /dev/null
+++ b/vendor/phar-io/manifest/src/xml/ManifestElement.php
@@ -0,0 +1,66 @@
+, Sebastian Heuer , Sebastian Bergmann
+ *
+ * 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;
+
+class ManifestElement {
+ public const XMLNS = 'https://phar.io/xml/manifest/1.0';
+
+ /** @var DOMElement */
+ private $element;
+
+ public function __construct(DOMElement $element) {
+ $this->element = $element;
+ }
+
+ protected function getAttributeValue(string $name): string {
+ if (!$this->element->hasAttribute($name)) {
+ throw new ManifestElementException(
+ \sprintf(
+ 'Attribute %s not set on element %s',
+ $name,
+ $this->element->localName
+ )
+ );
+ }
+
+ return $this->element->getAttribute($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)
+ );
+ }
+
+ return $element;
+ }
+
+ protected function getChildrenByName(string $elementName): DOMNodeList {
+ $elementList = $this->element->getElementsByTagNameNS(self::XMLNS, $elementName);
+
+ if ($elementList->length === 0) {
+ throw new ManifestElementException(
+ \sprintf('Element(s) %s missing', $elementName)
+ );
+ }
+
+ return $elementList;
+ }
+
+ protected function hasChild(string $elementName): bool {
+ return $this->element->getElementsByTagNameNS(self::XMLNS, $elementName)->length !== 0;
+ }
+}
diff --git a/vendor/phar-io/manifest/src/xml/PhpElement.php b/vendor/phar-io/manifest/src/xml/PhpElement.php
new file mode 100644
index 00000000..c5c906c9
--- /dev/null
+++ b/vendor/phar-io/manifest/src/xml/PhpElement.php
@@ -0,0 +1,26 @@
+, Sebastian Heuer , Sebastian Bergmann
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+namespace PharIo\Manifest;
+
+class PhpElement extends ManifestElement {
+ public function getVersion(): string {
+ return $this->getAttributeValue('version');
+ }
+
+ public function hasExtElements(): bool {
+ return $this->hasChild('ext');
+ }
+
+ public function getExtElements(): ExtElementCollection {
+ return new ExtElementCollection(
+ $this->getChildrenByName('ext')
+ );
+ }
+}
diff --git a/vendor/phar-io/manifest/src/xml/RequiresElement.php b/vendor/phar-io/manifest/src/xml/RequiresElement.php
new file mode 100644
index 00000000..b7cd41ef
--- /dev/null
+++ b/vendor/phar-io/manifest/src/xml/RequiresElement.php
@@ -0,0 +1,18 @@
+, Sebastian Heuer , Sebastian Bergmann
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+namespace PharIo\Manifest;
+
+class RequiresElement extends ManifestElement {
+ public function getPHPElement(): PhpElement {
+ return new PhpElement(
+ $this->getChildByName('php')
+ );
+ }
+}
diff --git a/vendor/phar-io/version/CHANGELOG.md b/vendor/phar-io/version/CHANGELOG.md
new file mode 100644
index 00000000..4c0edfa7
--- /dev/null
+++ b/vendor/phar-io/version/CHANGELOG.md
@@ -0,0 +1,142 @@
+# Changelog
+
+All notable changes to phar-io/version are documented in this file using the [Keep a CHANGELOG](http://keepachangelog.com/) principles.
+
+## [3.2.1] - 2022-02-21
+
+### Fixed
+
+- Have ExactVersionConstraint honor build metadata (added in 3.2.0)
+
+
+## [3.2.0] - 2022-02-21
+
+### Added
+
+- Build metadata is now supported and considered for equality checks only
+
+
+## [3.1.1] - 2022-02-07
+
+### Fixed
+
+- [#28](https://github.com/phar-io/version/issues/28): `VersionConstraintParser` does not support logical OR represented by single pipe (|) (Thanks @llaville)
+
+
+## [3.1.0] - 2021-02-23
+
+### Changed
+
+- Internal Refactoring
+- More scalar types
+
+### Added
+
+- [#24](https://github.com/phar-io/version/issues/24): `Version::getOriginalString()` added (Thanks @addshore)
+- Version constraints using the caret operator (`^`) now honor pre-1.0 releases, e.g. `^0.3` translates to `0.3.*`)
+- Various integration tests for version constraint processing
+
+### Fixed
+
+- [#23](https://github.com/phar-io/version/pull/23): Tilde operator without patch level
+
+
+
+## [3.0.4] - 14.12.2020
+
+### Fixed
+
+- [#22](https://github.com/phar-io/version/pull/22): make dev suffix rank works for uppercase too
+
+## [3.0.3] - 30.11.2020
+
+### Added
+
+- Comparator method `Version::equals()` added
+
+
+## [3.0.2] - 27.06.2020
+
+This release now supports PHP 7.2+ and PHP ^8.0. No other changes included.
+
+
+## [3.0.1] - 09.05.2020
+
+__Potential BC Break Notice:__
+`Version::getVersionString()` no longer returns `v` prefixes in case the "input"
+string contained one. These are not part of the semver specs
+(see https://semver.org/#is-v123-a-semantic-version) and get stripped out.
+As of Version 3.1.0 `Version::getOriginalString()` can be used to still
+retrieve it as given.
+
+### Changed
+
+- Internal Refactoring
+- More scalar types
+
+### Fixed
+
+- Fixed Constraint processing Regression for ^1.2 and ~1.2
+
+
+## [3.0.0] - 05.05.2020
+
+### Changed
+
+- Require PHP 7.2+
+- All code now uses strict mode
+- Scalar types have been added as needed
+
+### Added
+
+- The technically invalid format using 'v' prefix ("v1.2.3") is now properly supported
+
+
+## [2.0.1] - 08.07.2018
+
+### Fixed
+
+- Versions without a pre-release suffix are now always considered greater
+than versions with a pre-release suffix. Example: `3.0.0 > 3.0.0-alpha.1`
+
+
+## [2.0.0] - 23.06.2018
+
+Changes to public API:
+
+- `PreReleaseSuffix::construct()`: optional parameter `$number` removed
+- `PreReleaseSuffix::isGreaterThan()`: introduced
+- `Version::hasPreReleaseSuffix()`: introduced
+
+### Added
+
+- [#11](https://github.com/phar-io/version/issues/11): Added support for pre-release version suffixes. Supported values are:
+ - `dev`
+ - `beta` (also abbreviated form `b`)
+ - `rc`
+ - `alpha` (also abbreviated form `a`)
+ - `patch` (also abbreviated form `p`)
+
+ All values can be followed by a number, e.g. `beta3`.
+
+ When comparing versions, the pre-release suffix is taken into account. Example:
+`1.5.0 > 1.5.0-beta1 > 1.5.0-alpha3 > 1.5.0-alpha2 > 1.5.0-dev11`
+
+### Changed
+
+- reorganized the source directories
+
+### Fixed
+
+- [#10](https://github.com/phar-io/version/issues/10): Version numbers containing
+a numeric suffix as seen in Debian packages are now supported.
+
+
+[3.1.0]: https://github.com/phar-io/version/compare/3.0.4...3.1.0
+[3.0.4]: https://github.com/phar-io/version/compare/3.0.3...3.0.4
+[3.0.3]: https://github.com/phar-io/version/compare/3.0.2...3.0.3
+[3.0.2]: https://github.com/phar-io/version/compare/3.0.1...3.0.2
+[3.0.1]: https://github.com/phar-io/version/compare/3.0.0...3.0.1
+[3.0.0]: https://github.com/phar-io/version/compare/2.0.1...3.0.0
+[2.0.1]: https://github.com/phar-io/version/compare/2.0.0...2.0.1
+[2.0.0]: https://github.com/phar-io/version/compare/1.0.1...2.0.0
diff --git a/vendor/phar-io/version/LICENSE b/vendor/phar-io/version/LICENSE
new file mode 100644
index 00000000..ce32758a
--- /dev/null
+++ b/vendor/phar-io/version/LICENSE
@@ -0,0 +1,29 @@
+Copyright (c) 2016-2017 Arne Blankerts , Sebastian Heuer and contributors
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+* Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+* Neither the name of the copyright holder nor the names of 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 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/phar-io/version/README.md b/vendor/phar-io/version/README.md
new file mode 100644
index 00000000..76e6e985
--- /dev/null
+++ b/vendor/phar-io/version/README.md
@@ -0,0 +1,61 @@
+# Version
+
+Library for handling version information and constraints
+
+[![Build Status](https://travis-ci.org/phar-io/version.svg?branch=master)](https://travis-ci.org/phar-io/version)
+
+## Installation
+
+You can add this library as a local, per-project dependency to your project using [Composer](https://getcomposer.org/):
+
+ composer require phar-io/version
+
+If you only need this library during development, for instance to run your project's test suite, then you should add it as a development-time dependency:
+
+ composer require --dev phar-io/version
+
+## Version constraints
+
+A Version constraint describes a range of versions or a discrete version number. The format of version numbers follows the schema of [semantic versioning](http://semver.org): `..`. A constraint might contain an operator that describes the range.
+
+Beside the typical mathematical operators like `<=`, `>=`, there are two special operators:
+
+*Caret operator*: `^1.0`
+can be written as `>=1.0.0 <2.0.0` and read as »every Version within major version `1`«.
+
+*Tilde operator*: `~1.0.0`
+can be written as `>=1.0.0 <1.1.0` and read as »every version within minor version `1.1`. The behavior of tilde operator depends on whether a patch level version is provided or not. If no patch level is provided, tilde operator behaves like the caret operator: `~1.0` is identical to `^1.0`.
+
+## Usage examples
+
+Parsing version constraints and check discrete versions for compliance:
+
+```php
+
+use PharIo\Version\Version;
+use PharIo\Version\VersionConstraintParser;
+
+$parser = new VersionConstraintParser();
+$caret_constraint = $parser->parse( '^7.0' );
+
+$caret_constraint->complies( new Version( '7.0.17' ) ); // true
+$caret_constraint->complies( new Version( '7.1.0' ) ); // true
+$caret_constraint->complies( new Version( '6.4.34' ) ); // false
+
+$tilde_constraint = $parser->parse( '~1.1.0' );
+
+$tilde_constraint->complies( new Version( '1.1.4' ) ); // true
+$tilde_constraint->complies( new Version( '1.2.0' ) ); // false
+```
+
+As of version 2.0.0, pre-release labels are supported and taken into account when comparing versions:
+
+```php
+
+$leftVersion = new PharIo\Version\Version('3.0.0-alpha.1');
+$rightVersion = new PharIo\Version\Version('3.0.0-alpha.2');
+
+$leftVersion->isGreaterThan($rightVersion); // false
+$rightVersion->isGreaterThan($leftVersion); // true
+
+```
diff --git a/vendor/phar-io/version/composer.json b/vendor/phar-io/version/composer.json
new file mode 100644
index 00000000..22687dcd
--- /dev/null
+++ b/vendor/phar-io/version/composer.json
@@ -0,0 +1,34 @@
+{
+ "name": "phar-io/version",
+ "description": "Library for handling version information and constraints",
+ "license": "BSD-3-Clause",
+ "authors": [
+ {
+ "name": "Arne Blankerts",
+ "email": "arne@blankerts.de",
+ "role": "Developer"
+ },
+ {
+ "name": "Sebastian Heuer",
+ "email": "sebastian@phpeople.de",
+ "role": "Developer"
+ },
+ {
+ "name": "Sebastian Bergmann",
+ "email": "sebastian@phpunit.de",
+ "role": "Developer"
+ }
+ ],
+ "support": {
+ "issues": "https://github.com/phar-io/version/issues"
+ },
+ "require": {
+ "php": "^7.2 || ^8.0"
+ },
+ "autoload": {
+ "classmap": [
+ "src/"
+ ]
+ }
+}
+
diff --git a/vendor/phar-io/version/src/BuildMetaData.php b/vendor/phar-io/version/src/BuildMetaData.php
new file mode 100644
index 00000000..d42f0363
--- /dev/null
+++ b/vendor/phar-io/version/src/BuildMetaData.php
@@ -0,0 +1,28 @@
+, Sebastian Heuer , Sebastian Bergmann
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+namespace PharIo\Version;
+
+class BuildMetaData {
+
+ /** @var string */
+ private $value;
+
+ public function __construct(string $value) {
+ $this->value = $value;
+ }
+
+ public function asString(): string {
+ return $this->value;
+ }
+
+ public function equals(BuildMetaData $other): bool {
+ return $this->asString() === $other->asString();
+ }
+}
diff --git a/vendor/phar-io/version/src/PreReleaseSuffix.php b/vendor/phar-io/version/src/PreReleaseSuffix.php
new file mode 100644
index 00000000..00563008
--- /dev/null
+++ b/vendor/phar-io/version/src/PreReleaseSuffix.php
@@ -0,0 +1,82 @@
+ 0,
+ 'a' => 1,
+ 'alpha' => 1,
+ 'b' => 2,
+ 'beta' => 2,
+ 'rc' => 3,
+ 'p' => 4,
+ 'pl' => 4,
+ 'patch' => 4,
+ ];
+
+ /** @var string */
+ private $value;
+
+ /** @var int */
+ private $valueScore;
+
+ /** @var int */
+ private $number = 0;
+
+ /** @var string */
+ private $full;
+
+ /**
+ * @throws InvalidPreReleaseSuffixException
+ */
+ public function __construct(string $value) {
+ $this->parseValue($value);
+ }
+
+ public function asString(): string {
+ return $this->full;
+ }
+
+ public function getValue(): string {
+ return $this->value;
+ }
+
+ public function getNumber(): ?int {
+ return $this->number;
+ }
+
+ public function isGreaterThan(PreReleaseSuffix $suffix): bool {
+ if ($this->valueScore > $suffix->valueScore) {
+ return true;
+ }
+
+ if ($this->valueScore < $suffix->valueScore) {
+ return false;
+ }
+
+ return $this->getNumber() > $suffix->getNumber();
+ }
+
+ private function mapValueToScore(string $value): int {
+ $value = \strtolower($value);
+
+ return self::valueScoreMap[$value];
+ }
+
+ private function parseValue(string $value): void {
+ $regex = '/-?((dev|beta|b|rc|alpha|a|patch|p|pl)\.?(\d*)).*$/i';
+
+ if (\preg_match($regex, $value, $matches) !== 1) {
+ throw new InvalidPreReleaseSuffixException(\sprintf('Invalid label %s', $value));
+ }
+
+ $this->full = $matches[1];
+ $this->value = $matches[2];
+
+ if ($matches[3] !== '') {
+ $this->number = (int)$matches[3];
+ }
+
+ $this->valueScore = $this->mapValueToScore($matches[2]);
+ }
+}
diff --git a/vendor/phar-io/version/src/Version.php b/vendor/phar-io/version/src/Version.php
new file mode 100644
index 00000000..644af5ca
--- /dev/null
+++ b/vendor/phar-io/version/src/Version.php
@@ -0,0 +1,208 @@
+, Sebastian Heuer , Sebastian Bergmann
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+namespace PharIo\Version;
+
+class Version {
+ /** @var string */
+ private $originalVersionString;
+
+ /** @var VersionNumber */
+ private $major;
+
+ /** @var VersionNumber */
+ private $minor;
+
+ /** @var VersionNumber */
+ private $patch;
+
+ /** @var null|PreReleaseSuffix */
+ private $preReleaseSuffix;
+
+ /** @var null|BuildMetaData */
+ private $buildMetadata;
+
+ public function __construct(string $versionString) {
+ $this->ensureVersionStringIsValid($versionString);
+ $this->originalVersionString = $versionString;
+ }
+
+ /**
+ * @throws NoPreReleaseSuffixException
+ */
+ public function getPreReleaseSuffix(): PreReleaseSuffix {
+ if ($this->preReleaseSuffix === null) {
+ throw new NoPreReleaseSuffixException('No pre-release suffix set');
+ }
+
+ return $this->preReleaseSuffix;
+ }
+
+ public function getOriginalString(): string {
+ return $this->originalVersionString;
+ }
+
+ public function getVersionString(): string {
+ $str = \sprintf(
+ '%d.%d.%d',
+ $this->getMajor()->getValue() ?? 0,
+ $this->getMinor()->getValue() ?? 0,
+ $this->getPatch()->getValue() ?? 0
+ );
+
+ if (!$this->hasPreReleaseSuffix()) {
+ return $str;
+ }
+
+ return $str . '-' . $this->getPreReleaseSuffix()->asString();
+ }
+
+ public function hasPreReleaseSuffix(): bool {
+ return $this->preReleaseSuffix !== null;
+ }
+
+ public function equals(Version $other): bool {
+ if ($this->getVersionString() !== $other->getVersionString()) {
+ return false;
+ }
+
+ if ($this->hasBuildMetaData() !== $other->hasBuildMetaData()) {
+ return false;
+ }
+
+ if ($this->hasBuildMetaData() && $other->hasBuildMetaData() &&
+ !$this->getBuildMetaData()->equals($other->getBuildMetaData())) {
+ return false;
+ }
+
+ return true;
+ }
+
+ public function isGreaterThan(Version $version): bool {
+ if ($version->getMajor()->getValue() > $this->getMajor()->getValue()) {
+ return false;
+ }
+
+ if ($version->getMajor()->getValue() < $this->getMajor()->getValue()) {
+ return true;
+ }
+
+ if ($version->getMinor()->getValue() > $this->getMinor()->getValue()) {
+ return false;
+ }
+
+ if ($version->getMinor()->getValue() < $this->getMinor()->getValue()) {
+ return true;
+ }
+
+ if ($version->getPatch()->getValue() > $this->getPatch()->getValue()) {
+ return false;
+ }
+
+ if ($version->getPatch()->getValue() < $this->getPatch()->getValue()) {
+ return true;
+ }
+
+ if (!$version->hasPreReleaseSuffix() && !$this->hasPreReleaseSuffix()) {
+ return false;
+ }
+
+ if ($version->hasPreReleaseSuffix() && !$this->hasPreReleaseSuffix()) {
+ return true;
+ }
+
+ if (!$version->hasPreReleaseSuffix() && $this->hasPreReleaseSuffix()) {
+ return false;
+ }
+
+ return $this->getPreReleaseSuffix()->isGreaterThan($version->getPreReleaseSuffix());
+ }
+
+ public function getMajor(): VersionNumber {
+ return $this->major;
+ }
+
+ public function getMinor(): VersionNumber {
+ return $this->minor;
+ }
+
+ public function getPatch(): VersionNumber {
+ return $this->patch;
+ }
+
+ /**
+ * @psalm-assert-if-true BuildMetaData $this->buildMetadata
+ * @psalm-assert-if-true BuildMetaData $this->getBuildMetaData()
+ */
+ public function hasBuildMetaData(): bool {
+ return $this->buildMetadata !== null;
+ }
+
+ /**
+ * @throws NoBuildMetaDataException
+ */
+ public function getBuildMetaData(): BuildMetaData {
+ if (!$this->hasBuildMetaData()) {
+ throw new NoBuildMetaDataException('No build metadata set');
+ }
+
+ return $this->buildMetadata;
+ }
+
+ /**
+ * @param string[] $matches
+ *
+ * @throws InvalidPreReleaseSuffixException
+ */
+ private function parseVersion(array $matches): void {
+ $this->major = new VersionNumber((int)$matches['Major']);
+ $this->minor = new VersionNumber((int)$matches['Minor']);
+ $this->patch = isset($matches['Patch']) ? new VersionNumber((int)$matches['Patch']) : new VersionNumber(0);
+
+ if (isset($matches['PreReleaseSuffix']) && $matches['PreReleaseSuffix'] !== '') {
+ $this->preReleaseSuffix = new PreReleaseSuffix($matches['PreReleaseSuffix']);
+ }
+
+ if (isset($matches['BuildMetadata'])) {
+ $this->buildMetadata = new BuildMetaData($matches['BuildMetadata']);
+ }
+ }
+
+ /**
+ * @param string $version
+ *
+ * @throws InvalidVersionException
+ */
+ private function ensureVersionStringIsValid($version): void {
+ $regex = '/^v?
+ (?P0|[1-9]\d*)
+ \\.
+ (?P0|[1-9]\d*)
+ (\\.
+ (?P0|[1-9]\d*)
+ )?
+ (?:
+ -
+ (?(?:(dev|beta|b|rc|alpha|a|patch|p|pl)\.?\d*))
+ )?
+ (?:
+ \\+
+ (?P[0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-@]+)*)
+ )?
+ $/xi';
+
+ if (\preg_match($regex, $version, $matches) !== 1) {
+ throw new InvalidVersionException(
+ \sprintf("Version string '%s' does not follow SemVer semantics", $version)
+ );
+ }
+
+ $this->parseVersion($matches);
+ }
+}
diff --git a/vendor/phar-io/version/src/VersionConstraintParser.php b/vendor/phar-io/version/src/VersionConstraintParser.php
new file mode 100644
index 00000000..03d6a095
--- /dev/null
+++ b/vendor/phar-io/version/src/VersionConstraintParser.php
@@ -0,0 +1,115 @@
+, Sebastian Heuer , Sebastian Bergmann
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+namespace PharIo\Version;
+
+class VersionConstraintParser {
+ /**
+ * @throws UnsupportedVersionConstraintException
+ */
+ public function parse(string $value): VersionConstraint {
+ if (\strpos($value, '|') !== false) {
+ return $this->handleOrGroup($value);
+ }
+
+ if (!\preg_match('/^[\^~*]?v?[\d.*]+(?:-.*)?$/i', $value)) {
+ throw new UnsupportedVersionConstraintException(
+ \sprintf('Version constraint %s is not supported.', $value)
+ );
+ }
+
+ switch ($value[0]) {
+ case '~':
+ return $this->handleTildeOperator($value);
+ case '^':
+ return $this->handleCaretOperator($value);
+ }
+
+ $constraint = new VersionConstraintValue($value);
+
+ if ($constraint->getMajor()->isAny()) {
+ return new AnyVersionConstraint();
+ }
+
+ if ($constraint->getMinor()->isAny()) {
+ return new SpecificMajorVersionConstraint(
+ $constraint->getVersionString(),
+ $constraint->getMajor()->getValue() ?? 0
+ );
+ }
+
+ if ($constraint->getPatch()->isAny()) {
+ return new SpecificMajorAndMinorVersionConstraint(
+ $constraint->getVersionString(),
+ $constraint->getMajor()->getValue() ?? 0,
+ $constraint->getMinor()->getValue() ?? 0
+ );
+ }
+
+ return new ExactVersionConstraint($constraint->getVersionString());
+ }
+
+ private function handleOrGroup(string $value): OrVersionConstraintGroup {
+ $constraints = [];
+
+ foreach (\preg_split('{\s*\|\|?\s*}', \trim($value)) as $groupSegment) {
+ $constraints[] = $this->parse(\trim($groupSegment));
+ }
+
+ return new OrVersionConstraintGroup($value, $constraints);
+ }
+
+ private function handleTildeOperator(string $value): AndVersionConstraintGroup {
+ $constraintValue = new VersionConstraintValue(\substr($value, 1));
+
+ if ($constraintValue->getPatch()->isAny()) {
+ return $this->handleCaretOperator($value);
+ }
+
+ $constraints = [
+ new GreaterThanOrEqualToVersionConstraint(
+ $value,
+ new Version(\substr($value, 1))
+ ),
+ new SpecificMajorAndMinorVersionConstraint(
+ $value,
+ $constraintValue->getMajor()->getValue() ?? 0,
+ $constraintValue->getMinor()->getValue() ?? 0
+ )
+ ];
+
+ return new AndVersionConstraintGroup($value, $constraints);
+ }
+
+ private function handleCaretOperator(string $value): AndVersionConstraintGroup {
+ $constraintValue = new VersionConstraintValue(\substr($value, 1));
+
+ $constraints = [
+ new GreaterThanOrEqualToVersionConstraint($value, new Version(\substr($value, 1)))
+ ];
+
+ if ($constraintValue->getMajor()->getValue() === 0) {
+ $constraints[] = new SpecificMajorAndMinorVersionConstraint(
+ $value,
+ $constraintValue->getMajor()->getValue() ?? 0,
+ $constraintValue->getMinor()->getValue() ?? 0
+ );
+ } else {
+ $constraints[] = new SpecificMajorVersionConstraint(
+ $value,
+ $constraintValue->getMajor()->getValue() ?? 0
+ );
+ }
+
+ return new AndVersionConstraintGroup(
+ $value,
+ $constraints
+ );
+ }
+}
diff --git a/vendor/phar-io/version/src/VersionConstraintValue.php b/vendor/phar-io/version/src/VersionConstraintValue.php
new file mode 100644
index 00000000..0762e7c0
--- /dev/null
+++ b/vendor/phar-io/version/src/VersionConstraintValue.php
@@ -0,0 +1,88 @@
+versionString = $versionString;
+
+ $this->parseVersion($versionString);
+ }
+
+ public function getLabel(): string {
+ return $this->label;
+ }
+
+ public function getBuildMetaData(): string {
+ return $this->buildMetaData;
+ }
+
+ public function getVersionString(): string {
+ return $this->versionString;
+ }
+
+ public function getMajor(): VersionNumber {
+ return $this->major;
+ }
+
+ public function getMinor(): VersionNumber {
+ return $this->minor;
+ }
+
+ public function getPatch(): VersionNumber {
+ return $this->patch;
+ }
+
+ private function parseVersion(string $versionString): void {
+ $this->extractBuildMetaData($versionString);
+ $this->extractLabel($versionString);
+ $this->stripPotentialVPrefix($versionString);
+
+ $versionSegments = \explode('.', $versionString);
+ $this->major = new VersionNumber(\is_numeric($versionSegments[0]) ? (int)$versionSegments[0] : null);
+
+ $minorValue = isset($versionSegments[1]) && \is_numeric($versionSegments[1]) ? (int)$versionSegments[1] : null;
+ $patchValue = isset($versionSegments[2]) && \is_numeric($versionSegments[2]) ? (int)$versionSegments[2] : null;
+
+ $this->minor = new VersionNumber($minorValue);
+ $this->patch = new VersionNumber($patchValue);
+ }
+
+ private function extractBuildMetaData(string &$versionString): void {
+ if (\preg_match('/\+(.*)/', $versionString, $matches) === 1) {
+ $this->buildMetaData = $matches[1];
+ $versionString = \str_replace($matches[0], '', $versionString);
+ }
+ }
+
+ private function extractLabel(string &$versionString): void {
+ if (\preg_match('/-(.*)/', $versionString, $matches) === 1) {
+ $this->label = $matches[1];
+ $versionString = \str_replace($matches[0], '', $versionString);
+ }
+ }
+
+ private function stripPotentialVPrefix(string &$versionString): void {
+ if ($versionString[0] !== 'v') {
+ return;
+ }
+ $versionString = \substr($versionString, 1);
+ }
+}
diff --git a/vendor/phar-io/version/src/VersionNumber.php b/vendor/phar-io/version/src/VersionNumber.php
new file mode 100644
index 00000000..4833a9b0
--- /dev/null
+++ b/vendor/phar-io/version/src/VersionNumber.php
@@ -0,0 +1,28 @@
+, Sebastian Heuer , Sebastian Bergmann
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+namespace PharIo\Version;
+
+class VersionNumber {
+
+ /** @var ?int */
+ private $value;
+
+ public function __construct(?int $value) {
+ $this->value = $value;
+ }
+
+ public function isAny(): bool {
+ return $this->value === null;
+ }
+
+ public function getValue(): ?int {
+ return $this->value;
+ }
+}
diff --git a/vendor/phar-io/version/src/constraints/AbstractVersionConstraint.php b/vendor/phar-io/version/src/constraints/AbstractVersionConstraint.php
new file mode 100644
index 00000000..66201a14
--- /dev/null
+++ b/vendor/phar-io/version/src/constraints/AbstractVersionConstraint.php
@@ -0,0 +1,23 @@
+, Sebastian Heuer , Sebastian Bergmann
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+namespace PharIo\Version;
+
+abstract class AbstractVersionConstraint implements VersionConstraint {
+ /** @var string */
+ private $originalValue;
+
+ public function __construct(string $originalValue) {
+ $this->originalValue = $originalValue;
+ }
+
+ public function asString(): string {
+ return $this->originalValue;
+ }
+}
diff --git a/vendor/phar-io/version/src/constraints/AndVersionConstraintGroup.php b/vendor/phar-io/version/src/constraints/AndVersionConstraintGroup.php
new file mode 100644
index 00000000..5096f2fb
--- /dev/null
+++ b/vendor/phar-io/version/src/constraints/AndVersionConstraintGroup.php
@@ -0,0 +1,34 @@
+, Sebastian Heuer , Sebastian Bergmann
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+namespace PharIo\Version;
+
+class AndVersionConstraintGroup extends AbstractVersionConstraint {
+ /** @var VersionConstraint[] */
+ private $constraints = [];
+
+ /**
+ * @param VersionConstraint[] $constraints
+ */
+ public function __construct(string $originalValue, array $constraints) {
+ parent::__construct($originalValue);
+
+ $this->constraints = $constraints;
+ }
+
+ public function complies(Version $version): bool {
+ foreach ($this->constraints as $constraint) {
+ if (!$constraint->complies($version)) {
+ return false;
+ }
+ }
+
+ return true;
+ }
+}
diff --git a/vendor/phar-io/version/src/constraints/AnyVersionConstraint.php b/vendor/phar-io/version/src/constraints/AnyVersionConstraint.php
new file mode 100644
index 00000000..1499f071
--- /dev/null
+++ b/vendor/phar-io/version/src/constraints/AnyVersionConstraint.php
@@ -0,0 +1,20 @@
+, Sebastian Heuer , Sebastian Bergmann
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+namespace PharIo\Version;
+
+class AnyVersionConstraint implements VersionConstraint {
+ public function complies(Version $version): bool {
+ return true;
+ }
+
+ public function asString(): string {
+ return '*';
+ }
+}
diff --git a/vendor/phar-io/version/src/constraints/ExactVersionConstraint.php b/vendor/phar-io/version/src/constraints/ExactVersionConstraint.php
new file mode 100644
index 00000000..1d675c9c
--- /dev/null
+++ b/vendor/phar-io/version/src/constraints/ExactVersionConstraint.php
@@ -0,0 +1,22 @@
+, Sebastian Heuer , Sebastian Bergmann
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+namespace PharIo\Version;
+
+class ExactVersionConstraint extends AbstractVersionConstraint {
+ public function complies(Version $version): bool {
+ $other = $version->getVersionString();
+
+ if ($version->hasBuildMetaData()) {
+ $other .= '+' . $version->getBuildMetaData()->asString();
+ }
+
+ return $this->asString() === $other;
+ }
+}
diff --git a/vendor/phar-io/version/src/constraints/GreaterThanOrEqualToVersionConstraint.php b/vendor/phar-io/version/src/constraints/GreaterThanOrEqualToVersionConstraint.php
new file mode 100644
index 00000000..ec371723
--- /dev/null
+++ b/vendor/phar-io/version/src/constraints/GreaterThanOrEqualToVersionConstraint.php
@@ -0,0 +1,26 @@
+, Sebastian Heuer , Sebastian Bergmann
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+namespace PharIo\Version;
+
+class GreaterThanOrEqualToVersionConstraint extends AbstractVersionConstraint {
+ /** @var Version */
+ private $minimalVersion;
+
+ public function __construct(string $originalValue, Version $minimalVersion) {
+ parent::__construct($originalValue);
+
+ $this->minimalVersion = $minimalVersion;
+ }
+
+ public function complies(Version $version): bool {
+ return $version->getVersionString() === $this->minimalVersion->getVersionString()
+ || $version->isGreaterThan($this->minimalVersion);
+ }
+}
diff --git a/vendor/phar-io/version/src/constraints/OrVersionConstraintGroup.php b/vendor/phar-io/version/src/constraints/OrVersionConstraintGroup.php
new file mode 100644
index 00000000..59fd382f
--- /dev/null
+++ b/vendor/phar-io/version/src/constraints/OrVersionConstraintGroup.php
@@ -0,0 +1,35 @@
+, Sebastian Heuer , Sebastian Bergmann
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+namespace PharIo\Version;
+
+class OrVersionConstraintGroup extends AbstractVersionConstraint {
+ /** @var VersionConstraint[] */
+ private $constraints = [];
+
+ /**
+ * @param string $originalValue
+ * @param VersionConstraint[] $constraints
+ */
+ public function __construct($originalValue, array $constraints) {
+ parent::__construct($originalValue);
+
+ $this->constraints = $constraints;
+ }
+
+ public function complies(Version $version): bool {
+ foreach ($this->constraints as $constraint) {
+ if ($constraint->complies($version)) {
+ return true;
+ }
+ }
+
+ return false;
+ }
+}
diff --git a/vendor/phar-io/version/src/constraints/SpecificMajorAndMinorVersionConstraint.php b/vendor/phar-io/version/src/constraints/SpecificMajorAndMinorVersionConstraint.php
new file mode 100644
index 00000000..302aa311
--- /dev/null
+++ b/vendor/phar-io/version/src/constraints/SpecificMajorAndMinorVersionConstraint.php
@@ -0,0 +1,33 @@
+, Sebastian Heuer , Sebastian Bergmann
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+namespace PharIo\Version;
+
+class SpecificMajorAndMinorVersionConstraint extends AbstractVersionConstraint {
+ /** @var int */
+ private $major;
+
+ /** @var int */
+ private $minor;
+
+ public function __construct(string $originalValue, int $major, int $minor) {
+ parent::__construct($originalValue);
+
+ $this->major = $major;
+ $this->minor = $minor;
+ }
+
+ public function complies(Version $version): bool {
+ if ($version->getMajor()->getValue() !== $this->major) {
+ return false;
+ }
+
+ return $version->getMinor()->getValue() === $this->minor;
+ }
+}
diff --git a/vendor/phar-io/version/src/constraints/SpecificMajorVersionConstraint.php b/vendor/phar-io/version/src/constraints/SpecificMajorVersionConstraint.php
new file mode 100644
index 00000000..968b809c
--- /dev/null
+++ b/vendor/phar-io/version/src/constraints/SpecificMajorVersionConstraint.php
@@ -0,0 +1,25 @@
+, Sebastian Heuer , Sebastian Bergmann
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+namespace PharIo\Version;
+
+class SpecificMajorVersionConstraint extends AbstractVersionConstraint {
+ /** @var int */
+ private $major;
+
+ public function __construct(string $originalValue, int $major) {
+ parent::__construct($originalValue);
+
+ $this->major = $major;
+ }
+
+ public function complies(Version $version): bool {
+ return $version->getMajor()->getValue() === $this->major;
+ }
+}
diff --git a/vendor/phar-io/version/src/constraints/VersionConstraint.php b/vendor/phar-io/version/src/constraints/VersionConstraint.php
new file mode 100644
index 00000000..e94f9e00
--- /dev/null
+++ b/vendor/phar-io/version/src/constraints/VersionConstraint.php
@@ -0,0 +1,16 @@
+, Sebastian Heuer , Sebastian Bergmann
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+namespace PharIo\Version;
+
+interface VersionConstraint {
+ public function complies(Version $version): bool;
+
+ public function asString(): string;
+}
diff --git a/vendor/phar-io/version/src/exceptions/Exception.php b/vendor/phar-io/version/src/exceptions/Exception.php
new file mode 100644
index 00000000..3ea458f3
--- /dev/null
+++ b/vendor/phar-io/version/src/exceptions/Exception.php
@@ -0,0 +1,15 @@
+, Sebastian Heuer , Sebastian Bergmann
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+namespace PharIo\Version;
+
+use Throwable;
+
+interface Exception extends Throwable {
+}
diff --git a/vendor/phar-io/version/src/exceptions/InvalidPreReleaseSuffixException.php b/vendor/phar-io/version/src/exceptions/InvalidPreReleaseSuffixException.php
new file mode 100644
index 00000000..bc0b0c3e
--- /dev/null
+++ b/vendor/phar-io/version/src/exceptions/InvalidPreReleaseSuffixException.php
@@ -0,0 +1,5 @@
+, Sebastian Heuer , Sebastian Bergmann
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+namespace PharIo\Version;
+
+final class UnsupportedVersionConstraintException extends \RuntimeException implements Exception {
+}
diff --git a/vendor/php-stubs/wordpress-stubs/LICENSE b/vendor/php-stubs/wordpress-stubs/LICENSE
new file mode 100644
index 00000000..84b563a5
--- /dev/null
+++ b/vendor/php-stubs/wordpress-stubs/LICENSE
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2019 Viktor Szépe
+
+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/php-stubs/wordpress-stubs/composer.json b/vendor/php-stubs/wordpress-stubs/composer.json
new file mode 100644
index 00000000..c71c1e58
--- /dev/null
+++ b/vendor/php-stubs/wordpress-stubs/composer.json
@@ -0,0 +1,37 @@
+{
+ "name": "php-stubs/wordpress-stubs",
+ "description": "WordPress function and class declaration stubs for static analysis.",
+ "license": "MIT",
+ "keywords": [
+ "wordpress",
+ "static analysis",
+ "phpstan"
+ ],
+ "homepage": "https://github.com/php-stubs/wordpress-stubs",
+ "require-dev": {
+ "php": "~7.3 || ~8.0",
+ "nikic/php-parser": "< 4.12.0",
+ "php-stubs/generator": "^0.8.3",
+ "phpdocumentor/reflection-docblock": "^5.3",
+ "phpstan/phpstan": "^1.2"
+ },
+ "suggest": {
+ "paragonie/sodium_compat": "Pure PHP implementation of libsodium",
+ "symfony/polyfill-php73": "Symfony polyfill backporting some PHP 7.3+ features to lower PHP versions",
+ "szepeviktor/phpstan-wordpress": "WordPress extensions for PHPStan"
+ },
+ "minimum-stability": "stable",
+ "config": {
+ "allow-plugins": {
+ "php-stubs/generator": true
+ }
+ },
+ "scripts": {
+ "post-install-cmd": "@composer --working-dir=source/ update --no-interaction",
+ "post-update-cmd": "@composer --working-dir=source/ update --no-interaction",
+ "cleanup": "git status --short --ignored | sed -n -e 's#^!! ##p' | xargs -r rm -vrf"
+ },
+ "scripts-descriptions": {
+ "cleanup": "Remove all ignored files."
+ }
+}
diff --git a/vendor/php-stubs/wordpress-stubs/functionMap.php b/vendor/php-stubs/wordpress-stubs/functionMap.php
new file mode 100644
index 00000000..4e4dcec4
--- /dev/null
+++ b/vendor/php-stubs/wordpress-stubs/functionMap.php
@@ -0,0 +1,49 @@
+, filename: string|null, http_response: \WP_HTTP_Requests_Response}|\WP_Error';
+$cronArgsType = 'list';
+
+/**
+ * This array is in the same format as the function map array in PHPStan:
+ *
+ * '' => ['', ''=>'']
+ *
+ * @link https://github.com/phpstan/phpstan-src/blob/1.5.x/resources/functionMap.php
+ */
+return [
+ 'add_meta_box' => ['void', 'context'=>'"normal"|"side"|"advanced"', 'priority'=>'"high"|"core"|"default"|"low"'],
+ 'addslashes_gpc' => ['T', '@phpstan-template'=>'T', 'gpc'=>'T'],
+ 'rawurlencode_deep' => ['T', '@phpstan-template'=>'T', 'value'=>'T'],
+ 'remove_meta_box' => ['void', 'context'=>'"normal"|"side"|"advanced"'],
+ 'sanitize_category' => ['T', '@phpstan-template'=>'T of array|object', 'category'=>'T'],
+ 'sanitize_post' => ['T', '@phpstan-template'=>'T of array|object', 'post'=>'T'],
+ 'sanitize_term' => ['T', '@phpstan-template'=>'T of array|object', 'term'=>'T'],
+ 'stripslashes_deep' => ['T', '@phpstan-template'=>'T', 'value'=>'T'],
+ 'urldecode_deep' => ['T', '@phpstan-template'=>'T', 'value'=>'T'],
+ 'urlencode_deep' => ['T', '@phpstan-template'=>'T', 'value'=>'T'],
+ 'wp_clear_scheduled_hook' => ['int|false|WP_Error', 'args'=>$cronArgsType],
+ 'wp_get_schedule' => ['string|false', 'args'=>$cronArgsType],
+ 'wp_get_scheduled_event' => ['object|false', 'args'=>$cronArgsType],
+ 'WP_Http::get' => [$httpReturnType],
+ 'WP_Http::head' => [$httpReturnType],
+ 'WP_Http::post' => [$httpReturnType],
+ 'WP_Http::request' => [$httpReturnType],
+ 'WP_List_Table::bulk_actions' => ['void', 'which'=>'"top"|"bottom"'],
+ 'WP_List_Table::display_tablenav' => ['void', 'which'=>'"top"|"bottom"'],
+ 'WP_List_Table::pagination' => ['void', 'which'=>'"top"|"bottom"'],
+ 'wp_next_scheduled' => ['int|false', 'args'=>$cronArgsType],
+ 'wp_remote_get' => [$httpReturnType],
+ 'wp_remote_head' => [$httpReturnType],
+ 'wp_remote_post' => [$httpReturnType],
+ 'wp_remote_request' => [$httpReturnType],
+ 'wp_reschedule_event' => ['bool|WP_Error', 'args'=>$cronArgsType],
+ 'wp_safe_remote_get' => [$httpReturnType],
+ 'wp_safe_remote_head' => [$httpReturnType],
+ 'wp_safe_remote_post' => [$httpReturnType],
+ 'wp_safe_remote_request' => [$httpReturnType],
+ 'wp_schedule_event' => ['bool|WP_Error', 'args'=>$cronArgsType],
+ 'wp_schedule_single_event' => ['bool|WP_Error', 'args'=>$cronArgsType],
+ 'wp_slash' => ['T', '@phpstan-template'=>'T', 'value'=>'T'],
+ 'wp_unschedule_event' => ['bool|WP_Error', 'args'=>$cronArgsType],
+ 'wp_unslash' => ['T', '@phpstan-template'=>'T', 'value'=>'T'],
+];
diff --git a/vendor/php-stubs/wordpress-stubs/phpstan.neon b/vendor/php-stubs/wordpress-stubs/phpstan.neon
new file mode 100644
index 00000000..f83f2f0b
--- /dev/null
+++ b/vendor/php-stubs/wordpress-stubs/phpstan.neon
@@ -0,0 +1,5 @@
+parameters:
+ level: 8
+ paths:
+ - finder.php
+ - visitor.php
diff --git a/vendor/php-stubs/wordpress-stubs/source/.gitignore b/vendor/php-stubs/wordpress-stubs/source/.gitignore
new file mode 100644
index 00000000..2ea50ef7
--- /dev/null
+++ b/vendor/php-stubs/wordpress-stubs/source/.gitignore
@@ -0,0 +1,3 @@
+*
+!/.gitignore
+!/composer.json
diff --git a/vendor/php-stubs/wordpress-stubs/source/composer.json b/vendor/php-stubs/wordpress-stubs/source/composer.json
new file mode 100644
index 00000000..77e932a1
--- /dev/null
+++ b/vendor/php-stubs/wordpress-stubs/source/composer.json
@@ -0,0 +1,18 @@
+{
+ "require": {
+ "php": "~7.3 || ~8.0",
+ "ext-gettext": "*",
+ "ext-hash": "*",
+ "ext-json": "*",
+ "ext-mbstring": "*",
+ "ext-openssl": "*",
+ "ext-sodium": "*",
+ "johnpbloch/wordpress": "6.1.1"
+ },
+ "minimum-stability": "stable",
+ "config": {
+ "allow-plugins": {
+ "johnpbloch/wordpress-core-installer": true
+ }
+ }
+}
diff --git a/vendor/php-stubs/wordpress-stubs/visitor.php b/vendor/php-stubs/wordpress-stubs/visitor.php
new file mode 100644
index 00000000..5b536ae0
--- /dev/null
+++ b/vendor/php-stubs/wordpress-stubs/visitor.php
@@ -0,0 +1,887 @@
+children as $child) {
+ if ($child->name === null) {
+ return false;
+ }
+ }
+
+ return true;
+ }
+
+ public function isMixedShape(): bool
+ {
+ $hasStaticKey = false;
+
+ foreach ($this->children as $child) {
+ if ($child->name !== null) {
+ $hasStaticKey = true;
+ } elseif ($hasStaticKey) {
+ return true;
+ }
+ }
+
+ return false;
+ }
+}
+
+final class WordPressTag extends WithChildren
+{
+ /**
+ * @var string
+ */
+ public $tag;
+
+ /**
+ * @var string
+ */
+ public $type;
+
+ /**
+ * @var ?string
+ */
+ public $name = null;
+
+ /**
+ * @var ?string
+ */
+ public $description = null;
+
+ /**
+ * @return string[]
+ */
+ public function format(): array
+ {
+ if ($this->isMixedShape()) {
+ return [];
+ }
+
+ $strings = [];
+ $childStrings = [];
+ $level = 1;
+
+ if (! $this->isArrayShape()) {
+ $level = 0;
+ }
+
+ foreach ($this->children as $child) {
+ $childStrings = array_merge($childStrings, $child->format($level));
+ }
+
+ if (count($childStrings) === 0) {
+ return [];
+ }
+
+ $name = ($this->name !== null) ? (' $' . $this->name) : '';
+
+ if ($this->isArrayShape()) {
+ $strings[] = sprintf(
+ '%s %s{',
+ $this->tag,
+ $this->type
+ );
+ } else {
+ if (count($this->children) > 0 && count($this->children[0]->children) > 0) {
+ $strings[] = sprintf(
+ '%s %stag,
+ $this->type
+ );
+ } else {
+ $strings[] = sprintf(
+ '%s array%s',
+ $this->tag,
+ $this->type,
+ $name
+ );
+
+ return $strings;
+ }
+ }
+
+ $strings = array_merge($strings, $childStrings);
+ $description = '';
+
+ if ($this->description !== null) {
+ $description = ' ' . $this->description;
+ }
+
+ if ($this->isArrayShape()) {
+ $strings[] = sprintf(
+ '}%s%s',
+ $name,
+ $description
+ );
+ } else {
+ $strings[] = sprintf(
+ '}>%s%s',
+ $name,
+ $description
+ );
+ }
+
+ return $strings;
+ }
+}
+
+final class WordPressArg extends WithChildren
+{
+ /**
+ * @var string
+ */
+ public $type;
+
+ /**
+ * @var bool
+ */
+ public $optional = false;
+
+ /**
+ * @var ?string
+ */
+ public $name = null;
+
+ /**
+ * @return string[]
+ */
+ public function format(int $level = 1): array
+ {
+ $strings = [];
+ $padding = str_repeat(' ', ($level * 2));
+
+ if ($this->isMixedShape()) {
+ return [];
+ }
+
+ if (count($this->children) > 0) {
+ $childStrings = [];
+
+ foreach ($this->children as $child) {
+ $childStrings = array_merge($childStrings, $child->format($level + 1));
+ }
+
+ if (count($childStrings) === 0) {
+ return [];
+ }
+
+ if ($this->isArrayShape()) {
+ if ($this->name !== null) {
+ $strings[] = sprintf(
+ '%s%s%s: %s{',
+ $padding,
+ $this->name,
+ ($this->optional) ? '?' : '',
+ $this->type
+ );
+ }
+ } else {
+ $strings[] = sprintf(
+ '%s%s%s: arrayname,
+ ($this->optional) ? '?' : '',
+ $this->type
+ );
+ }
+
+ $strings = array_merge($strings, $childStrings);
+
+ if ($this->isArrayShape()) {
+ if ($this->name !== null) {
+ $strings[] = $padding . '},';
+ }
+ } else {
+ $strings[] = $padding . '}>,';
+ }
+ } else {
+ $strings[] = sprintf(
+ '%s%s%s: %s,',
+ $padding,
+ $this->name,
+ ($this->optional) ? '?' : '',
+ $this->type
+ );
+ }
+
+ return $strings;
+ }
+}
+
+return new class extends NodeVisitor {
+
+ /**
+ * @var \phpDocumentor\Reflection\DocBlockFactory
+ */
+ private $docBlockFactory;
+
+ /**
+ * @var ?array>
+ */
+ private $functionMap = null;
+
+ /**
+ * @var array>
+ */
+ private $additionalTags = [];
+
+ /**
+ * @var array>
+ */
+ private $additionalTagStrings = [];
+
+ public function __construct()
+ {
+ $this->docBlockFactory = \phpDocumentor\Reflection\DocBlockFactory::createInstance();
+ }
+
+ public function enterNode(Node $node)
+ {
+ parent::enterNode($node);
+
+ if (!($node instanceof Function_) && !($node instanceof ClassMethod) && !($node instanceof Property)) {
+ return null;
+ }
+
+ $docComment = $node->getDocComment();
+
+ if (!($docComment instanceof Doc)) {
+ return null;
+ }
+
+ $symbolName = self::getNodeName($node);
+
+ if ($node instanceof ClassMethod) {
+ /** @var \PhpParser\Node\Stmt\Class_ $parent */
+ $parent = $this->stack[count($this->stack) - 2];
+
+ if (isset($parent->name)) {
+ $symbolName = sprintf(
+ '%1$s::%2$s',
+ $parent->name->name,
+ $node->name->name
+ );
+ }
+ }
+
+ $additions = $this->generateAdditionalTagsFromDoc($docComment);
+ $node->setAttribute('fullSymbolName', $symbolName);
+
+ if (count($additions) > 0) {
+ $this->additionalTags[ $symbolName ] = $additions;
+ }
+
+ $additions = $this->getAdditionalTagsFromMap($symbolName);
+
+ if (count($additions) > 0) {
+ $this->additionalTagStrings[ $symbolName ] = $additions;
+ }
+
+ return null;
+ }
+
+ private static function getNodeName(Node $node): string
+ {
+ if (($node instanceof Function_) || ($node instanceof ClassMethod)) {
+ return $node->name->name;
+ }
+
+ if ($node instanceof Property) {
+ return sprintf(
+ 'property_%s',
+ uniqid()
+ );
+ }
+
+ return '';
+ }
+
+ /**
+ * @return Node[]
+ */
+ public function getStubStmts(): array
+ {
+ $stmts = parent::getStubStmts();
+
+ foreach ($stmts as $stmt) {
+ $this->postProcessNode($stmt);
+ }
+
+ return $stmts;
+ }
+
+ private function postProcessNode(Node $node): void
+ {
+ if (isset($node->stmts) && is_array($node->stmts)) {
+ foreach ($node->stmts as $stmt) {
+ $this->postProcessNode($stmt);
+ }
+ }
+
+ if (! ($node instanceof Function_) && ! ($node instanceof ClassMethod) && ! ($node instanceof Property)) {
+ return;
+ }
+
+ $name = $node->getAttribute('fullSymbolName');
+
+ if ($name === null) {
+ return;
+ }
+
+ $docComment = $node->getDocComment();
+
+ if (!($docComment instanceof Doc)) {
+ return;
+ }
+
+ $newDocComment = $this->addTags($name, $docComment);
+
+ if ($newDocComment !== null) {
+ $node->setDocComment($newDocComment);
+ }
+
+ if (! isset($this->additionalTagStrings[ $name ])) {
+ return;
+ }
+
+ $docComment = $node->getDocComment();
+
+ if (!($docComment instanceof Doc)) {
+ return;
+ }
+
+ $newDocComment = $this->addStringTags($name, $docComment);
+
+ if ($newDocComment !== null) {
+ $node->setDocComment($newDocComment);
+ }
+ }
+
+ /**
+ * @return array
+ */
+ private function generateAdditionalTagsFromDoc(Doc $docComment): array
+ {
+ $docCommentText = $docComment->getText();
+
+ try {
+ $docblock = $this->docBlockFactory->create($docCommentText);
+ } catch ( \RuntimeException $e ) {
+ return [];
+ } catch ( \InvalidArgumentException $e ) {
+ return [];
+ }
+
+ /** @var \phpDocumentor\Reflection\DocBlock\Tags\Param[] */
+ $params = $docblock->getTagsByName('param');
+
+ /** @var \phpDocumentor\Reflection\DocBlock\Tags\Return_[] */
+ $returns = $docblock->getTagsByName('return');
+
+ /** @var \phpDocumentor\Reflection\DocBlock\Tags\Var_[] */
+ $vars = $docblock->getTagsByName('var');
+
+ /** @var WordPressTag[] $additions */
+ $additions = [];
+
+ foreach ($params as $param) {
+ if (! $param instanceof Param) {
+ continue;
+ }
+
+ $addition = self::getAdditionFromParam($param);
+
+ if ($addition !== null) {
+ $additions[] = $addition;
+ }
+ }
+
+ foreach ($returns as $return) {
+ if (! $return instanceof Return_) {
+ continue;
+ }
+
+ $addition = self::getAdditionFromReturn($return);
+
+ if ($addition !== null) {
+ $additions[] = $addition;
+ }
+ }
+
+ foreach ($vars as $var) {
+ if (! $var instanceof Var_) {
+ continue;
+ }
+
+ $addition = self::getAdditionFromVar($var);
+
+ if ($addition !== null) {
+ $additions[] = $addition;
+ }
+ }
+
+ return $additions;
+ }
+
+ private function addTags(string $name, Doc $docComment): ?Doc
+ {
+ if (isset($this->additionalTags[ $name ])) {
+ $additions = $this->additionalTags[ $name ];
+ } else {
+ $additions = [];
+ }
+
+ $docCommentText = $docComment->getText();
+
+ try {
+ $docblock = $this->docBlockFactory->create($docCommentText);
+ } catch ( \RuntimeException $e ) {
+ return null;
+ } catch ( \InvalidArgumentException $e ) {
+ return null;
+ }
+
+ $additions = $this->discoverInheritedArgs($docblock, $additions);
+
+ /** @var string[] $additionStrings */
+ $additionStrings = array_map( function(WordPressTag $tag): string {
+ $lines = $tag->format();
+
+ if (count($lines) === 0) {
+ return '';
+ }
+
+ return " * " . implode("\n * ", $lines);
+ }, $additions);
+
+ $additionStrings = array_filter($additionStrings);
+
+ if (count($additionStrings) === 0) {
+ return null;
+ }
+
+ $newDocComment = sprintf(
+ "%s\n%s\n */",
+ substr($docCommentText, 0, -4),
+ implode("\n", $additionStrings)
+ );
+
+ return new Doc($newDocComment, $docComment->getStartLine(), $docComment->getStartFilePos());
+ }
+
+ /**
+ * @param array $additions
+ * @return array
+ */
+ private function discoverInheritedArgs(DocBlock $docblock, array $additions): array
+ {
+ /** @var Param[] $params */
+ $params = $docblock->getTagsByName('param');
+
+ $phpStanParams = array_filter($additions, function(WordPressTag $addition): bool {
+ return $addition->tag === '@phpstan-param';
+ });
+
+ foreach ($params as $param) {
+ $inherited = $this->getInheritedTagsForParam($param);
+
+ if (count($inherited) === 0) {
+ continue;
+ }
+
+ foreach ($phpStanParams as $addition) {
+ foreach ($inherited as $inherit) {
+ if ($addition->name !== $inherit->name) {
+ continue;
+ }
+
+ $addition->children = array_merge($addition->children, $inherit->children);
+ continue 3;
+ }
+ }
+
+ $additions = array_merge($additions, $inherited);
+ }
+
+ return $additions;
+ }
+
+ /**
+ * @return array
+ */
+ private function getInheritedTagsForParam(Param $param): array
+ {
+ $type = $param->getType();
+
+ if ($type === null) {
+ return [];
+ }
+
+ $typeName = self::getTypeNameFromType($type);
+
+ if ($typeName === null) {
+ return [];
+ }
+
+ $paramDescription = $param->getDescription();
+
+ if ($paramDescription === null) {
+ return [];
+ }
+
+ list($description) = explode("\n\n", $paramDescription->__toString());
+
+ if (strpos($description, '()') === false) {
+ return [];
+ }
+
+ $description = str_replace("\n", ' ', $description);
+ $additions = [];
+
+ foreach ($this->additionalTags as $symbolName => $tags) {
+ $search = sprintf(
+ 'see %s()',
+ $symbolName
+ );
+
+ if (stripos($description, $search) === false) {
+ continue;
+ }
+
+ $match = self::getMatchingInheritedTag($param, $tags, $symbolName);
+
+ if ($match !== null) {
+ $additions[] = $match;
+ }
+ }
+
+ return $additions;
+ }
+
+ /**
+ * @param array $tags
+ */
+ private static function getMatchingInheritedTag(Param $param, array $tags, string $symbolName): ?WordPressTag
+ {
+ $paramName = $param->getVariableName();
+ $matchNames = [
+ $paramName,
+ 'args',
+ 'options',
+ 'query',
+ ];
+ $matchingTags = array_filter($tags, static function(WordPressTag $tag) use ($matchNames): bool {
+ return in_array($tag->name, $matchNames, true);
+ });
+
+ foreach ($matchingTags as $tag) {
+ $addTag = clone $tag;
+ $addTag->name = $paramName;
+ $addTag->description = sprintf(
+ 'See %s()',
+ $symbolName
+ );
+
+ return $addTag;
+ }
+
+ return null;
+ }
+
+ /**
+ * @return string[]
+ */
+ private function getAdditionalTagsFromMap(string $symbolName): array
+ {
+ if (! isset($this->functionMap)) {
+ $this->functionMap = require __DIR__ . '/functionMap.php';
+ }
+
+ if (! isset($this->functionMap[$symbolName])) {
+ return [];
+ }
+
+ $parameters = $this->functionMap[$symbolName];
+ $returnType = array_shift($parameters);
+ $additions = [];
+
+ foreach ($parameters as $paramName => $paramType) {
+ if (strpos($paramName, '@') === 0) {
+ $additions[] = sprintf(
+ '%s %s',
+ $paramName,
+ $paramType
+ );
+ continue;
+ }
+
+ $additions[] = sprintf(
+ '@phpstan-param %s $%s',
+ $paramType,
+ $paramName
+ );
+ }
+
+ $additions[] = sprintf(
+ '@phpstan-return %s',
+ $returnType
+ );
+
+ return $additions;
+ }
+
+ private function addStringTags(string $name, Doc $docComment): ?Doc
+ {
+ if ( !isset($this->additionalTagStrings[ $name ])) {
+ return null;
+ }
+
+ $additions = $this->additionalTagStrings[ $name ];
+
+ $docCommentText = $docComment->getText();
+ $newDocComment = sprintf(
+ "%s\n * %s\n */",
+ substr($docCommentText, 0, -4),
+ implode("\n * ", $additions)
+ );
+
+ return new Doc($newDocComment, $docComment->getStartLine(), $docComment->getStartFilePos());
+ }
+
+ private function getAdditionFromParam(Param $tag): ?WordPressTag
+ {
+ $tagDescription = $tag->getDescription();
+ $tagVariableName = $tag->getVariableName();
+ $tagVariableType = $tag->getType();
+
+ // Skip if information we need is missing.
+ if (!$tagDescription || !$tagVariableName || !$tagVariableType) {
+ return null;
+ }
+
+ $elements = self::getElementsFromDescription($tagDescription, true);
+
+ if (count($elements) === 0) {
+ return null;
+ }
+
+ $tagVariableType = self::getTypeNameFromType($tagVariableType);
+
+ if ($tagVariableType === null) {
+ return null;
+ }
+
+ // It's common for an args parameter to accept a query var string or array with `string|array`.
+ // Remove the accepted string type for these so we get the strongest typing we can manage.
+ $tagVariableType = str_replace(['|string', 'string|'], '', $tagVariableType);
+
+ $tag = new WordPressTag();
+ $tag->tag = '@phpstan-param';
+ $tag->type = $tagVariableType;
+ $tag->name = $tagVariableName;
+ $tag->children = $elements;
+
+ return $tag;
+ }
+
+ private function getAdditionFromReturn(Return_ $tag): ?WordPressTag
+ {
+ $tagDescription = $tag->getDescription();
+ $tagVariableType = $tag->getType();
+
+ // Skip if information we need is missing.
+ if (!$tagDescription || !$tagVariableType) {
+ return null;
+ }
+
+ $elements = self::getElementsFromDescription($tagDescription, false);
+
+ if (count($elements) === 0) {
+ return null;
+ }
+
+ $tagVariableType = self::getTypeNameFromType($tagVariableType);
+
+ if ($tagVariableType === null) {
+ return null;
+ }
+
+ $tag = new WordPressTag();
+ $tag->tag = '@phpstan-return';
+ $tag->type = $tagVariableType;
+ $tag->children = $elements;
+
+ return $tag;
+ }
+
+ private static function getAdditionFromVar(Var_ $tag): ?WordPressTag
+ {
+ $tagDescription = $tag->getDescription();
+ $tagVariableType = $tag->getType();
+
+ // Skip if information we need is missing.
+ if (!$tagDescription || !$tagVariableType) {
+ return null;
+ }
+
+ $elements = self::getElementsFromDescription($tagDescription, false);
+
+ if (count($elements) === 0) {
+ return null;
+ }
+
+ $tagVariableType = self::getTypeNameFromType($tagVariableType);
+
+ if ($tagVariableType === null) {
+ return null;
+ }
+
+ $tag = new WordPressTag();
+ $tag->tag = '@phpstan-var';
+ $tag->type = $tagVariableType;
+ $tag->children = $elements;
+
+ return $tag;
+ }
+
+ private static function getTypeNameFromType(Type $tagVariableType): ?string
+ {
+ return self::getTypeNameFromString($tagVariableType->__toString());
+ }
+
+ private static function getTypeNameFromString(string $tagVariable): ?string
+ {
+ // PHPStan doesn't support typed array shapes (`int[]{...}`) so replace
+ // typed arrays such as `int[]` with `array`.
+ $tagVariableType = preg_replace('#[a-zA-Z0-9_]+\[\]#', 'array', $tagVariable);
+
+ if ($tagVariableType === null) {
+ return null;
+ }
+
+ if (strpos($tagVariableType, 'array') === false) {
+ // Skip if we have hash notation that's not for an array (ie. for `object`).
+ return null;
+ }
+
+ if (strpos($tagVariableType, 'array|') !== false) {
+ // Move `array` to the end of union types so the appended array shape works.
+ $tagVariableType = str_replace('array|', '', $tagVariableType) . '|array';
+ }
+
+ return $tagVariableType;
+ }
+
+ /**
+ * @return WordPressArg[]
+ */
+ private static function getElementsFromDescription(Description $tagDescription, bool $optional): array
+ {
+ $text = $tagDescription->__toString();
+
+ // Skip if the description doesn't contain at least one correctly
+ // formatted `@type`, which indicates an array hash.
+ if (strpos($text, ' @type ') === false) {
+ return [];
+ }
+
+ return self::getTypesAtLevel($text, $optional, 1);
+ }
+
+ /**
+ * @return WordPressArg[]
+ */
+ private static function getTypesAtLevel(string $text, bool $optional, int $level): array
+ {
+ // Populate `$types` with the value of each top level `@type`.
+ $spaces = str_repeat(' ', ($level * 4));
+ $types = preg_split("/\R+{$spaces}@type /", $text);
+
+ if ($types === false) {
+ return [];
+ }
+
+ unset($types[0]);
+ $elements = [];
+
+ foreach ($types as $typeTag) {
+ $parts = preg_split('#\s+#', trim($typeTag), 3);
+
+ if ($parts === false || count($parts) < 2) {
+ return [];
+ }
+
+ list($type, $name) = $parts;
+
+ $optionalArg = $optional;
+ $nameTrimmed = ltrim($name, '$');
+
+ if (is_numeric($nameTrimmed)) {
+ $optionalArg = false;
+ } elseif ($optional && ($level > 1)) {
+ $optionalArg = isset($parts[2]) && self::isOptional($parts[2]);
+ }
+
+ if (strpos($name, '...$') !== false) {
+ $name = null;
+ } elseif (strpos($name, '$') !== 0) {
+ return [];
+ } else {
+ $name = $nameTrimmed;
+ }
+
+ $arg = new WordPressArg();
+ $arg->type = $type;
+ $arg->optional = $optionalArg;
+ $arg->name = $name;
+
+ $nextLevel = $level + 1;
+ $subTypes = self::getTypesAtLevel($typeTag, $optional, $nextLevel);
+
+ if (count($subTypes) > 0) {
+ $type = self::getTypeNameFromString($type);
+
+ if ($type !== null) {
+ $arg->type = $type;
+ }
+ $arg->children = $subTypes;
+ }
+
+ $elements[] = $arg;
+ }
+
+ return $elements;
+ }
+
+ private static function isOptional(string $description): bool
+ {
+ return (stripos($description, 'Optional') !== false)
+ || (stripos($description, 'Default ') !== false)
+ || (stripos($description, 'Default: ') !== false)
+ || (stripos($description, 'Defaults to ') !== false)
+ ;
+ }
+};
diff --git a/vendor/php-stubs/wordpress-stubs/wordpress-stubs.php b/vendor/php-stubs/wordpress-stubs/wordpress-stubs.php
new file mode 100644
index 00000000..d0c3a90b
--- /dev/null
+++ b/vendor/php-stubs/wordpress-stubs/wordpress-stubs.php
@@ -0,0 +1,131524 @@
+
+ //
+ //
+ function parselisting($line)
+ {
+ }
+ function SendMSG($message = "", $crlf = \true)
+ {
+ }
+ function SetType($mode = \FTP_AUTOASCII)
+ {
+ }
+ function _settype($mode = \FTP_ASCII)
+ {
+ }
+ function Passive($pasv = \NULL)
+ {
+ }
+ function SetServer($host, $port = 21, $reconnect = \true)
+ {
+ }
+ function SetUmask($umask = 022)
+ {
+ }
+ function SetTimeout($timeout = 30)
+ {
+ }
+ function connect($server = \NULL)
+ {
+ }
+ function quit($force = \false)
+ {
+ }
+ function login($user = \NULL, $pass = \NULL)
+ {
+ }
+ function pwd()
+ {
+ }
+ function cdup()
+ {
+ }
+ function chdir($pathname)
+ {
+ }
+ function rmdir($pathname)
+ {
+ }
+ function mkdir($pathname)
+ {
+ }
+ function rename($from, $to)
+ {
+ }
+ function filesize($pathname)
+ {
+ }
+ function abort()
+ {
+ }
+ function mdtm($pathname)
+ {
+ }
+ function systype()
+ {
+ }
+ function delete($pathname)
+ {
+ }
+ function site($command, $fnction = "site")
+ {
+ }
+ function chmod($pathname, $mode)
+ {
+ }
+ function restore($from)
+ {
+ }
+ function features()
+ {
+ }
+ function rawlist($pathname = "", $arg = "")
+ {
+ }
+ function nlist($pathname = "", $arg = "")
+ {
+ }
+ function is_exists($pathname)
+ {
+ }
+ function file_exists($pathname)
+ {
+ }
+ function fget($fp, $remotefile, $rest = 0)
+ {
+ }
+ function get($remotefile, $localfile = \NULL, $rest = 0)
+ {
+ }
+ function fput($remotefile, $fp, $rest = 0)
+ {
+ }
+ function put($localfile, $remotefile = \NULL, $rest = 0)
+ {
+ }
+ function mput($local = ".", $remote = \NULL, $continious = \false)
+ {
+ }
+ function mget($remote, $local = ".", $continious = \false)
+ {
+ }
+ function mdel($remote, $continious = \false)
+ {
+ }
+ function mmkdir($dir, $mode = 0777)
+ {
+ }
+ function glob($pattern, $handle = \NULL)
+ {
+ }
+ function glob_pattern_match($pattern, $subject)
+ {
+ }
+ function glob_regexp($pattern, $subject)
+ {
+ }
+ function dirlist($remote)
+ {
+ }
+ //
+ //
+ //
+ function _checkCode()
+ {
+ }
+ function _list($arg = "", $cmd = "LIST", $fnction = "_list")
+ {
+ }
+ //
+ //
+ //
+ // Gnre une erreur pour traitement externe la classe
+ function PushError($fctname, $msg, $desc = \false)
+ {
+ }
+ // Rcupre une erreur externe
+ function PopError()
+ {
+ }
+ }
+ /**
+ * PemFTP - An Ftp implementation in pure PHP
+ *
+ * @package PemFTP
+ * @since 2.5.0
+ *
+ * @version 1.0
+ * @copyright Alexey Dotsenko
+ * @author Alexey Dotsenko
+ * @link https://www.phpclasses.org/package/1743-PHP-FTP-client-in-pure-PHP.html
+ * @license LGPL https://opensource.org/licenses/lgpl-license.html
+ */
+ /**
+ * FTP implementation using fsockopen to connect.
+ *
+ * @package PemFTP
+ * @subpackage Pure
+ * @since 2.5.0
+ *
+ * @version 1.0
+ * @copyright Alexey Dotsenko
+ * @author Alexey Dotsenko
+ * @link https://www.phpclasses.org/package/1743-PHP-FTP-client-in-pure-PHP.html
+ * @license LGPL https://opensource.org/licenses/lgpl-license.html
+ */
+ class ftp_pure extends \ftp_base
+ {
+ function __construct($verb = \FALSE, $le = \FALSE)
+ {
+ }
+ //
+ //
+ //
+ function _settimeout($sock)
+ {
+ }
+ function _connect($host, $port)
+ {
+ }
+ function _readmsg($fnction = "_readmsg")
+ {
+ }
+ function _exec($cmd, $fnction = "_exec")
+ {
+ }
+ function _data_prepare($mode = \FTP_ASCII)
+ {
+ }
+ function _data_read($mode = \FTP_ASCII, $fp = \NULL)
+ {
+ }
+ function _data_write($mode = \FTP_ASCII, $fp = \NULL)
+ {
+ }
+ function _data_write_block($mode, $block)
+ {
+ }
+ function _data_close()
+ {
+ }
+ function _quit($force = \FALSE)
+ {
+ }
+ }
+ /**
+ * PemFTP - An Ftp implementation in pure PHP
+ *
+ * @package PemFTP
+ * @since 2.5.0
+ *
+ * @version 1.0
+ * @copyright Alexey Dotsenko
+ * @author Alexey Dotsenko
+ * @link https://www.phpclasses.org/package/1743-PHP-FTP-client-in-pure-PHP.html
+ * @license LGPL https://opensource.org/licenses/lgpl-license.html
+ */
+ /**
+ * Socket Based FTP implementation
+ *
+ * @package PemFTP
+ * @subpackage Socket
+ * @since 2.5.0
+ *
+ * @version 1.0
+ * @copyright Alexey Dotsenko
+ * @author Alexey Dotsenko
+ * @link https://www.phpclasses.org/package/1743-PHP-FTP-client-in-pure-PHP.html
+ * @license LGPL https://opensource.org/licenses/lgpl-license.html
+ */
+ class ftp_sockets extends \ftp_base
+ {
+ function __construct($verb = \FALSE, $le = \FALSE)
+ {
+ }
+ //
+ //
+ //
+ function _settimeout($sock)
+ {
+ }
+ function _connect($host, $port)
+ {
+ }
+ function _readmsg($fnction = "_readmsg")
+ {
+ }
+ function _exec($cmd, $fnction = "_exec")
+ {
+ }
+ function _data_prepare($mode = \FTP_ASCII)
+ {
+ }
+ function _data_read($mode = \FTP_ASCII, $fp = \NULL)
+ {
+ }
+ function _data_write($mode = \FTP_ASCII, $fp = \NULL)
+ {
+ }
+ function _data_write_block($mode, $block)
+ {
+ }
+ function _data_close()
+ {
+ }
+ function _quit()
+ {
+ }
+ }
+ class ftp extends \ftp_sockets
+ {
+ }
+ /**
+ * Upgrader API: Language_Pack_Upgrader_Skin class
+ *
+ * @package WordPress
+ * @subpackage Upgrader
+ * @since 4.6.0
+ */
+ /**
+ * Translation Upgrader Skin for WordPress Translation Upgrades.
+ *
+ * @since 3.7.0
+ * @since 4.6.0 Moved to its own file from wp-admin/includes/class-wp-upgrader-skins.php.
+ *
+ * @see WP_Upgrader_Skin
+ */
+ class Language_Pack_Upgrader_Skin extends \WP_Upgrader_Skin
+ {
+ public $language_update = \null;
+ public $done_header = \false;
+ public $done_footer = \false;
+ public $display_footer_actions = \true;
+ /**
+ * @param array $args
+ */
+ public function __construct($args = array())
+ {
+ }
+ /**
+ */
+ public function before()
+ {
+ }
+ /**
+ * @since 5.9.0 Renamed `$error` to `$errors` for PHP 8 named parameter support.
+ *
+ * @param string|WP_Error $errors Errors.
+ */
+ public function error($errors)
+ {
+ }
+ /**
+ */
+ public function after()
+ {
+ }
+ /**
+ */
+ public function bulk_footer()
+ {
+ }
+ }
+ /**
+ * Upgrade API: Language_Pack_Upgrader class
+ *
+ * @package WordPress
+ * @subpackage Upgrader
+ * @since 4.6.0
+ */
+ /**
+ * Core class used for updating/installing language packs (translations)
+ * for plugins, themes, and core.
+ *
+ * @since 3.7.0
+ * @since 4.6.0 Moved to its own file from wp-admin/includes/class-wp-upgrader.php.
+ *
+ * @see WP_Upgrader
+ */
+ class Language_Pack_Upgrader extends \WP_Upgrader
+ {
+ /**
+ * Result of the language pack upgrade.
+ *
+ * @since 3.7.0
+ * @var array|WP_Error $result
+ * @see WP_Upgrader::$result
+ */
+ public $result;
+ /**
+ * Whether a bulk upgrade/installation is being performed.
+ *
+ * @since 3.7.0
+ * @var bool $bulk
+ */
+ public $bulk = \true;
+ /**
+ * Asynchronously upgrades language packs after other upgrades have been made.
+ *
+ * Hooked to the {@see 'upgrader_process_complete'} action by default.
+ *
+ * @since 3.7.0
+ *
+ * @param false|WP_Upgrader $upgrader Optional. WP_Upgrader instance or false. If `$upgrader` is
+ * a Language_Pack_Upgrader instance, the method will bail to
+ * avoid recursion. Otherwise unused. Default false.
+ */
+ public static function async_upgrade($upgrader = \false)
+ {
+ }
+ /**
+ * Initialize the upgrade strings.
+ *
+ * @since 3.7.0
+ */
+ public function upgrade_strings()
+ {
+ }
+ /**
+ * Upgrade a language pack.
+ *
+ * @since 3.7.0
+ *
+ * @param string|false $update Optional. Whether an update offer is available. Default false.
+ * @param array $args Optional. Other optional arguments, see
+ * Language_Pack_Upgrader::bulk_upgrade(). Default empty array.
+ * @return array|bool|WP_Error The result of the upgrade, or a WP_Error object instead.
+ * @phpstan-param array{
+ * clear_update_cache?: bool,
+ * } $args See Language_Pack_Upgrader::bulk_upgrade()
+ */
+ public function upgrade($update = \false, $args = array())
+ {
+ }
+ /**
+ * Bulk upgrade language packs.
+ *
+ * @since 3.7.0
+ *
+ * @global WP_Filesystem_Base $wp_filesystem WordPress filesystem subclass.
+ *
+ * @param object[] $language_updates Optional. Array of language packs to update. @see wp_get_translation_updates().
+ * Default empty array.
+ * @param array $args {
+ * Other arguments for upgrading multiple language packs. Default empty array.
+ *
+ * @type bool $clear_update_cache Whether to clear the update cache when done.
+ * Default true.
+ * }
+ * @return array|bool|WP_Error Will return an array of results, or true if there are no updates,
+ * false or WP_Error for initial errors.
+ * @phpstan-param array{
+ * clear_update_cache?: bool,
+ * } $args
+ */
+ public function bulk_upgrade($language_updates = array(), $args = array())
+ {
+ }
+ /**
+ * Checks that the package source contains .mo and .po files.
+ *
+ * Hooked to the {@see 'upgrader_source_selection'} filter by
+ * Language_Pack_Upgrader::bulk_upgrade().
+ *
+ * @since 3.7.0
+ *
+ * @global WP_Filesystem_Base $wp_filesystem WordPress filesystem subclass.
+ *
+ * @param string|WP_Error $source The path to the downloaded package source.
+ * @param string $remote_source Remote file source location.
+ * @return string|WP_Error The source as passed, or a WP_Error object on failure.
+ */
+ public function check_package($source, $remote_source)
+ {
+ }
+ /**
+ * Get the name of an item being updated.
+ *
+ * @since 3.7.0
+ *
+ * @param object $update The data for an update.
+ * @return string The name of the item being updated.
+ */
+ public function get_name_for_update($update)
+ {
+ }
+ /**
+ * Clears existing translations where this item is going to be installed into.
+ *
+ * @since 5.1.0
+ *
+ * @global WP_Filesystem_Base $wp_filesystem WordPress filesystem subclass.
+ *
+ * @param string $remote_destination The location on the remote filesystem to be cleared.
+ * @return bool|WP_Error True upon success, WP_Error on failure.
+ */
+ public function clear_destination($remote_destination)
+ {
+ }
+ }
+ /* For futur use
+ define( 'PCLZIP_CB_PRE_LIST', 78005 );
+ define( 'PCLZIP_CB_POST_LIST', 78006 );
+ define( 'PCLZIP_CB_PRE_DELETE', 78007 );
+ define( 'PCLZIP_CB_POST_DELETE', 78008 );
+ */
+ // --------------------------------------------------------------------------------
+ // Class : PclZip
+ // Description :
+ // PclZip is the class that represent a Zip archive.
+ // The public methods allow the manipulation of the archive.
+ // Attributes :
+ // Attributes must not be accessed directly.
+ // Methods :
+ // PclZip() : Object creator
+ // create() : Creates the Zip archive
+ // listContent() : List the content of the Zip archive
+ // extract() : Extract the content of the archive
+ // properties() : List the properties of the archive
+ // --------------------------------------------------------------------------------
+ class PclZip
+ {
+ // ----- Filename of the zip file
+ var $zipname = '';
+ // ----- File descriptor of the zip file
+ var $zip_fd = 0;
+ // ----- Internal error handling
+ var $error_code = 1;
+ var $error_string = '';
+ // ----- Current status of the magic_quotes_runtime
+ // This value store the php configuration for magic_quotes
+ // The class can then disable the magic_quotes and reset it after
+ var $magic_quotes_status;
+ // --------------------------------------------------------------------------------
+ // Function : PclZip()
+ // Description :
+ // Creates a PclZip object and set the name of the associated Zip archive
+ // filename.
+ // Note that no real action is taken, if the archive does not exist it is not
+ // created. Use create() for that.
+ // --------------------------------------------------------------------------------
+ function __construct($p_zipname)
+ {
+ }
+ public function PclZip($p_zipname)
+ {
+ }
+ // --------------------------------------------------------------------------------
+ // --------------------------------------------------------------------------------
+ // Function :
+ // create($p_filelist, $p_add_dir="", $p_remove_dir="")
+ // create($p_filelist, $p_option, $p_option_value, ...)
+ // Description :
+ // This method supports two different synopsis. The first one is historical.
+ // This method creates a Zip Archive. The Zip file is created in the
+ // filesystem. The files and directories indicated in $p_filelist
+ // are added in the archive. See the parameters description for the
+ // supported format of $p_filelist.
+ // When a directory is in the list, the directory and its content is added
+ // in the archive.
+ // In this synopsis, the function takes an optional variable list of
+ // options. See below the supported options.
+ // Parameters :
+ // $p_filelist : An array containing file or directory names, or
+ // a string containing one filename or one directory name, or
+ // a string containing a list of filenames and/or directory
+ // names separated by spaces.
+ // $p_add_dir : A path to add before the real path of the archived file,
+ // in order to have it memorized in the archive.
+ // $p_remove_dir : A path to remove from the real path of the file to archive,
+ // in order to have a shorter path memorized in the archive.
+ // When $p_add_dir and $p_remove_dir are set, $p_remove_dir
+ // is removed first, before $p_add_dir is added.
+ // Options :
+ // PCLZIP_OPT_ADD_PATH :
+ // PCLZIP_OPT_REMOVE_PATH :
+ // PCLZIP_OPT_REMOVE_ALL_PATH :
+ // PCLZIP_OPT_COMMENT :
+ // PCLZIP_CB_PRE_ADD :
+ // PCLZIP_CB_POST_ADD :
+ // Return Values :
+ // 0 on failure,
+ // The list of the added files, with a status of the add action.
+ // (see PclZip::listContent() for list entry format)
+ // --------------------------------------------------------------------------------
+ function create($p_filelist)
+ {
+ }
+ // --------------------------------------------------------------------------------
+ // --------------------------------------------------------------------------------
+ // Function :
+ // add($p_filelist, $p_add_dir="", $p_remove_dir="")
+ // add($p_filelist, $p_option, $p_option_value, ...)
+ // Description :
+ // This method supports two synopsis. The first one is historical.
+ // This methods add the list of files in an existing archive.
+ // If a file with the same name already exists, it is added at the end of the
+ // archive, the first one is still present.
+ // If the archive does not exist, it is created.
+ // Parameters :
+ // $p_filelist : An array containing file or directory names, or
+ // a string containing one filename or one directory name, or
+ // a string containing a list of filenames and/or directory
+ // names separated by spaces.
+ // $p_add_dir : A path to add before the real path of the archived file,
+ // in order to have it memorized in the archive.
+ // $p_remove_dir : A path to remove from the real path of the file to archive,
+ // in order to have a shorter path memorized in the archive.
+ // When $p_add_dir and $p_remove_dir are set, $p_remove_dir
+ // is removed first, before $p_add_dir is added.
+ // Options :
+ // PCLZIP_OPT_ADD_PATH :
+ // PCLZIP_OPT_REMOVE_PATH :
+ // PCLZIP_OPT_REMOVE_ALL_PATH :
+ // PCLZIP_OPT_COMMENT :
+ // PCLZIP_OPT_ADD_COMMENT :
+ // PCLZIP_OPT_PREPEND_COMMENT :
+ // PCLZIP_CB_PRE_ADD :
+ // PCLZIP_CB_POST_ADD :
+ // Return Values :
+ // 0 on failure,
+ // The list of the added files, with a status of the add action.
+ // (see PclZip::listContent() for list entry format)
+ // --------------------------------------------------------------------------------
+ function add($p_filelist)
+ {
+ }
+ // --------------------------------------------------------------------------------
+ // --------------------------------------------------------------------------------
+ // Function : listContent()
+ // Description :
+ // This public method, gives the list of the files and directories, with their
+ // properties.
+ // The properties of each entries in the list are (used also in other functions) :
+ // filename : Name of the file. For a create or add action it is the filename
+ // given by the user. For an extract function it is the filename
+ // of the extracted file.
+ // stored_filename : Name of the file / directory stored in the archive.
+ // size : Size of the stored file.
+ // compressed_size : Size of the file's data compressed in the archive
+ // (without the headers overhead)
+ // mtime : Last known modification date of the file (UNIX timestamp)
+ // comment : Comment associated with the file
+ // folder : true | false
+ // index : index of the file in the archive
+ // status : status of the action (depending of the action) :
+ // Values are :
+ // ok : OK !
+ // filtered : the file / dir is not extracted (filtered by user)
+ // already_a_directory : the file can not be extracted because a
+ // directory with the same name already exists
+ // write_protected : the file can not be extracted because a file
+ // with the same name already exists and is
+ // write protected
+ // newer_exist : the file was not extracted because a newer file exists
+ // path_creation_fail : the file is not extracted because the folder
+ // does not exist and can not be created
+ // write_error : the file was not extracted because there was a
+ // error while writing the file
+ // read_error : the file was not extracted because there was a error
+ // while reading the file
+ // invalid_header : the file was not extracted because of an archive
+ // format error (bad file header)
+ // Note that each time a method can continue operating when there
+ // is an action error on a file, the error is only logged in the file status.
+ // Return Values :
+ // 0 on an unrecoverable failure,
+ // The list of the files in the archive.
+ // --------------------------------------------------------------------------------
+ function listContent()
+ {
+ }
+ // --------------------------------------------------------------------------------
+ // --------------------------------------------------------------------------------
+ // Function :
+ // extract($p_path="./", $p_remove_path="")
+ // extract([$p_option, $p_option_value, ...])
+ // Description :
+ // This method supports two synopsis. The first one is historical.
+ // This method extract all the files / directories from the archive to the
+ // folder indicated in $p_path.
+ // If you want to ignore the 'root' part of path of the memorized files
+ // you can indicate this in the optional $p_remove_path parameter.
+ // By default, if a newer file with the same name already exists, the
+ // file is not extracted.
+ //
+ // If both PCLZIP_OPT_PATH and PCLZIP_OPT_ADD_PATH options
+ // are used, the path indicated in PCLZIP_OPT_ADD_PATH is append
+ // at the end of the path value of PCLZIP_OPT_PATH.
+ // Parameters :
+ // $p_path : Path where the files and directories are to be extracted
+ // $p_remove_path : First part ('root' part) of the memorized path
+ // (if any similar) to remove while extracting.
+ // Options :
+ // PCLZIP_OPT_PATH :
+ // PCLZIP_OPT_ADD_PATH :
+ // PCLZIP_OPT_REMOVE_PATH :
+ // PCLZIP_OPT_REMOVE_ALL_PATH :
+ // PCLZIP_CB_PRE_EXTRACT :
+ // PCLZIP_CB_POST_EXTRACT :
+ // Return Values :
+ // 0 or a negative value on failure,
+ // The list of the extracted files, with a status of the action.
+ // (see PclZip::listContent() for list entry format)
+ // --------------------------------------------------------------------------------
+ function extract()
+ {
+ }
+ // --------------------------------------------------------------------------------
+ // --------------------------------------------------------------------------------
+ // Function :
+ // extractByIndex($p_index, $p_path="./", $p_remove_path="")
+ // extractByIndex($p_index, [$p_option, $p_option_value, ...])
+ // Description :
+ // This method supports two synopsis. The first one is historical.
+ // This method is doing a partial extract of the archive.
+ // The extracted files or folders are identified by their index in the
+ // archive (from 0 to n).
+ // Note that if the index identify a folder, only the folder entry is
+ // extracted, not all the files included in the archive.
+ // Parameters :
+ // $p_index : A single index (integer) or a string of indexes of files to
+ // extract. The form of the string is "0,4-6,8-12" with only numbers
+ // and '-' for range or ',' to separate ranges. No spaces or ';'
+ // are allowed.
+ // $p_path : Path where the files and directories are to be extracted
+ // $p_remove_path : First part ('root' part) of the memorized path
+ // (if any similar) to remove while extracting.
+ // Options :
+ // PCLZIP_OPT_PATH :
+ // PCLZIP_OPT_ADD_PATH :
+ // PCLZIP_OPT_REMOVE_PATH :
+ // PCLZIP_OPT_REMOVE_ALL_PATH :
+ // PCLZIP_OPT_EXTRACT_AS_STRING : The files are extracted as strings and
+ // not as files.
+ // The resulting content is in a new field 'content' in the file
+ // structure.
+ // This option must be used alone (any other options are ignored).
+ // PCLZIP_CB_PRE_EXTRACT :
+ // PCLZIP_CB_POST_EXTRACT :
+ // Return Values :
+ // 0 on failure,
+ // The list of the extracted files, with a status of the action.
+ // (see PclZip::listContent() for list entry format)
+ // --------------------------------------------------------------------------------
+ //function extractByIndex($p_index, options...)
+ function extractByIndex($p_index)
+ {
+ }
+ // --------------------------------------------------------------------------------
+ // --------------------------------------------------------------------------------
+ // Function :
+ // delete([$p_option, $p_option_value, ...])
+ // Description :
+ // This method removes files from the archive.
+ // If no parameters are given, then all the archive is emptied.
+ // Parameters :
+ // None or optional arguments.
+ // Options :
+ // PCLZIP_OPT_BY_INDEX :
+ // PCLZIP_OPT_BY_NAME :
+ // PCLZIP_OPT_BY_EREG :
+ // PCLZIP_OPT_BY_PREG :
+ // Return Values :
+ // 0 on failure,
+ // The list of the files which are still present in the archive.
+ // (see PclZip::listContent() for list entry format)
+ // --------------------------------------------------------------------------------
+ function delete()
+ {
+ }
+ // --------------------------------------------------------------------------------
+ // --------------------------------------------------------------------------------
+ // Function : deleteByIndex()
+ // Description :
+ // ***** Deprecated *****
+ // delete(PCLZIP_OPT_BY_INDEX, $p_index) should be preferred.
+ // --------------------------------------------------------------------------------
+ function deleteByIndex($p_index)
+ {
+ }
+ // --------------------------------------------------------------------------------
+ // --------------------------------------------------------------------------------
+ // Function : properties()
+ // Description :
+ // This method gives the properties of the archive.
+ // The properties are :
+ // nb : Number of files in the archive
+ // comment : Comment associated with the archive file
+ // status : not_exist, ok
+ // Parameters :
+ // None
+ // Return Values :
+ // 0 on failure,
+ // An array with the archive properties.
+ // --------------------------------------------------------------------------------
+ function properties()
+ {
+ }
+ // --------------------------------------------------------------------------------
+ // --------------------------------------------------------------------------------
+ // Function : duplicate()
+ // Description :
+ // This method creates an archive by copying the content of an other one. If
+ // the archive already exist, it is replaced by the new one without any warning.
+ // Parameters :
+ // $p_archive : The filename of a valid archive, or
+ // a valid PclZip object.
+ // Return Values :
+ // 1 on success.
+ // 0 or a negative value on error (error code).
+ // --------------------------------------------------------------------------------
+ function duplicate($p_archive)
+ {
+ }
+ // --------------------------------------------------------------------------------
+ // --------------------------------------------------------------------------------
+ // Function : merge()
+ // Description :
+ // This method merge the $p_archive_to_add archive at the end of the current
+ // one ($this).
+ // If the archive ($this) does not exist, the merge becomes a duplicate.
+ // If the $p_archive_to_add archive does not exist, the merge is a success.
+ // Parameters :
+ // $p_archive_to_add : It can be directly the filename of a valid zip archive,
+ // or a PclZip object archive.
+ // Return Values :
+ // 1 on success,
+ // 0 or negative values on error (see below).
+ // --------------------------------------------------------------------------------
+ function merge($p_archive_to_add)
+ {
+ }
+ // --------------------------------------------------------------------------------
+ // --------------------------------------------------------------------------------
+ // Function : errorCode()
+ // Description :
+ // Parameters :
+ // --------------------------------------------------------------------------------
+ function errorCode()
+ {
+ }
+ // --------------------------------------------------------------------------------
+ // --------------------------------------------------------------------------------
+ // Function : errorName()
+ // Description :
+ // Parameters :
+ // --------------------------------------------------------------------------------
+ function errorName($p_with_code = \false)
+ {
+ }
+ // --------------------------------------------------------------------------------
+ // --------------------------------------------------------------------------------
+ // Function : errorInfo()
+ // Description :
+ // Parameters :
+ // --------------------------------------------------------------------------------
+ function errorInfo($p_full = \false)
+ {
+ }
+ // --------------------------------------------------------------------------------
+ // --------------------------------------------------------------------------------
+ // ***** UNDER THIS LINE ARE DEFINED PRIVATE INTERNAL FUNCTIONS *****
+ // ***** *****
+ // ***** THESES FUNCTIONS MUST NOT BE USED DIRECTLY *****
+ // --------------------------------------------------------------------------------
+ // --------------------------------------------------------------------------------
+ // Function : privCheckFormat()
+ // Description :
+ // This method check that the archive exists and is a valid zip archive.
+ // Several level of check exists. (futur)
+ // Parameters :
+ // $p_level : Level of check. Default 0.
+ // 0 : Check the first bytes (magic codes) (default value))
+ // 1 : 0 + Check the central directory (futur)
+ // 2 : 1 + Check each file header (futur)
+ // Return Values :
+ // true on success,
+ // false on error, the error code is set.
+ // --------------------------------------------------------------------------------
+ function privCheckFormat($p_level = 0)
+ {
+ }
+ // --------------------------------------------------------------------------------
+ // --------------------------------------------------------------------------------
+ // Function : privParseOptions()
+ // Description :
+ // This internal methods reads the variable list of arguments ($p_options_list,
+ // $p_size) and generate an array with the options and values ($v_result_list).
+ // $v_requested_options contains the options that can be present and those that
+ // must be present.
+ // $v_requested_options is an array, with the option value as key, and 'optional',
+ // or 'mandatory' as value.
+ // Parameters :
+ // See above.
+ // Return Values :
+ // 1 on success.
+ // 0 on failure.
+ // --------------------------------------------------------------------------------
+ function privParseOptions(&$p_options_list, $p_size, &$v_result_list, $v_requested_options = \false)
+ {
+ }
+ // --------------------------------------------------------------------------------
+ // --------------------------------------------------------------------------------
+ // Function : privOptionDefaultThreshold()
+ // Description :
+ // Parameters :
+ // Return Values :
+ // --------------------------------------------------------------------------------
+ function privOptionDefaultThreshold(&$p_options)
+ {
+ }
+ // --------------------------------------------------------------------------------
+ // --------------------------------------------------------------------------------
+ // Function : privFileDescrParseAtt()
+ // Description :
+ // Parameters :
+ // Return Values :
+ // 1 on success.
+ // 0 on failure.
+ // --------------------------------------------------------------------------------
+ function privFileDescrParseAtt(&$p_file_list, &$p_filedescr, $v_options, $v_requested_options = \false)
+ {
+ }
+ // --------------------------------------------------------------------------------
+ // --------------------------------------------------------------------------------
+ // Function : privFileDescrExpand()
+ // Description :
+ // This method look for each item of the list to see if its a file, a folder
+ // or a string to be added as file. For any other type of files (link, other)
+ // just ignore the item.
+ // Then prepare the information that will be stored for that file.
+ // When its a folder, expand the folder with all the files that are in that
+ // folder (recursively).
+ // Parameters :
+ // Return Values :
+ // 1 on success.
+ // 0 on failure.
+ // --------------------------------------------------------------------------------
+ function privFileDescrExpand(&$p_filedescr_list, &$p_options)
+ {
+ }
+ // --------------------------------------------------------------------------------
+ // --------------------------------------------------------------------------------
+ // Function : privCreate()
+ // Description :
+ // Parameters :
+ // Return Values :
+ // --------------------------------------------------------------------------------
+ function privCreate($p_filedescr_list, &$p_result_list, &$p_options)
+ {
+ }
+ // --------------------------------------------------------------------------------
+ // --------------------------------------------------------------------------------
+ // Function : privAdd()
+ // Description :
+ // Parameters :
+ // Return Values :
+ // --------------------------------------------------------------------------------
+ function privAdd($p_filedescr_list, &$p_result_list, &$p_options)
+ {
+ }
+ // --------------------------------------------------------------------------------
+ // --------------------------------------------------------------------------------
+ // Function : privOpenFd()
+ // Description :
+ // Parameters :
+ // --------------------------------------------------------------------------------
+ function privOpenFd($p_mode)
+ {
+ }
+ // --------------------------------------------------------------------------------
+ // --------------------------------------------------------------------------------
+ // Function : privCloseFd()
+ // Description :
+ // Parameters :
+ // --------------------------------------------------------------------------------
+ function privCloseFd()
+ {
+ }
+ // --------------------------------------------------------------------------------
+ // --------------------------------------------------------------------------------
+ // Function : privAddList()
+ // Description :
+ // $p_add_dir and $p_remove_dir will give the ability to memorize a path which is
+ // different from the real path of the file. This is useful if you want to have PclTar
+ // running in any directory, and memorize relative path from an other directory.
+ // Parameters :
+ // $p_list : An array containing the file or directory names to add in the tar
+ // $p_result_list : list of added files with their properties (specially the status field)
+ // $p_add_dir : Path to add in the filename path archived
+ // $p_remove_dir : Path to remove in the filename path archived
+ // Return Values :
+ // --------------------------------------------------------------------------------
+ // function privAddList($p_list, &$p_result_list, $p_add_dir, $p_remove_dir, $p_remove_all_dir, &$p_options)
+ function privAddList($p_filedescr_list, &$p_result_list, &$p_options)
+ {
+ }
+ // --------------------------------------------------------------------------------
+ // --------------------------------------------------------------------------------
+ // Function : privAddFileList()
+ // Description :
+ // Parameters :
+ // $p_filedescr_list : An array containing the file description
+ // or directory names to add in the zip
+ // $p_result_list : list of added files with their properties (specially the status field)
+ // Return Values :
+ // --------------------------------------------------------------------------------
+ function privAddFileList($p_filedescr_list, &$p_result_list, &$p_options)
+ {
+ }
+ // --------------------------------------------------------------------------------
+ // --------------------------------------------------------------------------------
+ // Function : privAddFile()
+ // Description :
+ // Parameters :
+ // Return Values :
+ // --------------------------------------------------------------------------------
+ function privAddFile($p_filedescr, &$p_header, &$p_options)
+ {
+ }
+ // --------------------------------------------------------------------------------
+ // --------------------------------------------------------------------------------
+ // Function : privAddFileUsingTempFile()
+ // Description :
+ // Parameters :
+ // Return Values :
+ // --------------------------------------------------------------------------------
+ function privAddFileUsingTempFile($p_filedescr, &$p_header, &$p_options)
+ {
+ }
+ // --------------------------------------------------------------------------------
+ // --------------------------------------------------------------------------------
+ // Function : privCalculateStoredFilename()
+ // Description :
+ // Based on file descriptor properties and global options, this method
+ // calculate the filename that will be stored in the archive.
+ // Parameters :
+ // Return Values :
+ // --------------------------------------------------------------------------------
+ function privCalculateStoredFilename(&$p_filedescr, &$p_options)
+ {
+ }
+ // --------------------------------------------------------------------------------
+ // --------------------------------------------------------------------------------
+ // Function : privWriteFileHeader()
+ // Description :
+ // Parameters :
+ // Return Values :
+ // --------------------------------------------------------------------------------
+ function privWriteFileHeader(&$p_header)
+ {
+ }
+ // --------------------------------------------------------------------------------
+ // --------------------------------------------------------------------------------
+ // Function : privWriteCentralFileHeader()
+ // Description :
+ // Parameters :
+ // Return Values :
+ // --------------------------------------------------------------------------------
+ function privWriteCentralFileHeader(&$p_header)
+ {
+ }
+ // --------------------------------------------------------------------------------
+ // --------------------------------------------------------------------------------
+ // Function : privWriteCentralHeader()
+ // Description :
+ // Parameters :
+ // Return Values :
+ // --------------------------------------------------------------------------------
+ function privWriteCentralHeader($p_nb_entries, $p_size, $p_offset, $p_comment)
+ {
+ }
+ // --------------------------------------------------------------------------------
+ // --------------------------------------------------------------------------------
+ // Function : privList()
+ // Description :
+ // Parameters :
+ // Return Values :
+ // --------------------------------------------------------------------------------
+ function privList(&$p_list)
+ {
+ }
+ // --------------------------------------------------------------------------------
+ // --------------------------------------------------------------------------------
+ // Function : privConvertHeader2FileInfo()
+ // Description :
+ // This function takes the file information from the central directory
+ // entries and extract the interesting parameters that will be given back.
+ // The resulting file infos are set in the array $p_info
+ // $p_info['filename'] : Filename with full path. Given by user (add),
+ // extracted in the filesystem (extract).
+ // $p_info['stored_filename'] : Stored filename in the archive.
+ // $p_info['size'] = Size of the file.
+ // $p_info['compressed_size'] = Compressed size of the file.
+ // $p_info['mtime'] = Last modification date of the file.
+ // $p_info['comment'] = Comment associated with the file.
+ // $p_info['folder'] = true/false : indicates if the entry is a folder or not.
+ // $p_info['status'] = status of the action on the file.
+ // $p_info['crc'] = CRC of the file content.
+ // Parameters :
+ // Return Values :
+ // --------------------------------------------------------------------------------
+ function privConvertHeader2FileInfo($p_header, &$p_info)
+ {
+ }
+ // --------------------------------------------------------------------------------
+ // --------------------------------------------------------------------------------
+ // Function : privExtractByRule()
+ // Description :
+ // Extract a file or directory depending of rules (by index, by name, ...)
+ // Parameters :
+ // $p_file_list : An array where will be placed the properties of each
+ // extracted file
+ // $p_path : Path to add while writing the extracted files
+ // $p_remove_path : Path to remove (from the file memorized path) while writing the
+ // extracted files. If the path does not match the file path,
+ // the file is extracted with its memorized path.
+ // $p_remove_path does not apply to 'list' mode.
+ // $p_path and $p_remove_path are commulative.
+ // Return Values :
+ // 1 on success,0 or less on error (see error code list)
+ // --------------------------------------------------------------------------------
+ function privExtractByRule(&$p_file_list, $p_path, $p_remove_path, $p_remove_all_path, &$p_options)
+ {
+ }
+ // --------------------------------------------------------------------------------
+ // --------------------------------------------------------------------------------
+ // Function : privExtractFile()
+ // Description :
+ // Parameters :
+ // Return Values :
+ //
+ // 1 : ... ?
+ // PCLZIP_ERR_USER_ABORTED(2) : User ask for extraction stop in callback
+ // --------------------------------------------------------------------------------
+ function privExtractFile(&$p_entry, $p_path, $p_remove_path, $p_remove_all_path, &$p_options)
+ {
+ }
+ // --------------------------------------------------------------------------------
+ // --------------------------------------------------------------------------------
+ // Function : privExtractFileUsingTempFile()
+ // Description :
+ // Parameters :
+ // Return Values :
+ // --------------------------------------------------------------------------------
+ function privExtractFileUsingTempFile(&$p_entry, &$p_options)
+ {
+ }
+ // --------------------------------------------------------------------------------
+ // --------------------------------------------------------------------------------
+ // Function : privExtractFileInOutput()
+ // Description :
+ // Parameters :
+ // Return Values :
+ // --------------------------------------------------------------------------------
+ function privExtractFileInOutput(&$p_entry, &$p_options)
+ {
+ }
+ // --------------------------------------------------------------------------------
+ // --------------------------------------------------------------------------------
+ // Function : privExtractFileAsString()
+ // Description :
+ // Parameters :
+ // Return Values :
+ // --------------------------------------------------------------------------------
+ function privExtractFileAsString(&$p_entry, &$p_string, &$p_options)
+ {
+ }
+ // --------------------------------------------------------------------------------
+ // --------------------------------------------------------------------------------
+ // Function : privReadFileHeader()
+ // Description :
+ // Parameters :
+ // Return Values :
+ // --------------------------------------------------------------------------------
+ function privReadFileHeader(&$p_header)
+ {
+ }
+ // --------------------------------------------------------------------------------
+ // --------------------------------------------------------------------------------
+ // Function : privReadCentralFileHeader()
+ // Description :
+ // Parameters :
+ // Return Values :
+ // --------------------------------------------------------------------------------
+ function privReadCentralFileHeader(&$p_header)
+ {
+ }
+ // --------------------------------------------------------------------------------
+ // --------------------------------------------------------------------------------
+ // Function : privCheckFileHeaders()
+ // Description :
+ // Parameters :
+ // Return Values :
+ // 1 on success,
+ // 0 on error;
+ // --------------------------------------------------------------------------------
+ function privCheckFileHeaders(&$p_local_header, &$p_central_header)
+ {
+ }
+ // --------------------------------------------------------------------------------
+ // --------------------------------------------------------------------------------
+ // Function : privReadEndCentralDir()
+ // Description :
+ // Parameters :
+ // Return Values :
+ // --------------------------------------------------------------------------------
+ function privReadEndCentralDir(&$p_central_dir)
+ {
+ }
+ // --------------------------------------------------------------------------------
+ // --------------------------------------------------------------------------------
+ // Function : privDeleteByRule()
+ // Description :
+ // Parameters :
+ // Return Values :
+ // --------------------------------------------------------------------------------
+ function privDeleteByRule(&$p_result_list, &$p_options)
+ {
+ }
+ // --------------------------------------------------------------------------------
+ // --------------------------------------------------------------------------------
+ // Function : privDirCheck()
+ // Description :
+ // Check if a directory exists, if not it creates it and all the parents directory
+ // which may be useful.
+ // Parameters :
+ // $p_dir : Directory path to check.
+ // Return Values :
+ // 1 : OK
+ // -1 : Unable to create directory
+ // --------------------------------------------------------------------------------
+ function privDirCheck($p_dir, $p_is_dir = \false)
+ {
+ }
+ // --------------------------------------------------------------------------------
+ // --------------------------------------------------------------------------------
+ // Function : privMerge()
+ // Description :
+ // If $p_archive_to_add does not exist, the function exit with a success result.
+ // Parameters :
+ // Return Values :
+ // --------------------------------------------------------------------------------
+ function privMerge(&$p_archive_to_add)
+ {
+ }
+ // --------------------------------------------------------------------------------
+ // --------------------------------------------------------------------------------
+ // Function : privDuplicate()
+ // Description :
+ // Parameters :
+ // Return Values :
+ // --------------------------------------------------------------------------------
+ function privDuplicate($p_archive_filename)
+ {
+ }
+ // --------------------------------------------------------------------------------
+ // --------------------------------------------------------------------------------
+ // Function : privErrorLog()
+ // Description :
+ // Parameters :
+ // --------------------------------------------------------------------------------
+ function privErrorLog($p_error_code = 0, $p_error_string = '')
+ {
+ }
+ // --------------------------------------------------------------------------------
+ // --------------------------------------------------------------------------------
+ // Function : privErrorReset()
+ // Description :
+ // Parameters :
+ // --------------------------------------------------------------------------------
+ function privErrorReset()
+ {
+ }
+ // --------------------------------------------------------------------------------
+ // --------------------------------------------------------------------------------
+ // Function : privDisableMagicQuotes()
+ // Description :
+ // Parameters :
+ // Return Values :
+ // --------------------------------------------------------------------------------
+ function privDisableMagicQuotes()
+ {
+ }
+ // --------------------------------------------------------------------------------
+ // --------------------------------------------------------------------------------
+ // Function : privSwapBackMagicQuotes()
+ // Description :
+ // Parameters :
+ // Return Values :
+ // --------------------------------------------------------------------------------
+ function privSwapBackMagicQuotes()
+ {
+ }
+ // --------------------------------------------------------------------------------
+ }
+ /**
+ * Upgrader API: Plugin_Installer_Skin class
+ *
+ * @package WordPress
+ * @subpackage Upgrader
+ * @since 4.6.0
+ */
+ /**
+ * Plugin Installer Skin for WordPress Plugin Installer.
+ *
+ * @since 2.8.0
+ * @since 4.6.0 Moved to its own file from wp-admin/includes/class-wp-upgrader-skins.php.
+ *
+ * @see WP_Upgrader_Skin
+ */
+ class Plugin_Installer_Skin extends \WP_Upgrader_Skin
+ {
+ public $api;
+ public $type;
+ public $url;
+ public $overwrite;
+ /**
+ * @param array $args
+ */
+ public function __construct($args = array())
+ {
+ }
+ /**
+ * Action to perform before installing a plugin.
+ *
+ * @since 2.8.0
+ */
+ public function before()
+ {
+ }
+ /**
+ * Hides the `process_failed` error when updating a plugin by uploading a zip file.
+ *
+ * @since 5.5.0
+ *
+ * @param WP_Error $wp_error WP_Error object.
+ * @return bool
+ */
+ public function hide_process_failed($wp_error)
+ {
+ }
+ /**
+ * Action to perform following a plugin install.
+ *
+ * @since 2.8.0
+ */
+ public function after()
+ {
+ }
+ }
+ /**
+ * Upgrader API: Plugin_Upgrader_Skin class
+ *
+ * @package WordPress
+ * @subpackage Upgrader
+ * @since 4.6.0
+ */
+ /**
+ * Plugin Upgrader Skin for WordPress Plugin Upgrades.
+ *
+ * @since 2.8.0
+ * @since 4.6.0 Moved to its own file from wp-admin/includes/class-wp-upgrader-skins.php.
+ *
+ * @see WP_Upgrader_Skin
+ */
+ class Plugin_Upgrader_Skin extends \WP_Upgrader_Skin
+ {
+ /**
+ * Holds the plugin slug in the Plugin Directory.
+ *
+ * @since 2.8.0
+ *
+ * @var string
+ */
+ public $plugin = '';
+ /**
+ * Whether the plugin is active.
+ *
+ * @since 2.8.0
+ *
+ * @var bool
+ */
+ public $plugin_active = \false;
+ /**
+ * Whether the plugin is active for the entire network.
+ *
+ * @since 2.8.0
+ *
+ * @var bool
+ */
+ public $plugin_network_active = \false;
+ /**
+ * Constructor.
+ *
+ * Sets up the plugin upgrader skin.
+ *
+ * @since 2.8.0
+ *
+ * @param array $args Optional. The plugin upgrader skin arguments to
+ * override default options. Default empty array.
+ */
+ public function __construct($args = array())
+ {
+ }
+ /**
+ * Action to perform following a single plugin update.
+ *
+ * @since 2.8.0
+ */
+ public function after()
+ {
+ }
+ }
+ /**
+ * Upgrade API: Plugin_Upgrader class
+ *
+ * @package WordPress
+ * @subpackage Upgrader
+ * @since 4.6.0
+ */
+ /**
+ * Core class used for upgrading/installing plugins.
+ *
+ * It is designed to upgrade/install plugins from a local zip, remote zip URL,
+ * or uploaded zip file.
+ *
+ * @since 2.8.0
+ * @since 4.6.0 Moved to its own file from wp-admin/includes/class-wp-upgrader.php.
+ *
+ * @see WP_Upgrader
+ */
+ class Plugin_Upgrader extends \WP_Upgrader
+ {
+ /**
+ * Plugin upgrade result.
+ *
+ * @since 2.8.0
+ * @var array|WP_Error $result
+ *
+ * @see WP_Upgrader::$result
+ */
+ public $result;
+ /**
+ * Whether a bulk upgrade/installation is being performed.
+ *
+ * @since 2.9.0
+ * @var bool $bulk
+ */
+ public $bulk = \false;
+ /**
+ * New plugin info.
+ *
+ * @since 5.5.0
+ * @var array $new_plugin_data
+ *
+ * @see check_package()
+ */
+ public $new_plugin_data = array();
+ /**
+ * Initialize the upgrade strings.
+ *
+ * @since 2.8.0
+ */
+ public function upgrade_strings()
+ {
+ }
+ /**
+ * Initialize the installation strings.
+ *
+ * @since 2.8.0
+ */
+ public function install_strings()
+ {
+ }
+ /**
+ * Install a plugin package.
+ *
+ * @since 2.8.0
+ * @since 3.7.0 The `$args` parameter was added, making clearing the plugin update cache optional.
+ *
+ * @param string $package The full local path or URI of the package.
+ * @param array $args {
+ * Optional. Other arguments for installing a plugin package. Default empty array.
+ *
+ * @type bool $clear_update_cache Whether to clear the plugin updates cache if successful.
+ * Default true.
+ * }
+ * @return bool|WP_Error True if the installation was successful, false or a WP_Error otherwise.
+ * @phpstan-param array{
+ * clear_update_cache?: bool,
+ * } $args
+ */
+ public function install($package, $args = array())
+ {
+ }
+ /**
+ * Upgrade a plugin.
+ *
+ * @since 2.8.0
+ * @since 3.7.0 The `$args` parameter was added, making clearing the plugin update cache optional.
+ *
+ * @param string $plugin Path to the plugin file relative to the plugins directory.
+ * @param array $args {
+ * Optional. Other arguments for upgrading a plugin package. Default empty array.
+ *
+ * @type bool $clear_update_cache Whether to clear the plugin updates cache if successful.
+ * Default true.
+ * }
+ * @return bool|WP_Error True if the upgrade was successful, false or a WP_Error object otherwise.
+ * @phpstan-param array{
+ * clear_update_cache?: bool,
+ * } $args
+ */
+ public function upgrade($plugin, $args = array())
+ {
+ }
+ /**
+ * Bulk upgrade several plugins at once.
+ *
+ * @since 2.8.0
+ * @since 3.7.0 The `$args` parameter was added, making clearing the plugin update cache optional.
+ *
+ * @param string[] $plugins Array of paths to plugin files relative to the plugins directory.
+ * @param array $args {
+ * Optional. Other arguments for upgrading several plugins at once.
+ *
+ * @type bool $clear_update_cache Whether to clear the plugin updates cache if successful. Default true.
+ * }
+ * @return array|false An array of results indexed by plugin file, or false if unable to connect to the filesystem.
+ * @phpstan-param array{
+ * clear_update_cache?: bool,
+ * } $args
+ */
+ public function bulk_upgrade($plugins, $args = array())
+ {
+ }
+ /**
+ * Checks that the source package contains a valid plugin.
+ *
+ * Hooked to the {@see 'upgrader_source_selection'} filter by Plugin_Upgrader::install().
+ *
+ * @since 3.3.0
+ *
+ * @global WP_Filesystem_Base $wp_filesystem WordPress filesystem subclass.
+ * @global string $wp_version The WordPress version string.
+ *
+ * @param string $source The path to the downloaded package source.
+ * @return string|WP_Error The source as passed, or a WP_Error object on failure.
+ */
+ public function check_package($source)
+ {
+ }
+ /**
+ * Retrieve the path to the file that contains the plugin info.
+ *
+ * This isn't used internally in the class, but is called by the skins.
+ *
+ * @since 2.8.0
+ *
+ * @return string|false The full path to the main plugin file, or false.
+ */
+ public function plugin_info()
+ {
+ }
+ /**
+ * Deactivates a plugin before it is upgraded.
+ *
+ * Hooked to the {@see 'upgrader_pre_install'} filter by Plugin_Upgrader::upgrade().
+ *
+ * @since 2.8.0
+ * @since 4.1.0 Added a return value.
+ *
+ * @param bool|WP_Error $response The installation response before the installation has started.
+ * @param array $plugin Plugin package arguments.
+ * @return bool|WP_Error The original `$response` parameter or WP_Error.
+ */
+ public function deactivate_plugin_before_upgrade($response, $plugin)
+ {
+ }
+ /**
+ * Turns on maintenance mode before attempting to background update an active plugin.
+ *
+ * Hooked to the {@see 'upgrader_pre_install'} filter by Plugin_Upgrader::upgrade().
+ *
+ * @since 5.4.0
+ *
+ * @param bool|WP_Error $response The installation response before the installation has started.
+ * @param array $plugin Plugin package arguments.
+ * @return bool|WP_Error The original `$response` parameter or WP_Error.
+ */
+ public function active_before($response, $plugin)
+ {
+ }
+ /**
+ * Turns off maintenance mode after upgrading an active plugin.
+ *
+ * Hooked to the {@see 'upgrader_post_install'} filter by Plugin_Upgrader::upgrade().
+ *
+ * @since 5.4.0
+ *
+ * @param bool|WP_Error $response The installation response after the installation has finished.
+ * @param array $plugin Plugin package arguments.
+ * @return bool|WP_Error The original `$response` parameter or WP_Error.
+ */
+ public function active_after($response, $plugin)
+ {
+ }
+ /**
+ * Deletes the old plugin during an upgrade.
+ *
+ * Hooked to the {@see 'upgrader_clear_destination'} filter by
+ * Plugin_Upgrader::upgrade() and Plugin_Upgrader::bulk_upgrade().
+ *
+ * @since 2.8.0
+ *
+ * @global WP_Filesystem_Base $wp_filesystem WordPress filesystem subclass.
+ *
+ * @param bool|WP_Error $removed Whether the destination was cleared.
+ * True on success, WP_Error on failure.
+ * @param string $local_destination The local package destination.
+ * @param string $remote_destination The remote package destination.
+ * @param array $plugin Extra arguments passed to hooked filters.
+ * @return bool|WP_Error
+ */
+ public function delete_old_plugin($removed, $local_destination, $remote_destination, $plugin)
+ {
+ }
+ }
+ /**
+ * Upgrader API: Theme_Installer_Skin class
+ *
+ * @package WordPress
+ * @subpackage Upgrader
+ * @since 4.6.0
+ */
+ /**
+ * Theme Installer Skin for the WordPress Theme Installer.
+ *
+ * @since 2.8.0
+ * @since 4.6.0 Moved to its own file from wp-admin/includes/class-wp-upgrader-skins.php.
+ *
+ * @see WP_Upgrader_Skin
+ */
+ class Theme_Installer_Skin extends \WP_Upgrader_Skin
+ {
+ public $api;
+ public $type;
+ public $url;
+ public $overwrite;
+ /**
+ * @param array $args
+ */
+ public function __construct($args = array())
+ {
+ }
+ /**
+ * Action to perform before installing a theme.
+ *
+ * @since 2.8.0
+ */
+ public function before()
+ {
+ }
+ /**
+ * Hides the `process_failed` error when updating a theme by uploading a zip file.
+ *
+ * @since 5.5.0
+ *
+ * @param WP_Error $wp_error WP_Error object.
+ * @return bool
+ */
+ public function hide_process_failed($wp_error)
+ {
+ }
+ /**
+ * Action to perform following a single theme install.
+ *
+ * @since 2.8.0
+ */
+ public function after()
+ {
+ }
+ }
+ /**
+ * Upgrader API: Theme_Upgrader_Skin class
+ *
+ * @package WordPress
+ * @subpackage Upgrader
+ * @since 4.6.0
+ */
+ /**
+ * Theme Upgrader Skin for WordPress Theme Upgrades.
+ *
+ * @since 2.8.0
+ * @since 4.6.0 Moved to its own file from wp-admin/includes/class-wp-upgrader-skins.php.
+ *
+ * @see WP_Upgrader_Skin
+ */
+ class Theme_Upgrader_Skin extends \WP_Upgrader_Skin
+ {
+ /**
+ * Holds the theme slug in the Theme Directory.
+ *
+ * @since 2.8.0
+ *
+ * @var string
+ */
+ public $theme = '';
+ /**
+ * Constructor.
+ *
+ * Sets up the theme upgrader skin.
+ *
+ * @since 2.8.0
+ *
+ * @param array $args Optional. The theme upgrader skin arguments to
+ * override default options. Default empty array.
+ */
+ public function __construct($args = array())
+ {
+ }
+ /**
+ * Action to perform following a single theme update.
+ *
+ * @since 2.8.0
+ */
+ public function after()
+ {
+ }
+ }
+ /**
+ * Upgrade API: Theme_Upgrader class
+ *
+ * @package WordPress
+ * @subpackage Upgrader
+ * @since 4.6.0
+ */
+ /**
+ * Core class used for upgrading/installing themes.
+ *
+ * It is designed to upgrade/install themes from a local zip, remote zip URL,
+ * or uploaded zip file.
+ *
+ * @since 2.8.0
+ * @since 4.6.0 Moved to its own file from wp-admin/includes/class-wp-upgrader.php.
+ *
+ * @see WP_Upgrader
+ */
+ class Theme_Upgrader extends \WP_Upgrader
+ {
+ /**
+ * Result of the theme upgrade offer.
+ *
+ * @since 2.8.0
+ * @var array|WP_Error $result
+ * @see WP_Upgrader::$result
+ */
+ public $result;
+ /**
+ * Whether multiple themes are being upgraded/installed in bulk.
+ *
+ * @since 2.9.0
+ * @var bool $bulk
+ */
+ public $bulk = \false;
+ /**
+ * New theme info.
+ *
+ * @since 5.5.0
+ * @var array $new_theme_data
+ *
+ * @see check_package()
+ */
+ public $new_theme_data = array();
+ /**
+ * Initialize the upgrade strings.
+ *
+ * @since 2.8.0
+ */
+ public function upgrade_strings()
+ {
+ }
+ /**
+ * Initialize the installation strings.
+ *
+ * @since 2.8.0
+ */
+ public function install_strings()
+ {
+ }
+ /**
+ * Check if a child theme is being installed and we need to install its parent.
+ *
+ * Hooked to the {@see 'upgrader_post_install'} filter by Theme_Upgrader::install().
+ *
+ * @since 3.4.0
+ *
+ * @param bool $install_result
+ * @param array $hook_extra
+ * @param array $child_result
+ * @return bool
+ */
+ public function check_parent_theme_filter($install_result, $hook_extra, $child_result)
+ {
+ }
+ /**
+ * Don't display the activate and preview actions to the user.
+ *
+ * Hooked to the {@see 'install_theme_complete_actions'} filter by
+ * Theme_Upgrader::check_parent_theme_filter() when installing
+ * a child theme and installing the parent theme fails.
+ *
+ * @since 3.4.0
+ *
+ * @param array $actions Preview actions.
+ * @return array
+ */
+ public function hide_activate_preview_actions($actions)
+ {
+ }
+ /**
+ * Install a theme package.
+ *
+ * @since 2.8.0
+ * @since 3.7.0 The `$args` parameter was added, making clearing the update cache optional.
+ *
+ * @param string $package The full local path or URI of the package.
+ * @param array $args {
+ * Optional. Other arguments for installing a theme package. Default empty array.
+ *
+ * @type bool $clear_update_cache Whether to clear the updates cache if successful.
+ * Default true.
+ * }
+ *
+ * @return bool|WP_Error True if the installation was successful, false or a WP_Error object otherwise.
+ * @phpstan-param array{
+ * clear_update_cache?: bool,
+ * } $args
+ */
+ public function install($package, $args = array())
+ {
+ }
+ /**
+ * Upgrade a theme.
+ *
+ * @since 2.8.0
+ * @since 3.7.0 The `$args` parameter was added, making clearing the update cache optional.
+ *
+ * @param string $theme The theme slug.
+ * @param array $args {
+ * Optional. Other arguments for upgrading a theme. Default empty array.
+ *
+ * @type bool $clear_update_cache Whether to clear the update cache if successful.
+ * Default true.
+ * }
+ * @return bool|WP_Error True if the upgrade was successful, false or a WP_Error object otherwise.
+ * @phpstan-param array{
+ * clear_update_cache?: bool,
+ * } $args
+ */
+ public function upgrade($theme, $args = array())
+ {
+ }
+ /**
+ * Upgrade several themes at once.
+ *
+ * @since 3.0.0
+ * @since 3.7.0 The `$args` parameter was added, making clearing the update cache optional.
+ *
+ * @param string[] $themes Array of the theme slugs.
+ * @param array $args {
+ * Optional. Other arguments for upgrading several themes at once. Default empty array.
+ *
+ * @type bool $clear_update_cache Whether to clear the update cache if successful.
+ * Default true.
+ * }
+ * @return array[]|false An array of results, or false if unable to connect to the filesystem.
+ * @phpstan-param array{
+ * clear_update_cache?: bool,
+ * } $args
+ */
+ public function bulk_upgrade($themes, $args = array())
+ {
+ }
+ /**
+ * Checks that the package source contains a valid theme.
+ *
+ * Hooked to the {@see 'upgrader_source_selection'} filter by Theme_Upgrader::install().
+ *
+ * @since 3.3.0
+ *
+ * @global WP_Filesystem_Base $wp_filesystem WordPress filesystem subclass.
+ * @global string $wp_version The WordPress version string.
+ *
+ * @param string $source The path to the downloaded package source.
+ * @return string|WP_Error The source as passed, or a WP_Error object on failure.
+ */
+ public function check_package($source)
+ {
+ }
+ /**
+ * Turn on maintenance mode before attempting to upgrade the active theme.
+ *
+ * Hooked to the {@see 'upgrader_pre_install'} filter by Theme_Upgrader::upgrade() and
+ * Theme_Upgrader::bulk_upgrade().
+ *
+ * @since 2.8.0
+ *
+ * @param bool|WP_Error $response The installation response before the installation has started.
+ * @param array $theme Theme arguments.
+ * @return bool|WP_Error The original `$response` parameter or WP_Error.
+ */
+ public function current_before($response, $theme)
+ {
+ }
+ /**
+ * Turn off maintenance mode after upgrading the active theme.
+ *
+ * Hooked to the {@see 'upgrader_post_install'} filter by Theme_Upgrader::upgrade()
+ * and Theme_Upgrader::bulk_upgrade().
+ *
+ * @since 2.8.0
+ *
+ * @param bool|WP_Error $response The installation response after the installation has finished.
+ * @param array $theme Theme arguments.
+ * @return bool|WP_Error The original `$response` parameter or WP_Error.
+ */
+ public function current_after($response, $theme)
+ {
+ }
+ /**
+ * Delete the old theme during an upgrade.
+ *
+ * Hooked to the {@see 'upgrader_clear_destination'} filter by Theme_Upgrader::upgrade()
+ * and Theme_Upgrader::bulk_upgrade().
+ *
+ * @since 2.8.0
+ *
+ * @global WP_Filesystem_Base $wp_filesystem Subclass
+ *
+ * @param bool $removed
+ * @param string $local_destination
+ * @param string $remote_destination
+ * @param array $theme
+ * @return bool
+ */
+ public function delete_old_theme($removed, $local_destination, $remote_destination, $theme)
+ {
+ }
+ /**
+ * Get the WP_Theme object for a theme.
+ *
+ * @since 2.8.0
+ * @since 3.0.0 The `$theme` argument was added.
+ *
+ * @param string $theme The directory name of the theme. This is optional, and if not supplied,
+ * the directory name from the last result will be used.
+ * @return WP_Theme|false The theme's info object, or false `$theme` is not supplied
+ * and the last result isn't set.
+ */
+ public function theme_info($theme = \null)
+ {
+ }
+ }
+ /**
+ * A class for displaying various tree-like structures.
+ *
+ * Extend the Walker class to use it, see examples below. Child classes
+ * do not need to implement all of the abstract methods in the class. The child
+ * only needs to implement the methods that are needed.
+ *
+ * @since 2.1.0
+ *
+ * @package WordPress
+ * @abstract
+ */
+ #[\AllowDynamicProperties]
+ class Walker
+ {
+ /**
+ * What the class handles.
+ *
+ * @since 2.1.0
+ * @var string
+ */
+ public $tree_type;
+ /**
+ * DB fields to use.
+ *
+ * @since 2.1.0
+ * @var string[]
+ */
+ public $db_fields;
+ /**
+ * Max number of pages walked by the paged walker.
+ *
+ * @since 2.7.0
+ * @var int
+ */
+ public $max_pages = 1;
+ /**
+ * Whether the current element has children or not.
+ *
+ * To be used in start_el().
+ *
+ * @since 4.0.0
+ * @var bool
+ */
+ public $has_children;
+ /**
+ * Starts the list before the elements are added.
+ *
+ * The $args parameter holds additional values that may be used with the child
+ * class methods. This method is called at the start of the output list.
+ *
+ * @since 2.1.0
+ * @abstract
+ *
+ * @param string $output Used to append additional content (passed by reference).
+ * @param int $depth Depth of the item.
+ * @param array $args An array of additional arguments.
+ */
+ public function start_lvl(&$output, $depth = 0, $args = array())
+ {
+ }
+ /**
+ * Ends the list of after the elements are added.
+ *
+ * The $args parameter holds additional values that may be used with the child
+ * class methods. This method finishes the list at the end of output of the elements.
+ *
+ * @since 2.1.0
+ * @abstract
+ *
+ * @param string $output Used to append additional content (passed by reference).
+ * @param int $depth Depth of the item.
+ * @param array $args An array of additional arguments.
+ */
+ public function end_lvl(&$output, $depth = 0, $args = array())
+ {
+ }
+ /**
+ * Starts the element output.
+ *
+ * The $args parameter holds additional values that may be used with the child
+ * class methods. Also includes the element output.
+ *
+ * @since 2.1.0
+ * @since 5.9.0 Renamed `$object` (a PHP reserved keyword) to `$data_object` for PHP 8 named parameter support.
+ * @abstract
+ *
+ * @param string $output Used to append additional content (passed by reference).
+ * @param object $data_object The data object.
+ * @param int $depth Depth of the item.
+ * @param array $args An array of additional arguments.
+ * @param int $current_object_id Optional. ID of the current item. Default 0.
+ */
+ public function start_el(&$output, $data_object, $depth = 0, $args = array(), $current_object_id = 0)
+ {
+ }
+ /**
+ * Ends the element output, if needed.
+ *
+ * The $args parameter holds additional values that may be used with the child class methods.
+ *
+ * @since 2.1.0
+ * @since 5.9.0 Renamed `$object` (a PHP reserved keyword) to `$data_object` for PHP 8 named parameter support.
+ * @abstract
+ *
+ * @param string $output Used to append additional content (passed by reference).
+ * @param object $data_object The data object.
+ * @param int $depth Depth of the item.
+ * @param array $args An array of additional arguments.
+ */
+ public function end_el(&$output, $data_object, $depth = 0, $args = array())
+ {
+ }
+ /**
+ * Traverses elements to create list from elements.
+ *
+ * Display one element if the element doesn't have any children otherwise,
+ * display the element and its children. Will only traverse up to the max
+ * depth and no ignore elements under that depth. It is possible to set the
+ * max depth to include all depths, see walk() method.
+ *
+ * This method should not be called directly, use the walk() method instead.
+ *
+ * @since 2.5.0
+ *
+ * @param object $element Data object.
+ * @param array $children_elements List of elements to continue traversing (passed by reference).
+ * @param int $max_depth Max depth to traverse.
+ * @param int $depth Depth of current element.
+ * @param array $args An array of arguments.
+ * @param string $output Used to append additional content (passed by reference).
+ */
+ public function display_element($element, &$children_elements, $max_depth, $depth, $args, &$output)
+ {
+ }
+ /**
+ * Displays array of elements hierarchically.
+ *
+ * Does not assume any existing order of elements.
+ *
+ * $max_depth = -1 means flatly display every element.
+ * $max_depth = 0 means display all levels.
+ * $max_depth > 0 specifies the number of display levels.
+ *
+ * @since 2.1.0
+ * @since 5.3.0 Formalized the existing `...$args` parameter by adding it
+ * to the function signature.
+ *
+ * @param array $elements An array of elements.
+ * @param int $max_depth The maximum hierarchical depth.
+ * @param mixed ...$args Optional additional arguments.
+ * @return string The hierarchical item output.
+ */
+ public function walk($elements, $max_depth, ...$args)
+ {
+ }
+ /**
+ * Produces a page of nested elements.
+ *
+ * Given an array of hierarchical elements, the maximum depth, a specific page number,
+ * and number of elements per page, this function first determines all top level root elements
+ * belonging to that page, then lists them and all of their children in hierarchical order.
+ *
+ * $max_depth = 0 means display all levels.
+ * $max_depth > 0 specifies the number of display levels.
+ *
+ * @since 2.7.0
+ * @since 5.3.0 Formalized the existing `...$args` parameter by adding it
+ * to the function signature.
+ *
+ * @param array $elements An array of elements.
+ * @param int $max_depth The maximum hierarchical depth.
+ * @param int $page_num The specific page number, beginning with 1.
+ * @param int $per_page Number of elements per page.
+ * @param mixed ...$args Optional additional arguments.
+ * @return string XHTML of the specified page of elements.
+ */
+ public function paged_walk($elements, $max_depth, $page_num, $per_page, ...$args)
+ {
+ }
+ /**
+ * Calculates the total number of root elements.
+ *
+ * @since 2.7.0
+ *
+ * @param array $elements Elements to list.
+ * @return int Number of root elements.
+ */
+ public function get_number_of_root_elements($elements)
+ {
+ }
+ /**
+ * Unsets all the children for a given top level element.
+ *
+ * @since 2.7.0
+ *
+ * @param object $element The top level element.
+ * @param array $children_elements The children elements.
+ */
+ public function unset_children($element, &$children_elements)
+ {
+ }
+ }
+ /**
+ * Taxonomy API: Walker_Category_Checklist class
+ *
+ * @package WordPress
+ * @subpackage Administration
+ * @since 4.4.0
+ */
+ /**
+ * Core walker class to output an unordered list of category checkbox input elements.
+ *
+ * @since 2.5.1
+ *
+ * @see Walker
+ * @see wp_category_checklist()
+ * @see wp_terms_checklist()
+ */
+ class Walker_Category_Checklist extends \Walker
+ {
+ public $tree_type = 'category';
+ public $db_fields = array('parent' => 'parent', 'id' => 'term_id');
+ // TODO: Decouple this.
+ /**
+ * Starts the list before the elements are added.
+ *
+ * @see Walker:start_lvl()
+ *
+ * @since 2.5.1
+ *
+ * @param string $output Used to append additional content (passed by reference).
+ * @param int $depth Depth of category. Used for tab indentation.
+ * @param array $args An array of arguments. @see wp_terms_checklist()
+ * @phpstan-param array{
+ * descendants_and_self?: int,
+ * selected_cats?: int[],
+ * popular_cats?: int[],
+ * walker?: Walker,
+ * taxonomy?: string,
+ * checked_ontop?: bool,
+ * echo?: bool,
+ * } $args See wp_terms_checklist()
+ */
+ public function start_lvl(&$output, $depth = 0, $args = array())
+ {
+ }
+ /**
+ * Ends the list of after the elements are added.
+ *
+ * @see Walker::end_lvl()
+ *
+ * @since 2.5.1
+ *
+ * @param string $output Used to append additional content (passed by reference).
+ * @param int $depth Depth of category. Used for tab indentation.
+ * @param array $args An array of arguments. @see wp_terms_checklist()
+ * @phpstan-param array{
+ * descendants_and_self?: int,
+ * selected_cats?: int[],
+ * popular_cats?: int[],
+ * walker?: Walker,
+ * taxonomy?: string,
+ * checked_ontop?: bool,
+ * echo?: bool,
+ * } $args See wp_terms_checklist()
+ */
+ public function end_lvl(&$output, $depth = 0, $args = array())
+ {
+ }
+ /**
+ * Start the element output.
+ *
+ * @see Walker::start_el()
+ *
+ * @since 2.5.1
+ * @since 5.9.0 Renamed `$category` to `$data_object` and `$id` to `$current_object_id`
+ * to match parent class for PHP 8 named parameter support.
+ *
+ * @param string $output Used to append additional content (passed by reference).
+ * @param WP_Term $data_object The current term object.
+ * @param int $depth Depth of the term in reference to parents. Default 0.
+ * @param array $args An array of arguments. @see wp_terms_checklist()
+ * @param int $current_object_id Optional. ID of the current term. Default 0.
+ * @phpstan-param array{
+ * descendants_and_self?: int,
+ * selected_cats?: int[],
+ * popular_cats?: int[],
+ * walker?: Walker,
+ * taxonomy?: string,
+ * checked_ontop?: bool,
+ * echo?: bool,
+ * } $args See wp_terms_checklist()
+ */
+ public function start_el(&$output, $data_object, $depth = 0, $args = array(), $current_object_id = 0)
+ {
+ }
+ /**
+ * Ends the element output, if needed.
+ *
+ * @see Walker::end_el()
+ *
+ * @since 2.5.1
+ * @since 5.9.0 Renamed `$category` to `$data_object` to match parent class for PHP 8 named parameter support.
+ *
+ * @param string $output Used to append additional content (passed by reference).
+ * @param WP_Term $data_object The current term object.
+ * @param int $depth Depth of the term in reference to parents. Default 0.
+ * @param array $args An array of arguments. @see wp_terms_checklist()
+ * @phpstan-param array{
+ * descendants_and_self?: int,
+ * selected_cats?: int[],
+ * popular_cats?: int[],
+ * walker?: Walker,
+ * taxonomy?: string,
+ * checked_ontop?: bool,
+ * echo?: bool,
+ * } $args See wp_terms_checklist()
+ */
+ public function end_el(&$output, $data_object, $depth = 0, $args = array())
+ {
+ }
+ }
+ /**
+ * Nav Menu API: Walker_Nav_Menu class
+ *
+ * @package WordPress
+ * @subpackage Nav_Menus
+ * @since 4.6.0
+ */
+ /**
+ * Core class used to implement an HTML list of nav menu items.
+ *
+ * @since 3.0.0
+ *
+ * @see Walker
+ */
+ class Walker_Nav_Menu extends \Walker
+ {
+ /**
+ * What the class handles.
+ *
+ * @since 3.0.0
+ * @var string
+ *
+ * @see Walker::$tree_type
+ */
+ public $tree_type = array('post_type', 'taxonomy', 'custom');
+ /**
+ * Database fields to use.
+ *
+ * @since 3.0.0
+ * @todo Decouple this.
+ * @var string[]
+ *
+ * @see Walker::$db_fields
+ */
+ public $db_fields = array('parent' => 'menu_item_parent', 'id' => 'db_id');
+ /**
+ * Starts the list before the elements are added.
+ *
+ * @since 3.0.0
+ *
+ * @see Walker::start_lvl()
+ *
+ * @param string $output Used to append additional content (passed by reference).
+ * @param int $depth Depth of menu item. Used for padding.
+ * @param stdClass $args An object of wp_nav_menu() arguments.
+ */
+ public function start_lvl(&$output, $depth = 0, $args = \null)
+ {
+ }
+ /**
+ * Ends the list of after the elements are added.
+ *
+ * @since 3.0.0
+ *
+ * @see Walker::end_lvl()
+ *
+ * @param string $output Used to append additional content (passed by reference).
+ * @param int $depth Depth of menu item. Used for padding.
+ * @param stdClass $args An object of wp_nav_menu() arguments.
+ */
+ public function end_lvl(&$output, $depth = 0, $args = \null)
+ {
+ }
+ /**
+ * Starts the element output.
+ *
+ * @since 3.0.0
+ * @since 4.4.0 The {@see 'nav_menu_item_args'} filter was added.
+ * @since 5.9.0 Renamed `$item` to `$data_object` and `$id` to `$current_object_id`
+ * to match parent class for PHP 8 named parameter support.
+ *
+ * @see Walker::start_el()
+ *
+ * @param string $output Used to append additional content (passed by reference).
+ * @param WP_Post $data_object Menu item data object.
+ * @param int $depth Depth of menu item. Used for padding.
+ * @param stdClass $args An object of wp_nav_menu() arguments.
+ * @param int $current_object_id Optional. ID of the current menu item. Default 0.
+ */
+ public function start_el(&$output, $data_object, $depth = 0, $args = \null, $current_object_id = 0)
+ {
+ }
+ /**
+ * Ends the element output, if needed.
+ *
+ * @since 3.0.0
+ * @since 5.9.0 Renamed `$item` to `$data_object` to match parent class for PHP 8 named parameter support.
+ *
+ * @see Walker::end_el()
+ *
+ * @param string $output Used to append additional content (passed by reference).
+ * @param WP_Post $data_object Menu item data object. Not used.
+ * @param int $depth Depth of page. Not Used.
+ * @param stdClass $args An object of wp_nav_menu() arguments.
+ */
+ public function end_el(&$output, $data_object, $depth = 0, $args = \null)
+ {
+ }
+ }
+ /**
+ * Navigation Menu API: Walker_Nav_Menu_Checklist class
+ *
+ * @package WordPress
+ * @subpackage Administration
+ * @since 4.4.0
+ */
+ /**
+ * Create HTML list of nav menu input items.
+ *
+ * @since 3.0.0
+ * @uses Walker_Nav_Menu
+ */
+ class Walker_Nav_Menu_Checklist extends \Walker_Nav_Menu
+ {
+ /**
+ * @param array|false $fields Database fields to use.
+ */
+ public function __construct($fields = \false)
+ {
+ }
+ /**
+ * Starts the list before the elements are added.
+ *
+ * @see Walker_Nav_Menu::start_lvl()
+ *
+ * @since 3.0.0
+ *
+ * @param string $output Used to append additional content (passed by reference).
+ * @param int $depth Depth of page. Used for padding.
+ * @param stdClass $args Not used.
+ */
+ public function start_lvl(&$output, $depth = 0, $args = \null)
+ {
+ }
+ /**
+ * Ends the list of after the elements are added.
+ *
+ * @see Walker_Nav_Menu::end_lvl()
+ *
+ * @since 3.0.0
+ *
+ * @param string $output Used to append additional content (passed by reference).
+ * @param int $depth Depth of page. Used for padding.
+ * @param stdClass $args Not used.
+ */
+ public function end_lvl(&$output, $depth = 0, $args = \null)
+ {
+ }
+ /**
+ * Start the element output.
+ *
+ * @see Walker_Nav_Menu::start_el()
+ *
+ * @since 3.0.0
+ * @since 5.9.0 Renamed `$item` to `$data_object` and `$id` to `$current_object_id`
+ * to match parent class for PHP 8 named parameter support.
+ *
+ * @global int $_nav_menu_placeholder
+ * @global int|string $nav_menu_selected_id
+ *
+ * @param string $output Used to append additional content (passed by reference).
+ * @param WP_Post $data_object Menu item data object.
+ * @param int $depth Depth of menu item. Used for padding.
+ * @param stdClass $args Not used.
+ * @param int $current_object_id Optional. ID of the current menu item. Default 0.
+ */
+ public function start_el(&$output, $data_object, $depth = 0, $args = \null, $current_object_id = 0)
+ {
+ }
+ }
+ /**
+ * Navigation Menu API: Walker_Nav_Menu_Edit class
+ *
+ * @package WordPress
+ * @subpackage Administration
+ * @since 4.4.0
+ */
+ /**
+ * Create HTML list of nav menu input items.
+ *
+ * @since 3.0.0
+ *
+ * @see Walker_Nav_Menu
+ */
+ class Walker_Nav_Menu_Edit extends \Walker_Nav_Menu
+ {
+ /**
+ * Starts the list before the elements are added.
+ *
+ * @see Walker_Nav_Menu::start_lvl()
+ *
+ * @since 3.0.0
+ *
+ * @param string $output Passed by reference.
+ * @param int $depth Depth of menu item. Used for padding.
+ * @param stdClass $args Not used.
+ */
+ public function start_lvl(&$output, $depth = 0, $args = \null)
+ {
+ }
+ /**
+ * Ends the list of after the elements are added.
+ *
+ * @see Walker_Nav_Menu::end_lvl()
+ *
+ * @since 3.0.0
+ *
+ * @param string $output Passed by reference.
+ * @param int $depth Depth of menu item. Used for padding.
+ * @param stdClass $args Not used.
+ */
+ public function end_lvl(&$output, $depth = 0, $args = \null)
+ {
+ }
+ /**
+ * Start the element output.
+ *
+ * @see Walker_Nav_Menu::start_el()
+ * @since 3.0.0
+ * @since 5.9.0 Renamed `$item` to `$data_object` and `$id` to `$current_object_id`
+ * to match parent class for PHP 8 named parameter support.
+ *
+ * @global int $_wp_nav_menu_max_depth
+ *
+ * @param string $output Used to append additional content (passed by reference).
+ * @param WP_Post $data_object Menu item data object.
+ * @param int $depth Depth of menu item. Used for padding.
+ * @param stdClass $args Not used.
+ * @param int $current_object_id Optional. ID of the current menu item. Default 0.
+ */
+ public function start_el(&$output, $data_object, $depth = 0, $args = \null, $current_object_id = 0)
+ {
+ }
+ }
+ /**
+ * Upgrader API: WP_Ajax_Upgrader_Skin class
+ *
+ * @package WordPress
+ * @subpackage Upgrader
+ * @since 4.6.0
+ */
+ /**
+ * Upgrader Skin for Ajax WordPress upgrades.
+ *
+ * This skin is designed to be used for Ajax updates.
+ *
+ * @since 4.6.0
+ *
+ * @see Automatic_Upgrader_Skin
+ */
+ class WP_Ajax_Upgrader_Skin extends \Automatic_Upgrader_Skin
+ {
+ /**
+ * Plugin info.
+ *
+ * The Plugin_Upgrader::bulk_upgrade() method will fill this in
+ * with info retrieved from the get_plugin_data() function.
+ *
+ * @var array Plugin data. Values will be empty if not supplied by the plugin.
+ */
+ public $plugin_info = array();
+ /**
+ * Theme info.
+ *
+ * The Theme_Upgrader::bulk_upgrade() method will fill this in
+ * with info retrieved from the Theme_Upgrader::theme_info() method,
+ * which in turn calls the wp_get_theme() function.
+ *
+ * @var WP_Theme|false The theme's info object, or false.
+ */
+ public $theme_info = \false;
+ /**
+ * Holds the WP_Error object.
+ *
+ * @since 4.6.0
+ *
+ * @var null|WP_Error
+ */
+ protected $errors = \null;
+ /**
+ * Constructor.
+ *
+ * Sets up the WordPress Ajax upgrader skin.
+ *
+ * @since 4.6.0
+ *
+ * @see WP_Upgrader_Skin::__construct()
+ *
+ * @param array $args Optional. The WordPress Ajax upgrader skin arguments to
+ * override default options. See WP_Upgrader_Skin::__construct().
+ * Default empty array.
+ */
+ public function __construct($args = array())
+ {
+ }
+ /**
+ * Retrieves the list of errors.
+ *
+ * @since 4.6.0
+ *
+ * @return WP_Error Errors during an upgrade.
+ */
+ public function get_errors()
+ {
+ }
+ /**
+ * Retrieves a string for error messages.
+ *
+ * @since 4.6.0
+ *
+ * @return string Error messages during an upgrade.
+ */
+ public function get_error_messages()
+ {
+ }
+ /**
+ * Stores an error message about the upgrade.
+ *
+ * @since 4.6.0
+ * @since 5.3.0 Formalized the existing `...$args` parameter by adding it
+ * to the function signature.
+ *
+ * @param string|WP_Error $errors Errors.
+ * @param mixed ...$args Optional text replacements.
+ */
+ public function error($errors, ...$args)
+ {
+ }
+ /**
+ * Stores a message about the upgrade.
+ *
+ * @since 4.6.0
+ * @since 5.3.0 Formalized the existing `...$args` parameter by adding it
+ * to the function signature.
+ * @since 5.9.0 Renamed `$data` to `$feedback` for PHP 8 named parameter support.
+ *
+ * @param string|array|WP_Error $feedback Message data.
+ * @param mixed ...$args Optional text replacements.
+ */
+ public function feedback($feedback, ...$args)
+ {
+ }
+ }
+ /**
+ * Administration API: WP_List_Table class
+ *
+ * @package WordPress
+ * @subpackage List_Table
+ * @since 3.1.0
+ */
+ /**
+ * Base class for displaying a list of items in an ajaxified HTML table.
+ *
+ * @since 3.1.0
+ */
+ #[\AllowDynamicProperties]
+ class WP_List_Table
+ {
+ /**
+ * The current list of items.
+ *
+ * @since 3.1.0
+ * @var array
+ */
+ public $items;
+ /**
+ * Various information about the current table.
+ *
+ * @since 3.1.0
+ * @var array
+ */
+ protected $_args;
+ /**
+ * Various information needed for displaying the pagination.
+ *
+ * @since 3.1.0
+ * @var array
+ */
+ protected $_pagination_args = array();
+ /**
+ * The current screen.
+ *
+ * @since 3.1.0
+ * @var WP_Screen
+ */
+ protected $screen;
+ /**
+ * The view switcher modes.
+ *
+ * @since 4.1.0
+ * @var array
+ */
+ protected $modes = array();
+ /**
+ * Stores the value returned by ->get_column_info().
+ *
+ * @since 4.1.0
+ * @var array
+ */
+ protected $_column_headers;
+ /**
+ * {@internal Missing Summary}
+ *
+ * @var array
+ */
+ protected $compat_fields = array('_args', '_pagination_args', 'screen', '_actions', '_pagination');
+ /**
+ * {@internal Missing Summary}
+ *
+ * @var array
+ */
+ protected $compat_methods = array('set_pagination_args', 'get_views', 'get_bulk_actions', 'bulk_actions', 'row_actions', 'months_dropdown', 'view_switcher', 'comments_bubble', 'get_items_per_page', 'pagination', 'get_sortable_columns', 'get_column_info', 'get_table_classes', 'display_tablenav', 'extra_tablenav', 'single_row_columns');
+ /**
+ * Constructor.
+ *
+ * The child class should call this constructor from its own constructor to override
+ * the default $args.
+ *
+ * @since 3.1.0
+ *
+ * @param array|string $args {
+ * Array or string of arguments.
+ *
+ * @type string $plural Plural value used for labels and the objects being listed.
+ * This affects things such as CSS class-names and nonces used
+ * in the list table, e.g. 'posts'. Default empty.
+ * @type string $singular Singular label for an object being listed, e.g. 'post'.
+ * Default empty
+ * @type bool $ajax Whether the list table supports Ajax. This includes loading
+ * and sorting data, for example. If true, the class will call
+ * the _js_vars() method in the footer to provide variables
+ * to any scripts handling Ajax events. Default false.
+ * @type string $screen String containing the hook name used to determine the current
+ * screen. If left null, the current screen will be automatically set.
+ * Default null.
+ * }
+ * @phpstan-param array{
+ * plural?: string,
+ * singular?: string,
+ * ajax?: bool,
+ * screen?: string,
+ * } $args
+ */
+ public function __construct($args = array())
+ {
+ }
+ /**
+ * Make private properties readable for backward compatibility.
+ *
+ * @since 4.0.0
+ *
+ * @param string $name Property to get.
+ * @return mixed Property.
+ */
+ public function __get($name)
+ {
+ }
+ /**
+ * Make private properties settable for backward compatibility.
+ *
+ * @since 4.0.0
+ *
+ * @param string $name Property to check if set.
+ * @param mixed $value Property value.
+ * @return mixed Newly-set property.
+ */
+ public function __set($name, $value)
+ {
+ }
+ /**
+ * Make private properties checkable for backward compatibility.
+ *
+ * @since 4.0.0
+ *
+ * @param string $name Property to check if set.
+ * @return bool Whether the property is a back-compat property and it is set.
+ */
+ public function __isset($name)
+ {
+ }
+ /**
+ * Make private properties un-settable for backward compatibility.
+ *
+ * @since 4.0.0
+ *
+ * @param string $name Property to unset.
+ */
+ public function __unset($name)
+ {
+ }
+ /**
+ * Make private/protected methods readable for backward compatibility.
+ *
+ * @since 4.0.0
+ *
+ * @param string $name Method to call.
+ * @param array $arguments Arguments to pass when calling.
+ * @return mixed|bool Return value of the callback, false otherwise.
+ */
+ public function __call($name, $arguments)
+ {
+ }
+ /**
+ * Checks the current user's permissions
+ *
+ * @since 3.1.0
+ * @abstract
+ */
+ public function ajax_user_can()
+ {
+ }
+ /**
+ * Prepares the list of items for displaying.
+ *
+ * @uses WP_List_Table::set_pagination_args()
+ *
+ * @since 3.1.0
+ * @abstract
+ */
+ public function prepare_items()
+ {
+ }
+ /**
+ * An internal method that sets all the necessary pagination arguments
+ *
+ * @since 3.1.0
+ *
+ * @param array|string $args Array or string of arguments with information about the pagination.
+ */
+ protected function set_pagination_args($args)
+ {
+ }
+ /**
+ * Access the pagination args.
+ *
+ * @since 3.1.0
+ *
+ * @param string $key Pagination argument to retrieve. Common values include 'total_items',
+ * 'total_pages', 'per_page', or 'infinite_scroll'.
+ * @return int Number of items that correspond to the given pagination argument.
+ */
+ public function get_pagination_arg($key)
+ {
+ }
+ /**
+ * Whether the table has items to display or not
+ *
+ * @since 3.1.0
+ *
+ * @return bool
+ */
+ public function has_items()
+ {
+ }
+ /**
+ * Message to be displayed when there are no items
+ *
+ * @since 3.1.0
+ */
+ public function no_items()
+ {
+ }
+ /**
+ * Displays the search box.
+ *
+ * @since 3.1.0
+ *
+ * @param string $text The 'submit' button label.
+ * @param string $input_id ID attribute value for the search input field.
+ */
+ public function search_box($text, $input_id)
+ {
+ }
+ /**
+ * Generates views links.
+ *
+ * @since 6.1.0
+ *
+ * @param array $link_data {
+ * An array of link data.
+ *
+ * @type string $url The link URL.
+ * @type string $label The link label.
+ * @type bool $current Optional. Whether this is the currently selected view.
+ * }
+ * @return array An array of link markup. Keys match the `$link_data` input array.
+ * @phpstan-param array{
+ * url?: string,
+ * label?: string,
+ * current?: bool,
+ * } $link_data
+ */
+ protected function get_views_links($link_data = array())
+ {
+ }
+ /**
+ * Gets the list of views available on this table.
+ *
+ * The format is an associative array:
+ * - `'id' => 'link'`
+ *
+ * @since 3.1.0
+ *
+ * @return array
+ */
+ protected function get_views()
+ {
+ }
+ /**
+ * Displays the list of views available on this table.
+ *
+ * @since 3.1.0
+ */
+ public function views()
+ {
+ }
+ /**
+ * Retrieves the list of bulk actions available for this table.
+ *
+ * The format is an associative array where each element represents either a top level option value and label, or
+ * an array representing an optgroup and its options.
+ *
+ * For a standard option, the array element key is the field value and the array element value is the field label.
+ *
+ * For an optgroup, the array element key is the label and the array element value is an associative array of
+ * options as above.
+ *
+ * Example:
+ *
+ * [
+ * 'edit' => 'Edit',
+ * 'delete' => 'Delete',
+ * 'Change State' => [
+ * 'feature' => 'Featured',
+ * 'sale' => 'On Sale',
+ * ]
+ * ]
+ *
+ * @since 3.1.0
+ * @since 5.6.0 A bulk action can now contain an array of options in order to create an optgroup.
+ *
+ * @return array
+ */
+ protected function get_bulk_actions()
+ {
+ }
+ /**
+ * Displays the bulk actions dropdown.
+ *
+ * @since 3.1.0
+ *
+ * @param string $which The location of the bulk actions: 'top' or 'bottom'.
+ * This is designated as optional for backward compatibility.
+ * @phpstan-param "top"|"bottom" $which
+ * @phpstan-return void
+ */
+ protected function bulk_actions($which = '')
+ {
+ }
+ /**
+ * Gets the current action selected from the bulk actions dropdown.
+ *
+ * @since 3.1.0
+ *
+ * @return string|false The action name. False if no action was selected.
+ */
+ public function current_action()
+ {
+ }
+ /**
+ * Generates the required HTML for a list of row action links.
+ *
+ * @since 3.1.0
+ *
+ * @param string[] $actions An array of action links.
+ * @param bool $always_visible Whether the actions should be always visible.
+ * @return string The HTML for the row actions.
+ */
+ protected function row_actions($actions, $always_visible = \false)
+ {
+ }
+ /**
+ * Displays a dropdown for filtering items in the list table by month.
+ *
+ * @since 3.1.0
+ *
+ * @global wpdb $wpdb WordPress database abstraction object.
+ * @global WP_Locale $wp_locale WordPress date and time locale object.
+ *
+ * @param string $post_type The post type.
+ */
+ protected function months_dropdown($post_type)
+ {
+ }
+ /**
+ * Displays a view switcher.
+ *
+ * @since 3.1.0
+ *
+ * @param string $current_mode
+ */
+ protected function view_switcher($current_mode)
+ {
+ }
+ /**
+ * Displays a comment count bubble.
+ *
+ * @since 3.1.0
+ *
+ * @param int $post_id The post ID.
+ * @param int $pending_comments Number of pending comments.
+ */
+ protected function comments_bubble($post_id, $pending_comments)
+ {
+ }
+ /**
+ * Gets the current page number.
+ *
+ * @since 3.1.0
+ *
+ * @return int
+ */
+ public function get_pagenum()
+ {
+ }
+ /**
+ * Gets the number of items to display on a single page.
+ *
+ * @since 3.1.0
+ *
+ * @param string $option User option name.
+ * @param int $default_value Optional. The number of items to display. Default 20.
+ * @return int
+ */
+ protected function get_items_per_page($option, $default_value = 20)
+ {
+ }
+ /**
+ * Displays the pagination.
+ *
+ * @since 3.1.0
+ *
+ * @param string $which
+ * @phpstan-param "top"|"bottom" $which
+ * @phpstan-return void
+ */
+ protected function pagination($which)
+ {
+ }
+ /**
+ * Gets a list of columns.
+ *
+ * The format is:
+ * - `'internal-name' => 'Title'`
+ *
+ * @since 3.1.0
+ * @abstract
+ *
+ * @return array
+ */
+ public function get_columns()
+ {
+ }
+ /**
+ * Gets a list of sortable columns.
+ *
+ * The format is:
+ * - `'internal-name' => 'orderby'`
+ * - `'internal-name' => array( 'orderby', 'asc' )` - The second element sets the initial sorting order.
+ * - `'internal-name' => array( 'orderby', true )` - The second element makes the initial order descending.
+ *
+ * @since 3.1.0
+ *
+ * @return array
+ */
+ protected function get_sortable_columns()
+ {
+ }
+ /**
+ * Gets the name of the default primary column.
+ *
+ * @since 4.3.0
+ *
+ * @return string Name of the default primary column, in this case, an empty string.
+ */
+ protected function get_default_primary_column_name()
+ {
+ }
+ /**
+ * Public wrapper for WP_List_Table::get_default_primary_column_name().
+ *
+ * @since 4.4.0
+ *
+ * @return string Name of the default primary column.
+ */
+ public function get_primary_column()
+ {
+ }
+ /**
+ * Gets the name of the primary column.
+ *
+ * @since 4.3.0
+ *
+ * @return string The name of the primary column.
+ */
+ protected function get_primary_column_name()
+ {
+ }
+ /**
+ * Gets a list of all, hidden, and sortable columns, with filter applied.
+ *
+ * @since 3.1.0
+ *
+ * @return array
+ */
+ protected function get_column_info()
+ {
+ }
+ /**
+ * Returns the number of visible columns.
+ *
+ * @since 3.1.0
+ *
+ * @return int
+ */
+ public function get_column_count()
+ {
+ }
+ /**
+ * Prints column headers, accounting for hidden and sortable columns.
+ *
+ * @since 3.1.0
+ *
+ * @param bool $with_id Whether to set the ID attribute or not
+ */
+ public function print_column_headers($with_id = \true)
+ {
+ }
+ /**
+ * Displays the table.
+ *
+ * @since 3.1.0
+ */
+ public function display()
+ {
+ }
+ /**
+ * Gets a list of CSS classes for the WP_List_Table table tag.
+ *
+ * @since 3.1.0
+ *
+ * @return string[] Array of CSS classes for the table tag.
+ */
+ protected function get_table_classes()
+ {
+ }
+ /**
+ * Generates the table navigation above or below the table
+ *
+ * @since 3.1.0
+ * @param string $which
+ * @phpstan-param "top"|"bottom" $which
+ * @phpstan-return void
+ */
+ protected function display_tablenav($which)
+ {
+ }
+ /**
+ * Extra controls to be displayed between bulk actions and pagination.
+ *
+ * @since 3.1.0
+ *
+ * @param string $which
+ */
+ protected function extra_tablenav($which)
+ {
+ }
+ /**
+ * Generates the tbody element for the list table.
+ *
+ * @since 3.1.0
+ */
+ public function display_rows_or_placeholder()
+ {
+ }
+ /**
+ * Generates the table rows.
+ *
+ * @since 3.1.0
+ */
+ public function display_rows()
+ {
+ }
+ /**
+ * Generates content for a single row of the table.
+ *
+ * @since 3.1.0
+ *
+ * @param object|array $item The current item
+ */
+ public function single_row($item)
+ {
+ }
+ /**
+ * @param object|array $item
+ * @param string $column_name
+ */
+ protected function column_default($item, $column_name)
+ {
+ }
+ /**
+ * @param object|array $item
+ */
+ protected function column_cb($item)
+ {
+ }
+ /**
+ * Generates the columns for a single row of the table.
+ *
+ * @since 3.1.0
+ *
+ * @param object|array $item The current item.
+ */
+ protected function single_row_columns($item)
+ {
+ }
+ /**
+ * Generates and display row actions links for the list table.
+ *
+ * @since 4.3.0
+ *
+ * @param object|array $item The item being acted upon.
+ * @param string $column_name Current column name.
+ * @param string $primary Primary column name.
+ * @return string The row actions HTML, or an empty string
+ * if the current column is not the primary column.
+ */
+ protected function handle_row_actions($item, $column_name, $primary)
+ {
+ }
+ /**
+ * Handles an incoming ajax request (called from admin-ajax.php)
+ *
+ * @since 3.1.0
+ */
+ public function ajax_response()
+ {
+ }
+ /**
+ * Sends required variables to JavaScript land.
+ *
+ * @since 3.1.0
+ */
+ public function _js_vars()
+ {
+ }
+ }
+ /**
+ * List Table API: WP_Application_Passwords_List_Table class
+ *
+ * @package WordPress
+ * @subpackage Administration
+ * @since 5.6.0
+ */
+ /**
+ * Class for displaying the list of application password items.
+ *
+ * @since 5.6.0
+ *
+ * @see WP_List_Table
+ */
+ class WP_Application_Passwords_List_Table extends \WP_List_Table
+ {
+ /**
+ * Gets the list of columns.
+ *
+ * @since 5.6.0
+ *
+ * @return array
+ */
+ public function get_columns()
+ {
+ }
+ /**
+ * Prepares the list of items for displaying.
+ *
+ * @since 5.6.0
+ *
+ * @global int $user_id User ID.
+ */
+ public function prepare_items()
+ {
+ }
+ /**
+ * Handles the name column output.
+ *
+ * @since 5.6.0
+ *
+ * @param array $item The current application password item.
+ */
+ public function column_name($item)
+ {
+ }
+ /**
+ * Handles the created column output.
+ *
+ * @since 5.6.0
+ *
+ * @param array $item The current application password item.
+ */
+ public function column_created($item)
+ {
+ }
+ /**
+ * Handles the last used column output.
+ *
+ * @since 5.6.0
+ *
+ * @param array $item The current application password item.
+ */
+ public function column_last_used($item)
+ {
+ }
+ /**
+ * Handles the last ip column output.
+ *
+ * @since 5.6.0
+ *
+ * @param array $item The current application password item.
+ */
+ public function column_last_ip($item)
+ {
+ }
+ /**
+ * Handles the revoke column output.
+ *
+ * @since 5.6.0
+ *
+ * @param array $item The current application password item.
+ */
+ public function column_revoke($item)
+ {
+ }
+ /**
+ * Generates content for a single row of the table
+ *
+ * @since 5.6.0
+ *
+ * @param array $item The current item.
+ * @param string $column_name The current column name.
+ */
+ protected function column_default($item, $column_name)
+ {
+ }
+ /**
+ * Generates custom table navigation to prevent conflicting nonces.
+ *
+ * @since 5.6.0
+ *
+ * @param string $which The location of the bulk actions: 'top' or 'bottom'.
+ */
+ protected function display_tablenav($which)
+ {
+ }
+ /**
+ * Generates content for a single row of the table.
+ *
+ * @since 5.6.0
+ *
+ * @param array $item The current item.
+ */
+ public function single_row($item)
+ {
+ }
+ /**
+ * Gets the name of the default primary column.
+ *
+ * @since 5.6.0
+ *
+ * @return string Name of the default primary column, in this case, 'name'.
+ */
+ protected function get_default_primary_column_name()
+ {
+ }
+ /**
+ * Prints the JavaScript template for the new row item.
+ *
+ * @since 5.6.0
+ */
+ public function print_js_template_row()
+ {
+ }
+ }
+ /**
+ * Upgrade API: WP_Automatic_Updater class
+ *
+ * @package WordPress
+ * @subpackage Upgrader
+ * @since 4.6.0
+ */
+ /**
+ * Core class used for handling automatic background updates.
+ *
+ * @since 3.7.0
+ * @since 4.6.0 Moved to its own file from wp-admin/includes/class-wp-upgrader.php.
+ */
+ #[\AllowDynamicProperties]
+ class WP_Automatic_Updater
+ {
+ /**
+ * Tracks update results during processing.
+ *
+ * @var array
+ */
+ protected $update_results = array();
+ /**
+ * Determines whether the entire automatic updater is disabled.
+ *
+ * @since 3.7.0
+ */
+ public function is_disabled()
+ {
+ }
+ /**
+ * Checks for version control checkouts.
+ *
+ * Checks for Subversion, Git, Mercurial, and Bazaar. It recursively looks up the
+ * filesystem to the top of the drive, erring on the side of detecting a VCS
+ * checkout somewhere.
+ *
+ * ABSPATH is always checked in addition to whatever `$context` is (which may be the
+ * wp-content directory, for example). The underlying assumption is that if you are
+ * using version control *anywhere*, then you should be making decisions for
+ * how things get updated.
+ *
+ * @since 3.7.0
+ *
+ * @param string $context The filesystem path to check, in addition to ABSPATH.
+ * @return bool True if a VCS checkout was discovered at `$context` or ABSPATH,
+ * or anywhere higher. False otherwise.
+ */
+ public function is_vcs_checkout($context)
+ {
+ }
+ /**
+ * Tests to see if we can and should update a specific item.
+ *
+ * @since 3.7.0
+ *
+ * @global wpdb $wpdb WordPress database abstraction object.
+ *
+ * @param string $type The type of update being checked: 'core', 'theme',
+ * 'plugin', 'translation'.
+ * @param object $item The update offer.
+ * @param string $context The filesystem context (a path) against which filesystem
+ * access and status should be checked.
+ * @return bool True if the item should be updated, false otherwise.
+ */
+ public function should_update($type, $item, $context)
+ {
+ }
+ /**
+ * Notifies an administrator of a core update.
+ *
+ * @since 3.7.0
+ *
+ * @param object $item The update offer.
+ * @return bool True if the site administrator is notified of a core update,
+ * false otherwise.
+ */
+ protected function send_core_update_notification_email($item)
+ {
+ }
+ /**
+ * Updates an item, if appropriate.
+ *
+ * @since 3.7.0
+ *
+ * @param string $type The type of update being checked: 'core', 'theme', 'plugin', 'translation'.
+ * @param object $item The update offer.
+ * @return null|WP_Error
+ */
+ public function update($type, $item)
+ {
+ }
+ /**
+ * Kicks off the background update process, looping through all pending updates.
+ *
+ * @since 3.7.0
+ */
+ public function run()
+ {
+ }
+ /**
+ * If we tried to perform a core update, check if we should send an email,
+ * and if we need to avoid processing future updates.
+ *
+ * @since 3.7.0
+ *
+ * @param object $update_result The result of the core update. Includes the update offer and result.
+ */
+ protected function after_core_update($update_result)
+ {
+ }
+ /**
+ * Sends an email upon the completion or failure of a background core update.
+ *
+ * @since 3.7.0
+ *
+ * @param string $type The type of email to send. Can be one of 'success', 'fail', 'manual', 'critical'.
+ * @param object $core_update The update offer that was attempted.
+ * @param mixed $result Optional. The result for the core update. Can be WP_Error.
+ */
+ protected function send_email($type, $core_update, $result = \null)
+ {
+ }
+ /**
+ * If we tried to perform plugin or theme updates, check if we should send an email.
+ *
+ * @since 5.5.0
+ *
+ * @param array $update_results The results of update tasks.
+ */
+ protected function after_plugin_theme_update($update_results)
+ {
+ }
+ /**
+ * Sends an email upon the completion or failure of a plugin or theme background update.
+ *
+ * @since 5.5.0
+ *
+ * @param string $type The type of email to send. Can be one of 'success', 'fail', 'mixed'.
+ * @param array $successful_updates A list of updates that succeeded.
+ * @param array $failed_updates A list of updates that failed.
+ */
+ protected function send_plugin_theme_email($type, $successful_updates, $failed_updates)
+ {
+ }
+ /**
+ * Prepares and sends an email of a full log of background update results, useful for debugging and geekery.
+ *
+ * @since 3.7.0
+ */
+ protected function send_debug_email()
+ {
+ }
+ }
+ /**
+ * List Table API: WP_Comments_List_Table class
+ *
+ * @package WordPress
+ * @subpackage Administration
+ * @since 3.1.0
+ */
+ /**
+ * Core class used to implement displaying comments in a list table.
+ *
+ * @since 3.1.0
+ *
+ * @see WP_List_Table
+ */
+ class WP_Comments_List_Table extends \WP_List_Table
+ {
+ public $checkbox = \true;
+ public $pending_count = array();
+ public $extra_items;
+ /**
+ * Constructor.
+ *
+ * @since 3.1.0
+ *
+ * @see WP_List_Table::__construct() for more information on default arguments.
+ *
+ * @global int $post_id
+ *
+ * @param array $args An associative array of arguments.
+ */
+ public function __construct($args = array())
+ {
+ }
+ /**
+ * Adds avatars to comment author names.
+ *
+ * @since 3.1.0
+ *
+ * @param string $name Comment author name.
+ * @param int $comment_id Comment ID.
+ * @return string Avatar with the user name.
+ */
+ public function floated_admin_avatar($name, $comment_id)
+ {
+ }
+ /**
+ * @return bool
+ */
+ public function ajax_user_can()
+ {
+ }
+ /**
+ * @global string $mode List table view mode.
+ * @global int $post_id
+ * @global string $comment_status
+ * @global string $comment_type
+ * @global string $search
+ */
+ public function prepare_items()
+ {
+ }
+ /**
+ * @param string $comment_status
+ * @return int
+ */
+ public function get_per_page($comment_status = 'all')
+ {
+ }
+ /**
+ * @global string $comment_status
+ */
+ public function no_items()
+ {
+ }
+ /**
+ * @global int $post_id
+ * @global string $comment_status
+ * @global string $comment_type
+ */
+ protected function get_views()
+ {
+ }
+ /**
+ * @global string $comment_status
+ *
+ * @return array
+ */
+ protected function get_bulk_actions()
+ {
+ }
+ /**
+ * @global string $comment_status
+ * @global string $comment_type
+ *
+ * @param string $which
+ */
+ protected function extra_tablenav($which)
+ {
+ }
+ /**
+ * @return string|false
+ */
+ public function current_action()
+ {
+ }
+ /**
+ * @global int $post_id
+ *
+ * @return array
+ */
+ public function get_columns()
+ {
+ }
+ /**
+ * Displays a comment type drop-down for filtering on the Comments list table.
+ *
+ * @since 5.5.0
+ * @since 5.6.0 Renamed from `comment_status_dropdown()` to `comment_type_dropdown()`.
+ *
+ * @param string $comment_type The current comment type slug.
+ */
+ protected function comment_type_dropdown($comment_type)
+ {
+ }
+ /**
+ * @return array
+ */
+ protected function get_sortable_columns()
+ {
+ }
+ /**
+ * Gets the name of the default primary column.
+ *
+ * @since 4.3.0
+ *
+ * @return string Name of the default primary column, in this case, 'comment'.
+ */
+ protected function get_default_primary_column_name()
+ {
+ }
+ /**
+ * Displays the comments table.
+ *
+ * Overrides the parent display() method to render extra comments.
+ *
+ * @since 3.1.0
+ */
+ public function display()
+ {
+ }
+ /**
+ * @global WP_Post $post Global post object.
+ * @global WP_Comment $comment Global comment object.
+ *
+ * @param WP_Comment $item
+ */
+ public function single_row($item)
+ {
+ }
+ /**
+ * Generates and displays row actions links.
+ *
+ * @since 4.3.0
+ * @since 5.9.0 Renamed `$comment` to `$item` to match parent class for PHP 8 named parameter support.
+ *
+ * @global string $comment_status Status for the current listed comments.
+ *
+ * @param WP_Comment $item The comment object.
+ * @param string $column_name Current column name.
+ * @param string $primary Primary column name.
+ * @return string Row actions output for comments. An empty string
+ * if the current column is not the primary column,
+ * or if the current user cannot edit the comment.
+ */
+ protected function handle_row_actions($item, $column_name, $primary)
+ {
+ }
+ /**
+ * @since 5.9.0 Renamed `$comment` to `$item` to match parent class for PHP 8 named parameter support.
+ *
+ * @param WP_Comment $item The comment object.
+ */
+ public function column_cb($item)
+ {
+ }
+ /**
+ * @param WP_Comment $comment The comment object.
+ */
+ public function column_comment($comment)
+ {
+ }
+ /**
+ * @global string $comment_status
+ *
+ * @param WP_Comment $comment The comment object.
+ */
+ public function column_author($comment)
+ {
+ }
+ /**
+ * @param WP_Comment $comment The comment object.
+ */
+ public function column_date($comment)
+ {
+ }
+ /**
+ * @param WP_Comment $comment The comment object.
+ */
+ public function column_response($comment)
+ {
+ }
+ /**
+ * @since 5.9.0 Renamed `$comment` to `$item` to match parent class for PHP 8 named parameter support.
+ *
+ * @param WP_Comment $item The comment object.
+ * @param string $column_name The custom column's name.
+ */
+ public function column_default($item, $column_name)
+ {
+ }
+ }
+ /**
+ * Administration: Community Events class.
+ *
+ * @package WordPress
+ * @subpackage Administration
+ * @since 4.8.0
+ */
+ /**
+ * Class WP_Community_Events.
+ *
+ * A client for api.wordpress.org/events.
+ *
+ * @since 4.8.0
+ */
+ #[\AllowDynamicProperties]
+ class WP_Community_Events
+ {
+ /**
+ * ID for a WordPress user account.
+ *
+ * @since 4.8.0
+ *
+ * @var int
+ */
+ protected $user_id = 0;
+ /**
+ * Stores location data for the user.
+ *
+ * @since 4.8.0
+ *
+ * @var false|array
+ */
+ protected $user_location = \false;
+ /**
+ * Constructor for WP_Community_Events.
+ *
+ * @since 4.8.0
+ *
+ * @param int $user_id WP user ID.
+ * @param false|array $user_location {
+ * Stored location data for the user. false to pass no location.
+ *
+ * @type string $description The name of the location
+ * @type string $latitude The latitude in decimal degrees notation, without the degree
+ * symbol. e.g.: 47.615200.
+ * @type string $longitude The longitude in decimal degrees notation, without the degree
+ * symbol. e.g.: -122.341100.
+ * @type string $country The ISO 3166-1 alpha-2 country code. e.g.: BR
+ * }
+ * @phpstan-param false|array{
+ * description?: string,
+ * latitude?: string,
+ * longitude?: string,
+ * country?: string,
+ * } $user_location
+ */
+ public function __construct($user_id, $user_location = \false)
+ {
+ }
+ /**
+ * Gets data about events near a particular location.
+ *
+ * Cached events will be immediately returned if the `user_location` property
+ * is set for the current user, and cached events exist for that location.
+ *
+ * Otherwise, this method sends a request to the w.org Events API with location
+ * data. The API will send back a recognized location based on the data, along
+ * with nearby events.
+ *
+ * The browser's request for events is proxied with this method, rather
+ * than having the browser make the request directly to api.wordpress.org,
+ * because it allows results to be cached server-side and shared with other
+ * users and sites in the network. This makes the process more efficient,
+ * since increasing the number of visits that get cached data means users
+ * don't have to wait as often; if the user's browser made the request
+ * directly, it would also need to make a second request to WP in order to
+ * pass the data for caching. Having WP make the request also introduces
+ * the opportunity to anonymize the IP before sending it to w.org, which
+ * mitigates possible privacy concerns.
+ *
+ * @since 4.8.0
+ * @since 5.5.2 Response no longer contains formatted date field. They're added
+ * in `wp.communityEvents.populateDynamicEventFields()` now.
+ *
+ * @param string $location_search Optional. City name to help determine the location.
+ * e.g., "Seattle". Default empty string.
+ * @param string $timezone Optional. Timezone to help determine the location.
+ * Default empty string.
+ * @return array|WP_Error A WP_Error on failure; an array with location and events on
+ * success.
+ */
+ public function get_events($location_search = '', $timezone = '')
+ {
+ }
+ /**
+ * Builds an array of args to use in an HTTP request to the w.org Events API.
+ *
+ * @since 4.8.0
+ *
+ * @param string $search Optional. City search string. Default empty string.
+ * @param string $timezone Optional. Timezone string. Default empty string.
+ * @return array The request args.
+ */
+ protected function get_request_args($search = '', $timezone = '')
+ {
+ }
+ /**
+ * Determines the user's actual IP address and attempts to partially
+ * anonymize an IP address by converting it to a network ID.
+ *
+ * Geolocating the network ID usually returns a similar location as the
+ * actual IP, but provides some privacy for the user.
+ *
+ * $_SERVER['REMOTE_ADDR'] cannot be used in all cases, such as when the user
+ * is making their request through a proxy, or when the web server is behind
+ * a proxy. In those cases, $_SERVER['REMOTE_ADDR'] is set to the proxy address rather
+ * than the user's actual address.
+ *
+ * Modified from https://stackoverflow.com/a/2031935/450127, MIT license.
+ * Modified from https://github.com/geertw/php-ip-anonymizer, MIT license.
+ *
+ * SECURITY WARNING: This function is _NOT_ intended to be used in
+ * circumstances where the authenticity of the IP address matters. This does
+ * _NOT_ guarantee that the returned address is valid or accurate, and it can
+ * be easily spoofed.
+ *
+ * @since 4.8.0
+ *
+ * @return string|false The anonymized address on success; the given address
+ * or false on failure.
+ */
+ public static function get_unsafe_client_ip()
+ {
+ }
+ /**
+ * Test if two pairs of latitude/longitude coordinates match each other.
+ *
+ * @since 4.8.0
+ *
+ * @param array $a The first pair, with indexes 'latitude' and 'longitude'.
+ * @param array $b The second pair, with indexes 'latitude' and 'longitude'.
+ * @return bool True if they match, false if they don't.
+ */
+ protected function coordinates_match($a, $b)
+ {
+ }
+ /**
+ * Generates a transient key based on user location.
+ *
+ * This could be reduced to a one-liner in the calling functions, but it's
+ * intentionally a separate function because it's called from multiple
+ * functions, and having it abstracted keeps the logic consistent and DRY,
+ * which is less prone to errors.
+ *
+ * @since 4.8.0
+ *
+ * @param array $location Should contain 'latitude' and 'longitude' indexes.
+ * @return string|false Transient key on success, false on failure.
+ */
+ protected function get_events_transient_key($location)
+ {
+ }
+ /**
+ * Caches an array of events data from the Events API.
+ *
+ * @since 4.8.0
+ *
+ * @param array $events Response body from the API request.
+ * @param int|false $expiration Optional. Amount of time to cache the events. Defaults to false.
+ * @return bool true if events were cached; false if not.
+ */
+ protected function cache_events($events, $expiration = \false)
+ {
+ }
+ /**
+ * Gets cached events.
+ *
+ * @since 4.8.0
+ * @since 5.5.2 Response no longer contains formatted date field. They're added
+ * in `wp.communityEvents.populateDynamicEventFields()` now.
+ *
+ * @return array|false An array containing `location` and `events` items
+ * on success, false on failure.
+ */
+ public function get_cached_events()
+ {
+ }
+ /**
+ * Adds formatted date and time items for each event in an API response.
+ *
+ * This has to be called after the data is pulled from the cache, because
+ * the cached events are shared by all users. If it was called before storing
+ * the cache, then all users would see the events in the localized data/time
+ * of the user who triggered the cache refresh, rather than their own.
+ *
+ * @since 4.8.0
+ * @deprecated 5.6.0 No longer used in core.
+ *
+ * @param array $response_body The response which contains the events.
+ * @return array The response with dates and times formatted.
+ */
+ protected function format_event_data_time($response_body)
+ {
+ }
+ /**
+ * Prepares the event list for presentation.
+ *
+ * Discards expired events, and makes WordCamps "sticky." Attendees need more
+ * advanced notice about WordCamps than they do for meetups, so camps should
+ * appear in the list sooner. If a WordCamp is coming up, the API will "stick"
+ * it in the response, even if it wouldn't otherwise appear. When that happens,
+ * the event will be at the end of the list, and will need to be moved into a
+ * higher position, so that it doesn't get trimmed off.
+ *
+ * @since 4.8.0
+ * @since 4.9.7 Stick a WordCamp to the final list.
+ * @since 5.5.2 Accepts and returns only the events, rather than an entire HTTP response.
+ * @since 6.0.0 Decode HTML entities from the event title.
+ *
+ * @param array $events The events that will be prepared.
+ * @return array The response body with events trimmed.
+ */
+ protected function trim_events(array $events)
+ {
+ }
+ /**
+ * Logs responses to Events API requests.
+ *
+ * @since 4.8.0
+ * @deprecated 4.9.0 Use a plugin instead. See #41217 for an example.
+ *
+ * @param string $message A description of what occurred.
+ * @param array $details Details that provide more context for the
+ * log entry.
+ */
+ protected function maybe_log_events_response($message, $details)
+ {
+ }
+ }
+ /**
+ * Class for providing debug data based on a users WordPress environment.
+ *
+ * @package WordPress
+ * @subpackage Site_Health
+ * @since 5.2.0
+ */
+ #[\AllowDynamicProperties]
+ class WP_Debug_Data
+ {
+ /**
+ * Calls all core functions to check for updates.
+ *
+ * @since 5.2.0
+ */
+ public static function check_for_updates()
+ {
+ }
+ /**
+ * Static function for generating site debug data when required.
+ *
+ * @since 5.2.0
+ * @since 5.3.0 Added database charset, database collation,
+ * and timezone information.
+ * @since 5.5.0 Added pretty permalinks support information.
+ *
+ * @throws ImagickException
+ * @global wpdb $wpdb WordPress database abstraction object.
+ *
+ * @return array The debug data for the site.
+ */
+ public static function debug_data()
+ {
+ }
+ /**
+ * Returns the value of a MySQL system variable.
+ *
+ * @since 5.9.0
+ *
+ * @global wpdb $wpdb WordPress database abstraction object.
+ *
+ * @param string $mysql_var Name of the MySQL system variable.
+ * @return string|null The variable value on success. Null if the variable does not exist.
+ */
+ public static function get_mysql_var($mysql_var)
+ {
+ }
+ /**
+ * Formats the information gathered for debugging, in a manner suitable for copying to a forum or support ticket.
+ *
+ * @since 5.2.0
+ *
+ * @param array $info_array Information gathered from the `WP_Debug_Data::debug_data()` function.
+ * @param string $data_type The data type to return, either 'info' or 'debug'.
+ * @return string The formatted data.
+ */
+ public static function format($info_array, $data_type)
+ {
+ }
+ /**
+ * Fetches the total size of all the database tables for the active database user.
+ *
+ * @since 5.2.0
+ *
+ * @return int The size of the database, in bytes.
+ */
+ public static function get_database_size()
+ {
+ }
+ /**
+ * Fetches the sizes of the WordPress directories: `wordpress` (ABSPATH), `plugins`, `themes`, and `uploads`.
+ * Intended to supplement the array returned by `WP_Debug_Data::debug_data()`.
+ *
+ * @since 5.2.0
+ *
+ * @return array The sizes of the directories, also the database size and total installation size.
+ */
+ public static function get_sizes()
+ {
+ }
+ }
+ /**
+ * Base WordPress Filesystem
+ *
+ * @package WordPress
+ * @subpackage Filesystem
+ */
+ /**
+ * Base WordPress Filesystem class which Filesystem implementations extend.
+ *
+ * @since 2.5.0
+ */
+ #[\AllowDynamicProperties]
+ class WP_Filesystem_Base
+ {
+ /**
+ * Whether to display debug data for the connection.
+ *
+ * @since 2.5.0
+ * @var bool
+ */
+ public $verbose = \false;
+ /**
+ * Cached list of local filepaths to mapped remote filepaths.
+ *
+ * @since 2.7.0
+ * @var array
+ */
+ public $cache = array();
+ /**
+ * The Access method of the current connection, Set automatically.
+ *
+ * @since 2.5.0
+ * @var string
+ */
+ public $method = '';
+ /**
+ * @var WP_Error
+ */
+ public $errors = \null;
+ /**
+ */
+ public $options = array();
+ /**
+ * Returns the path on the remote filesystem of ABSPATH.
+ *
+ * @since 2.7.0
+ *
+ * @return string The location of the remote path.
+ */
+ public function abspath()
+ {
+ }
+ /**
+ * Returns the path on the remote filesystem of WP_CONTENT_DIR.
+ *
+ * @since 2.7.0
+ *
+ * @return string The location of the remote path.
+ */
+ public function wp_content_dir()
+ {
+ }
+ /**
+ * Returns the path on the remote filesystem of WP_PLUGIN_DIR.
+ *
+ * @since 2.7.0
+ *
+ * @return string The location of the remote path.
+ */
+ public function wp_plugins_dir()
+ {
+ }
+ /**
+ * Returns the path on the remote filesystem of the Themes Directory.
+ *
+ * @since 2.7.0
+ *
+ * @param string|false $theme Optional. The theme stylesheet or template for the directory.
+ * Default false.
+ * @return string The location of the remote path.
+ */
+ public function wp_themes_dir($theme = \false)
+ {
+ }
+ /**
+ * Returns the path on the remote filesystem of WP_LANG_DIR.
+ *
+ * @since 3.2.0
+ *
+ * @return string The location of the remote path.
+ */
+ public function wp_lang_dir()
+ {
+ }
+ /**
+ * Locates a folder on the remote filesystem.
+ *
+ * @since 2.5.0
+ * @deprecated 2.7.0 use WP_Filesystem_Base::abspath() or WP_Filesystem_Base::wp_*_dir() instead.
+ * @see WP_Filesystem_Base::abspath()
+ * @see WP_Filesystem_Base::wp_content_dir()
+ * @see WP_Filesystem_Base::wp_plugins_dir()
+ * @see WP_Filesystem_Base::wp_themes_dir()
+ * @see WP_Filesystem_Base::wp_lang_dir()
+ *
+ * @param string $base Optional. The folder to start searching from. Default '.'.
+ * @param bool $verbose Optional. True to display debug information. Default false.
+ * @return string The location of the remote path.
+ */
+ public function find_base_dir($base = '.', $verbose = \false)
+ {
+ }
+ /**
+ * Locates a folder on the remote filesystem.
+ *
+ * @since 2.5.0
+ * @deprecated 2.7.0 use WP_Filesystem_Base::abspath() or WP_Filesystem_Base::wp_*_dir() methods instead.
+ * @see WP_Filesystem_Base::abspath()
+ * @see WP_Filesystem_Base::wp_content_dir()
+ * @see WP_Filesystem_Base::wp_plugins_dir()
+ * @see WP_Filesystem_Base::wp_themes_dir()
+ * @see WP_Filesystem_Base::wp_lang_dir()
+ *
+ * @param string $base Optional. The folder to start searching from. Default '.'.
+ * @param bool $verbose Optional. True to display debug information. Default false.
+ * @return string The location of the remote path.
+ */
+ public function get_base_dir($base = '.', $verbose = \false)
+ {
+ }
+ /**
+ * Locates a folder on the remote filesystem.
+ *
+ * Assumes that on Windows systems, Stripping off the Drive
+ * letter is OK Sanitizes \\ to / in Windows filepaths.
+ *
+ * @since 2.7.0
+ *
+ * @param string $folder the folder to locate.
+ * @return string|false The location of the remote path, false on failure.
+ */
+ public function find_folder($folder)
+ {
+ }
+ /**
+ * Locates a folder on the remote filesystem.
+ *
+ * Expects Windows sanitized path.
+ *
+ * @since 2.7.0
+ *
+ * @param string $folder The folder to locate.
+ * @param string $base The folder to start searching from.
+ * @param bool $loop If the function has recursed. Internal use only.
+ * @return string|false The location of the remote path, false to cease looping.
+ */
+ public function search_for_folder($folder, $base = '.', $loop = \false)
+ {
+ }
+ /**
+ * Returns the *nix-style file permissions for a file.
+ *
+ * From the PHP documentation page for fileperms().
+ *
+ * @link https://www.php.net/manual/en/function.fileperms.php
+ *
+ * @since 2.5.0
+ *
+ * @param string $file String filename.
+ * @return string The *nix-style representation of permissions.
+ */
+ public function gethchmod($file)
+ {
+ }
+ /**
+ * Gets the permissions of the specified file or filepath in their octal format.
+ *
+ * @since 2.5.0
+ *
+ * @param string $file Path to the file.
+ * @return string Mode of the file (the last 3 digits).
+ */
+ public function getchmod($file)
+ {
+ }
+ /**
+ * Converts *nix-style file permissions to a octal number.
+ *
+ * Converts '-rw-r--r--' to 0644
+ * From "info at rvgate dot nl"'s comment on the PHP documentation for chmod()
+ *
+ * @link https://www.php.net/manual/en/function.chmod.php#49614
+ *
+ * @since 2.5.0
+ *
+ * @param string $mode string The *nix-style file permissions.
+ * @return string Octal representation of permissions.
+ */
+ public function getnumchmodfromh($mode)
+ {
+ }
+ /**
+ * Determines if the string provided contains binary characters.
+ *
+ * @since 2.7.0
+ *
+ * @param string $text String to test against.
+ * @return bool True if string is binary, false otherwise.
+ */
+ public function is_binary($text)
+ {
+ }
+ /**
+ * Changes the owner of a file or directory.
+ *
+ * Default behavior is to do nothing, override this in your subclass, if desired.
+ *
+ * @since 2.5.0
+ *
+ * @param string $file Path to the file or directory.
+ * @param string|int $owner A user name or number.
+ * @param bool $recursive Optional. If set to true, changes file owner recursively.
+ * Default false.
+ * @return bool True on success, false on failure.
+ */
+ public function chown($file, $owner, $recursive = \false)
+ {
+ }
+ /**
+ * Connects filesystem.
+ *
+ * @since 2.5.0
+ * @abstract
+ *
+ * @return bool True on success, false on failure (always true for WP_Filesystem_Direct).
+ */
+ public function connect()
+ {
+ }
+ /**
+ * Reads entire file into a string.
+ *
+ * @since 2.5.0
+ * @abstract
+ *
+ * @param string $file Name of the file to read.
+ * @return string|false Read data on success, false on failure.
+ */
+ public function get_contents($file)
+ {
+ }
+ /**
+ * Reads entire file into an array.
+ *
+ * @since 2.5.0
+ * @abstract
+ *
+ * @param string $file Path to the file.
+ * @return array|false File contents in an array on success, false on failure.
+ */
+ public function get_contents_array($file)
+ {
+ }
+ /**
+ * Writes a string to a file.
+ *
+ * @since 2.5.0
+ * @abstract
+ *
+ * @param string $file Remote path to the file where to write the data.
+ * @param string $contents The data to write.
+ * @param int|false $mode Optional. The file permissions as octal number, usually 0644.
+ * Default false.
+ * @return bool True on success, false on failure.
+ */
+ public function put_contents($file, $contents, $mode = \false)
+ {
+ }
+ /**
+ * Gets the current working directory.
+ *
+ * @since 2.5.0
+ * @abstract
+ *
+ * @return string|false The current working directory on success, false on failure.
+ */
+ public function cwd()
+ {
+ }
+ /**
+ * Changes current directory.
+ *
+ * @since 2.5.0
+ * @abstract
+ *
+ * @param string $dir The new current directory.
+ * @return bool True on success, false on failure.
+ */
+ public function chdir($dir)
+ {
+ }
+ /**
+ * Changes the file group.
+ *
+ * @since 2.5.0
+ * @abstract
+ *
+ * @param string $file Path to the file.
+ * @param string|int $group A group name or number.
+ * @param bool $recursive Optional. If set to true, changes file group recursively.
+ * Default false.
+ * @return bool True on success, false on failure.
+ */
+ public function chgrp($file, $group, $recursive = \false)
+ {
+ }
+ /**
+ * Changes filesystem permissions.
+ *
+ * @since 2.5.0
+ * @abstract
+ *
+ * @param string $file Path to the file.
+ * @param int|false $mode Optional. The permissions as octal number, usually 0644 for files,
+ * 0755 for directories. Default false.
+ * @param bool $recursive Optional. If set to true, changes file permissions recursively.
+ * Default false.
+ * @return bool True on success, false on failure.
+ */
+ public function chmod($file, $mode = \false, $recursive = \false)
+ {
+ }
+ /**
+ * Gets the file owner.
+ *
+ * @since 2.5.0
+ * @abstract
+ *
+ * @param string $file Path to the file.
+ * @return string|false Username of the owner on success, false on failure.
+ */
+ public function owner($file)
+ {
+ }
+ /**
+ * Gets the file's group.
+ *
+ * @since 2.5.0
+ * @abstract
+ *
+ * @param string $file Path to the file.
+ * @return string|false The group on success, false on failure.
+ */
+ public function group($file)
+ {
+ }
+ /**
+ * Copies a file.
+ *
+ * @since 2.5.0
+ * @abstract
+ *
+ * @param string $source Path to the source file.
+ * @param string $destination Path to the destination file.
+ * @param bool $overwrite Optional. Whether to overwrite the destination file if it exists.
+ * Default false.
+ * @param int|false $mode Optional. The permissions as octal number, usually 0644 for files,
+ * 0755 for dirs. Default false.
+ * @return bool True on success, false on failure.
+ */
+ public function copy($source, $destination, $overwrite = \false, $mode = \false)
+ {
+ }
+ /**
+ * Moves a file.
+ *
+ * @since 2.5.0
+ * @abstract
+ *
+ * @param string $source Path to the source file.
+ * @param string $destination Path to the destination file.
+ * @param bool $overwrite Optional. Whether to overwrite the destination file if it exists.
+ * Default false.
+ * @return bool True on success, false on failure.
+ */
+ public function move($source, $destination, $overwrite = \false)
+ {
+ }
+ /**
+ * Deletes a file or directory.
+ *
+ * @since 2.5.0
+ * @abstract
+ *
+ * @param string $file Path to the file or directory.
+ * @param bool $recursive Optional. If set to true, deletes files and folders recursively.
+ * Default false.
+ * @param string|false $type Type of resource. 'f' for file, 'd' for directory.
+ * Default false.
+ * @return bool True on success, false on failure.
+ */
+ public function delete($file, $recursive = \false, $type = \false)
+ {
+ }
+ /**
+ * Checks if a file or directory exists.
+ *
+ * @since 2.5.0
+ * @abstract
+ *
+ * @param string $path Path to file or directory.
+ * @return bool Whether $path exists or not.
+ */
+ public function exists($path)
+ {
+ }
+ /**
+ * Checks if resource is a file.
+ *
+ * @since 2.5.0
+ * @abstract
+ *
+ * @param string $file File path.
+ * @return bool Whether $file is a file.
+ */
+ public function is_file($file)
+ {
+ }
+ /**
+ * Checks if resource is a directory.
+ *
+ * @since 2.5.0
+ * @abstract
+ *
+ * @param string $path Directory path.
+ * @return bool Whether $path is a directory.
+ */
+ public function is_dir($path)
+ {
+ }
+ /**
+ * Checks if a file is readable.
+ *
+ * @since 2.5.0
+ * @abstract
+ *
+ * @param string $file Path to file.
+ * @return bool Whether $file is readable.
+ */
+ public function is_readable($file)
+ {
+ }
+ /**
+ * Checks if a file or directory is writable.
+ *
+ * @since 2.5.0
+ * @abstract
+ *
+ * @param string $path Path to file or directory.
+ * @return bool Whether $path is writable.
+ */
+ public function is_writable($path)
+ {
+ }
+ /**
+ * Gets the file's last access time.
+ *
+ * @since 2.5.0
+ * @abstract
+ *
+ * @param string $file Path to file.
+ * @return int|false Unix timestamp representing last access time, false on failure.
+ */
+ public function atime($file)
+ {
+ }
+ /**
+ * Gets the file modification time.
+ *
+ * @since 2.5.0
+ * @abstract
+ *
+ * @param string $file Path to file.
+ * @return int|false Unix timestamp representing modification time, false on failure.
+ */
+ public function mtime($file)
+ {
+ }
+ /**
+ * Gets the file size (in bytes).
+ *
+ * @since 2.5.0
+ * @abstract
+ *
+ * @param string $file Path to file.
+ * @return int|false Size of the file in bytes on success, false on failure.
+ */
+ public function size($file)
+ {
+ }
+ /**
+ * Sets the access and modification times of a file.
+ *
+ * Note: If $file doesn't exist, it will be created.
+ *
+ * @since 2.5.0
+ * @abstract
+ *
+ * @param string $file Path to file.
+ * @param int $time Optional. Modified time to set for file.
+ * Default 0.
+ * @param int $atime Optional. Access time to set for file.
+ * Default 0.
+ * @return bool True on success, false on failure.
+ */
+ public function touch($file, $time = 0, $atime = 0)
+ {
+ }
+ /**
+ * Creates a directory.
+ *
+ * @since 2.5.0
+ * @abstract
+ *
+ * @param string $path Path for new directory.
+ * @param int|false $chmod Optional. The permissions as octal number (or false to skip chmod).
+ * Default false.
+ * @param string|int|false $chown Optional. A user name or number (or false to skip chown).
+ * Default false.
+ * @param string|int|false $chgrp Optional. A group name or number (or false to skip chgrp).
+ * Default false.
+ * @return bool True on success, false on failure.
+ */
+ public function mkdir($path, $chmod = \false, $chown = \false, $chgrp = \false)
+ {
+ }
+ /**
+ * Deletes a directory.
+ *
+ * @since 2.5.0
+ * @abstract
+ *
+ * @param string $path Path to directory.
+ * @param bool $recursive Optional. Whether to recursively remove files/directories.
+ * Default false.
+ * @return bool True on success, false on failure.
+ */
+ public function rmdir($path, $recursive = \false)
+ {
+ }
+ /**
+ * Gets details for files in a directory or a specific file.
+ *
+ * @since 2.5.0
+ * @abstract
+ *
+ * @param string $path Path to directory or file.
+ * @param bool $include_hidden Optional. Whether to include details of hidden ("." prefixed) files.
+ * Default true.
+ * @param bool $recursive Optional. Whether to recursively include file details in nested directories.
+ * Default false.
+ * @return array|false {
+ * Array of files. False if unable to list directory contents.
+ *
+ * @type string $name Name of the file or directory.
+ * @type string $perms *nix representation of permissions.
+ * @type string $permsn Octal representation of permissions.
+ * @type string $owner Owner name or ID.
+ * @type int $size Size of file in bytes.
+ * @type int $lastmodunix Last modified unix timestamp.
+ * @type mixed $lastmod Last modified month (3 letter) and day (without leading 0).
+ * @type int $time Last modified time.
+ * @type string $type Type of resource. 'f' for file, 'd' for directory.
+ * @type mixed $files If a directory and `$recursive` is true, contains another array of files.
+ * }
+ * @phpstan-return false|array{
+ * name: string,
+ * perms: string,
+ * permsn: string,
+ * owner: string,
+ * size: int,
+ * lastmodunix: int,
+ * lastmod: mixed,
+ * time: int,
+ * type: string,
+ * files: mixed,
+ * }
+ */
+ public function dirlist($path, $include_hidden = \true, $recursive = \false)
+ {
+ }
+ }
+ /**
+ * WordPress Direct Filesystem.
+ *
+ * @package WordPress
+ * @subpackage Filesystem
+ */
+ /**
+ * WordPress Filesystem Class for direct PHP file and folder manipulation.
+ *
+ * @since 2.5.0
+ *
+ * @see WP_Filesystem_Base
+ */
+ class WP_Filesystem_Direct extends \WP_Filesystem_Base
+ {
+ /**
+ * Constructor.
+ *
+ * @since 2.5.0
+ *
+ * @param mixed $arg Not used.
+ */
+ public function __construct($arg)
+ {
+ }
+ /**
+ * Reads entire file into a string.
+ *
+ * @since 2.5.0
+ *
+ * @param string $file Name of the file to read.
+ * @return string|false Read data on success, false on failure.
+ */
+ public function get_contents($file)
+ {
+ }
+ /**
+ * Reads entire file into an array.
+ *
+ * @since 2.5.0
+ *
+ * @param string $file Path to the file.
+ * @return array|false File contents in an array on success, false on failure.
+ */
+ public function get_contents_array($file)
+ {
+ }
+ /**
+ * Writes a string to a file.
+ *
+ * @since 2.5.0
+ *
+ * @param string $file Remote path to the file where to write the data.
+ * @param string $contents The data to write.
+ * @param int|false $mode Optional. The file permissions as octal number, usually 0644.
+ * Default false.
+ * @return bool True on success, false on failure.
+ */
+ public function put_contents($file, $contents, $mode = \false)
+ {
+ }
+ /**
+ * Gets the current working directory.
+ *
+ * @since 2.5.0
+ *
+ * @return string|false The current working directory on success, false on failure.
+ */
+ public function cwd()
+ {
+ }
+ /**
+ * Changes current directory.
+ *
+ * @since 2.5.0
+ *
+ * @param string $dir The new current directory.
+ * @return bool True on success, false on failure.
+ */
+ public function chdir($dir)
+ {
+ }
+ /**
+ * Changes the file group.
+ *
+ * @since 2.5.0
+ *
+ * @param string $file Path to the file.
+ * @param string|int $group A group name or number.
+ * @param bool $recursive Optional. If set to true, changes file group recursively.
+ * Default false.
+ * @return bool True on success, false on failure.
+ */
+ public function chgrp($file, $group, $recursive = \false)
+ {
+ }
+ /**
+ * Changes filesystem permissions.
+ *
+ * @since 2.5.0
+ *
+ * @param string $file Path to the file.
+ * @param int|false $mode Optional. The permissions as octal number, usually 0644 for files,
+ * 0755 for directories. Default false.
+ * @param bool $recursive Optional. If set to true, changes file permissions recursively.
+ * Default false.
+ * @return bool True on success, false on failure.
+ */
+ public function chmod($file, $mode = \false, $recursive = \false)
+ {
+ }
+ /**
+ * Changes the owner of a file or directory.
+ *
+ * @since 2.5.0
+ *
+ * @param string $file Path to the file or directory.
+ * @param string|int $owner A user name or number.
+ * @param bool $recursive Optional. If set to true, changes file owner recursively.
+ * Default false.
+ * @return bool True on success, false on failure.
+ */
+ public function chown($file, $owner, $recursive = \false)
+ {
+ }
+ /**
+ * Gets the file owner.
+ *
+ * @since 2.5.0
+ *
+ * @param string $file Path to the file.
+ * @return string|false Username of the owner on success, false on failure.
+ */
+ public function owner($file)
+ {
+ }
+ /**
+ * Gets the permissions of the specified file or filepath in their octal format.
+ *
+ * FIXME does not handle errors in fileperms()
+ *
+ * @since 2.5.0
+ *
+ * @param string $file Path to the file.
+ * @return string Mode of the file (the last 3 digits).
+ */
+ public function getchmod($file)
+ {
+ }
+ /**
+ * Gets the file's group.
+ *
+ * @since 2.5.0
+ *
+ * @param string $file Path to the file.
+ * @return string|false The group on success, false on failure.
+ */
+ public function group($file)
+ {
+ }
+ /**
+ * Copies a file.
+ *
+ * @since 2.5.0
+ *
+ * @param string $source Path to the source file.
+ * @param string $destination Path to the destination file.
+ * @param bool $overwrite Optional. Whether to overwrite the destination file if it exists.
+ * Default false.
+ * @param int|false $mode Optional. The permissions as octal number, usually 0644 for files,
+ * 0755 for dirs. Default false.
+ * @return bool True on success, false on failure.
+ */
+ public function copy($source, $destination, $overwrite = \false, $mode = \false)
+ {
+ }
+ /**
+ * Moves a file.
+ *
+ * @since 2.5.0
+ *
+ * @param string $source Path to the source file.
+ * @param string $destination Path to the destination file.
+ * @param bool $overwrite Optional. Whether to overwrite the destination file if it exists.
+ * Default false.
+ * @return bool True on success, false on failure.
+ */
+ public function move($source, $destination, $overwrite = \false)
+ {
+ }
+ /**
+ * Deletes a file or directory.
+ *
+ * @since 2.5.0
+ *
+ * @param string $file Path to the file or directory.
+ * @param bool $recursive Optional. If set to true, deletes files and folders recursively.
+ * Default false.
+ * @param string|false $type Type of resource. 'f' for file, 'd' for directory.
+ * Default false.
+ * @return bool True on success, false on failure.
+ */
+ public function delete($file, $recursive = \false, $type = \false)
+ {
+ }
+ /**
+ * Checks if a file or directory exists.
+ *
+ * @since 2.5.0
+ *
+ * @param string $path Path to file or directory.
+ * @return bool Whether $path exists or not.
+ */
+ public function exists($path)
+ {
+ }
+ /**
+ * Checks if resource is a file.
+ *
+ * @since 2.5.0
+ *
+ * @param string $file File path.
+ * @return bool Whether $file is a file.
+ */
+ public function is_file($file)
+ {
+ }
+ /**
+ * Checks if resource is a directory.
+ *
+ * @since 2.5.0
+ *
+ * @param string $path Directory path.
+ * @return bool Whether $path is a directory.
+ */
+ public function is_dir($path)
+ {
+ }
+ /**
+ * Checks if a file is readable.
+ *
+ * @since 2.5.0
+ *
+ * @param string $file Path to file.
+ * @return bool Whether $file is readable.
+ */
+ public function is_readable($file)
+ {
+ }
+ /**
+ * Checks if a file or directory is writable.
+ *
+ * @since 2.5.0
+ *
+ * @param string $path Path to file or directory.
+ * @return bool Whether $path is writable.
+ */
+ public function is_writable($path)
+ {
+ }
+ /**
+ * Gets the file's last access time.
+ *
+ * @since 2.5.0
+ *
+ * @param string $file Path to file.
+ * @return int|false Unix timestamp representing last access time, false on failure.
+ */
+ public function atime($file)
+ {
+ }
+ /**
+ * Gets the file modification time.
+ *
+ * @since 2.5.0
+ *
+ * @param string $file Path to file.
+ * @return int|false Unix timestamp representing modification time, false on failure.
+ */
+ public function mtime($file)
+ {
+ }
+ /**
+ * Gets the file size (in bytes).
+ *
+ * @since 2.5.0
+ *
+ * @param string $file Path to file.
+ * @return int|false Size of the file in bytes on success, false on failure.
+ */
+ public function size($file)
+ {
+ }
+ /**
+ * Sets the access and modification times of a file.
+ *
+ * Note: If $file doesn't exist, it will be created.
+ *
+ * @since 2.5.0
+ *
+ * @param string $file Path to file.
+ * @param int $time Optional. Modified time to set for file.
+ * Default 0.
+ * @param int $atime Optional. Access time to set for file.
+ * Default 0.
+ * @return bool True on success, false on failure.
+ */
+ public function touch($file, $time = 0, $atime = 0)
+ {
+ }
+ /**
+ * Creates a directory.
+ *
+ * @since 2.5.0
+ *
+ * @param string $path Path for new directory.
+ * @param int|false $chmod Optional. The permissions as octal number (or false to skip chmod).
+ * Default false.
+ * @param string|int|false $chown Optional. A user name or number (or false to skip chown).
+ * Default false.
+ * @param string|int|false $chgrp Optional. A group name or number (or false to skip chgrp).
+ * Default false.
+ * @return bool True on success, false on failure.
+ */
+ public function mkdir($path, $chmod = \false, $chown = \false, $chgrp = \false)
+ {
+ }
+ /**
+ * Deletes a directory.
+ *
+ * @since 2.5.0
+ *
+ * @param string $path Path to directory.
+ * @param bool $recursive Optional. Whether to recursively remove files/directories.
+ * Default false.
+ * @return bool True on success, false on failure.
+ */
+ public function rmdir($path, $recursive = \false)
+ {
+ }
+ /**
+ * Gets details for files in a directory or a specific file.
+ *
+ * @since 2.5.0
+ *
+ * @param string $path Path to directory or file.
+ * @param bool $include_hidden Optional. Whether to include details of hidden ("." prefixed) files.
+ * Default true.
+ * @param bool $recursive Optional. Whether to recursively include file details in nested directories.
+ * Default false.
+ * @return array|false {
+ * Array of files. False if unable to list directory contents.
+ *
+ * @type string $name Name of the file or directory.
+ * @type string $perms *nix representation of permissions.
+ * @type string $permsn Octal representation of permissions.
+ * @type string $owner Owner name or ID.
+ * @type int $size Size of file in bytes.
+ * @type int $lastmodunix Last modified unix timestamp.
+ * @type mixed $lastmod Last modified month (3 letter) and day (without leading 0).
+ * @type int $time Last modified time.
+ * @type string $type Type of resource. 'f' for file, 'd' for directory.
+ * @type mixed $files If a directory and `$recursive` is true, contains another array of files.
+ * }
+ * @phpstan-return false|array{
+ * name: string,
+ * perms: string,
+ * permsn: string,
+ * owner: string,
+ * size: int,
+ * lastmodunix: int,
+ * lastmod: mixed,
+ * time: int,
+ * type: string,
+ * files: mixed,
+ * }
+ */
+ public function dirlist($path, $include_hidden = \true, $recursive = \false)
+ {
+ }
+ }
+ /**
+ * WordPress FTP Filesystem.
+ *
+ * @package WordPress
+ * @subpackage Filesystem
+ */
+ /**
+ * WordPress Filesystem Class for implementing FTP.
+ *
+ * @since 2.5.0
+ *
+ * @see WP_Filesystem_Base
+ */
+ class WP_Filesystem_FTPext extends \WP_Filesystem_Base
+ {
+ /**
+ * @since 2.5.0
+ * @var resource
+ */
+ public $link;
+ /**
+ * Constructor.
+ *
+ * @since 2.5.0
+ *
+ * @param array $opt
+ */
+ public function __construct($opt = '')
+ {
+ }
+ /**
+ * Connects filesystem.
+ *
+ * @since 2.5.0
+ *
+ * @return bool True on success, false on failure.
+ */
+ public function connect()
+ {
+ }
+ /**
+ * Reads entire file into a string.
+ *
+ * @since 2.5.0
+ *
+ * @param string $file Name of the file to read.
+ * @return string|false Read data on success, false if no temporary file could be opened,
+ * or if the file couldn't be retrieved.
+ */
+ public function get_contents($file)
+ {
+ }
+ /**
+ * Reads entire file into an array.
+ *
+ * @since 2.5.0
+ *
+ * @param string $file Path to the file.
+ * @return array|false File contents in an array on success, false on failure.
+ */
+ public function get_contents_array($file)
+ {
+ }
+ /**
+ * Writes a string to a file.
+ *
+ * @since 2.5.0
+ *
+ * @param string $file Remote path to the file where to write the data.
+ * @param string $contents The data to write.
+ * @param int|false $mode Optional. The file permissions as octal number, usually 0644.
+ * Default false.
+ * @return bool True on success, false on failure.
+ */
+ public function put_contents($file, $contents, $mode = \false)
+ {
+ }
+ /**
+ * Gets the current working directory.
+ *
+ * @since 2.5.0
+ *
+ * @return string|false The current working directory on success, false on failure.
+ */
+ public function cwd()
+ {
+ }
+ /**
+ * Changes current directory.
+ *
+ * @since 2.5.0
+ *
+ * @param string $dir The new current directory.
+ * @return bool True on success, false on failure.
+ */
+ public function chdir($dir)
+ {
+ }
+ /**
+ * Changes filesystem permissions.
+ *
+ * @since 2.5.0
+ *
+ * @param string $file Path to the file.
+ * @param int|false $mode Optional. The permissions as octal number, usually 0644 for files,
+ * 0755 for directories. Default false.
+ * @param bool $recursive Optional. If set to true, changes file permissions recursively.
+ * Default false.
+ * @return bool True on success, false on failure.
+ */
+ public function chmod($file, $mode = \false, $recursive = \false)
+ {
+ }
+ /**
+ * Gets the file owner.
+ *
+ * @since 2.5.0
+ *
+ * @param string $file Path to the file.
+ * @return string|false Username of the owner on success, false on failure.
+ */
+ public function owner($file)
+ {
+ }
+ /**
+ * Gets the permissions of the specified file or filepath in their octal format.
+ *
+ * @since 2.5.0
+ *
+ * @param string $file Path to the file.
+ * @return string Mode of the file (the last 3 digits).
+ */
+ public function getchmod($file)
+ {
+ }
+ /**
+ * Gets the file's group.
+ *
+ * @since 2.5.0
+ *
+ * @param string $file Path to the file.
+ * @return string|false The group on success, false on failure.
+ */
+ public function group($file)
+ {
+ }
+ /**
+ * Copies a file.
+ *
+ * @since 2.5.0
+ *
+ * @param string $source Path to the source file.
+ * @param string $destination Path to the destination file.
+ * @param bool $overwrite Optional. Whether to overwrite the destination file if it exists.
+ * Default false.
+ * @param int|false $mode Optional. The permissions as octal number, usually 0644 for files,
+ * 0755 for dirs. Default false.
+ * @return bool True on success, false on failure.
+ */
+ public function copy($source, $destination, $overwrite = \false, $mode = \false)
+ {
+ }
+ /**
+ * Moves a file.
+ *
+ * @since 2.5.0
+ *
+ * @param string $source Path to the source file.
+ * @param string $destination Path to the destination file.
+ * @param bool $overwrite Optional. Whether to overwrite the destination file if it exists.
+ * Default false.
+ * @return bool True on success, false on failure.
+ */
+ public function move($source, $destination, $overwrite = \false)
+ {
+ }
+ /**
+ * Deletes a file or directory.
+ *
+ * @since 2.5.0
+ *
+ * @param string $file Path to the file or directory.
+ * @param bool $recursive Optional. If set to true, deletes files and folders recursively.
+ * Default false.
+ * @param string|false $type Type of resource. 'f' for file, 'd' for directory.
+ * Default false.
+ * @return bool True on success, false on failure.
+ */
+ public function delete($file, $recursive = \false, $type = \false)
+ {
+ }
+ /**
+ * Checks if a file or directory exists.
+ *
+ * @since 2.5.0
+ *
+ * @param string $path Path to file or directory.
+ * @return bool Whether $path exists or not.
+ */
+ public function exists($path)
+ {
+ }
+ /**
+ * Checks if resource is a file.
+ *
+ * @since 2.5.0
+ *
+ * @param string $file File path.
+ * @return bool Whether $file is a file.
+ */
+ public function is_file($file)
+ {
+ }
+ /**
+ * Checks if resource is a directory.
+ *
+ * @since 2.5.0
+ *
+ * @param string $path Directory path.
+ * @return bool Whether $path is a directory.
+ */
+ public function is_dir($path)
+ {
+ }
+ /**
+ * Checks if a file is readable.
+ *
+ * @since 2.5.0
+ *
+ * @param string $file Path to file.
+ * @return bool Whether $file is readable.
+ */
+ public function is_readable($file)
+ {
+ }
+ /**
+ * Checks if a file or directory is writable.
+ *
+ * @since 2.5.0
+ *
+ * @param string $path Path to file or directory.
+ * @return bool Whether $path is writable.
+ */
+ public function is_writable($path)
+ {
+ }
+ /**
+ * Gets the file's last access time.
+ *
+ * @since 2.5.0
+ *
+ * @param string $file Path to file.
+ * @return int|false Unix timestamp representing last access time, false on failure.
+ */
+ public function atime($file)
+ {
+ }
+ /**
+ * Gets the file modification time.
+ *
+ * @since 2.5.0
+ *
+ * @param string $file Path to file.
+ * @return int|false Unix timestamp representing modification time, false on failure.
+ */
+ public function mtime($file)
+ {
+ }
+ /**
+ * Gets the file size (in bytes).
+ *
+ * @since 2.5.0
+ *
+ * @param string $file Path to file.
+ * @return int|false Size of the file in bytes on success, false on failure.
+ */
+ public function size($file)
+ {
+ }
+ /**
+ * Sets the access and modification times of a file.
+ *
+ * Note: If $file doesn't exist, it will be created.
+ *
+ * @since 2.5.0
+ *
+ * @param string $file Path to file.
+ * @param int $time Optional. Modified time to set for file.
+ * Default 0.
+ * @param int $atime Optional. Access time to set for file.
+ * Default 0.
+ * @return bool True on success, false on failure.
+ */
+ public function touch($file, $time = 0, $atime = 0)
+ {
+ }
+ /**
+ * Creates a directory.
+ *
+ * @since 2.5.0
+ *
+ * @param string $path Path for new directory.
+ * @param int|false $chmod Optional. The permissions as octal number (or false to skip chmod).
+ * Default false.
+ * @param string|int|false $chown Optional. A user name or number (or false to skip chown).
+ * Default false.
+ * @param string|int|false $chgrp Optional. A group name or number (or false to skip chgrp).
+ * Default false.
+ * @return bool True on success, false on failure.
+ */
+ public function mkdir($path, $chmod = \false, $chown = \false, $chgrp = \false)
+ {
+ }
+ /**
+ * Deletes a directory.
+ *
+ * @since 2.5.0
+ *
+ * @param string $path Path to directory.
+ * @param bool $recursive Optional. Whether to recursively remove files/directories.
+ * Default false.
+ * @return bool True on success, false on failure.
+ */
+ public function rmdir($path, $recursive = \false)
+ {
+ }
+ /**
+ * @param string $line
+ * @return array
+ */
+ public function parselisting($line)
+ {
+ }
+ /**
+ * Gets details for files in a directory or a specific file.
+ *
+ * @since 2.5.0
+ *
+ * @param string $path Path to directory or file.
+ * @param bool $include_hidden Optional. Whether to include details of hidden ("." prefixed) files.
+ * Default true.
+ * @param bool $recursive Optional. Whether to recursively include file details in nested directories.
+ * Default false.
+ * @return array|false {
+ * Array of files. False if unable to list directory contents.
+ *
+ * @type string $name Name of the file or directory.
+ * @type string $perms *nix representation of permissions.
+ * @type string $permsn Octal representation of permissions.
+ * @type string $owner Owner name or ID.
+ * @type int $size Size of file in bytes.
+ * @type int $lastmodunix Last modified unix timestamp.
+ * @type mixed $lastmod Last modified month (3 letter) and day (without leading 0).
+ * @type int $time Last modified time.
+ * @type string $type Type of resource. 'f' for file, 'd' for directory.
+ * @type mixed $files If a directory and `$recursive` is true, contains another array of files.
+ * }
+ * @phpstan-return false|array{
+ * name: string,
+ * perms: string,
+ * permsn: string,
+ * owner: string,
+ * size: int,
+ * lastmodunix: int,
+ * lastmod: mixed,
+ * time: int,
+ * type: string,
+ * files: mixed,
+ * }
+ */
+ public function dirlist($path = '.', $include_hidden = \true, $recursive = \false)
+ {
+ }
+ /**
+ * Destructor.
+ *
+ * @since 2.5.0
+ */
+ public function __destruct()
+ {
+ }
+ }
+ /**
+ * WordPress FTP Sockets Filesystem.
+ *
+ * @package WordPress
+ * @subpackage Filesystem
+ */
+ /**
+ * WordPress Filesystem Class for implementing FTP Sockets.
+ *
+ * @since 2.5.0
+ *
+ * @see WP_Filesystem_Base
+ */
+ class WP_Filesystem_ftpsockets extends \WP_Filesystem_Base
+ {
+ /**
+ * @since 2.5.0
+ * @var ftp
+ */
+ public $ftp;
+ /**
+ * Constructor.
+ *
+ * @since 2.5.0
+ *
+ * @param array $opt
+ */
+ public function __construct($opt = '')
+ {
+ }
+ /**
+ * Connects filesystem.
+ *
+ * @since 2.5.0
+ *
+ * @return bool True on success, false on failure.
+ */
+ public function connect()
+ {
+ }
+ /**
+ * Reads entire file into a string.
+ *
+ * @since 2.5.0
+ *
+ * @param string $file Name of the file to read.
+ * @return string|false Read data on success, false if no temporary file could be opened,
+ * or if the file couldn't be retrieved.
+ */
+ public function get_contents($file)
+ {
+ }
+ /**
+ * Reads entire file into an array.
+ *
+ * @since 2.5.0
+ *
+ * @param string $file Path to the file.
+ * @return array|false File contents in an array on success, false on failure.
+ */
+ public function get_contents_array($file)
+ {
+ }
+ /**
+ * Writes a string to a file.
+ *
+ * @since 2.5.0
+ *
+ * @param string $file Remote path to the file where to write the data.
+ * @param string $contents The data to write.
+ * @param int|false $mode Optional. The file permissions as octal number, usually 0644.
+ * Default false.
+ * @return bool True on success, false on failure.
+ */
+ public function put_contents($file, $contents, $mode = \false)
+ {
+ }
+ /**
+ * Gets the current working directory.
+ *
+ * @since 2.5.0
+ *
+ * @return string|false The current working directory on success, false on failure.
+ */
+ public function cwd()
+ {
+ }
+ /**
+ * Changes current directory.
+ *
+ * @since 2.5.0
+ *
+ * @param string $dir The new current directory.
+ * @return bool True on success, false on failure.
+ */
+ public function chdir($dir)
+ {
+ }
+ /**
+ * Changes filesystem permissions.
+ *
+ * @since 2.5.0
+ *
+ * @param string $file Path to the file.
+ * @param int|false $mode Optional. The permissions as octal number, usually 0644 for files,
+ * 0755 for directories. Default false.
+ * @param bool $recursive Optional. If set to true, changes file permissions recursively.
+ * Default false.
+ * @return bool True on success, false on failure.
+ */
+ public function chmod($file, $mode = \false, $recursive = \false)
+ {
+ }
+ /**
+ * Gets the file owner.
+ *
+ * @since 2.5.0
+ *
+ * @param string $file Path to the file.
+ * @return string|false Username of the owner on success, false on failure.
+ */
+ public function owner($file)
+ {
+ }
+ /**
+ * Gets the permissions of the specified file or filepath in their octal format.
+ *
+ * @since 2.5.0
+ *
+ * @param string $file Path to the file.
+ * @return string Mode of the file (the last 3 digits).
+ */
+ public function getchmod($file)
+ {
+ }
+ /**
+ * Gets the file's group.
+ *
+ * @since 2.5.0
+ *
+ * @param string $file Path to the file.
+ * @return string|false The group on success, false on failure.
+ */
+ public function group($file)
+ {
+ }
+ /**
+ * Copies a file.
+ *
+ * @since 2.5.0
+ *
+ * @param string $source Path to the source file.
+ * @param string $destination Path to the destination file.
+ * @param bool $overwrite Optional. Whether to overwrite the destination file if it exists.
+ * Default false.
+ * @param int|false $mode Optional. The permissions as octal number, usually 0644 for files,
+ * 0755 for dirs. Default false.
+ * @return bool True on success, false on failure.
+ */
+ public function copy($source, $destination, $overwrite = \false, $mode = \false)
+ {
+ }
+ /**
+ * Moves a file.
+ *
+ * @since 2.5.0
+ *
+ * @param string $source Path to the source file.
+ * @param string $destination Path to the destination file.
+ * @param bool $overwrite Optional. Whether to overwrite the destination file if it exists.
+ * Default false.
+ * @return bool True on success, false on failure.
+ */
+ public function move($source, $destination, $overwrite = \false)
+ {
+ }
+ /**
+ * Deletes a file or directory.
+ *
+ * @since 2.5.0
+ *
+ * @param string $file Path to the file or directory.
+ * @param bool $recursive Optional. If set to true, deletes files and folders recursively.
+ * Default false.
+ * @param string|false $type Type of resource. 'f' for file, 'd' for directory.
+ * Default false.
+ * @return bool True on success, false on failure.
+ */
+ public function delete($file, $recursive = \false, $type = \false)
+ {
+ }
+ /**
+ * Checks if a file or directory exists.
+ *
+ * @since 2.5.0
+ *
+ * @param string $path Path to file or directory.
+ * @return bool Whether $path exists or not.
+ */
+ public function exists($path)
+ {
+ }
+ /**
+ * Checks if resource is a file.
+ *
+ * @since 2.5.0
+ *
+ * @param string $file File path.
+ * @return bool Whether $file is a file.
+ */
+ public function is_file($file)
+ {
+ }
+ /**
+ * Checks if resource is a directory.
+ *
+ * @since 2.5.0
+ *
+ * @param string $path Directory path.
+ * @return bool Whether $path is a directory.
+ */
+ public function is_dir($path)
+ {
+ }
+ /**
+ * Checks if a file is readable.
+ *
+ * @since 2.5.0
+ *
+ * @param string $file Path to file.
+ * @return bool Whether $file is readable.
+ */
+ public function is_readable($file)
+ {
+ }
+ /**
+ * Checks if a file or directory is writable.
+ *
+ * @since 2.5.0
+ *
+ * @param string $path Path to file or directory.
+ * @return bool Whether $path is writable.
+ */
+ public function is_writable($path)
+ {
+ }
+ /**
+ * Gets the file's last access time.
+ *
+ * @since 2.5.0
+ *
+ * @param string $file Path to file.
+ * @return int|false Unix timestamp representing last access time, false on failure.
+ */
+ public function atime($file)
+ {
+ }
+ /**
+ * Gets the file modification time.
+ *
+ * @since 2.5.0
+ *
+ * @param string $file Path to file.
+ * @return int|false Unix timestamp representing modification time, false on failure.
+ */
+ public function mtime($file)
+ {
+ }
+ /**
+ * Gets the file size (in bytes).
+ *
+ * @since 2.5.0
+ *
+ * @param string $file Path to file.
+ * @return int|false Size of the file in bytes on success, false on failure.
+ */
+ public function size($file)
+ {
+ }
+ /**
+ * Sets the access and modification times of a file.
+ *
+ * Note: If $file doesn't exist, it will be created.
+ *
+ * @since 2.5.0
+ *
+ * @param string $file Path to file.
+ * @param int $time Optional. Modified time to set for file.
+ * Default 0.
+ * @param int $atime Optional. Access time to set for file.
+ * Default 0.
+ * @return bool True on success, false on failure.
+ */
+ public function touch($file, $time = 0, $atime = 0)
+ {
+ }
+ /**
+ * Creates a directory.
+ *
+ * @since 2.5.0
+ *
+ * @param string $path Path for new directory.
+ * @param int|false $chmod Optional. The permissions as octal number (or false to skip chmod).
+ * Default false.
+ * @param string|int|false $chown Optional. A user name or number (or false to skip chown).
+ * Default false.
+ * @param string|int|false $chgrp Optional. A group name or number (or false to skip chgrp).
+ * Default false.
+ * @return bool True on success, false on failure.
+ */
+ public function mkdir($path, $chmod = \false, $chown = \false, $chgrp = \false)
+ {
+ }
+ /**
+ * Deletes a directory.
+ *
+ * @since 2.5.0
+ *
+ * @param string $path Path to directory.
+ * @param bool $recursive Optional. Whether to recursively remove files/directories.
+ * Default false.
+ * @return bool True on success, false on failure.
+ */
+ public function rmdir($path, $recursive = \false)
+ {
+ }
+ /**
+ * Gets details for files in a directory or a specific file.
+ *
+ * @since 2.5.0
+ *
+ * @param string $path Path to directory or file.
+ * @param bool $include_hidden Optional. Whether to include details of hidden ("." prefixed) files.
+ * Default true.
+ * @param bool $recursive Optional. Whether to recursively include file details in nested directories.
+ * Default false.
+ * @return array|false {
+ * Array of files. False if unable to list directory contents.
+ *
+ * @type string $name Name of the file or directory.
+ * @type string $perms *nix representation of permissions.
+ * @type string $permsn Octal representation of permissions.
+ * @type string $owner Owner name or ID.
+ * @type int $size Size of file in bytes.
+ * @type int $lastmodunix Last modified unix timestamp.
+ * @type mixed $lastmod Last modified month (3 letter) and day (without leading 0).
+ * @type int $time Last modified time.
+ * @type string $type Type of resource. 'f' for file, 'd' for directory.
+ * @type mixed $files If a directory and `$recursive` is true, contains another array of files.
+ * }
+ * @phpstan-return false|array{
+ * name: string,
+ * perms: string,
+ * permsn: string,
+ * owner: string,
+ * size: int,
+ * lastmodunix: int,
+ * lastmod: mixed,
+ * time: int,
+ * type: string,
+ * files: mixed,
+ * }
+ */
+ public function dirlist($path = '.', $include_hidden = \true, $recursive = \false)
+ {
+ }
+ /**
+ * Destructor.
+ *
+ * @since 2.5.0
+ */
+ public function __destruct()
+ {
+ }
+ }
+ /**
+ * WordPress Filesystem Class for implementing SSH2
+ *
+ * To use this class you must follow these steps for PHP 5.2.6+
+ *
+ * @contrib http://kevin.vanzonneveld.net/techblog/article/make_ssh_connections_with_php/ - Installation Notes
+ *
+ * Compile libssh2 (Note: Only 0.14 is officaly working with PHP 5.2.6+ right now, But many users have found the latest versions work)
+ *
+ * cd /usr/src
+ * wget https://www.libssh2.org/download/libssh2-0.14.tar.gz
+ * tar -zxvf libssh2-0.14.tar.gz
+ * cd libssh2-0.14/
+ * ./configure
+ * make all install
+ *
+ * Note: Do not leave the directory yet!
+ *
+ * Enter: pecl install -f ssh2
+ *
+ * Copy the ssh.so file it creates to your PHP Module Directory.
+ * Open up your PHP.INI file and look for where extensions are placed.
+ * Add in your PHP.ini file: extension=ssh2.so
+ *
+ * Restart Apache!
+ * Check phpinfo() streams to confirm that: ssh2.shell, ssh2.exec, ssh2.tunnel, ssh2.scp, ssh2.sftp exist.
+ *
+ * Note: As of WordPress 2.8, this utilizes the PHP5+ function `stream_get_contents()`.
+ *
+ * @since 2.7.0
+ *
+ * @package WordPress
+ * @subpackage Filesystem
+ */
+ class WP_Filesystem_SSH2 extends \WP_Filesystem_Base
+ {
+ /**
+ * @since 2.7.0
+ * @var resource
+ */
+ public $link = \false;
+ /**
+ * @since 2.7.0
+ * @var resource
+ */
+ public $sftp_link;
+ /**
+ * @since 2.7.0
+ * @var bool
+ */
+ public $keys = \false;
+ /**
+ * Constructor.
+ *
+ * @since 2.7.0
+ *
+ * @param array $opt
+ */
+ public function __construct($opt = '')
+ {
+ }
+ /**
+ * Connects filesystem.
+ *
+ * @since 2.7.0
+ *
+ * @return bool True on success, false on failure.
+ */
+ public function connect()
+ {
+ }
+ /**
+ * Gets the ssh2.sftp PHP stream wrapper path to open for the given file.
+ *
+ * This method also works around a PHP bug where the root directory (/) cannot
+ * be opened by PHP functions, causing a false failure. In order to work around
+ * this, the path is converted to /./ which is semantically the same as /
+ * See https://bugs.php.net/bug.php?id=64169 for more details.
+ *
+ * @since 4.4.0
+ *
+ * @param string $path The File/Directory path on the remote server to return
+ * @return string The ssh2.sftp:// wrapped path to use.
+ */
+ public function sftp_path($path)
+ {
+ }
+ /**
+ * @since 2.7.0
+ *
+ * @param string $command
+ * @param bool $returnbool
+ * @return bool|string True on success, false on failure. String if the command was executed, `$returnbool`
+ * is false (default), and data from the resulting stream was retrieved.
+ */
+ public function run_command($command, $returnbool = \false)
+ {
+ }
+ /**
+ * Reads entire file into a string.
+ *
+ * @since 2.7.0
+ *
+ * @param string $file Name of the file to read.
+ * @return string|false Read data on success, false if no temporary file could be opened,
+ * or if the file couldn't be retrieved.
+ */
+ public function get_contents($file)
+ {
+ }
+ /**
+ * Reads entire file into an array.
+ *
+ * @since 2.7.0
+ *
+ * @param string $file Path to the file.
+ * @return array|false File contents in an array on success, false on failure.
+ */
+ public function get_contents_array($file)
+ {
+ }
+ /**
+ * Writes a string to a file.
+ *
+ * @since 2.7.0
+ *
+ * @param string $file Remote path to the file where to write the data.
+ * @param string $contents The data to write.
+ * @param int|false $mode Optional. The file permissions as octal number, usually 0644.
+ * Default false.
+ * @return bool True on success, false on failure.
+ */
+ public function put_contents($file, $contents, $mode = \false)
+ {
+ }
+ /**
+ * Gets the current working directory.
+ *
+ * @since 2.7.0
+ *
+ * @return string|false The current working directory on success, false on failure.
+ */
+ public function cwd()
+ {
+ }
+ /**
+ * Changes current directory.
+ *
+ * @since 2.7.0
+ *
+ * @param string $dir The new current directory.
+ * @return bool True on success, false on failure.
+ */
+ public function chdir($dir)
+ {
+ }
+ /**
+ * Changes the file group.
+ *
+ * @since 2.7.0
+ *
+ * @param string $file Path to the file.
+ * @param string|int $group A group name or number.
+ * @param bool $recursive Optional. If set to true, changes file group recursively.
+ * Default false.
+ * @return bool True on success, false on failure.
+ */
+ public function chgrp($file, $group, $recursive = \false)
+ {
+ }
+ /**
+ * Changes filesystem permissions.
+ *
+ * @since 2.7.0
+ *
+ * @param string $file Path to the file.
+ * @param int|false $mode Optional. The permissions as octal number, usually 0644 for files,
+ * 0755 for directories. Default false.
+ * @param bool $recursive Optional. If set to true, changes file permissions recursively.
+ * Default false.
+ * @return bool True on success, false on failure.
+ */
+ public function chmod($file, $mode = \false, $recursive = \false)
+ {
+ }
+ /**
+ * Changes the owner of a file or directory.
+ *
+ * @since 2.7.0
+ *
+ * @param string $file Path to the file or directory.
+ * @param string|int $owner A user name or number.
+ * @param bool $recursive Optional. If set to true, changes file owner recursively.
+ * Default false.
+ * @return bool True on success, false on failure.
+ */
+ public function chown($file, $owner, $recursive = \false)
+ {
+ }
+ /**
+ * Gets the file owner.
+ *
+ * @since 2.7.0
+ *
+ * @param string $file Path to the file.
+ * @return string|false Username of the owner on success, false on failure.
+ */
+ public function owner($file)
+ {
+ }
+ /**
+ * Gets the permissions of the specified file or filepath in their octal format.
+ *
+ * @since 2.7.0
+ *
+ * @param string $file Path to the file.
+ * @return string Mode of the file (the last 3 digits).
+ */
+ public function getchmod($file)
+ {
+ }
+ /**
+ * Gets the file's group.
+ *
+ * @since 2.7.0
+ *
+ * @param string $file Path to the file.
+ * @return string|false The group on success, false on failure.
+ */
+ public function group($file)
+ {
+ }
+ /**
+ * Copies a file.
+ *
+ * @since 2.7.0
+ *
+ * @param string $source Path to the source file.
+ * @param string $destination Path to the destination file.
+ * @param bool $overwrite Optional. Whether to overwrite the destination file if it exists.
+ * Default false.
+ * @param int|false $mode Optional. The permissions as octal number, usually 0644 for files,
+ * 0755 for dirs. Default false.
+ * @return bool True on success, false on failure.
+ */
+ public function copy($source, $destination, $overwrite = \false, $mode = \false)
+ {
+ }
+ /**
+ * Moves a file.
+ *
+ * @since 2.7.0
+ *
+ * @param string $source Path to the source file.
+ * @param string $destination Path to the destination file.
+ * @param bool $overwrite Optional. Whether to overwrite the destination file if it exists.
+ * Default false.
+ * @return bool True on success, false on failure.
+ */
+ public function move($source, $destination, $overwrite = \false)
+ {
+ }
+ /**
+ * Deletes a file or directory.
+ *
+ * @since 2.7.0
+ *
+ * @param string $file Path to the file or directory.
+ * @param bool $recursive Optional. If set to true, deletes files and folders recursively.
+ * Default false.
+ * @param string|false $type Type of resource. 'f' for file, 'd' for directory.
+ * Default false.
+ * @return bool True on success, false on failure.
+ */
+ public function delete($file, $recursive = \false, $type = \false)
+ {
+ }
+ /**
+ * Checks if a file or directory exists.
+ *
+ * @since 2.7.0
+ *
+ * @param string $path Path to file or directory.
+ * @return bool Whether $path exists or not.
+ */
+ public function exists($path)
+ {
+ }
+ /**
+ * Checks if resource is a file.
+ *
+ * @since 2.7.0
+ *
+ * @param string $file File path.
+ * @return bool Whether $file is a file.
+ */
+ public function is_file($file)
+ {
+ }
+ /**
+ * Checks if resource is a directory.
+ *
+ * @since 2.7.0
+ *
+ * @param string $path Directory path.
+ * @return bool Whether $path is a directory.
+ */
+ public function is_dir($path)
+ {
+ }
+ /**
+ * Checks if a file is readable.
+ *
+ * @since 2.7.0
+ *
+ * @param string $file Path to file.
+ * @return bool Whether $file is readable.
+ */
+ public function is_readable($file)
+ {
+ }
+ /**
+ * Checks if a file or directory is writable.
+ *
+ * @since 2.7.0
+ *
+ * @param string $path Path to file or directory.
+ * @return bool Whether $path is writable.
+ */
+ public function is_writable($path)
+ {
+ }
+ /**
+ * Gets the file's last access time.
+ *
+ * @since 2.7.0
+ *
+ * @param string $file Path to file.
+ * @return int|false Unix timestamp representing last access time, false on failure.
+ */
+ public function atime($file)
+ {
+ }
+ /**
+ * Gets the file modification time.
+ *
+ * @since 2.7.0
+ *
+ * @param string $file Path to file.
+ * @return int|false Unix timestamp representing modification time, false on failure.
+ */
+ public function mtime($file)
+ {
+ }
+ /**
+ * Gets the file size (in bytes).
+ *
+ * @since 2.7.0
+ *
+ * @param string $file Path to file.
+ * @return int|false Size of the file in bytes on success, false on failure.
+ */
+ public function size($file)
+ {
+ }
+ /**
+ * Sets the access and modification times of a file.
+ *
+ * Note: Not implemented.
+ *
+ * @since 2.7.0
+ *
+ * @param string $file Path to file.
+ * @param int $time Optional. Modified time to set for file.
+ * Default 0.
+ * @param int $atime Optional. Access time to set for file.
+ * Default 0.
+ */
+ public function touch($file, $time = 0, $atime = 0)
+ {
+ }
+ /**
+ * Creates a directory.
+ *
+ * @since 2.7.0
+ *
+ * @param string $path Path for new directory.
+ * @param int|false $chmod Optional. The permissions as octal number (or false to skip chmod).
+ * Default false.
+ * @param string|int|false $chown Optional. A user name or number (or false to skip chown).
+ * Default false.
+ * @param string|int|false $chgrp Optional. A group name or number (or false to skip chgrp).
+ * Default false.
+ * @return bool True on success, false on failure.
+ */
+ public function mkdir($path, $chmod = \false, $chown = \false, $chgrp = \false)
+ {
+ }
+ /**
+ * Deletes a directory.
+ *
+ * @since 2.7.0
+ *
+ * @param string $path Path to directory.
+ * @param bool $recursive Optional. Whether to recursively remove files/directories.
+ * Default false.
+ * @return bool True on success, false on failure.
+ */
+ public function rmdir($path, $recursive = \false)
+ {
+ }
+ /**
+ * Gets details for files in a directory or a specific file.
+ *
+ * @since 2.7.0
+ *
+ * @param string $path Path to directory or file.
+ * @param bool $include_hidden Optional. Whether to include details of hidden ("." prefixed) files.
+ * Default true.
+ * @param bool $recursive Optional. Whether to recursively include file details in nested directories.
+ * Default false.
+ * @return array|false {
+ * Array of files. False if unable to list directory contents.
+ *
+ * @type string $name Name of the file or directory.
+ * @type string $perms *nix representation of permissions.
+ * @type string $permsn Octal representation of permissions.
+ * @type string $owner Owner name or ID.
+ * @type int $size Size of file in bytes.
+ * @type int $lastmodunix Last modified unix timestamp.
+ * @type mixed $lastmod Last modified month (3 letter) and day (without leading 0).
+ * @type int $time Last modified time.
+ * @type string $type Type of resource. 'f' for file, 'd' for directory.
+ * @type mixed $files If a directory and `$recursive` is true, contains another array of files.
+ * }
+ * @phpstan-return false|array{
+ * name: string,
+ * perms: string,
+ * permsn: string,
+ * owner: string,
+ * size: int,
+ * lastmodunix: int,
+ * lastmod: mixed,
+ * time: int,
+ * type: string,
+ * files: mixed,
+ * }
+ */
+ public function dirlist($path, $include_hidden = \true, $recursive = \false)
+ {
+ }
+ }
+ /**
+ * WP_Importer base class
+ */
+ #[\AllowDynamicProperties]
+ class WP_Importer
+ {
+ /**
+ * Class Constructor
+ */
+ public function __construct()
+ {
+ }
+ /**
+ * Returns array with imported permalinks from WordPress database
+ *
+ * @global wpdb $wpdb WordPress database abstraction object.
+ *
+ * @param string $importer_name
+ * @param string $blog_id
+ * @return array
+ */
+ public function get_imported_posts($importer_name, $blog_id)
+ {
+ }
+ /**
+ * Return count of imported permalinks from WordPress database
+ *
+ * @global wpdb $wpdb WordPress database abstraction object.
+ *
+ * @param string $importer_name
+ * @param string $blog_id
+ * @return int
+ */
+ public function count_imported_posts($importer_name, $blog_id)
+ {
+ }
+ /**
+ * Set array with imported comments from WordPress database
+ *
+ * @global wpdb $wpdb WordPress database abstraction object.
+ *
+ * @param string $blog_id
+ * @return array
+ */
+ public function get_imported_comments($blog_id)
+ {
+ }
+ /**
+ * @param int $blog_id
+ * @return int|void
+ */
+ public function set_blog($blog_id)
+ {
+ }
+ /**
+ * @param int $user_id
+ * @return int|void
+ */
+ public function set_user($user_id)
+ {
+ }
+ /**
+ * Sort by strlen, longest string first
+ *
+ * @param string $a
+ * @param string $b
+ * @return int
+ */
+ public function cmpr_strlen($a, $b)
+ {
+ }
+ /**
+ * GET URL
+ *
+ * @param string $url
+ * @param string $username
+ * @param string $password
+ * @param bool $head
+ * @return array
+ */
+ public function get_page($url, $username = '', $password = '', $head = \false)
+ {
+ }
+ /**
+ * Bump up the request timeout for http requests
+ *
+ * @param int $val
+ * @return int
+ */
+ public function bump_request_timeout($val)
+ {
+ }
+ /**
+ * Check if user has exceeded disk quota
+ *
+ * @return bool
+ */
+ public function is_user_over_quota()
+ {
+ }
+ /**
+ * Replace newlines, tabs, and multiple spaces with a single space.
+ *
+ * @param string $text
+ * @return string
+ */
+ public function min_whitespace($text)
+ {
+ }
+ /**
+ * Resets global variables that grow out of control during imports.
+ *
+ * @since 3.0.0
+ *
+ * @global wpdb $wpdb WordPress database abstraction object.
+ * @global int[] $wp_actions
+ */
+ public function stop_the_insanity()
+ {
+ }
+ }
+ /**
+ * Administration API: WP_Internal_Pointers class
+ *
+ * @package WordPress
+ * @subpackage Administration
+ * @since 4.4.0
+ */
+ /**
+ * Core class used to implement an internal admin pointers API.
+ *
+ * @since 3.3.0
+ */
+ #[\AllowDynamicProperties]
+ final class WP_Internal_Pointers
+ {
+ /**
+ * Initializes the new feature pointers.
+ *
+ * @since 3.3.0
+ *
+ * All pointers can be disabled using the following:
+ * remove_action( 'admin_enqueue_scripts', array( 'WP_Internal_Pointers', 'enqueue_scripts' ) );
+ *
+ * Individual pointers (e.g. wp390_widgets) can be disabled using the following:
+ *
+ * function yourprefix_remove_pointers() {
+ * remove_action(
+ * 'admin_print_footer_scripts',
+ * array( 'WP_Internal_Pointers', 'pointer_wp390_widgets' )
+ * );
+ * }
+ * add_action( 'admin_enqueue_scripts', 'yourprefix_remove_pointers', 11 );
+ *
+ * @param string $hook_suffix The current admin page.
+ */
+ public static function enqueue_scripts($hook_suffix)
+ {
+ }
+ public static function pointer_wp330_toolbar()
+ {
+ }
+ public static function pointer_wp330_media_uploader()
+ {
+ }
+ public static function pointer_wp330_saving_widgets()
+ {
+ }
+ public static function pointer_wp340_customize_current_theme_link()
+ {
+ }
+ public static function pointer_wp340_choose_image_from_library()
+ {
+ }
+ public static function pointer_wp350_media()
+ {
+ }
+ public static function pointer_wp360_revisions()
+ {
+ }
+ public static function pointer_wp360_locks()
+ {
+ }
+ public static function pointer_wp390_widgets()
+ {
+ }
+ public static function pointer_wp410_dfw()
+ {
+ }
+ public static function pointer_wp496_privacy()
+ {
+ }
+ /**
+ * Prevents new users from seeing existing 'new feature' pointers.
+ *
+ * @since 3.3.0
+ *
+ * @param int $user_id User ID.
+ */
+ public static function dismiss_pointers_for_new_users($user_id)
+ {
+ }
+ }
+ /**
+ * List Table API: WP_Links_List_Table class
+ *
+ * @package WordPress
+ * @subpackage Administration
+ * @since 3.1.0
+ */
+ /**
+ * Core class used to implement displaying links in a list table.
+ *
+ * @since 3.1.0
+ *
+ * @see WP_List_Table
+ */
+ class WP_Links_List_Table extends \WP_List_Table
+ {
+ /**
+ * Constructor.
+ *
+ * @since 3.1.0
+ *
+ * @see WP_List_Table::__construct() for more information on default arguments.
+ *
+ * @param array $args An associative array of arguments.
+ */
+ public function __construct($args = array())
+ {
+ }
+ /**
+ * @return bool
+ */
+ public function ajax_user_can()
+ {
+ }
+ /**
+ * @global int $cat_id
+ * @global string $s
+ * @global string $orderby
+ * @global string $order
+ */
+ public function prepare_items()
+ {
+ }
+ /**
+ */
+ public function no_items()
+ {
+ }
+ /**
+ * @return array
+ */
+ protected function get_bulk_actions()
+ {
+ }
+ /**
+ * @global int $cat_id
+ * @param string $which
+ */
+ protected function extra_tablenav($which)
+ {
+ }
+ /**
+ * @return array
+ */
+ public function get_columns()
+ {
+ }
+ /**
+ * @return array
+ */
+ protected function get_sortable_columns()
+ {
+ }
+ /**
+ * Get the name of the default primary column.
+ *
+ * @since 4.3.0
+ *
+ * @return string Name of the default primary column, in this case, 'name'.
+ */
+ protected function get_default_primary_column_name()
+ {
+ }
+ /**
+ * Handles the checkbox column output.
+ *
+ * @since 4.3.0
+ * @since 5.9.0 Renamed `$link` to `$item` to match parent class for PHP 8 named parameter support.
+ *
+ * @param object $item The current link object.
+ */
+ public function column_cb($item)
+ {
+ }
+ /**
+ * Handles the link name column output.
+ *
+ * @since 4.3.0
+ *
+ * @param object $link The current link object.
+ */
+ public function column_name($link)
+ {
+ }
+ /**
+ * Handles the link URL column output.
+ *
+ * @since 4.3.0
+ *
+ * @param object $link The current link object.
+ */
+ public function column_url($link)
+ {
+ }
+ /**
+ * Handles the link categories column output.
+ *
+ * @since 4.3.0
+ *
+ * @global int $cat_id
+ *
+ * @param object $link The current link object.
+ */
+ public function column_categories($link)
+ {
+ }
+ /**
+ * Handles the link relation column output.
+ *
+ * @since 4.3.0
+ *
+ * @param object $link The current link object.
+ */
+ public function column_rel($link)
+ {
+ }
+ /**
+ * Handles the link visibility column output.
+ *
+ * @since 4.3.0
+ *
+ * @param object $link The current link object.
+ */
+ public function column_visible($link)
+ {
+ }
+ /**
+ * Handles the link rating column output.
+ *
+ * @since 4.3.0
+ *
+ * @param object $link The current link object.
+ */
+ public function column_rating($link)
+ {
+ }
+ /**
+ * Handles the default column output.
+ *
+ * @since 4.3.0
+ * @since 5.9.0 Renamed `$link` to `$item` to match parent class for PHP 8 named parameter support.
+ *
+ * @param object $item Link object.
+ * @param string $column_name Current column name.
+ */
+ public function column_default($item, $column_name)
+ {
+ }
+ public function display_rows()
+ {
+ }
+ /**
+ * Generates and displays row action links.
+ *
+ * @since 4.3.0
+ * @since 5.9.0 Renamed `$link` to `$item` to match parent class for PHP 8 named parameter support.
+ *
+ * @param object $item Link being acted upon.
+ * @param string $column_name Current column name.
+ * @param string $primary Primary column name.
+ * @return string Row actions output for links, or an empty string
+ * if the current column is not the primary column.
+ */
+ protected function handle_row_actions($item, $column_name, $primary)
+ {
+ }
+ }
+ /**
+ * Helper functions for displaying a list of items in an ajaxified HTML table.
+ *
+ * @package WordPress
+ * @subpackage List_Table
+ * @since 4.7.0
+ */
+ /**
+ * Helper class to be used only by back compat functions.
+ *
+ * @since 3.1.0
+ */
+ class _WP_List_Table_Compat extends \WP_List_Table
+ {
+ public $_screen;
+ public $_columns;
+ /**
+ * Constructor.
+ *
+ * @since 3.1.0
+ *
+ * @param string|WP_Screen $screen The screen hook name or screen object.
+ * @param string[] $columns An array of columns with column IDs as the keys
+ * and translated column names as the values.
+ */
+ public function __construct($screen, $columns = array())
+ {
+ }
+ /**
+ * Gets a list of all, hidden, and sortable columns.
+ *
+ * @since 3.1.0
+ *
+ * @return array
+ */
+ protected function get_column_info()
+ {
+ }
+ /**
+ * Gets a list of columns.
+ *
+ * @since 3.1.0
+ *
+ * @return array
+ */
+ public function get_columns()
+ {
+ }
+ }
+ /**
+ * List Table API: WP_Media_List_Table class
+ *
+ * @package WordPress
+ * @subpackage Administration
+ * @since 3.1.0
+ */
+ /**
+ * Core class used to implement displaying media items in a list table.
+ *
+ * @since 3.1.0
+ *
+ * @see WP_List_Table
+ */
+ class WP_Media_List_Table extends \WP_List_Table
+ {
+ /**
+ * Holds the number of pending comments for each post.
+ *
+ * @since 4.4.0
+ * @var array
+ */
+ protected $comment_pending_count = array();
+ /**
+ * Constructor.
+ *
+ * @since 3.1.0
+ *
+ * @see WP_List_Table::__construct() for more information on default arguments.
+ *
+ * @param array $args An associative array of arguments.
+ */
+ public function __construct($args = array())
+ {
+ }
+ /**
+ * @return bool
+ */
+ public function ajax_user_can()
+ {
+ }
+ /**
+ * @global string $mode List table view mode.
+ * @global WP_Query $wp_query WordPress Query object.
+ * @global array $post_mime_types
+ * @global array $avail_post_mime_types
+ */
+ public function prepare_items()
+ {
+ }
+ /**
+ * @global array $post_mime_types
+ * @global array $avail_post_mime_types
+ * @return array
+ */
+ protected function get_views()
+ {
+ }
+ /**
+ * @return array
+ */
+ protected function get_bulk_actions()
+ {
+ }
+ /**
+ * @param string $which
+ */
+ protected function extra_tablenav($which)
+ {
+ }
+ /**
+ * @return string
+ */
+ public function current_action()
+ {
+ }
+ /**
+ * @return bool
+ */
+ public function has_items()
+ {
+ }
+ /**
+ */
+ public function no_items()
+ {
+ }
+ /**
+ * Override parent views so we can use the filter bar display.
+ *
+ * @global string $mode List table view mode.
+ */
+ public function views()
+ {
+ }
+ /**
+ * @return array
+ */
+ public function get_columns()
+ {
+ }
+ /**
+ * @return array
+ */
+ protected function get_sortable_columns()
+ {
+ }
+ /**
+ * Handles the checkbox column output.
+ *
+ * @since 4.3.0
+ * @since 5.9.0 Renamed `$post` to `$item` to match parent class for PHP 8 named parameter support.
+ *
+ * @param WP_Post $item The current WP_Post object.
+ */
+ public function column_cb($item)
+ {
+ }
+ /**
+ * Handles the title column output.
+ *
+ * @since 4.3.0
+ *
+ * @param WP_Post $post The current WP_Post object.
+ */
+ public function column_title($post)
+ {
+ }
+ /**
+ * Handles the author column output.
+ *
+ * @since 4.3.0
+ *
+ * @param WP_Post $post The current WP_Post object.
+ */
+ public function column_author($post)
+ {
+ }
+ /**
+ * Handles the description column output.
+ *
+ * @since 4.3.0
+ *
+ * @param WP_Post $post The current WP_Post object.
+ */
+ public function column_desc($post)
+ {
+ }
+ /**
+ * Handles the date column output.
+ *
+ * @since 4.3.0
+ *
+ * @param WP_Post $post The current WP_Post object.
+ */
+ public function column_date($post)
+ {
+ }
+ /**
+ * Handles the parent column output.
+ *
+ * @since 4.3.0
+ *
+ * @param WP_Post $post The current WP_Post object.
+ */
+ public function column_parent($post)
+ {
+ }
+ /**
+ * Handles the comments column output.
+ *
+ * @since 4.3.0
+ *
+ * @param WP_Post $post The current WP_Post object.
+ */
+ public function column_comments($post)
+ {
+ }
+ /**
+ * Handles output for the default column.
+ *
+ * @since 4.3.0
+ * @since 5.9.0 Renamed `$post` to `$item` to match parent class for PHP 8 named parameter support.
+ *
+ * @param WP_Post $item The current WP_Post object.
+ * @param string $column_name Current column name.
+ */
+ public function column_default($item, $column_name)
+ {
+ }
+ /**
+ * @global WP_Post $post Global post object.
+ */
+ public function display_rows()
+ {
+ }
+ /**
+ * Gets the name of the default primary column.
+ *
+ * @since 4.3.0
+ *
+ * @return string Name of the default primary column, in this case, 'title'.
+ */
+ protected function get_default_primary_column_name()
+ {
+ }
+ /**
+ * Generates and displays row action links.
+ *
+ * @since 4.3.0
+ * @since 5.9.0 Renamed `$post` to `$item` to match parent class for PHP 8 named parameter support.
+ *
+ * @param WP_Post $item Attachment being acted upon.
+ * @param string $column_name Current column name.
+ * @param string $primary Primary column name.
+ * @return string Row actions output for media attachments, or an empty string
+ * if the current column is not the primary column.
+ */
+ protected function handle_row_actions($item, $column_name, $primary)
+ {
+ }
+ }
+ /**
+ * List Table API: WP_MS_Sites_List_Table class
+ *
+ * @package WordPress
+ * @subpackage Administration
+ * @since 3.1.0
+ */
+ /**
+ * Core class used to implement displaying sites in a list table for the network admin.
+ *
+ * @since 3.1.0
+ *
+ * @see WP_List_Table
+ */
+ class WP_MS_Sites_List_Table extends \WP_List_Table
+ {
+ /**
+ * Site status list.
+ *
+ * @since 4.3.0
+ * @var array
+ */
+ public $status_list;
+ /**
+ * Constructor.
+ *
+ * @since 3.1.0
+ *
+ * @see WP_List_Table::__construct() for more information on default arguments.
+ *
+ * @param array $args An associative array of arguments.
+ */
+ public function __construct($args = array())
+ {
+ }
+ /**
+ * @return bool
+ */
+ public function ajax_user_can()
+ {
+ }
+ /**
+ * Prepares the list of sites for display.
+ *
+ * @since 3.1.0
+ *
+ * @global string $mode List table view mode.
+ * @global string $s
+ * @global wpdb $wpdb WordPress database abstraction object.
+ */
+ public function prepare_items()
+ {
+ }
+ /**
+ */
+ public function no_items()
+ {
+ }
+ /**
+ * Gets links to filter sites by status.
+ *
+ * @since 5.3.0
+ *
+ * @return array
+ */
+ protected function get_views()
+ {
+ }
+ /**
+ * @return array
+ */
+ protected function get_bulk_actions()
+ {
+ }
+ /**
+ * @global string $mode List table view mode.
+ *
+ * @param string $which The location of the pagination nav markup: 'top' or 'bottom'.
+ */
+ protected function pagination($which)
+ {
+ }
+ /**
+ * Extra controls to be displayed between bulk actions and pagination.
+ *
+ * @since 5.3.0
+ *
+ * @param string $which The location of the extra table nav markup: 'top' or 'bottom'.
+ */
+ protected function extra_tablenav($which)
+ {
+ }
+ /**
+ * @return array
+ */
+ public function get_columns()
+ {
+ }
+ /**
+ * @return array
+ */
+ protected function get_sortable_columns()
+ {
+ }
+ /**
+ * Handles the checkbox column output.
+ *
+ * @since 4.3.0
+ * @since 5.9.0 Renamed `$blog` to `$item` to match parent class for PHP 8 named parameter support.
+ *
+ * @param array $item Current site.
+ */
+ public function column_cb($item)
+ {
+ }
+ /**
+ * Handles the ID column output.
+ *
+ * @since 4.4.0
+ *
+ * @param array $blog Current site.
+ */
+ public function column_id($blog)
+ {
+ }
+ /**
+ * Handles the site name column output.
+ *
+ * @since 4.3.0
+ *
+ * @global string $mode List table view mode.
+ *
+ * @param array $blog Current site.
+ */
+ public function column_blogname($blog)
+ {
+ }
+ /**
+ * Handles the lastupdated column output.
+ *
+ * @since 4.3.0
+ *
+ * @global string $mode List table view mode.
+ *
+ * @param array $blog Current site.
+ */
+ public function column_lastupdated($blog)
+ {
+ }
+ /**
+ * Handles the registered column output.
+ *
+ * @since 4.3.0
+ *
+ * @global string $mode List table view mode.
+ *
+ * @param array $blog Current site.
+ */
+ public function column_registered($blog)
+ {
+ }
+ /**
+ * Handles the users column output.
+ *
+ * @since 4.3.0
+ *
+ * @param array $blog Current site.
+ */
+ public function column_users($blog)
+ {
+ }
+ /**
+ * Handles the plugins column output.
+ *
+ * @since 4.3.0
+ *
+ * @param array $blog Current site.
+ */
+ public function column_plugins($blog)
+ {
+ }
+ /**
+ * Handles output for the default column.
+ *
+ * @since 4.3.0
+ * @since 5.9.0 Renamed `$blog` to `$item` to match parent class for PHP 8 named parameter support.
+ *
+ * @param array $item Current site.
+ * @param string $column_name Current column name.
+ */
+ public function column_default($item, $column_name)
+ {
+ }
+ /**
+ * @global string $mode List table view mode.
+ */
+ public function display_rows()
+ {
+ }
+ /**
+ * Maybe output comma-separated site states.
+ *
+ * @since 5.3.0
+ *
+ * @param array $site
+ */
+ protected function site_states($site)
+ {
+ }
+ /**
+ * Gets the name of the default primary column.
+ *
+ * @since 4.3.0
+ *
+ * @return string Name of the default primary column, in this case, 'blogname'.
+ */
+ protected function get_default_primary_column_name()
+ {
+ }
+ /**
+ * Generates and displays row action links.
+ *
+ * @since 4.3.0
+ * @since 5.9.0 Renamed `$blog` to `$item` to match parent class for PHP 8 named parameter support.
+ *
+ * @param array $item Site being acted upon.
+ * @param string $column_name Current column name.
+ * @param string $primary Primary column name.
+ * @return string Row actions output for sites in Multisite, or an empty string
+ * if the current column is not the primary column.
+ */
+ protected function handle_row_actions($item, $column_name, $primary)
+ {
+ }
+ }
+ /**
+ * List Table API: WP_MS_Themes_List_Table class
+ *
+ * @package WordPress
+ * @subpackage Administration
+ * @since 3.1.0
+ */
+ /**
+ * Core class used to implement displaying themes in a list table for the network admin.
+ *
+ * @since 3.1.0
+ *
+ * @see WP_List_Table
+ */
+ class WP_MS_Themes_List_Table extends \WP_List_Table
+ {
+ public $site_id;
+ public $is_site_themes;
+ /**
+ * Whether to show the auto-updates UI.
+ *
+ * @since 5.5.0
+ *
+ * @var bool True if auto-updates UI is to be shown, false otherwise.
+ */
+ protected $show_autoupdates = \true;
+ /**
+ * Constructor.
+ *
+ * @since 3.1.0
+ *
+ * @see WP_List_Table::__construct() for more information on default arguments.
+ *
+ * @global string $status
+ * @global int $page
+ *
+ * @param array $args An associative array of arguments.
+ */
+ public function __construct($args = array())
+ {
+ }
+ /**
+ * @return array
+ */
+ protected function get_table_classes()
+ {
+ }
+ /**
+ * @return bool
+ */
+ public function ajax_user_can()
+ {
+ }
+ /**
+ * @global string $status
+ * @global array $totals
+ * @global int $page
+ * @global string $orderby
+ * @global string $order
+ * @global string $s
+ */
+ public function prepare_items()
+ {
+ }
+ /**
+ * @param WP_Theme $theme
+ * @return bool
+ */
+ public function _search_callback($theme)
+ {
+ }
+ // Not used by any core columns.
+ /**
+ * @global string $orderby
+ * @global string $order
+ * @param array $theme_a
+ * @param array $theme_b
+ * @return int
+ */
+ public function _order_callback($theme_a, $theme_b)
+ {
+ }
+ /**
+ */
+ public function no_items()
+ {
+ }
+ /**
+ * @return array
+ */
+ public function get_columns()
+ {
+ }
+ /**
+ * @return array
+ */
+ protected function get_sortable_columns()
+ {
+ }
+ /**
+ * Gets the name of the primary column.
+ *
+ * @since 4.3.0
+ *
+ * @return string Unalterable name of the primary column name, in this case, 'name'.
+ */
+ protected function get_primary_column_name()
+ {
+ }
+ /**
+ * @global array $totals
+ * @global string $status
+ * @return array
+ */
+ protected function get_views()
+ {
+ }
+ /**
+ * @global string $status
+ *
+ * @return array
+ */
+ protected function get_bulk_actions()
+ {
+ }
+ /**
+ */
+ public function display_rows()
+ {
+ }
+ /**
+ * Handles the checkbox column output.
+ *
+ * @since 4.3.0
+ * @since 5.9.0 Renamed `$theme` to `$item` to match parent class for PHP 8 named parameter support.
+ *
+ * @param WP_Theme $item The current WP_Theme object.
+ */
+ public function column_cb($item)
+ {
+ }
+ /**
+ * Handles the name column output.
+ *
+ * @since 4.3.0
+ *
+ * @global string $status
+ * @global int $page
+ * @global string $s
+ *
+ * @param WP_Theme $theme The current WP_Theme object.
+ */
+ public function column_name($theme)
+ {
+ }
+ /**
+ * Handles the description column output.
+ *
+ * @since 4.3.0
+ *
+ * @global string $status
+ * @global array $totals
+ *
+ * @param WP_Theme $theme The current WP_Theme object.
+ */
+ public function column_description($theme)
+ {
+ }
+ /**
+ * Handles the auto-updates column output.
+ *
+ * @since 5.5.0
+ *
+ * @global string $status
+ * @global int $page
+ *
+ * @param WP_Theme $theme The current WP_Theme object.
+ */
+ public function column_autoupdates($theme)
+ {
+ }
+ /**
+ * Handles default column output.
+ *
+ * @since 4.3.0
+ * @since 5.9.0 Renamed `$theme` to `$item` to match parent class for PHP 8 named parameter support.
+ *
+ * @param WP_Theme $item The current WP_Theme object.
+ * @param string $column_name The current column name.
+ */
+ public function column_default($item, $column_name)
+ {
+ }
+ /**
+ * Handles the output for a single table row.
+ *
+ * @since 4.3.0
+ *
+ * @param WP_Theme $item The current WP_Theme object.
+ */
+ public function single_row_columns($item)
+ {
+ }
+ /**
+ * @global string $status
+ * @global array $totals
+ *
+ * @param WP_Theme $theme
+ */
+ public function single_row($theme)
+ {
+ }
+ }
+ /**
+ * List Table API: WP_MS_Users_List_Table class
+ *
+ * @package WordPress
+ * @subpackage Administration
+ * @since 3.1.0
+ */
+ /**
+ * Core class used to implement displaying users in a list table for the network admin.
+ *
+ * @since 3.1.0
+ *
+ * @see WP_List_Table
+ */
+ class WP_MS_Users_List_Table extends \WP_List_Table
+ {
+ /**
+ * @return bool
+ */
+ public function ajax_user_can()
+ {
+ }
+ /**
+ * @global string $mode List table view mode.
+ * @global string $usersearch
+ * @global string $role
+ */
+ public function prepare_items()
+ {
+ }
+ /**
+ * @return array
+ */
+ protected function get_bulk_actions()
+ {
+ }
+ /**
+ */
+ public function no_items()
+ {
+ }
+ /**
+ * @global string $role
+ * @return array
+ */
+ protected function get_views()
+ {
+ }
+ /**
+ * @global string $mode List table view mode.
+ *
+ * @param string $which
+ */
+ protected function pagination($which)
+ {
+ }
+ /**
+ * @return array
+ */
+ public function get_columns()
+ {
+ }
+ /**
+ * @return array
+ */
+ protected function get_sortable_columns()
+ {
+ }
+ /**
+ * Handles the checkbox column output.
+ *
+ * @since 4.3.0
+ * @since 5.9.0 Renamed `$user` to `$item` to match parent class for PHP 8 named parameter support.
+ *
+ * @param WP_User $item The current WP_User object.
+ */
+ public function column_cb($item)
+ {
+ }
+ /**
+ * Handles the ID column output.
+ *
+ * @since 4.4.0
+ *
+ * @param WP_User $user The current WP_User object.
+ */
+ public function column_id($user)
+ {
+ }
+ /**
+ * Handles the username column output.
+ *
+ * @since 4.3.0
+ *
+ * @param WP_User $user The current WP_User object.
+ */
+ public function column_username($user)
+ {
+ }
+ /**
+ * Handles the name column output.
+ *
+ * @since 4.3.0
+ *
+ * @param WP_User $user The current WP_User object.
+ */
+ public function column_name($user)
+ {
+ }
+ /**
+ * Handles the email column output.
+ *
+ * @since 4.3.0
+ *
+ * @param WP_User $user The current WP_User object.
+ */
+ public function column_email($user)
+ {
+ }
+ /**
+ * Handles the registered date column output.
+ *
+ * @since 4.3.0
+ *
+ * @global string $mode List table view mode.
+ *
+ * @param WP_User $user The current WP_User object.
+ */
+ public function column_registered($user)
+ {
+ }
+ /**
+ * @since 4.3.0
+ *
+ * @param WP_User $user
+ * @param string $classes
+ * @param string $data
+ * @param string $primary
+ */
+ protected function _column_blogs($user, $classes, $data, $primary)
+ {
+ }
+ /**
+ * Handles the sites column output.
+ *
+ * @since 4.3.0
+ *
+ * @param WP_User $user The current WP_User object.
+ */
+ public function column_blogs($user)
+ {
+ }
+ /**
+ * Handles the default column output.
+ *
+ * @since 4.3.0
+ * @since 5.9.0 Renamed `$user` to `$item` to match parent class for PHP 8 named parameter support.
+ *
+ * @param WP_User $item The current WP_User object.
+ * @param string $column_name The current column name.
+ */
+ public function column_default($item, $column_name)
+ {
+ }
+ public function display_rows()
+ {
+ }
+ /**
+ * Gets the name of the default primary column.
+ *
+ * @since 4.3.0
+ *
+ * @return string Name of the default primary column, in this case, 'username'.
+ */
+ protected function get_default_primary_column_name()
+ {
+ }
+ /**
+ * Generates and displays row action links.
+ *
+ * @since 4.3.0
+ * @since 5.9.0 Renamed `$user` to `$item` to match parent class for PHP 8 named parameter support.
+ *
+ * @param WP_User $item User being acted upon.
+ * @param string $column_name Current column name.
+ * @param string $primary Primary column name.
+ * @return string Row actions output for users in Multisite, or an empty string
+ * if the current column is not the primary column.
+ */
+ protected function handle_row_actions($item, $column_name, $primary)
+ {
+ }
+ }
+ /**
+ * List Table API: WP_Plugin_Install_List_Table class
+ *
+ * @package WordPress
+ * @subpackage Administration
+ * @since 3.1.0
+ */
+ /**
+ * Core class used to implement displaying plugins to install in a list table.
+ *
+ * @since 3.1.0
+ *
+ * @see WP_List_Table
+ */
+ class WP_Plugin_Install_List_Table extends \WP_List_Table
+ {
+ public $order = 'ASC';
+ public $orderby = \null;
+ public $groups = array();
+ /**
+ * @return bool
+ */
+ public function ajax_user_can()
+ {
+ }
+ /**
+ * Return the list of known plugins.
+ *
+ * Uses the transient data from the updates API to determine the known
+ * installed plugins.
+ *
+ * @since 4.9.0
+ * @access protected
+ *
+ * @return array
+ */
+ protected function get_installed_plugins()
+ {
+ }
+ /**
+ * Returns a list of slugs of installed plugins, if known.
+ *
+ * Uses the transient data from the updates API to determine the slugs of
+ * known installed plugins. This might be better elsewhere, perhaps even
+ * within get_plugins().
+ *
+ * @since 4.0.0
+ *
+ * @return array
+ */
+ protected function get_installed_plugin_slugs()
+ {
+ }
+ /**
+ * @global array $tabs
+ * @global string $tab
+ * @global int $paged
+ * @global string $type
+ * @global string $term
+ */
+ public function prepare_items()
+ {
+ }
+ /**
+ */
+ public function no_items()
+ {
+ }
+ /**
+ * @global array $tabs
+ * @global string $tab
+ *
+ * @return array
+ */
+ protected function get_views()
+ {
+ }
+ /**
+ * Overrides parent views so we can use the filter bar display.
+ */
+ public function views()
+ {
+ }
+ /**
+ * Displays the plugin install table.
+ *
+ * Overrides the parent display() method to provide a different container.
+ *
+ * @since 4.0.0
+ */
+ public function display()
+ {
+ }
+ /**
+ * @global string $tab
+ *
+ * @param string $which
+ */
+ protected function display_tablenav($which)
+ {
+ }
+ /**
+ * @return array
+ */
+ protected function get_table_classes()
+ {
+ }
+ /**
+ * @return array
+ */
+ public function get_columns()
+ {
+ }
+ public function display_rows()
+ {
+ }
+ }
+ /**
+ * List Table API: WP_Plugins_List_Table class
+ *
+ * @package WordPress
+ * @subpackage Administration
+ * @since 3.1.0
+ */
+ /**
+ * Core class used to implement displaying installed plugins in a list table.
+ *
+ * @since 3.1.0
+ *
+ * @see WP_List_Table
+ */
+ class WP_Plugins_List_Table extends \WP_List_Table
+ {
+ /**
+ * Whether to show the auto-updates UI.
+ *
+ * @since 5.5.0
+ *
+ * @var bool True if auto-updates UI is to be shown, false otherwise.
+ */
+ protected $show_autoupdates = \true;
+ /**
+ * Constructor.
+ *
+ * @since 3.1.0
+ *
+ * @see WP_List_Table::__construct() for more information on default arguments.
+ *
+ * @global string $status
+ * @global int $page
+ *
+ * @param array $args An associative array of arguments.
+ */
+ public function __construct($args = array())
+ {
+ }
+ /**
+ * @return array
+ */
+ protected function get_table_classes()
+ {
+ }
+ /**
+ * @return bool
+ */
+ public function ajax_user_can()
+ {
+ }
+ /**
+ * @global string $status
+ * @global array $plugins
+ * @global array $totals
+ * @global int $page
+ * @global string $orderby
+ * @global string $order
+ * @global string $s
+ */
+ public function prepare_items()
+ {
+ }
+ /**
+ * @global string $s URL encoded search term.
+ *
+ * @param array $plugin
+ * @return bool
+ */
+ public function _search_callback($plugin)
+ {
+ }
+ /**
+ * @global string $orderby
+ * @global string $order
+ * @param array $plugin_a
+ * @param array $plugin_b
+ * @return int
+ */
+ public function _order_callback($plugin_a, $plugin_b)
+ {
+ }
+ /**
+ * @global array $plugins
+ */
+ public function no_items()
+ {
+ }
+ /**
+ * Displays the search box.
+ *
+ * @since 4.6.0
+ *
+ * @param string $text The 'submit' button label.
+ * @param string $input_id ID attribute value for the search input field.
+ */
+ public function search_box($text, $input_id)
+ {
+ }
+ /**
+ * @global string $status
+ * @return array
+ */
+ public function get_columns()
+ {
+ }
+ /**
+ * @return array
+ */
+ protected function get_sortable_columns()
+ {
+ }
+ /**
+ * @global array $totals
+ * @global string $status
+ * @return array
+ */
+ protected function get_views()
+ {
+ }
+ /**
+ * @global string $status
+ * @return array
+ */
+ protected function get_bulk_actions()
+ {
+ }
+ /**
+ * @global string $status
+ * @param string $which
+ */
+ public function bulk_actions($which = '')
+ {
+ }
+ /**
+ * @global string $status
+ * @param string $which
+ */
+ protected function extra_tablenav($which)
+ {
+ }
+ /**
+ * @return string
+ */
+ public function current_action()
+ {
+ }
+ /**
+ * @global string $status
+ */
+ public function display_rows()
+ {
+ }
+ /**
+ * @global string $status
+ * @global int $page
+ * @global string $s
+ * @global array $totals
+ *
+ * @param array $item
+ */
+ public function single_row($item)
+ {
+ }
+ /**
+ * Gets the name of the primary column for this specific list table.
+ *
+ * @since 4.3.0
+ *
+ * @return string Unalterable name for the primary column, in this case, 'name'.
+ */
+ protected function get_primary_column_name()
+ {
+ }
+ }
+ /**
+ * List Table API: WP_Post_Comments_List_Table class
+ *
+ * @package WordPress
+ * @subpackage Administration
+ * @since 4.4.0
+ */
+ /**
+ * Core class used to implement displaying post comments in a list table.
+ *
+ * @since 3.1.0
+ *
+ * @see WP_Comments_List_Table
+ */
+ class WP_Post_Comments_List_Table extends \WP_Comments_List_Table
+ {
+ /**
+ * @return array
+ */
+ protected function get_column_info()
+ {
+ }
+ /**
+ * @return array
+ */
+ protected function get_table_classes()
+ {
+ }
+ /**
+ * @param bool $output_empty
+ */
+ public function display($output_empty = \false)
+ {
+ }
+ /**
+ * @param bool $comment_status
+ * @return int
+ */
+ public function get_per_page($comment_status = \false)
+ {
+ }
+ }
+ /**
+ * List Table API: WP_Posts_List_Table class
+ *
+ * @package WordPress
+ * @subpackage Administration
+ * @since 3.1.0
+ */
+ /**
+ * Core class used to implement displaying posts in a list table.
+ *
+ * @since 3.1.0
+ *
+ * @see WP_List_Table
+ */
+ class WP_Posts_List_Table extends \WP_List_Table
+ {
+ /**
+ * Whether the items should be displayed hierarchically or linearly.
+ *
+ * @since 3.1.0
+ * @var bool
+ */
+ protected $hierarchical_display;
+ /**
+ * Holds the number of pending comments for each post.
+ *
+ * @since 3.1.0
+ * @var array
+ */
+ protected $comment_pending_count;
+ /**
+ * Current level for output.
+ *
+ * @since 4.3.0
+ * @var int
+ */
+ protected $current_level = 0;
+ /**
+ * Constructor.
+ *
+ * @since 3.1.0
+ *
+ * @see WP_List_Table::__construct() for more information on default arguments.
+ *
+ * @global WP_Post_Type $post_type_object
+ * @global wpdb $wpdb WordPress database abstraction object.
+ *
+ * @param array $args An associative array of arguments.
+ */
+ public function __construct($args = array())
+ {
+ }
+ /**
+ * Sets whether the table layout should be hierarchical or not.
+ *
+ * @since 4.2.0
+ *
+ * @param bool $display Whether the table layout should be hierarchical.
+ */
+ public function set_hierarchical_display($display)
+ {
+ }
+ /**
+ * @return bool
+ */
+ public function ajax_user_can()
+ {
+ }
+ /**
+ * @global string $mode List table view mode.
+ * @global array $avail_post_stati
+ * @global WP_Query $wp_query WordPress Query object.
+ * @global int $per_page
+ */
+ public function prepare_items()
+ {
+ }
+ /**
+ * @return bool
+ */
+ public function has_items()
+ {
+ }
+ /**
+ */
+ public function no_items()
+ {
+ }
+ /**
+ * Determine if the current view is the "All" view.
+ *
+ * @since 4.2.0
+ *
+ * @return bool Whether the current view is the "All" view.
+ */
+ protected function is_base_request()
+ {
+ }
+ /**
+ * Helper to create links to edit.php with params.
+ *
+ * @since 4.4.0
+ *
+ * @param string[] $args Associative array of URL parameters for the link.
+ * @param string $link_text Link text.
+ * @param string $css_class Optional. Class attribute. Default empty string.
+ * @return string The formatted link string.
+ */
+ protected function get_edit_link($args, $link_text, $css_class = '')
+ {
+ }
+ /**
+ * @global array $locked_post_status This seems to be deprecated.
+ * @global array $avail_post_stati
+ * @return array
+ */
+ protected function get_views()
+ {
+ }
+ /**
+ * @return array
+ */
+ protected function get_bulk_actions()
+ {
+ }
+ /**
+ * Displays a categories drop-down for filtering on the Posts list table.
+ *
+ * @since 4.6.0
+ *
+ * @global int $cat Currently selected category.
+ *
+ * @param string $post_type Post type slug.
+ */
+ protected function categories_dropdown($post_type)
+ {
+ }
+ /**
+ * Displays a formats drop-down for filtering items.
+ *
+ * @since 5.2.0
+ * @access protected
+ *
+ * @param string $post_type Post type slug.
+ */
+ protected function formats_dropdown($post_type)
+ {
+ }
+ /**
+ * @param string $which
+ */
+ protected function extra_tablenav($which)
+ {
+ }
+ /**
+ * @return string
+ */
+ public function current_action()
+ {
+ }
+ /**
+ * @global string $mode List table view mode.
+ *
+ * @return array
+ */
+ protected function get_table_classes()
+ {
+ }
+ /**
+ * @return array
+ */
+ public function get_columns()
+ {
+ }
+ /**
+ * @return array
+ */
+ protected function get_sortable_columns()
+ {
+ }
+ /**
+ * @global WP_Query $wp_query WordPress Query object.
+ * @global int $per_page
+ * @param array $posts
+ * @param int $level
+ */
+ public function display_rows($posts = array(), $level = 0)
+ {
+ }
+ /**
+ * Handles the checkbox column output.
+ *
+ * @since 4.3.0
+ * @since 5.9.0 Renamed `$post` to `$item` to match parent class for PHP 8 named parameter support.
+ *
+ * @param WP_Post $item The current WP_Post object.
+ */
+ public function column_cb($item)
+ {
+ }
+ /**
+ * @since 4.3.0
+ *
+ * @param WP_Post $post
+ * @param string $classes
+ * @param string $data
+ * @param string $primary
+ */
+ protected function _column_title($post, $classes, $data, $primary)
+ {
+ }
+ /**
+ * Handles the title column output.
+ *
+ * @since 4.3.0
+ *
+ * @global string $mode List table view mode.
+ *
+ * @param WP_Post $post The current WP_Post object.
+ */
+ public function column_title($post)
+ {
+ }
+ /**
+ * Handles the post date column output.
+ *
+ * @since 4.3.0
+ *
+ * @global string $mode List table view mode.
+ *
+ * @param WP_Post $post The current WP_Post object.
+ */
+ public function column_date($post)
+ {
+ }
+ /**
+ * Handles the comments column output.
+ *
+ * @since 4.3.0
+ *
+ * @param WP_Post $post The current WP_Post object.
+ */
+ public function column_comments($post)
+ {
+ }
+ /**
+ * Handles the post author column output.
+ *
+ * @since 4.3.0
+ *
+ * @param WP_Post $post The current WP_Post object.
+ */
+ public function column_author($post)
+ {
+ }
+ /**
+ * Handles the default column output.
+ *
+ * @since 4.3.0
+ * @since 5.9.0 Renamed `$post` to `$item` to match parent class for PHP 8 named parameter support.
+ *
+ * @param WP_Post $item The current WP_Post object.
+ * @param string $column_name The current column name.
+ */
+ public function column_default($item, $column_name)
+ {
+ }
+ /**
+ * @global WP_Post $post Global post object.
+ *
+ * @param int|WP_Post $post
+ * @param int $level
+ */
+ public function single_row($post, $level = 0)
+ {
+ }
+ /**
+ * Gets the name of the default primary column.
+ *
+ * @since 4.3.0
+ *
+ * @return string Name of the default primary column, in this case, 'title'.
+ */
+ protected function get_default_primary_column_name()
+ {
+ }
+ /**
+ * Generates and displays row action links.
+ *
+ * @since 4.3.0
+ * @since 5.9.0 Renamed `$post` to `$item` to match parent class for PHP 8 named parameter support.
+ *
+ * @param WP_Post $item Post being acted upon.
+ * @param string $column_name Current column name.
+ * @param string $primary Primary column name.
+ * @return string Row actions output for posts, or an empty string
+ * if the current column is not the primary column.
+ */
+ protected function handle_row_actions($item, $column_name, $primary)
+ {
+ }
+ /**
+ * Outputs the hidden row displayed when inline editing
+ *
+ * @since 3.1.0
+ *
+ * @global string $mode List table view mode.
+ */
+ public function inline_edit()
+ {
+ }
+ }
+ /**
+ * List Table API: WP_Privacy_Requests_Table class
+ *
+ * @package WordPress
+ * @subpackage Administration
+ * @since 4.9.6
+ */
+ abstract class WP_Privacy_Requests_Table extends \WP_List_Table
+ {
+ /**
+ * Action name for the requests this table will work with. Classes
+ * which inherit from WP_Privacy_Requests_Table should define this.
+ *
+ * Example: 'export_personal_data'.
+ *
+ * @since 4.9.6
+ *
+ * @var string $request_type Name of action.
+ */
+ protected $request_type = 'INVALID';
+ /**
+ * Post type to be used.
+ *
+ * @since 4.9.6
+ *
+ * @var string $post_type The post type.
+ */
+ protected $post_type = 'INVALID';
+ /**
+ * Get columns to show in the list table.
+ *
+ * @since 4.9.6
+ *
+ * @return string[] Array of column titles keyed by their column name.
+ */
+ public function get_columns()
+ {
+ }
+ /**
+ * Normalize the admin URL to the current page (by request_type).
+ *
+ * @since 5.3.0
+ *
+ * @return string URL to the current admin page.
+ */
+ protected function get_admin_url()
+ {
+ }
+ /**
+ * Get a list of sortable columns.
+ *
+ * @since 4.9.6
+ *
+ * @return array Default sortable columns.
+ */
+ protected function get_sortable_columns()
+ {
+ }
+ /**
+ * Default primary column.
+ *
+ * @since 4.9.6
+ *
+ * @return string Default primary column name.
+ */
+ protected function get_default_primary_column_name()
+ {
+ }
+ /**
+ * Count number of requests for each status.
+ *
+ * @since 4.9.6
+ *
+ * @global wpdb $wpdb WordPress database abstraction object.
+ *
+ * @return object Number of posts for each status.
+ */
+ protected function get_request_counts()
+ {
+ }
+ /**
+ * Get an associative array ( id => link ) with the list of views available on this table.
+ *
+ * @since 4.9.6
+ *
+ * @return string[] An array of HTML links keyed by their view.
+ */
+ protected function get_views()
+ {
+ }
+ /**
+ * Get bulk actions.
+ *
+ * @since 4.9.6
+ *
+ * @return array Array of bulk action labels keyed by their action.
+ */
+ protected function get_bulk_actions()
+ {
+ }
+ /**
+ * Process bulk actions.
+ *
+ * @since 4.9.6
+ * @since 5.6.0 Added support for the `complete` action.
+ */
+ public function process_bulk_action()
+ {
+ }
+ /**
+ * Prepare items to output.
+ *
+ * @since 4.9.6
+ * @since 5.1.0 Added support for column sorting.
+ */
+ public function prepare_items()
+ {
+ }
+ /**
+ * Checkbox column.
+ *
+ * @since 4.9.6
+ *
+ * @param WP_User_Request $item Item being shown.
+ * @return string Checkbox column markup.
+ */
+ public function column_cb($item)
+ {
+ }
+ /**
+ * Status column.
+ *
+ * @since 4.9.6
+ *
+ * @param WP_User_Request $item Item being shown.
+ * @return string Status column markup.
+ */
+ public function column_status($item)
+ {
+ }
+ /**
+ * Convert timestamp for display.
+ *
+ * @since 4.9.6
+ *
+ * @param int $timestamp Event timestamp.
+ * @return string Human readable date.
+ */
+ protected function get_timestamp_as_date($timestamp)
+ {
+ }
+ /**
+ * Default column handler.
+ *
+ * @since 4.9.6
+ * @since 5.7.0 Added `manage_{$this->screen->id}_custom_column` action.
+ *
+ * @param WP_User_Request $item Item being shown.
+ * @param string $column_name Name of column being shown.
+ */
+ public function column_default($item, $column_name)
+ {
+ }
+ /**
+ * Created timestamp column. Overridden by children.
+ *
+ * @since 5.7.0
+ *
+ * @param WP_User_Request $item Item being shown.
+ * @return string Human readable date.
+ */
+ public function column_created_timestamp($item)
+ {
+ }
+ /**
+ * Actions column. Overridden by children.
+ *
+ * @since 4.9.6
+ *
+ * @param WP_User_Request $item Item being shown.
+ * @return string Email column markup.
+ */
+ public function column_email($item)
+ {
+ }
+ /**
+ * Next steps column. Overridden by children.
+ *
+ * @since 4.9.6
+ *
+ * @param WP_User_Request $item Item being shown.
+ */
+ public function column_next_steps($item)
+ {
+ }
+ /**
+ * Generates content for a single row of the table,
+ *
+ * @since 4.9.6
+ *
+ * @param WP_User_Request $item The current item.
+ */
+ public function single_row($item)
+ {
+ }
+ /**
+ * Embed scripts used to perform actions. Overridden by children.
+ *
+ * @since 4.9.6
+ */
+ public function embed_scripts()
+ {
+ }
+ }
+ /**
+ * WP_Privacy_Data_Export_Requests_Table class.
+ *
+ * @since 4.9.6
+ */
+ class WP_Privacy_Data_Export_Requests_List_Table extends \WP_Privacy_Requests_Table
+ {
+ /**
+ * Action name for the requests this table will work with.
+ *
+ * @since 4.9.6
+ *
+ * @var string $request_type Name of action.
+ */
+ protected $request_type = 'export_personal_data';
+ /**
+ * Post type for the requests.
+ *
+ * @since 4.9.6
+ *
+ * @var string $post_type The post type.
+ */
+ protected $post_type = 'user_request';
+ /**
+ * Actions column.
+ *
+ * @since 4.9.6
+ *
+ * @param WP_User_Request $item Item being shown.
+ * @return string Email column markup.
+ */
+ public function column_email($item)
+ {
+ }
+ /**
+ * Displays the next steps column.
+ *
+ * @since 4.9.6
+ *
+ * @param WP_User_Request $item Item being shown.
+ */
+ public function column_next_steps($item)
+ {
+ }
+ }
+ /**
+ * WP_Privacy_Data_Removal_Requests_List_Table class.
+ *
+ * @since 4.9.6
+ */
+ class WP_Privacy_Data_Removal_Requests_List_Table extends \WP_Privacy_Requests_Table
+ {
+ /**
+ * Action name for the requests this table will work with.
+ *
+ * @since 4.9.6
+ *
+ * @var string $request_type Name of action.
+ */
+ protected $request_type = 'remove_personal_data';
+ /**
+ * Post type for the requests.
+ *
+ * @since 4.9.6
+ *
+ * @var string $post_type The post type.
+ */
+ protected $post_type = 'user_request';
+ /**
+ * Actions column.
+ *
+ * @since 4.9.6
+ *
+ * @param WP_User_Request $item Item being shown.
+ * @return string Email column markup.
+ */
+ public function column_email($item)
+ {
+ }
+ /**
+ * Next steps column.
+ *
+ * @since 4.9.6
+ *
+ * @param WP_User_Request $item Item being shown.
+ */
+ public function column_next_steps($item)
+ {
+ }
+ }
+ /**
+ * WP_Privacy_Policy_Content class.
+ *
+ * @package WordPress
+ * @subpackage Administration
+ * @since 4.9.6
+ */
+ #[\AllowDynamicProperties]
+ final class WP_Privacy_Policy_Content
+ {
+ /**
+ * Add content to the postbox shown when editing the privacy policy.
+ *
+ * Plugins and themes should suggest text for inclusion in the site's privacy policy.
+ * The suggested text should contain information about any functionality that affects user privacy,
+ * and will be shown in the Suggested Privacy Policy Content postbox.
+ *
+ * Intended for use from `wp_add_privacy_policy_content()`.
+ *
+ * @since 4.9.6
+ *
+ * @param string $plugin_name The name of the plugin or theme that is suggesting content for the site's privacy policy.
+ * @param string $policy_text The suggested content for inclusion in the policy.
+ */
+ public static function add($plugin_name, $policy_text)
+ {
+ }
+ /**
+ * Quick check if any privacy info has changed.
+ *
+ * @since 4.9.6
+ */
+ public static function text_change_check()
+ {
+ }
+ /**
+ * Output a warning when some privacy info has changed.
+ *
+ * @since 4.9.6
+ *
+ * @global WP_Post $post Global post object.
+ */
+ public static function policy_text_changed_notice()
+ {
+ }
+ /**
+ * Update the cached policy info when the policy page is updated.
+ *
+ * @since 4.9.6
+ * @access private
+ *
+ * @param int $post_id The ID of the updated post.
+ */
+ public static function _policy_page_updated($post_id)
+ {
+ }
+ /**
+ * Check for updated, added or removed privacy policy information from plugins.
+ *
+ * Caches the current info in post_meta of the policy page.
+ *
+ * @since 4.9.6
+ *
+ * @return array The privacy policy text/information added by core and plugins.
+ */
+ public static function get_suggested_policy_text()
+ {
+ }
+ /**
+ * Add a notice with a link to the guide when editing the privacy policy page.
+ *
+ * @since 4.9.6
+ * @since 5.0.0 The `$post` parameter was made optional.
+ *
+ * @global WP_Post $post Global post object.
+ *
+ * @param WP_Post|null $post The currently edited post. Default null.
+ */
+ public static function notice($post = \null)
+ {
+ }
+ /**
+ * Output the privacy policy guide together with content from the theme and plugins.
+ *
+ * @since 4.9.6
+ */
+ public static function privacy_policy_guide()
+ {
+ }
+ /**
+ * Return the default suggested privacy policy content.
+ *
+ * @since 4.9.6
+ * @since 5.0.0 Added the `$blocks` parameter.
+ *
+ * @param bool $description Whether to include the descriptions under the section headings. Default false.
+ * @param bool $blocks Whether to format the content for the block editor. Default true.
+ * @return string The default policy content.
+ */
+ public static function get_default_content($description = \false, $blocks = \true)
+ {
+ }
+ /**
+ * Add the suggested privacy policy text to the policy postbox.
+ *
+ * @since 4.9.6
+ */
+ public static function add_suggested_content()
+ {
+ }
+ }
+ /**
+ * Screen API: WP_Screen class
+ *
+ * @package WordPress
+ * @subpackage Administration
+ * @since 4.4.0
+ */
+ /**
+ * Core class used to implement an admin screen API.
+ *
+ * @since 3.3.0
+ */
+ #[\AllowDynamicProperties]
+ final class WP_Screen
+ {
+ /**
+ * Any action associated with the screen.
+ *
+ * 'add' for *-add.php and *-new.php screens. Empty otherwise.
+ *
+ * @since 3.3.0
+ * @var string
+ */
+ public $action;
+ /**
+ * The base type of the screen.
+ *
+ * This is typically the same as `$id` but with any post types and taxonomies stripped.
+ * For example, for an `$id` of 'edit-post' the base is 'edit'.
+ *
+ * @since 3.3.0
+ * @var string
+ */
+ public $base;
+ /**
+ * The unique ID of the screen.
+ *
+ * @since 3.3.0
+ * @var string
+ */
+ public $id;
+ /**
+ * Whether the screen is in the network admin.
+ *
+ * Deprecated. Use in_admin() instead.
+ *
+ * @since 3.3.0
+ * @deprecated 3.5.0
+ * @var bool
+ */
+ public $is_network;
+ /**
+ * Whether the screen is in the user admin.
+ *
+ * Deprecated. Use in_admin() instead.
+ *
+ * @since 3.3.0
+ * @deprecated 3.5.0
+ * @var bool
+ */
+ public $is_user;
+ /**
+ * The base menu parent.
+ *
+ * This is derived from `$parent_file` by removing the query string and any .php extension.
+ * `$parent_file` values of 'edit.php?post_type=page' and 'edit.php?post_type=post'
+ * have a `$parent_base` of 'edit'.
+ *
+ * @since 3.3.0
+ * @var string
+ */
+ public $parent_base;
+ /**
+ * The parent_file for the screen per the admin menu system.
+ *
+ * Some `$parent_file` values are 'edit.php?post_type=page', 'edit.php', and 'options-general.php'.
+ *
+ * @since 3.3.0
+ * @var string
+ */
+ public $parent_file;
+ /**
+ * The post type associated with the screen, if any.
+ *
+ * The 'edit.php?post_type=page' screen has a post type of 'page'.
+ * The 'edit-tags.php?taxonomy=$taxonomy&post_type=page' screen has a post type of 'page'.
+ *
+ * @since 3.3.0
+ * @var string
+ */
+ public $post_type;
+ /**
+ * The taxonomy associated with the screen, if any.
+ *
+ * The 'edit-tags.php?taxonomy=category' screen has a taxonomy of 'category'.
+ *
+ * @since 3.3.0
+ * @var string
+ */
+ public $taxonomy;
+ /**
+ * Whether the screen is using the block editor.
+ *
+ * @since 5.0.0
+ * @var bool
+ */
+ public $is_block_editor = \false;
+ /**
+ * Fetches a screen object.
+ *
+ * @since 3.3.0
+ *
+ * @global string $hook_suffix
+ *
+ * @param string|WP_Screen $hook_name Optional. The hook name (also known as the hook suffix) used to determine the screen.
+ * Defaults to the current $hook_suffix global.
+ * @return WP_Screen Screen object.
+ */
+ public static function get($hook_name = '')
+ {
+ }
+ /**
+ * Makes the screen object the current screen.
+ *
+ * @see set_current_screen()
+ * @since 3.3.0
+ *
+ * @global WP_Screen $current_screen WordPress current screen object.
+ * @global string $typenow The post type of the current screen.
+ * @global string $taxnow The taxonomy of the current screen.
+ */
+ public function set_current_screen()
+ {
+ }
+ /**
+ * Indicates whether the screen is in a particular admin.
+ *
+ * @since 3.5.0
+ *
+ * @param string $admin The admin to check against (network | user | site).
+ * If empty any of the three admins will result in true.
+ * @return bool True if the screen is in the indicated admin, false otherwise.
+ */
+ public function in_admin($admin = \null)
+ {
+ }
+ /**
+ * Sets or returns whether the block editor is loading on the current screen.
+ *
+ * @since 5.0.0
+ *
+ * @param bool $set Optional. Sets whether the block editor is loading on the current screen or not.
+ * @return bool True if the block editor is being loaded, false otherwise.
+ */
+ public function is_block_editor($set = \null)
+ {
+ }
+ /**
+ * Sets the old string-based contextual help for the screen for backward compatibility.
+ *
+ * @since 3.3.0
+ *
+ * @param WP_Screen $screen A screen object.
+ * @param string $help Help text.
+ */
+ public static function add_old_compat_help($screen, $help)
+ {
+ }
+ /**
+ * Sets the parent information for the screen.
+ *
+ * This is called in admin-header.php after the menu parent for the screen has been determined.
+ *
+ * @since 3.3.0
+ *
+ * @param string $parent_file The parent file of the screen. Typically the $parent_file global.
+ */
+ public function set_parentage($parent_file)
+ {
+ }
+ /**
+ * Adds an option for the screen.
+ *
+ * Call this in template files after admin.php is loaded and before admin-header.php is loaded
+ * to add screen options.
+ *
+ * @since 3.3.0
+ *
+ * @param string $option Option ID.
+ * @param mixed $args Option-dependent arguments.
+ */
+ public function add_option($option, $args = array())
+ {
+ }
+ /**
+ * Removes an option from the screen.
+ *
+ * @since 3.8.0
+ *
+ * @param string $option Option ID.
+ */
+ public function remove_option($option)
+ {
+ }
+ /**
+ * Removes all options from the screen.
+ *
+ * @since 3.8.0
+ */
+ public function remove_options()
+ {
+ }
+ /**
+ * Gets the options registered for the screen.
+ *
+ * @since 3.8.0
+ *
+ * @return array Options with arguments.
+ */
+ public function get_options()
+ {
+ }
+ /**
+ * Gets the arguments for an option for the screen.
+ *
+ * @since 3.3.0
+ *
+ * @param string $option Option name.
+ * @param string|false $key Optional. Specific array key for when the option is an array.
+ * Default false.
+ * @return string The option value if set, null otherwise.
+ */
+ public function get_option($option, $key = \false)
+ {
+ }
+ /**
+ * Gets the help tabs registered for the screen.
+ *
+ * @since 3.4.0
+ * @since 4.4.0 Help tabs are ordered by their priority.
+ *
+ * @return array Help tabs with arguments.
+ */
+ public function get_help_tabs()
+ {
+ }
+ /**
+ * Gets the arguments for a help tab.
+ *
+ * @since 3.4.0
+ *
+ * @param string $id Help Tab ID.
+ * @return array Help tab arguments.
+ */
+ public function get_help_tab($id)
+ {
+ }
+ /**
+ * Adds a help tab to the contextual help for the screen.
+ *
+ * Call this on the `load-$pagenow` hook for the relevant screen,
+ * or fetch the `$current_screen` object, or use get_current_screen()
+ * and then call the method from the object.
+ *
+ * You may need to filter `$current_screen` using an if or switch statement
+ * to prevent new help tabs from being added to ALL admin screens.
+ *
+ * @since 3.3.0
+ * @since 4.4.0 The `$priority` argument was added.
+ *
+ * @param array $args {
+ * Array of arguments used to display the help tab.
+ *
+ * @type string $title Title for the tab. Default false.
+ * @type string $id Tab ID. Must be HTML-safe and should be unique for this menu.
+ * It is NOT allowed to contain any empty spaces. Default false.
+ * @type string $content Optional. Help tab content in plain text or HTML. Default empty string.
+ * @type callable $callback Optional. A callback to generate the tab content. Default false.
+ * @type int $priority Optional. The priority of the tab, used for ordering. Default 10.
+ * }
+ * @phpstan-param array{
+ * title?: string,
+ * id?: string,
+ * content?: string,
+ * callback?: callable,
+ * priority?: int,
+ * } $args
+ */
+ public function add_help_tab($args)
+ {
+ }
+ /**
+ * Removes a help tab from the contextual help for the screen.
+ *
+ * @since 3.3.0
+ *
+ * @param string $id The help tab ID.
+ */
+ public function remove_help_tab($id)
+ {
+ }
+ /**
+ * Removes all help tabs from the contextual help for the screen.
+ *
+ * @since 3.3.0
+ */
+ public function remove_help_tabs()
+ {
+ }
+ /**
+ * Gets the content from a contextual help sidebar.
+ *
+ * @since 3.4.0
+ *
+ * @return string Contents of the help sidebar.
+ */
+ public function get_help_sidebar()
+ {
+ }
+ /**
+ * Adds a sidebar to the contextual help for the screen.
+ *
+ * Call this in template files after admin.php is loaded and before admin-header.php is loaded
+ * to add a sidebar to the contextual help.
+ *
+ * @since 3.3.0
+ *
+ * @param string $content Sidebar content in plain text or HTML.
+ */
+ public function set_help_sidebar($content)
+ {
+ }
+ /**
+ * Gets the number of layout columns the user has selected.
+ *
+ * The layout_columns option controls the max number and default number of
+ * columns. This method returns the number of columns within that range selected
+ * by the user via Screen Options. If no selection has been made, the default
+ * provisioned in layout_columns is returned. If the screen does not support
+ * selecting the number of layout columns, 0 is returned.
+ *
+ * @since 3.4.0
+ *
+ * @return int Number of columns to display.
+ */
+ public function get_columns()
+ {
+ }
+ /**
+ * Gets the accessible hidden headings and text used in the screen.
+ *
+ * @since 4.4.0
+ *
+ * @see set_screen_reader_content() For more information on the array format.
+ *
+ * @return array An associative array of screen reader text strings.
+ */
+ public function get_screen_reader_content()
+ {
+ }
+ /**
+ * Gets a screen reader text string.
+ *
+ * @since 4.4.0
+ *
+ * @param string $key Screen reader text array named key.
+ * @return string Screen reader text string.
+ */
+ public function get_screen_reader_text($key)
+ {
+ }
+ /**
+ * Adds accessible hidden headings and text for the screen.
+ *
+ * @since 4.4.0
+ *
+ * @param array $content {
+ * An associative array of screen reader text strings.
+ *
+ * @type string $heading_views Screen reader text for the filter links heading.
+ * Default 'Filter items list'.
+ * @type string $heading_pagination Screen reader text for the pagination heading.
+ * Default 'Items list navigation'.
+ * @type string $heading_list Screen reader text for the items list heading.
+ * Default 'Items list'.
+ * }
+ * @phpstan-param array{
+ * heading_views?: string,
+ * heading_pagination?: string,
+ * heading_list?: string,
+ * } $content
+ */
+ public function set_screen_reader_content($content = array())
+ {
+ }
+ /**
+ * Removes all the accessible hidden headings and text for the screen.
+ *
+ * @since 4.4.0
+ */
+ public function remove_screen_reader_content()
+ {
+ }
+ /**
+ * Renders the screen's help section.
+ *
+ * This will trigger the deprecated filters for backward compatibility.
+ *
+ * @since 3.3.0
+ *
+ * @global string $screen_layout_columns
+ */
+ public function render_screen_meta()
+ {
+ }
+ /**
+ * @global array $wp_meta_boxes
+ *
+ * @return bool
+ */
+ public function show_screen_options()
+ {
+ }
+ /**
+ * Renders the screen options tab.
+ *
+ * @since 3.3.0
+ *
+ * @param array $options {
+ * Options for the tab.
+ *
+ * @type bool $wrap Whether the screen-options-wrap div will be included. Defaults to true.
+ * }
+ * @phpstan-param array{
+ * wrap?: bool,
+ * } $options
+ */
+ public function render_screen_options($options = array())
+ {
+ }
+ /**
+ * Renders the meta boxes preferences.
+ *
+ * @since 4.4.0
+ *
+ * @global array $wp_meta_boxes
+ */
+ public function render_meta_boxes_preferences()
+ {
+ }
+ /**
+ * Renders the list table columns preferences.
+ *
+ * @since 4.4.0
+ */
+ public function render_list_table_columns_preferences()
+ {
+ }
+ /**
+ * Renders the option for number of columns on the page.
+ *
+ * @since 3.3.0
+ */
+ public function render_screen_layout()
+ {
+ }
+ /**
+ * Renders the items per page option.
+ *
+ * @since 3.3.0
+ */
+ public function render_per_page_options()
+ {
+ }
+ /**
+ * Renders the list table view mode preferences.
+ *
+ * @since 4.4.0
+ *
+ * @global string $mode List table view mode.
+ */
+ public function render_view_mode()
+ {
+ }
+ /**
+ * Renders screen reader text.
+ *
+ * @since 4.4.0
+ *
+ * @param string $key The screen reader text array named key.
+ * @param string $tag Optional. The HTML tag to wrap the screen reader text. Default h2.
+ */
+ public function render_screen_reader_content($key = '', $tag = 'h2')
+ {
+ }
+ }
+ /**
+ * Class for testing automatic updates in the WordPress code.
+ *
+ * @package WordPress
+ * @subpackage Site_Health
+ * @since 5.2.0
+ */
+ #[\AllowDynamicProperties]
+ class WP_Site_Health_Auto_Updates
+ {
+ /**
+ * WP_Site_Health_Auto_Updates constructor.
+ *
+ * @since 5.2.0
+ */
+ public function __construct()
+ {
+ }
+ /**
+ * Runs tests to determine if auto-updates can run.
+ *
+ * @since 5.2.0
+ *
+ * @return array The test results.
+ */
+ public function run_tests()
+ {
+ }
+ /**
+ * Tests if auto-updates related constants are set correctly.
+ *
+ * @since 5.2.0
+ * @since 5.5.1 The `$value` parameter can accept an array.
+ *
+ * @param string $constant The name of the constant to check.
+ * @param bool|string|array $value The value that the constant should be, if set,
+ * or an array of acceptable values.
+ * @return array The test results.
+ */
+ public function test_constants($constant, $value)
+ {
+ }
+ /**
+ * Checks if updates are intercepted by a filter.
+ *
+ * @since 5.2.0
+ *
+ * @return array The test results.
+ */
+ public function test_wp_version_check_attached()
+ {
+ }
+ /**
+ * Checks if automatic updates are disabled by a filter.
+ *
+ * @since 5.2.0
+ *
+ * @return array The test results.
+ */
+ public function test_filters_automatic_updater_disabled()
+ {
+ }
+ /**
+ * Checks if automatic updates are disabled.
+ *
+ * @since 5.3.0
+ *
+ * @return array|false The test results. False if auto-updates are enabled.
+ */
+ public function test_wp_automatic_updates_disabled()
+ {
+ }
+ /**
+ * Checks if automatic updates have tried to run, but failed, previously.
+ *
+ * @since 5.2.0
+ *
+ * @return array|false The test results. False if the auto-updates failed.
+ */
+ public function test_if_failed_update()
+ {
+ }
+ /**
+ * Checks if WordPress is controlled by a VCS (Git, Subversion etc).
+ *
+ * @since 5.2.0
+ *
+ * @return array The test results.
+ */
+ public function test_vcs_abspath()
+ {
+ }
+ /**
+ * Checks if we can access files without providing credentials.
+ *
+ * @since 5.2.0
+ *
+ * @return array The test results.
+ */
+ public function test_check_wp_filesystem_method()
+ {
+ }
+ /**
+ * Checks if core files are writable by the web user/group.
+ *
+ * @since 5.2.0
+ *
+ * @global WP_Filesystem_Base $wp_filesystem WordPress filesystem subclass.
+ *
+ * @return array|false The test results. False if they're not writeable.
+ */
+ public function test_all_files_writable()
+ {
+ }
+ /**
+ * Checks if the install is using a development branch and can use nightly packages.
+ *
+ * @since 5.2.0
+ *
+ * @return array|false The test results. False if it isn't a development version.
+ */
+ public function test_accepts_dev_updates()
+ {
+ }
+ /**
+ * Checks if the site supports automatic minor updates.
+ *
+ * @since 5.2.0
+ *
+ * @return array The test results.
+ */
+ public function test_accepts_minor_updates()
+ {
+ }
+ }
+ /**
+ * Class for looking up a site's health based on a user's WordPress environment.
+ *
+ * @package WordPress
+ * @subpackage Site_Health
+ * @since 5.2.0
+ */
+ #[\AllowDynamicProperties]
+ class WP_Site_Health
+ {
+ public $is_mariadb = \false;
+ public $php_memory_limit;
+ public $schedules;
+ public $crons;
+ public $last_missed_cron = \null;
+ public $last_late_cron = \null;
+ /**
+ * WP_Site_Health constructor.
+ *
+ * @since 5.2.0
+ */
+ public function __construct()
+ {
+ }
+ /**
+ * Outputs the content of a tab in the Site Health screen.
+ *
+ * @since 5.8.0
+ *
+ * @param string $tab Slug of the current tab being displayed.
+ */
+ public function show_site_health_tab($tab)
+ {
+ }
+ /**
+ * Returns an instance of the WP_Site_Health class, or create one if none exist yet.
+ *
+ * @since 5.4.0
+ *
+ * @return WP_Site_Health|null
+ */
+ public static function get_instance()
+ {
+ }
+ /**
+ * Enqueues the site health scripts.
+ *
+ * @since 5.2.0
+ */
+ public function enqueue_scripts()
+ {
+ }
+ /**
+ * Tests whether `wp_version_check` is blocked.
+ *
+ * It's possible to block updates with the `wp_version_check` filter, but this can't be checked
+ * during an Ajax call, as the filter is never introduced then.
+ *
+ * This filter overrides a standard page request if it's made by an admin through the Ajax call
+ * with the right query argument to check for this.
+ *
+ * @since 5.2.0
+ */
+ public function check_wp_version_check_exists()
+ {
+ }
+ /**
+ * Tests for WordPress version and outputs it.
+ *
+ * Gives various results depending on what kind of updates are available, if any, to encourage
+ * the user to install security updates as a priority.
+ *
+ * @since 5.2.0
+ *
+ * @return array The test result.
+ */
+ public function get_test_wordpress_version()
+ {
+ }
+ /**
+ * Tests if plugins are outdated, or unnecessary.
+ *
+ * The test checks if your plugins are up to date, and encourages you to remove any
+ * that are not in use.
+ *
+ * @since 5.2.0
+ *
+ * @return array The test result.
+ */
+ public function get_test_plugin_version()
+ {
+ }
+ /**
+ * Tests if themes are outdated, or unnecessary.
+ *
+ * Checks if your site has a default theme (to fall back on if there is a need),
+ * if your themes are up to date and, finally, encourages you to remove any themes
+ * that are not needed.
+ *
+ * @since 5.2.0
+ *
+ * @return array The test results.
+ */
+ public function get_test_theme_version()
+ {
+ }
+ /**
+ * Tests if the supplied PHP version is supported.
+ *
+ * @since 5.2.0
+ *
+ * @return array The test results.
+ */
+ public function get_test_php_version()
+ {
+ }
+ /**
+ * Tests if required PHP modules are installed on the host.
+ *
+ * This test builds on the recommendations made by the WordPress Hosting Team
+ * as seen at https://make.wordpress.org/hosting/handbook/handbook/server-environment/#php-extensions
+ *
+ * @since 5.2.0
+ *
+ * @return array
+ */
+ public function get_test_php_extensions()
+ {
+ }
+ /**
+ * Tests if the PHP default timezone is set to UTC.
+ *
+ * @since 5.3.1
+ *
+ * @return array The test results.
+ */
+ public function get_test_php_default_timezone()
+ {
+ }
+ /**
+ * Tests if there's an active PHP session that can affect loopback requests.
+ *
+ * @since 5.5.0
+ *
+ * @return array The test results.
+ */
+ public function get_test_php_sessions()
+ {
+ }
+ /**
+ * Tests if the SQL server is up to date.
+ *
+ * @since 5.2.0
+ *
+ * @return array The test results.
+ */
+ public function get_test_sql_server()
+ {
+ }
+ /**
+ * Tests if the database server is capable of using utf8mb4.
+ *
+ * @since 5.2.0
+ *
+ * @return array The test results.
+ */
+ public function get_test_utf8mb4_support()
+ {
+ }
+ /**
+ * Tests if the site can communicate with WordPress.org.
+ *
+ * @since 5.2.0
+ *
+ * @return array The test results.
+ */
+ public function get_test_dotorg_communication()
+ {
+ }
+ /**
+ * Tests if debug information is enabled.
+ *
+ * When WP_DEBUG is enabled, errors and information may be disclosed to site visitors,
+ * or logged to a publicly accessible file.
+ *
+ * Debugging is also frequently left enabled after looking for errors on a site,
+ * as site owners do not understand the implications of this.
+ *
+ * @since 5.2.0
+ *
+ * @return array The test results.
+ */
+ public function get_test_is_in_debug_mode()
+ {
+ }
+ /**
+ * Tests if the site is serving content over HTTPS.
+ *
+ * Many sites have varying degrees of HTTPS support, the most common of which is sites that have it
+ * enabled, but only if you visit the right site address.
+ *
+ * @since 5.2.0
+ * @since 5.7.0 Updated to rely on {@see wp_is_using_https()} and {@see wp_is_https_supported()}.
+ *
+ * @return array The test results.
+ */
+ public function get_test_https_status()
+ {
+ }
+ /**
+ * Checks if the HTTP API can handle SSL/TLS requests.
+ *
+ * @since 5.2.0
+ *
+ * @return array The test result.
+ */
+ public function get_test_ssl_support()
+ {
+ }
+ /**
+ * Tests if scheduled events run as intended.
+ *
+ * If scheduled events are not running, this may indicate something with WP_Cron is not working
+ * as intended, or that there are orphaned events hanging around from older code.
+ *
+ * @since 5.2.0
+ *
+ * @return array The test results.
+ */
+ public function get_test_scheduled_events()
+ {
+ }
+ /**
+ * Tests if WordPress can run automated background updates.
+ *
+ * Background updates in WordPress are primarily used for minor releases and security updates.
+ * It's important to either have these working, or be aware that they are intentionally disabled
+ * for whatever reason.
+ *
+ * @since 5.2.0
+ *
+ * @return array The test results.
+ */
+ public function get_test_background_updates()
+ {
+ }
+ /**
+ * Tests if plugin and theme auto-updates appear to be configured correctly.
+ *
+ * @since 5.5.0
+ *
+ * @return array The test results.
+ */
+ public function get_test_plugin_theme_auto_updates()
+ {
+ }
+ /**
+ * Tests if loopbacks work as expected.
+ *
+ * A loopback is when WordPress queries itself, for example to start a new WP_Cron instance,
+ * or when editing a plugin or theme. This has shown itself to be a recurring issue,
+ * as code can very easily break this interaction.
+ *
+ * @since 5.2.0
+ *
+ * @return array The test results.
+ */
+ public function get_test_loopback_requests()
+ {
+ }
+ /**
+ * Tests if HTTP requests are blocked.
+ *
+ * It's possible to block all outgoing communication (with the possibility of allowing certain
+ * hosts) via the HTTP API. This may create problems for users as many features are running as
+ * services these days.
+ *
+ * @since 5.2.0
+ *
+ * @return array The test results.
+ */
+ public function get_test_http_requests()
+ {
+ }
+ /**
+ * Tests if the REST API is accessible.
+ *
+ * Various security measures may block the REST API from working, or it may have been disabled in general.
+ * This is required for the new block editor to work, so we explicitly test for this.
+ *
+ * @since 5.2.0
+ *
+ * @return array The test results.
+ */
+ public function get_test_rest_availability()
+ {
+ }
+ /**
+ * Tests if 'file_uploads' directive in PHP.ini is turned off.
+ *
+ * @since 5.5.0
+ *
+ * @return array The test results.
+ */
+ public function get_test_file_uploads()
+ {
+ }
+ /**
+ * Tests if the Authorization header has the expected values.
+ *
+ * @since 5.6.0
+ *
+ * @return array
+ */
+ public function get_test_authorization_header()
+ {
+ }
+ /**
+ * Tests if a full page cache is available.
+ *
+ * @since 6.1.0
+ *
+ * @return array The test result.
+ */
+ public function get_test_page_cache()
+ {
+ }
+ /**
+ * Tests if the site uses persistent object cache and recommends to use it if not.
+ *
+ * @since 6.1.0
+ *
+ * @return array The test result.
+ */
+ public function get_test_persistent_object_cache()
+ {
+ }
+ /**
+ * Returns a set of tests that belong to the site status page.
+ *
+ * Each site status test is defined here, they may be `direct` tests, that run on page load, or `async` tests
+ * which will run later down the line via JavaScript calls to improve page performance and hopefully also user
+ * experiences.
+ *
+ * @since 5.2.0
+ * @since 5.6.0 Added support for `has_rest` and `permissions`.
+ *
+ * @return array The list of tests to run.
+ */
+ public static function get_tests()
+ {
+ }
+ /**
+ * Adds a class to the body HTML tag.
+ *
+ * Filters the body class string for admin pages and adds our own class for easier styling.
+ *
+ * @since 5.2.0
+ *
+ * @param string $body_class The body class string.
+ * @return string The modified body class string.
+ */
+ public function admin_body_class($body_class)
+ {
+ }
+ /**
+ * Checks if any scheduled tasks have been missed.
+ *
+ * Returns a boolean value of `true` if a scheduled task has been missed and ends processing.
+ *
+ * If the list of crons is an instance of WP_Error, returns the instance instead of a boolean value.
+ *
+ * @since 5.2.0
+ *
+ * @return bool|WP_Error True if a cron was missed, false if not. WP_Error if the cron is set to that.
+ */
+ public function has_missed_cron()
+ {
+ }
+ /**
+ * Checks if any scheduled tasks are late.
+ *
+ * Returns a boolean value of `true` if a scheduled task is late and ends processing.
+ *
+ * If the list of crons is an instance of WP_Error, returns the instance instead of a boolean value.
+ *
+ * @since 5.3.0
+ *
+ * @return bool|WP_Error True if a cron is late, false if not. WP_Error if the cron is set to that.
+ */
+ public function has_late_cron()
+ {
+ }
+ /**
+ * Checks for potential issues with plugin and theme auto-updates.
+ *
+ * Though there is no way to 100% determine if plugin and theme auto-updates are configured
+ * correctly, a few educated guesses could be made to flag any conditions that would
+ * potentially cause unexpected behaviors.
+ *
+ * @since 5.5.0
+ *
+ * @return object The test results.
+ */
+ public function detect_plugin_theme_auto_update_issues()
+ {
+ }
+ /**
+ * Runs a loopback test on the site.
+ *
+ * Loopbacks are what WordPress uses to communicate with itself to start up WP_Cron, scheduled posts,
+ * make sure plugin or theme edits don't cause site failures and similar.
+ *
+ * @since 5.2.0
+ *
+ * @return object The test results.
+ */
+ public function can_perform_loopback()
+ {
+ }
+ /**
+ * Creates a weekly cron event, if one does not already exist.
+ *
+ * @since 5.4.0
+ */
+ public function maybe_create_scheduled_event()
+ {
+ }
+ /**
+ * Runs the scheduled event to check and update the latest site health status for the website.
+ *
+ * @since 5.4.0
+ */
+ public function wp_cron_scheduled_check()
+ {
+ }
+ /**
+ * Checks if the current environment type is set to 'development' or 'local'.
+ *
+ * @since 5.6.0
+ *
+ * @return bool True if it is a development environment, false if not.
+ */
+ public function is_development_environment()
+ {
+ }
+ /**
+ * Returns a list of headers and its verification callback to verify if page cache is enabled or not.
+ *
+ * Note: key is header name and value could be callable function to verify header value.
+ * Empty value mean existence of header detect page cache is enabled.
+ *
+ * @since 6.1.0
+ *
+ * @return array List of client caching headers and their (optional) verification callbacks.
+ */
+ public function get_page_cache_headers()
+ {
+ }
+ /**
+ * Determines whether to suggest using a persistent object cache.
+ *
+ * @since 6.1.0
+ *
+ * @global wpdb $wpdb WordPress database abstraction object.
+ *
+ * @return bool Whether to suggest using a persistent object cache.
+ */
+ public function should_suggest_persistent_object_cache()
+ {
+ }
+ }
+ /**
+ * Administration API: WP_Site_Icon class
+ *
+ * @package WordPress
+ * @subpackage Administration
+ * @since 4.3.0
+ */
+ /**
+ * Core class used to implement site icon functionality.
+ *
+ * @since 4.3.0
+ */
+ #[\AllowDynamicProperties]
+ class WP_Site_Icon
+ {
+ /**
+ * The minimum size of the site icon.
+ *
+ * @since 4.3.0
+ * @var int
+ */
+ public $min_size = 512;
+ /**
+ * The size to which to crop the image so that we can display it in the UI nicely.
+ *
+ * @since 4.3.0
+ * @var int
+ */
+ public $page_crop = 512;
+ /**
+ * List of site icon sizes.
+ *
+ * @since 4.3.0
+ * @var int[]
+ */
+ public $site_icon_sizes = array(
+ /*
+ * Square, medium sized tiles for IE11+.
+ *
+ * See https://msdn.microsoft.com/library/dn455106(v=vs.85).aspx
+ */
+ 270,
+ /*
+ * App icon for Android/Chrome.
+ *
+ * @link https://developers.google.com/web/updates/2014/11/Support-for-theme-color-in-Chrome-39-for-Android
+ * @link https://developer.chrome.com/multidevice/android/installtohomescreen
+ */
+ 192,
+ /*
+ * App icons up to iPhone 6 Plus.
+ *
+ * See https://developer.apple.com/library/prerelease/ios/documentation/UserExperience/Conceptual/MobileHIG/IconMatrix.html
+ */
+ 180,
+ // Our regular Favicon.
+ 32,
+ );
+ /**
+ * Registers actions and filters.
+ *
+ * @since 4.3.0
+ */
+ public function __construct()
+ {
+ }
+ /**
+ * Creates an attachment 'object'.
+ *
+ * @since 4.3.0
+ *
+ * @param string $cropped Cropped image URL.
+ * @param int $parent_attachment_id Attachment ID of parent image.
+ * @return array An array with attachment object data.
+ */
+ public function create_attachment_object($cropped, $parent_attachment_id)
+ {
+ }
+ /**
+ * Inserts an attachment.
+ *
+ * @since 4.3.0
+ *
+ * @param array $attachment An array with attachment object data.
+ * @param string $file File path of the attached image.
+ * @return int Attachment ID.
+ */
+ public function insert_attachment($attachment, $file)
+ {
+ }
+ /**
+ * Adds additional sizes to be made when creating the site icon images.
+ *
+ * @since 4.3.0
+ *
+ * @param array[] $sizes Array of arrays containing information for additional sizes.
+ * @return array[] Array of arrays containing additional image sizes.
+ */
+ public function additional_sizes($sizes = array())
+ {
+ }
+ /**
+ * Adds Site Icon sizes to the array of image sizes on demand.
+ *
+ * @since 4.3.0
+ *
+ * @param string[] $sizes Array of image size names.
+ * @return string[] Array of image size names.
+ */
+ public function intermediate_image_sizes($sizes = array())
+ {
+ }
+ /**
+ * Deletes the Site Icon when the image file is deleted.
+ *
+ * @since 4.3.0
+ *
+ * @param int $post_id Attachment ID.
+ */
+ public function delete_attachment_data($post_id)
+ {
+ }
+ /**
+ * Adds custom image sizes when meta data for an image is requested, that happens to be used as Site Icon.
+ *
+ * @since 4.3.0
+ *
+ * @param null|array|string $value The value get_metadata() should return a single metadata value, or an
+ * array of values.
+ * @param int $post_id Post ID.
+ * @param string $meta_key Meta key.
+ * @param bool $single Whether to return only the first value of the specified `$meta_key`.
+ * @return array|null|string The attachment metadata value, array of values, or null.
+ */
+ public function get_post_metadata($value, $post_id, $meta_key, $single)
+ {
+ }
+ }
+ /**
+ * List Table API: WP_Terms_List_Table class
+ *
+ * @package WordPress
+ * @subpackage Administration
+ * @since 3.1.0
+ */
+ /**
+ * Core class used to implement displaying terms in a list table.
+ *
+ * @since 3.1.0
+ *
+ * @see WP_List_Table
+ */
+ class WP_Terms_List_Table extends \WP_List_Table
+ {
+ public $callback_args;
+ /**
+ * Constructor.
+ *
+ * @since 3.1.0
+ *
+ * @see WP_List_Table::__construct() for more information on default arguments.
+ *
+ * @global string $post_type
+ * @global string $taxonomy
+ * @global string $action
+ * @global object $tax
+ *
+ * @param array $args An associative array of arguments.
+ */
+ public function __construct($args = array())
+ {
+ }
+ /**
+ * @return bool
+ */
+ public function ajax_user_can()
+ {
+ }
+ /**
+ */
+ public function prepare_items()
+ {
+ }
+ /**
+ */
+ public function no_items()
+ {
+ }
+ /**
+ * @return array
+ */
+ protected function get_bulk_actions()
+ {
+ }
+ /**
+ * @return string
+ */
+ public function current_action()
+ {
+ }
+ /**
+ * @return array
+ */
+ public function get_columns()
+ {
+ }
+ /**
+ * @return array
+ */
+ protected function get_sortable_columns()
+ {
+ }
+ /**
+ */
+ public function display_rows_or_placeholder()
+ {
+ }
+ /**
+ * @global string $taxonomy
+ * @param WP_Term $tag Term object.
+ * @param int $level
+ */
+ public function single_row($tag, $level = 0)
+ {
+ }
+ /**
+ * @since 5.9.0 Renamed `$tag` to `$item` to match parent class for PHP 8 named parameter support.
+ *
+ * @param WP_Term $item Term object.
+ * @return string
+ */
+ public function column_cb($item)
+ {
+ }
+ /**
+ * @param WP_Term $tag Term object.
+ * @return string
+ */
+ public function column_name($tag)
+ {
+ }
+ /**
+ * Gets the name of the default primary column.
+ *
+ * @since 4.3.0
+ *
+ * @return string Name of the default primary column, in this case, 'name'.
+ */
+ protected function get_default_primary_column_name()
+ {
+ }
+ /**
+ * Generates and displays row action links.
+ *
+ * @since 4.3.0
+ * @since 5.9.0 Renamed `$tag` to `$item` to match parent class for PHP 8 named parameter support.
+ *
+ * @param WP_Term $item Tag being acted upon.
+ * @param string $column_name Current column name.
+ * @param string $primary Primary column name.
+ * @return string Row actions output for terms, or an empty string
+ * if the current column is not the primary column.
+ */
+ protected function handle_row_actions($item, $column_name, $primary)
+ {
+ }
+ /**
+ * @param WP_Term $tag Term object.
+ * @return string
+ */
+ public function column_description($tag)
+ {
+ }
+ /**
+ * @param WP_Term $tag Term object.
+ * @return string
+ */
+ public function column_slug($tag)
+ {
+ }
+ /**
+ * @param WP_Term $tag Term object.
+ * @return string
+ */
+ public function column_posts($tag)
+ {
+ }
+ /**
+ * @param WP_Term $tag Term object.
+ * @return string
+ */
+ public function column_links($tag)
+ {
+ }
+ /**
+ * @since 5.9.0 Renamed `$tag` to `$item` to match parent class for PHP 8 named parameter support.
+ *
+ * @param WP_Term $item Term object.
+ * @param string $column_name Name of the column.
+ * @return string
+ */
+ public function column_default($item, $column_name)
+ {
+ }
+ /**
+ * Outputs the hidden row displayed when inline editing
+ *
+ * @since 3.1.0
+ */
+ public function inline_edit()
+ {
+ }
+ }
+ /**
+ * List Table API: WP_Themes_List_Table class
+ *
+ * @package WordPress
+ * @subpackage Administration
+ * @since 3.1.0
+ */
+ /**
+ * Core class used to implement displaying installed themes in a list table.
+ *
+ * @since 3.1.0
+ *
+ * @see WP_List_Table
+ */
+ class WP_Themes_List_Table extends \WP_List_Table
+ {
+ protected $search_terms = array();
+ public $features = array();
+ /**
+ * Constructor.
+ *
+ * @since 3.1.0
+ *
+ * @see WP_List_Table::__construct() for more information on default arguments.
+ *
+ * @param array $args An associative array of arguments.
+ */
+ public function __construct($args = array())
+ {
+ }
+ /**
+ * @return bool
+ */
+ public function ajax_user_can()
+ {
+ }
+ /**
+ */
+ public function prepare_items()
+ {
+ }
+ /**
+ */
+ public function no_items()
+ {
+ }
+ /**
+ * @param string $which
+ */
+ public function tablenav($which = 'top')
+ {
+ }
+ /**
+ * Displays the themes table.
+ *
+ * Overrides the parent display() method to provide a different container.
+ *
+ * @since 3.1.0
+ */
+ public function display()
+ {
+ }
+ /**
+ * @return array
+ */
+ public function get_columns()
+ {
+ }
+ /**
+ */
+ public function display_rows_or_placeholder()
+ {
+ }
+ /**
+ */
+ public function display_rows()
+ {
+ }
+ /**
+ * @param WP_Theme $theme
+ * @return bool
+ */
+ public function search_theme($theme)
+ {
+ }
+ /**
+ * Send required variables to JavaScript land
+ *
+ * @since 3.4.0
+ *
+ * @param array $extra_args
+ */
+ public function _js_vars($extra_args = array())
+ {
+ }
+ }
+ /**
+ * List Table API: WP_Theme_Install_List_Table class
+ *
+ * @package WordPress
+ * @subpackage Administration
+ * @since 3.1.0
+ */
+ /**
+ * Core class used to implement displaying themes to install in a list table.
+ *
+ * @since 3.1.0
+ *
+ * @see WP_Themes_List_Table
+ */
+ class WP_Theme_Install_List_Table extends \WP_Themes_List_Table
+ {
+ public $features = array();
+ /**
+ * @return bool
+ */
+ public function ajax_user_can()
+ {
+ }
+ /**
+ * @global array $tabs
+ * @global string $tab
+ * @global int $paged
+ * @global string $type
+ * @global array $theme_field_defaults
+ */
+ public function prepare_items()
+ {
+ }
+ /**
+ */
+ public function no_items()
+ {
+ }
+ /**
+ * @global array $tabs
+ * @global string $tab
+ * @return array
+ */
+ protected function get_views()
+ {
+ }
+ /**
+ * Displays the theme install table.
+ *
+ * Overrides the parent display() method to provide a different container.
+ *
+ * @since 3.1.0
+ */
+ public function display()
+ {
+ }
+ /**
+ */
+ public function display_rows()
+ {
+ }
+ /**
+ * Prints a theme from the WordPress.org API.
+ *
+ * @since 3.1.0
+ *
+ * @global array $themes_allowedtags
+ *
+ * @param stdClass $theme {
+ * An object that contains theme data returned by the WordPress.org API.
+ *
+ * @type string $name Theme name, e.g. 'Twenty Twenty-One'.
+ * @type string $slug Theme slug, e.g. 'twentytwentyone'.
+ * @type string $version Theme version, e.g. '1.1'.
+ * @type string $author Theme author username, e.g. 'melchoyce'.
+ * @type string $preview_url Preview URL, e.g. 'https://2021.wordpress.net/'.
+ * @type string $screenshot_url Screenshot URL, e.g. 'https://wordpress.org/themes/twentytwentyone/'.
+ * @type float $rating Rating score.
+ * @type int $num_ratings The number of ratings.
+ * @type string $homepage Theme homepage, e.g. 'https://wordpress.org/themes/twentytwentyone/'.
+ * @type string $description Theme description.
+ * @type string $download_link Theme ZIP download URL.
+ * }
+ */
+ public function single_row($theme)
+ {
+ }
+ /**
+ * Prints the wrapper for the theme installer.
+ */
+ public function theme_installer()
+ {
+ }
+ /**
+ * Prints the wrapper for the theme installer with a provided theme's data.
+ * Used to make the theme installer work for no-js.
+ *
+ * @param stdClass $theme A WordPress.org Theme API object.
+ */
+ public function theme_installer_single($theme)
+ {
+ }
+ /**
+ * Prints the info for a theme (to be used in the theme installer modal).
+ *
+ * @global array $themes_allowedtags
+ *
+ * @param stdClass $theme A WordPress.org Theme API object.
+ */
+ public function install_theme_info($theme)
+ {
+ }
+ /**
+ * Send required variables to JavaScript land
+ *
+ * @since 3.4.0
+ *
+ * @global string $tab Current tab within Themes->Install screen
+ * @global string $type Type of search.
+ *
+ * @param array $extra_args Unused.
+ */
+ public function _js_vars($extra_args = array())
+ {
+ }
+ }
+ /**
+ * List Table API: WP_Users_List_Table class
+ *
+ * @package WordPress
+ * @subpackage Administration
+ * @since 3.1.0
+ */
+ /**
+ * Core class used to implement displaying users in a list table.
+ *
+ * @since 3.1.0
+ *
+ * @see WP_List_Table
+ */
+ class WP_Users_List_Table extends \WP_List_Table
+ {
+ /**
+ * Site ID to generate the Users list table for.
+ *
+ * @since 3.1.0
+ * @var int
+ */
+ public $site_id;
+ /**
+ * Whether or not the current Users list table is for Multisite.
+ *
+ * @since 3.1.0
+ * @var bool
+ */
+ public $is_site_users;
+ /**
+ * Constructor.
+ *
+ * @since 3.1.0
+ *
+ * @see WP_List_Table::__construct() for more information on default arguments.
+ *
+ * @param array $args An associative array of arguments.
+ */
+ public function __construct($args = array())
+ {
+ }
+ /**
+ * Check the current user's permissions.
+ *
+ * @since 3.1.0
+ *
+ * @return bool
+ */
+ public function ajax_user_can()
+ {
+ }
+ /**
+ * Prepare the users list for display.
+ *
+ * @since 3.1.0
+ *
+ * @global string $role
+ * @global string $usersearch
+ */
+ public function prepare_items()
+ {
+ }
+ /**
+ * Output 'no users' message.
+ *
+ * @since 3.1.0
+ */
+ public function no_items()
+ {
+ }
+ /**
+ * Return an associative array listing all the views that can be used
+ * with this table.
+ *
+ * Provides a list of roles and user count for that role for easy
+ * Filtersing of the user table.
+ *
+ * @since 3.1.0
+ *
+ * @global string $role
+ *
+ * @return string[] An array of HTML links keyed by their view.
+ */
+ protected function get_views()
+ {
+ }
+ /**
+ * Retrieve an associative array of bulk actions available on this table.
+ *
+ * @since 3.1.0
+ *
+ * @return array Array of bulk action labels keyed by their action.
+ */
+ protected function get_bulk_actions()
+ {
+ }
+ /**
+ * Output the controls to allow user roles to be changed in bulk.
+ *
+ * @since 3.1.0
+ *
+ * @param string $which Whether this is being invoked above ("top")
+ * or below the table ("bottom").
+ */
+ protected function extra_tablenav($which)
+ {
+ }
+ /**
+ * Capture the bulk action required, and return it.
+ *
+ * Overridden from the base class implementation to capture
+ * the role change drop-down.
+ *
+ * @since 3.1.0
+ *
+ * @return string The bulk action required.
+ */
+ public function current_action()
+ {
+ }
+ /**
+ * Get a list of columns for the list table.
+ *
+ * @since 3.1.0
+ *
+ * @return string[] Array of column titles keyed by their column name.
+ */
+ public function get_columns()
+ {
+ }
+ /**
+ * Get a list of sortable columns for the list table.
+ *
+ * @since 3.1.0
+ *
+ * @return array Array of sortable columns.
+ */
+ protected function get_sortable_columns()
+ {
+ }
+ /**
+ * Generate the list table rows.
+ *
+ * @since 3.1.0
+ */
+ public function display_rows()
+ {
+ }
+ /**
+ * Generate HTML for a single row on the users.php admin panel.
+ *
+ * @since 3.1.0
+ * @since 4.2.0 The `$style` parameter was deprecated.
+ * @since 4.4.0 The `$role` parameter was deprecated.
+ *
+ * @param WP_User $user_object The current user object.
+ * @param string $style Deprecated. Not used.
+ * @param string $role Deprecated. Not used.
+ * @param int $numposts Optional. Post count to display for this user. Defaults
+ * to zero, as in, a new user has made zero posts.
+ * @return string Output for a single row.
+ */
+ public function single_row($user_object, $style = '', $role = '', $numposts = 0)
+ {
+ }
+ /**
+ * Gets the name of the default primary column.
+ *
+ * @since 4.3.0
+ *
+ * @return string Name of the default primary column, in this case, 'username'.
+ */
+ protected function get_default_primary_column_name()
+ {
+ }
+ /**
+ * Returns an array of translated user role names for a given user object.
+ *
+ * @since 4.4.0
+ *
+ * @param WP_User $user_object The WP_User object.
+ * @return string[] An array of user role names keyed by role.
+ */
+ protected function get_role_list($user_object)
+ {
+ }
+ }
+ /**
+ * WordPress User Search class.
+ *
+ * @since 2.1.0
+ * @deprecated 3.1.0 Use WP_User_Query
+ */
+ class WP_User_Search
+ {
+ /**
+ * {@internal Missing Description}}
+ *
+ * @since 2.1.0
+ * @access private
+ * @var mixed
+ */
+ var $results;
+ /**
+ * {@internal Missing Description}}
+ *
+ * @since 2.1.0
+ * @access private
+ * @var string
+ */
+ var $search_term;
+ /**
+ * Page number.
+ *
+ * @since 2.1.0
+ * @access private
+ * @var int
+ */
+ var $page;
+ /**
+ * Role name that users have.
+ *
+ * @since 2.5.0
+ * @access private
+ * @var string
+ */
+ var $role;
+ /**
+ * Raw page number.
+ *
+ * @since 2.1.0
+ * @access private
+ * @var int|bool
+ */
+ var $raw_page;
+ /**
+ * Amount of users to display per page.
+ *
+ * @since 2.1.0
+ * @access public
+ * @var int
+ */
+ var $users_per_page = 50;
+ /**
+ * {@internal Missing Description}}
+ *
+ * @since 2.1.0
+ * @access private
+ * @var int
+ */
+ var $first_user;
+ /**
+ * {@internal Missing Description}}
+ *
+ * @since 2.1.0
+ * @access private
+ * @var int
+ */
+ var $last_user;
+ /**
+ * {@internal Missing Description}}
+ *
+ * @since 2.1.0
+ * @access private
+ * @var string
+ */
+ var $query_limit;
+ /**
+ * {@internal Missing Description}}
+ *
+ * @since 3.0.0
+ * @access private
+ * @var string
+ */
+ var $query_orderby;
+ /**
+ * {@internal Missing Description}}
+ *
+ * @since 3.0.0
+ * @access private
+ * @var string
+ */
+ var $query_from;
+ /**
+ * {@internal Missing Description}}
+ *
+ * @since 3.0.0
+ * @access private
+ * @var string
+ */
+ var $query_where;
+ /**
+ * {@internal Missing Description}}
+ *
+ * @since 2.1.0
+ * @access private
+ * @var int
+ */
+ var $total_users_for_query = 0;
+ /**
+ * {@internal Missing Description}}
+ *
+ * @since 2.1.0
+ * @access private
+ * @var bool
+ */
+ var $too_many_total_users = \false;
+ /**
+ * {@internal Missing Description}}
+ *
+ * @since 2.1.0
+ * @access private
+ * @var WP_Error
+ */
+ var $search_errors;
+ /**
+ * {@internal Missing Description}}
+ *
+ * @since 2.7.0
+ * @access private
+ * @var string
+ */
+ var $paging_text;
+ /**
+ * PHP5 Constructor - Sets up the object properties.
+ *
+ * @since 2.1.0
+ *
+ * @param string $search_term Search terms string.
+ * @param int $page Optional. Page ID.
+ * @param string $role Role name.
+ * @return WP_User_Search
+ */
+ function __construct($search_term = '', $page = '', $role = '')
+ {
+ }
+ /**
+ * PHP4 Constructor - Sets up the object properties.
+ *
+ * @since 2.1.0
+ *
+ * @param string $search_term Search terms string.
+ * @param int $page Optional. Page ID.
+ * @param string $role Role name.
+ * @return WP_User_Search
+ */
+ public function WP_User_Search($search_term = '', $page = '', $role = '')
+ {
+ }
+ /**
+ * Prepares the user search query (legacy).
+ *
+ * @since 2.1.0
+ * @access public
+ */
+ public function prepare_query()
+ {
+ }
+ /**
+ * Executes the user search query.
+ *
+ * @since 2.1.0
+ * @access public
+ */
+ public function query()
+ {
+ }
+ /**
+ * Prepares variables for use in templates.
+ *
+ * @since 2.1.0
+ * @access public
+ */
+ function prepare_vars_for_template_usage()
+ {
+ }
+ /**
+ * Handles paging for the user search query.
+ *
+ * @since 2.1.0
+ * @access public
+ */
+ public function do_paging()
+ {
+ }
+ /**
+ * Retrieves the user search query results.
+ *
+ * @since 2.1.0
+ * @access public
+ *
+ * @return array
+ */
+ public function get_results()
+ {
+ }
+ /**
+ * Displaying paging text.
+ *
+ * @see do_paging() Builds paging text.
+ *
+ * @since 2.1.0
+ * @access public
+ */
+ function page_links()
+ {
+ }
+ /**
+ * Whether paging is enabled.
+ *
+ * @see do_paging() Builds paging text.
+ *
+ * @since 2.1.0
+ * @access public
+ *
+ * @return bool
+ */
+ function results_are_paged()
+ {
+ }
+ /**
+ * Whether there are search terms.
+ *
+ * @since 2.1.0
+ * @access public
+ *
+ * @return bool
+ */
+ function is_search()
+ {
+ }
+ }
+ /**
+ * Previous class for list table for privacy data export requests.
+ *
+ * @since 4.9.6
+ * @deprecated 5.3.0
+ */
+ class WP_Privacy_Data_Export_Requests_Table extends \WP_Privacy_Data_Export_Requests_List_Table
+ {
+ function __construct($args)
+ {
+ }
+ }
+ /**
+ * Previous class for list table for privacy data erasure requests.
+ *
+ * @since 4.9.6
+ * @deprecated 5.3.0
+ */
+ class WP_Privacy_Data_Removal_Requests_Table extends \WP_Privacy_Data_Removal_Requests_List_Table
+ {
+ function __construct($args)
+ {
+ }
+ }
+ class getid3_lib
+ {
+ /**
+ * @param string $string
+ * @param bool $hex
+ * @param bool $spaces
+ * @param string|bool $htmlencoding
+ *
+ * @return string
+ */
+ public static function PrintHexBytes($string, $hex = \true, $spaces = \true, $htmlencoding = 'UTF-8')
+ {
+ }
+ /**
+ * Truncates a floating-point number at the decimal point.
+ *
+ * @param float $floatnumber
+ *
+ * @return float|int returns int (if possible, otherwise float)
+ */
+ public static function trunc($floatnumber)
+ {
+ }
+ /**
+ * @param int|null $variable
+ * @param int $increment
+ *
+ * @return bool
+ */
+ public static function safe_inc(&$variable, $increment = 1)
+ {
+ }
+ /**
+ * @param int|float $floatnum
+ *
+ * @return int|float
+ */
+ public static function CastAsInt($floatnum)
+ {
+ }
+ /**
+ * @param int $num
+ *
+ * @return bool
+ */
+ public static function intValueSupported($num)
+ {
+ }
+ /**
+ * @param string $fraction
+ *
+ * @return float
+ */
+ public static function DecimalizeFraction($fraction)
+ {
+ }
+ /**
+ * @param string $binarynumerator
+ *
+ * @return float
+ */
+ public static function DecimalBinary2Float($binarynumerator)
+ {
+ }
+ /**
+ * @link http://www.scri.fsu.edu/~jac/MAD3401/Backgrnd/binary.html
+ *
+ * @param string $binarypointnumber
+ * @param int $maxbits
+ *
+ * @return array
+ */
+ public static function NormalizeBinaryPoint($binarypointnumber, $maxbits = 52)
+ {
+ }
+ /**
+ * @link http://www.scri.fsu.edu/~jac/MAD3401/Backgrnd/binary.html
+ *
+ * @param float $floatvalue
+ *
+ * @return string
+ */
+ public static function Float2BinaryDecimal($floatvalue)
+ {
+ }
+ /**
+ * @link http://www.scri.fsu.edu/~jac/MAD3401/Backgrnd/ieee-expl.html
+ *
+ * @param float $floatvalue
+ * @param int $bits
+ *
+ * @return string|false
+ */
+ public static function Float2String($floatvalue, $bits)
+ {
+ }
+ /**
+ * @param string $byteword
+ *
+ * @return float|false
+ */
+ public static function LittleEndian2Float($byteword)
+ {
+ }
+ /**
+ * ANSI/IEEE Standard 754-1985, Standard for Binary Floating Point Arithmetic
+ *
+ * @link https://web.archive.org/web/20120325162206/http://www.psc.edu/general/software/packages/ieee/ieee.php
+ * @link http://www.scri.fsu.edu/~jac/MAD3401/Backgrnd/ieee.html
+ *
+ * @param string $byteword
+ *
+ * @return float|false
+ */
+ public static function BigEndian2Float($byteword)
+ {
+ }
+ /**
+ * @param string $byteword
+ * @param bool $synchsafe
+ * @param bool $signed
+ *
+ * @return int|float|false
+ * @throws Exception
+ */
+ public static function BigEndian2Int($byteword, $synchsafe = \false, $signed = \false)
+ {
+ }
+ /**
+ * @param string $byteword
+ * @param bool $signed
+ *
+ * @return int|float|false
+ */
+ public static function LittleEndian2Int($byteword, $signed = \false)
+ {
+ }
+ /**
+ * @param string $byteword
+ *
+ * @return string
+ */
+ public static function LittleEndian2Bin($byteword)
+ {
+ }
+ /**
+ * @param string $byteword
+ *
+ * @return string
+ */
+ public static function BigEndian2Bin($byteword)
+ {
+ }
+ /**
+ * @param int $number
+ * @param int $minbytes
+ * @param bool $synchsafe
+ * @param bool $signed
+ *
+ * @return string
+ * @throws Exception
+ */
+ public static function BigEndian2String($number, $minbytes = 1, $synchsafe = \false, $signed = \false)
+ {
+ }
+ /**
+ * @param int $number
+ *
+ * @return string
+ */
+ public static function Dec2Bin($number)
+ {
+ }
+ /**
+ * @param string $binstring
+ * @param bool $signed
+ *
+ * @return int|float
+ */
+ public static function Bin2Dec($binstring, $signed = \false)
+ {
+ }
+ /**
+ * @param string $binstring
+ *
+ * @return string
+ */
+ public static function Bin2String($binstring)
+ {
+ }
+ /**
+ * @param int $number
+ * @param int $minbytes
+ * @param bool $synchsafe
+ *
+ * @return string
+ */
+ public static function LittleEndian2String($number, $minbytes = 1, $synchsafe = \false)
+ {
+ }
+ /**
+ * @param mixed $array1
+ * @param mixed $array2
+ *
+ * @return array|false
+ */
+ public static function array_merge_clobber($array1, $array2)
+ {
+ }
+ /**
+ * @param mixed $array1
+ * @param mixed $array2
+ *
+ * @return array|false
+ */
+ public static function array_merge_noclobber($array1, $array2)
+ {
+ }
+ /**
+ * @param mixed $array1
+ * @param mixed $array2
+ *
+ * @return array|false|null
+ */
+ public static function flipped_array_merge_noclobber($array1, $array2)
+ {
+ }
+ /**
+ * @param array $theArray
+ *
+ * @return bool
+ */
+ public static function ksort_recursive(&$theArray)
+ {
+ }
+ /**
+ * @param string $filename
+ * @param int $numextensions
+ *
+ * @return string
+ */
+ public static function fileextension($filename, $numextensions = 1)
+ {
+ }
+ /**
+ * @param int $seconds
+ *
+ * @return string
+ */
+ public static function PlaytimeString($seconds)
+ {
+ }
+ /**
+ * @param int $macdate
+ *
+ * @return int|float
+ */
+ public static function DateMac2Unix($macdate)
+ {
+ }
+ /**
+ * @param string $rawdata
+ *
+ * @return float
+ */
+ public static function FixedPoint8_8($rawdata)
+ {
+ }
+ /**
+ * @param string $rawdata
+ *
+ * @return float
+ */
+ public static function FixedPoint16_16($rawdata)
+ {
+ }
+ /**
+ * @param string $rawdata
+ *
+ * @return float
+ */
+ public static function FixedPoint2_30($rawdata)
+ {
+ }
+ /**
+ * @param string $ArrayPath
+ * @param string $Separator
+ * @param mixed $Value
+ *
+ * @return array
+ */
+ public static function CreateDeepArray($ArrayPath, $Separator, $Value)
+ {
+ }
+ /**
+ * @param array $arraydata
+ * @param bool $returnkey
+ *
+ * @return int|false
+ */
+ public static function array_max($arraydata, $returnkey = \false)
+ {
+ }
+ /**
+ * @param array $arraydata
+ * @param bool $returnkey
+ *
+ * @return int|false
+ */
+ public static function array_min($arraydata, $returnkey = \false)
+ {
+ }
+ /**
+ * @param string $XMLstring
+ *
+ * @return array|false
+ */
+ public static function XML2array($XMLstring)
+ {
+ }
+ /**
+ * @param SimpleXMLElement|array|mixed $XMLobject
+ *
+ * @return mixed
+ */
+ public static function SimpleXMLelement2array($XMLobject)
+ {
+ }
+ /**
+ * Returns checksum for a file from starting position to absolute end position.
+ *
+ * @param string $file
+ * @param int $offset
+ * @param int $end
+ * @param string $algorithm
+ *
+ * @return string|false
+ * @throws getid3_exception
+ */
+ public static function hash_data($file, $offset, $end, $algorithm)
+ {
+ }
+ /**
+ * @param string $filename_source
+ * @param string $filename_dest
+ * @param int $offset
+ * @param int $length
+ *
+ * @return bool
+ * @throws Exception
+ *
+ * @deprecated Unused, may be removed in future versions of getID3
+ */
+ public static function CopyFileParts($filename_source, $filename_dest, $offset, $length)
+ {
+ }
+ /**
+ * @param int $charval
+ *
+ * @return string
+ */
+ public static function iconv_fallback_int_utf8($charval)
+ {
+ }
+ /**
+ * ISO-8859-1 => UTF-8
+ *
+ * @param string $string
+ * @param bool $bom
+ *
+ * @return string
+ */
+ public static function iconv_fallback_iso88591_utf8($string, $bom = \false)
+ {
+ }
+ /**
+ * ISO-8859-1 => UTF-16BE
+ *
+ * @param string $string
+ * @param bool $bom
+ *
+ * @return string
+ */
+ public static function iconv_fallback_iso88591_utf16be($string, $bom = \false)
+ {
+ }
+ /**
+ * ISO-8859-1 => UTF-16LE
+ *
+ * @param string $string
+ * @param bool $bom
+ *
+ * @return string
+ */
+ public static function iconv_fallback_iso88591_utf16le($string, $bom = \false)
+ {
+ }
+ /**
+ * ISO-8859-1 => UTF-16LE (BOM)
+ *
+ * @param string $string
+ *
+ * @return string
+ */
+ public static function iconv_fallback_iso88591_utf16($string)
+ {
+ }
+ /**
+ * UTF-8 => ISO-8859-1
+ *
+ * @param string $string
+ *
+ * @return string
+ */
+ public static function iconv_fallback_utf8_iso88591($string)
+ {
+ }
+ /**
+ * UTF-8 => UTF-16BE
+ *
+ * @param string $string
+ * @param bool $bom
+ *
+ * @return string
+ */
+ public static function iconv_fallback_utf8_utf16be($string, $bom = \false)
+ {
+ }
+ /**
+ * UTF-8 => UTF-16LE
+ *
+ * @param string $string
+ * @param bool $bom
+ *
+ * @return string
+ */
+ public static function iconv_fallback_utf8_utf16le($string, $bom = \false)
+ {
+ }
+ /**
+ * UTF-8 => UTF-16LE (BOM)
+ *
+ * @param string $string
+ *
+ * @return string
+ */
+ public static function iconv_fallback_utf8_utf16($string)
+ {
+ }
+ /**
+ * UTF-16BE => UTF-8
+ *
+ * @param string $string
+ *
+ * @return string
+ */
+ public static function iconv_fallback_utf16be_utf8($string)
+ {
+ }
+ /**
+ * UTF-16LE => UTF-8
+ *
+ * @param string $string
+ *
+ * @return string
+ */
+ public static function iconv_fallback_utf16le_utf8($string)
+ {
+ }
+ /**
+ * UTF-16BE => ISO-8859-1
+ *
+ * @param string $string
+ *
+ * @return string
+ */
+ public static function iconv_fallback_utf16be_iso88591($string)
+ {
+ }
+ /**
+ * UTF-16LE => ISO-8859-1
+ *
+ * @param string $string
+ *
+ * @return string
+ */
+ public static function iconv_fallback_utf16le_iso88591($string)
+ {
+ }
+ /**
+ * UTF-16 (BOM) => ISO-8859-1
+ *
+ * @param string $string
+ *
+ * @return string
+ */
+ public static function iconv_fallback_utf16_iso88591($string)
+ {
+ }
+ /**
+ * UTF-16 (BOM) => UTF-8
+ *
+ * @param string $string
+ *
+ * @return string
+ */
+ public static function iconv_fallback_utf16_utf8($string)
+ {
+ }
+ /**
+ * @param string $in_charset
+ * @param string $out_charset
+ * @param string $string
+ *
+ * @return string
+ * @throws Exception
+ */
+ public static function iconv_fallback($in_charset, $out_charset, $string)
+ {
+ }
+ /**
+ * @param mixed $data
+ * @param string $charset
+ *
+ * @return mixed
+ */
+ public static function recursiveMultiByteCharString2HTML($data, $charset = 'ISO-8859-1')
+ {
+ }
+ /**
+ * @param string|int|float $string
+ * @param string $charset
+ *
+ * @return string
+ */
+ public static function MultiByteCharString2HTML($string, $charset = 'ISO-8859-1')
+ {
+ }
+ /**
+ * @param int $namecode
+ *
+ * @return string
+ */
+ public static function RGADnameLookup($namecode)
+ {
+ }
+ /**
+ * @param int $originatorcode
+ *
+ * @return string
+ */
+ public static function RGADoriginatorLookup($originatorcode)
+ {
+ }
+ /**
+ * @param int $rawadjustment
+ * @param int $signbit
+ *
+ * @return float
+ */
+ public static function RGADadjustmentLookup($rawadjustment, $signbit)
+ {
+ }
+ /**
+ * @param int $namecode
+ * @param int $originatorcode
+ * @param int $replaygain
+ *
+ * @return string
+ */
+ public static function RGADgainString($namecode, $originatorcode, $replaygain)
+ {
+ }
+ /**
+ * @param float $amplitude
+ *
+ * @return float
+ */
+ public static function RGADamplitude2dB($amplitude)
+ {
+ }
+ /**
+ * @param string $imgData
+ * @param array $imageinfo
+ *
+ * @return array|false
+ */
+ public static function GetDataImageSize($imgData, &$imageinfo = array())
+ {
+ }
+ /**
+ * @param string $mime_type
+ *
+ * @return string
+ */
+ public static function ImageExtFromMime($mime_type)
+ {
+ }
+ /**
+ * @param array $ThisFileInfo
+ * @param bool $option_tags_html default true (just as in the main getID3 class)
+ *
+ * @return bool
+ */
+ public static function CopyTagsToComments(&$ThisFileInfo, $option_tags_html = \true)
+ {
+ }
+ /**
+ * @param string $key
+ * @param int $begin
+ * @param int $end
+ * @param string $file
+ * @param string $name
+ *
+ * @return string
+ */
+ public static function EmbeddedLookup($key, $begin, $end, $file, $name)
+ {
+ }
+ /**
+ * @param string $filename
+ * @param string $sourcefile
+ * @param bool $DieOnFailure
+ *
+ * @return bool
+ * @throws Exception
+ */
+ public static function IncludeDependency($filename, $sourcefile, $DieOnFailure = \false)
+ {
+ }
+ /**
+ * @param string $string
+ *
+ * @return string
+ */
+ public static function trimNullByte($string)
+ {
+ }
+ /**
+ * @param string $path
+ *
+ * @return float|bool
+ */
+ public static function getFileSizeSyscall($path)
+ {
+ }
+ /**
+ * @param string $filename
+ *
+ * @return string|false
+ */
+ public static function truepath($filename)
+ {
+ }
+ /**
+ * Workaround for Bug #37268 (https://bugs.php.net/bug.php?id=37268)
+ *
+ * @param string $path A path.
+ * @param string $suffix If the name component ends in suffix this will also be cut off.
+ *
+ * @return string
+ */
+ public static function mb_basename($path, $suffix = '')
+ {
+ }
+ }
+ // End: Defines
+ class getID3
+ {
+ /*
+ * Settings
+ */
+ /**
+ * CASE SENSITIVE! - i.e. (must be supported by iconv()). Examples: ISO-8859-1 UTF-8 UTF-16 UTF-16BE
+ *
+ * @var string
+ */
+ public $encoding = 'UTF-8';
+ /**
+ * Should always be 'ISO-8859-1', but some tags may be written in other encodings such as 'EUC-CN' or 'CP1252'
+ *
+ * @var string
+ */
+ public $encoding_id3v1 = 'ISO-8859-1';
+ /**
+ * ID3v1 should always be 'ISO-8859-1', but some tags may be written in other encodings such as 'Windows-1251' or 'KOI8-R'. If true attempt to detect these encodings, but may return incorrect values for some tags actually in ISO-8859-1 encoding
+ *
+ * @var bool
+ */
+ public $encoding_id3v1_autodetect = \false;
+ /*
+ * Optional tag checks - disable for speed.
+ */
+ /**
+ * Read and process ID3v1 tags
+ *
+ * @var bool
+ */
+ public $option_tag_id3v1 = \true;
+ /**
+ * Read and process ID3v2 tags
+ *
+ * @var bool
+ */
+ public $option_tag_id3v2 = \true;
+ /**
+ * Read and process Lyrics3 tags
+ *
+ * @var bool
+ */
+ public $option_tag_lyrics3 = \true;
+ /**
+ * Read and process APE tags
+ *
+ * @var bool
+ */
+ public $option_tag_apetag = \true;
+ /**
+ * Copy tags to root key 'tags' and encode to $this->encoding
+ *
+ * @var bool
+ */
+ public $option_tags_process = \true;
+ /**
+ * Copy tags to root key 'tags_html' properly translated from various encodings to HTML entities
+ *
+ * @var bool
+ */
+ public $option_tags_html = \true;
+ /*
+ * Optional tag/comment calculations
+ */
+ /**
+ * Calculate additional info such as bitrate, channelmode etc
+ *
+ * @var bool
+ */
+ public $option_extra_info = \true;
+ /*
+ * Optional handling of embedded attachments (e.g. images)
+ */
+ /**
+ * Defaults to true (ATTACHMENTS_INLINE) for backward compatibility
+ *
+ * @var bool|string
+ */
+ public $option_save_attachments = \true;
+ /*
+ * Optional calculations
+ */
+ /**
+ * Get MD5 sum of data part - slow
+ *
+ * @var bool
+ */
+ public $option_md5_data = \false;
+ /**
+ * Use MD5 of source file if available - only FLAC and OptimFROG
+ *
+ * @var bool
+ */
+ public $option_md5_data_source = \false;
+ /**
+ * Get SHA1 sum of data part - slow
+ *
+ * @var bool
+ */
+ public $option_sha1_data = \false;
+ /**
+ * Check whether file is larger than 2GB and thus not supported by 32-bit PHP (null: auto-detect based on
+ * PHP_INT_MAX)
+ *
+ * @var bool|null
+ */
+ public $option_max_2gb_check;
+ /**
+ * Read buffer size in bytes
+ *
+ * @var int
+ */
+ public $option_fread_buffer_size = 32768;
+ // module-specific options
+ /** archive.rar
+ * if true use PHP RarArchive extension, if false (non-extension parsing not yet written in getID3)
+ *
+ * @var bool
+ */
+ public $options_archive_rar_use_php_rar_extension = \true;
+ /** archive.gzip
+ * Optional file list - disable for speed.
+ * Decode gzipped files, if possible, and parse recursively (.tar.gz for example).
+ *
+ * @var bool
+ */
+ public $options_archive_gzip_parse_contents = \false;
+ /** audio.midi
+ * if false only parse most basic information, much faster for some files but may be inaccurate
+ *
+ * @var bool
+ */
+ public $options_audio_midi_scanwholefile = \true;
+ /** audio.mp3
+ * Forces getID3() to scan the file byte-by-byte and log all the valid audio frame headers - extremely slow,
+ * unrecommended, but may provide data from otherwise-unusable files.
+ *
+ * @var bool
+ */
+ public $options_audio_mp3_allow_bruteforce = \false;
+ /** audio.mp3
+ * number of frames to scan to determine if MPEG-audio sequence is valid
+ * Lower this number to 5-20 for faster scanning
+ * Increase this number to 50+ for most accurate detection of valid VBR/CBR mpeg-audio streams
+ *
+ * @var int
+ */
+ public $options_audio_mp3_mp3_valid_check_frames = 50;
+ /** audio.wavpack
+ * Avoid scanning all frames (break after finding ID_RIFF_HEADER and ID_CONFIG_BLOCK,
+ * significantly faster for very large files but other data may be missed
+ *
+ * @var bool
+ */
+ public $options_audio_wavpack_quick_parsing = \false;
+ /** audio-video.flv
+ * Break out of the loop if too many frames have been scanned; only scan this
+ * many if meta frame does not contain useful duration.
+ *
+ * @var int
+ */
+ public $options_audiovideo_flv_max_frames = 100000;
+ /** audio-video.matroska
+ * If true, do not return information about CLUSTER chunks, since there's a lot of them
+ * and they're not usually useful [default: TRUE].
+ *
+ * @var bool
+ */
+ public $options_audiovideo_matroska_hide_clusters = \true;
+ /** audio-video.matroska
+ * True to parse the whole file, not only header [default: FALSE].
+ *
+ * @var bool
+ */
+ public $options_audiovideo_matroska_parse_whole_file = \false;
+ /** audio-video.quicktime
+ * return all parsed data from all atoms if true, otherwise just returned parsed metadata
+ *
+ * @var bool
+ */
+ public $options_audiovideo_quicktime_ReturnAtomData = \false;
+ /** audio-video.quicktime
+ * return all parsed data from all atoms if true, otherwise just returned parsed metadata
+ *
+ * @var bool
+ */
+ public $options_audiovideo_quicktime_ParseAllPossibleAtoms = \false;
+ /** audio-video.swf
+ * return all parsed tags if true, otherwise do not return tags not parsed by getID3
+ *
+ * @var bool
+ */
+ public $options_audiovideo_swf_ReturnAllTagData = \false;
+ /** graphic.bmp
+ * return BMP palette
+ *
+ * @var bool
+ */
+ public $options_graphic_bmp_ExtractPalette = \false;
+ /** graphic.bmp
+ * return image data
+ *
+ * @var bool
+ */
+ public $options_graphic_bmp_ExtractData = \false;
+ /** graphic.png
+ * If data chunk is larger than this do not read it completely (getID3 only needs the first
+ * few dozen bytes for parsing).
+ *
+ * @var int
+ */
+ public $options_graphic_png_max_data_bytes = 10000000;
+ /** misc.pdf
+ * return full details of PDF Cross-Reference Table (XREF)
+ *
+ * @var bool
+ */
+ public $options_misc_pdf_returnXREF = \false;
+ /** misc.torrent
+ * Assume all .torrent files are less than 1MB and just read entire thing into memory for easy processing.
+ * Override this value if you need to process files larger than 1MB
+ *
+ * @var int
+ */
+ public $options_misc_torrent_max_torrent_filesize = 1048576;
+ // Public variables
+ /**
+ * Filename of file being analysed.
+ *
+ * @var string
+ */
+ public $filename;
+ /**
+ * Filepointer to file being analysed.
+ *
+ * @var resource
+ */
+ public $fp;
+ /**
+ * Result array.
+ *
+ * @var array
+ */
+ public $info;
+ /**
+ * @var string
+ */
+ public $tempdir = \GETID3_TEMP_DIR;
+ /**
+ * @var int
+ */
+ public $memory_limit = 0;
+ /**
+ * @var string
+ */
+ protected $startup_error = '';
+ /**
+ * @var string
+ */
+ protected $startup_warning = '';
+ const VERSION = '1.9.22-202207161647';
+ const FREAD_BUFFER_SIZE = 32768;
+ const ATTACHMENTS_NONE = \false;
+ const ATTACHMENTS_INLINE = \true;
+ /**
+ * @throws getid3_exception
+ */
+ public function __construct()
+ {
+ }
+ /**
+ * @return string
+ */
+ public function version()
+ {
+ }
+ /**
+ * @return int
+ */
+ public function fread_buffer_size()
+ {
+ }
+ /**
+ * @param array $optArray
+ *
+ * @return bool
+ */
+ public function setOption($optArray)
+ {
+ }
+ /**
+ * @param string $filename
+ * @param int $filesize
+ * @param resource $fp
+ *
+ * @return bool
+ *
+ * @throws getid3_exception
+ */
+ public function openfile($filename, $filesize = \null, $fp = \null)
+ {
+ }
+ /**
+ * analyze file
+ *
+ * @param string $filename
+ * @param int $filesize
+ * @param string $original_filename
+ * @param resource $fp
+ *
+ * @return array
+ */
+ public function analyze($filename, $filesize = \null, $original_filename = '', $fp = \null)
+ {
+ }
+ /**
+ * Error handling.
+ *
+ * @param string $message
+ *
+ * @return array
+ */
+ public function error($message)
+ {
+ }
+ /**
+ * Warning handling.
+ *
+ * @param string $message
+ *
+ * @return bool
+ */
+ public function warning($message)
+ {
+ }
+ /**
+ * Return array containing information about all supported formats.
+ *
+ * @return array
+ */
+ public function GetFileFormatArray()
+ {
+ }
+ /**
+ * @param string $filedata
+ * @param string $filename
+ *
+ * @return mixed|false
+ */
+ public function GetFileFormat(&$filedata, $filename = '')
+ {
+ }
+ /**
+ * Converts array to $encoding charset from $this->encoding.
+ *
+ * @param array $array
+ * @param string $encoding
+ */
+ public function CharConvert(&$array, $encoding)
+ {
+ }
+ /**
+ * @return bool
+ */
+ public function HandleAllTags()
+ {
+ }
+ /**
+ * Calls getid3_lib::CopyTagsToComments() but passes in the option_tags_html setting from this instance of getID3
+ *
+ * @param array $ThisFileInfo
+ *
+ * @return bool
+ */
+ public function CopyTagsToComments(&$ThisFileInfo)
+ {
+ }
+ /**
+ * @param string $algorithm
+ *
+ * @return array|bool
+ */
+ public function getHashdata($algorithm)
+ {
+ }
+ public function ChannelsBitratePlaytimeCalculations()
+ {
+ }
+ /**
+ * @return bool
+ */
+ public function CalculateCompressionRatioVideo()
+ {
+ }
+ /**
+ * @return bool
+ */
+ public function CalculateCompressionRatioAudio()
+ {
+ }
+ /**
+ * @return bool
+ */
+ public function CalculateReplayGain()
+ {
+ }
+ /**
+ * @return bool
+ */
+ public function ProcessAudioStreams()
+ {
+ }
+ /**
+ * @return string|bool
+ */
+ public function getid3_tempnam()
+ {
+ }
+ /**
+ * @param string $name
+ *
+ * @return bool
+ *
+ * @throws getid3_exception
+ */
+ public function include_module($name)
+ {
+ }
+ /**
+ * @param string $filename
+ *
+ * @return bool
+ */
+ public static function is_writable($filename)
+ {
+ }
+ }
+ abstract class getid3_handler
+ {
+ /**
+ * @var getID3
+ */
+ protected $getid3;
+ // pointer
+ /**
+ * Analyzing filepointer or string.
+ *
+ * @var bool
+ */
+ protected $data_string_flag = \false;
+ /**
+ * String to analyze.
+ *
+ * @var string
+ */
+ protected $data_string = '';
+ /**
+ * Seek position in string.
+ *
+ * @var int
+ */
+ protected $data_string_position = 0;
+ /**
+ * String length.
+ *
+ * @var int
+ */
+ protected $data_string_length = 0;
+ /**
+ * getid3_handler constructor.
+ *
+ * @param getID3 $getid3
+ * @param string $call_module
+ */
+ public function __construct(\getID3 $getid3, $call_module = \null)
+ {
+ }
+ /**
+ * Analyze from file pointer.
+ *
+ * @return bool
+ */
+ public abstract function Analyze();
+ /**
+ * Analyze from string instead.
+ *
+ * @param string $string
+ */
+ public function AnalyzeString($string)
+ {
+ }
+ /**
+ * @param string $string
+ */
+ public function setStringMode($string)
+ {
+ }
+ /**
+ * @return int|bool
+ */
+ protected function ftell()
+ {
+ }
+ /**
+ * @param int $bytes
+ *
+ * @return string|false
+ *
+ * @throws getid3_exception
+ */
+ protected function fread($bytes)
+ {
+ }
+ /**
+ * @param int $bytes
+ * @param int $whence
+ *
+ * @return int
+ *
+ * @throws getid3_exception
+ */
+ protected function fseek($bytes, $whence = \SEEK_SET)
+ {
+ }
+ /**
+ * @return string|false
+ *
+ * @throws getid3_exception
+ */
+ protected function fgets()
+ {
+ }
+ /**
+ * @return bool
+ */
+ protected function feof()
+ {
+ }
+ /**
+ * @param string $module
+ *
+ * @return bool
+ */
+ protected final function isDependencyFor($module)
+ {
+ }
+ /**
+ * @param string $text
+ *
+ * @return bool
+ */
+ protected function error($text)
+ {
+ }
+ /**
+ * @param string $text
+ *
+ * @return bool
+ */
+ protected function warning($text)
+ {
+ }
+ /**
+ * @param string $text
+ */
+ protected function notice($text)
+ {
+ }
+ /**
+ * @param string $name
+ * @param int $offset
+ * @param int $length
+ * @param string $image_mime
+ *
+ * @return string|null
+ *
+ * @throws Exception
+ * @throws getid3_exception
+ */
+ public function saveAttachment($name, $offset, $length, $image_mime = \null)
+ {
+ }
+ }
+ class getid3_exception extends \Exception
+ {
+ public $message;
+ }
+ class getid3_asf extends \getid3_handler
+ {
+ protected static $ASFIndexParametersObjectIndexSpecifiersIndexTypes = array(1 => 'Nearest Past Data Packet', 2 => 'Nearest Past Media Object', 3 => 'Nearest Past Cleanpoint');
+ protected static $ASFMediaObjectIndexParametersObjectIndexSpecifiersIndexTypes = array(1 => 'Nearest Past Data Packet', 2 => 'Nearest Past Media Object', 3 => 'Nearest Past Cleanpoint', 0xff => 'Frame Number Offset');
+ protected static $ASFTimecodeIndexParametersObjectIndexSpecifiersIndexTypes = array(2 => 'Nearest Past Media Object', 3 => 'Nearest Past Cleanpoint');
+ /**
+ * @param getID3 $getid3
+ */
+ public function __construct(\getID3 $getid3)
+ {
+ }
+ /**
+ * @return bool
+ */
+ public function Analyze()
+ {
+ }
+ /**
+ * @param int $CodecListType
+ *
+ * @return string
+ */
+ public static function codecListObjectTypeLookup($CodecListType)
+ {
+ }
+ /**
+ * @return array
+ */
+ public static function KnownGUIDs()
+ {
+ }
+ /**
+ * @param string $GUIDstring
+ *
+ * @return string|false
+ */
+ public static function GUIDname($GUIDstring)
+ {
+ }
+ /**
+ * @param int $id
+ *
+ * @return string
+ */
+ public static function ASFIndexObjectIndexTypeLookup($id)
+ {
+ }
+ /**
+ * @param string $GUIDstring
+ *
+ * @return string
+ */
+ public static function GUIDtoBytestring($GUIDstring)
+ {
+ }
+ /**
+ * @param string $Bytestring
+ *
+ * @return string
+ */
+ public static function BytestringToGUID($Bytestring)
+ {
+ }
+ /**
+ * @param int $FILETIME
+ * @param bool $round
+ *
+ * @return float|int
+ */
+ public static function FILETIMEtoUNIXtime($FILETIME, $round = \true)
+ {
+ }
+ /**
+ * @param int $WMpictureType
+ *
+ * @return string
+ */
+ public static function WMpictureTypeLookup($WMpictureType)
+ {
+ }
+ /**
+ * @param string $asf_header_extension_object_data
+ * @param int $unhandled_sections
+ *
+ * @return array
+ */
+ public function HeaderExtensionObjectDataParse(&$asf_header_extension_object_data, &$unhandled_sections)
+ {
+ }
+ /**
+ * @param int $id
+ *
+ * @return string
+ */
+ public static function metadataLibraryObjectDataTypeLookup($id)
+ {
+ }
+ /**
+ * @param string $data
+ *
+ * @return array
+ */
+ public function ASF_WMpicture(&$data)
+ {
+ }
+ /**
+ * Remove terminator 00 00 and convert UTF-16LE to Latin-1.
+ *
+ * @param string $string
+ *
+ * @return string
+ */
+ public static function TrimConvert($string)
+ {
+ }
+ /**
+ * Remove terminator 00 00.
+ *
+ * @param string $string
+ *
+ * @return string
+ */
+ public static function TrimTerm($string)
+ {
+ }
+ }
+ class getid3_flv extends \getid3_handler
+ {
+ const magic = 'FLV';
+ /**
+ * Break out of the loop if too many frames have been scanned; only scan this
+ * many if meta frame does not contain useful duration.
+ *
+ * @var int
+ */
+ public $max_frames = 100000;
+ /**
+ * @return bool
+ */
+ public function Analyze()
+ {
+ }
+ /**
+ * @param int $id
+ *
+ * @return string|false
+ */
+ public static function audioFormatLookup($id)
+ {
+ }
+ /**
+ * @param int $id
+ *
+ * @return int|false
+ */
+ public static function audioRateLookup($id)
+ {
+ }
+ /**
+ * @param int $id
+ *
+ * @return int|false
+ */
+ public static function audioBitDepthLookup($id)
+ {
+ }
+ /**
+ * @param int $id
+ *
+ * @return string|false
+ */
+ public static function videoCodecLookup($id)
+ {
+ }
+ }
+ class AMFStream
+ {
+ /**
+ * @var string
+ */
+ public $bytes;
+ /**
+ * @var int
+ */
+ public $pos;
+ /**
+ * @param string $bytes
+ */
+ public function __construct(&$bytes)
+ {
+ }
+ /**
+ * @return int
+ */
+ public function readByte()
+ {
+ }
+ /**
+ * @return int
+ */
+ public function readInt()
+ {
+ }
+ /**
+ * @return int
+ */
+ public function readLong()
+ {
+ }
+ /**
+ * @return float|false
+ */
+ public function readDouble()
+ {
+ }
+ /**
+ * @return string
+ */
+ public function readUTF()
+ {
+ }
+ /**
+ * @return string
+ */
+ public function readLongUTF()
+ {
+ }
+ /**
+ * @param int $length
+ *
+ * @return string
+ */
+ public function read($length)
+ {
+ }
+ /**
+ * @return int
+ */
+ public function peekByte()
+ {
+ }
+ /**
+ * @return int
+ */
+ public function peekInt()
+ {
+ }
+ /**
+ * @return int
+ */
+ public function peekLong()
+ {
+ }
+ /**
+ * @return float|false
+ */
+ public function peekDouble()
+ {
+ }
+ /**
+ * @return string
+ */
+ public function peekUTF()
+ {
+ }
+ /**
+ * @return string
+ */
+ public function peekLongUTF()
+ {
+ }
+ }
+ class AMFReader
+ {
+ /**
+ * @var AMFStream
+ */
+ public $stream;
+ /**
+ * @param AMFStream $stream
+ */
+ public function __construct(\AMFStream $stream)
+ {
+ }
+ /**
+ * @return mixed
+ */
+ public function readData()
+ {
+ }
+ /**
+ * @return float|false
+ */
+ public function readDouble()
+ {
+ }
+ /**
+ * @return bool
+ */
+ public function readBoolean()
+ {
+ }
+ /**
+ * @return string
+ */
+ public function readString()
+ {
+ }
+ /**
+ * @return array
+ */
+ public function readObject()
+ {
+ }
+ /**
+ * @return array
+ */
+ public function readMixedArray()
+ {
+ }
+ /**
+ * @return array
+ */
+ public function readArray()
+ {
+ }
+ /**
+ * @return float|false
+ */
+ public function readDate()
+ {
+ }
+ /**
+ * @return string
+ */
+ public function readLongString()
+ {
+ }
+ /**
+ * @return string
+ */
+ public function readXML()
+ {
+ }
+ /**
+ * @return array
+ */
+ public function readTypedObject()
+ {
+ }
+ }
+ class AVCSequenceParameterSetReader
+ {
+ /**
+ * @var string
+ */
+ public $sps;
+ public $start = 0;
+ public $currentBytes = 0;
+ public $currentBits = 0;
+ /**
+ * @var int
+ */
+ public $width;
+ /**
+ * @var int
+ */
+ public $height;
+ /**
+ * @param string $sps
+ */
+ public function __construct($sps)
+ {
+ }
+ public function readData()
+ {
+ }
+ /**
+ * @param int $bits
+ */
+ public function skipBits($bits)
+ {
+ }
+ /**
+ * @return int
+ */
+ public function getBit()
+ {
+ }
+ /**
+ * @param int $bits
+ *
+ * @return int
+ */
+ public function getBits($bits)
+ {
+ }
+ /**
+ * @return int
+ */
+ public function expGolombUe()
+ {
+ }
+ /**
+ * @return int
+ */
+ public function expGolombSe()
+ {
+ }
+ /**
+ * @return int
+ */
+ public function getWidth()
+ {
+ }
+ /**
+ * @return int
+ */
+ public function getHeight()
+ {
+ }
+ }
+ // [FD] -- Relative position of the data that should be in position of the virtual block.
+ /**
+ * @tutorial http://www.matroska.org/technical/specs/index.html
+ *
+ * @todo Rewrite EBML parser to reduce it's size and honor default element values
+ * @todo After rewrite implement stream size calculation, that will provide additional useful info and enable AAC/FLAC audio bitrate detection
+ */
+ class getid3_matroska extends \getid3_handler
+ {
+ /**
+ * If true, do not return information about CLUSTER chunks, since there's a lot of them
+ * and they're not usually useful [default: TRUE].
+ *
+ * @var bool
+ */
+ public $hide_clusters = \true;
+ /**
+ * True to parse the whole file, not only header [default: FALSE].
+ *
+ * @var bool
+ */
+ public $parse_whole_file = \false;
+ /**
+ * @return bool
+ */
+ public function Analyze()
+ {
+ }
+ /**
+ * @param int $target_type
+ *
+ * @return string|int
+ */
+ public static function TargetTypeValue($target_type)
+ {
+ }
+ /**
+ * @param int $lacingtype
+ *
+ * @return string|int
+ */
+ public static function BlockLacingType($lacingtype)
+ {
+ }
+ /**
+ * @param string $codecid
+ *
+ * @return string
+ */
+ public static function CodecIDtoCommonName($codecid)
+ {
+ }
+ /**
+ * @param int $value
+ *
+ * @return string
+ */
+ public static function displayUnit($value)
+ {
+ }
+ }
+ // needed for ISO 639-2 language code lookup
+ class getid3_quicktime extends \getid3_handler
+ {
+ /** audio-video.quicktime
+ * return all parsed data from all atoms if true, otherwise just returned parsed metadata
+ *
+ * @var bool
+ */
+ public $ReturnAtomData = \false;
+ /** audio-video.quicktime
+ * return all parsed data from all atoms if true, otherwise just returned parsed metadata
+ *
+ * @var bool
+ */
+ public $ParseAllPossibleAtoms = \false;
+ /**
+ * @return bool
+ */
+ public function Analyze()
+ {
+ }
+ /**
+ * @param string $atomname
+ * @param int $atomsize
+ * @param string $atom_data
+ * @param int $baseoffset
+ * @param array $atomHierarchy
+ * @param bool $ParseAllPossibleAtoms
+ *
+ * @return array|false
+ */
+ public function QuicktimeParseAtom($atomname, $atomsize, $atom_data, $baseoffset, &$atomHierarchy, $ParseAllPossibleAtoms)
+ {
+ }
+ /**
+ * @param string $atom_data
+ * @param int $baseoffset
+ * @param array $atomHierarchy
+ * @param bool $ParseAllPossibleAtoms
+ *
+ * @return array|false
+ */
+ public function QuicktimeParseContainerAtom($atom_data, $baseoffset, &$atomHierarchy, $ParseAllPossibleAtoms)
+ {
+ }
+ /**
+ * @param string $data
+ * @param int $offset
+ *
+ * @return int
+ */
+ public function quicktime_read_mp4_descr_length($data, &$offset)
+ {
+ }
+ /**
+ * @param int $languageid
+ *
+ * @return string
+ */
+ public function QuicktimeLanguageLookup($languageid)
+ {
+ }
+ /**
+ * @param string $codecid
+ *
+ * @return string
+ */
+ public function QuicktimeVideoCodecLookup($codecid)
+ {
+ }
+ /**
+ * @param string $codecid
+ *
+ * @return mixed|string
+ */
+ public function QuicktimeAudioCodecLookup($codecid)
+ {
+ }
+ /**
+ * @param string $compressionid
+ *
+ * @return string
+ */
+ public function QuicktimeDCOMLookup($compressionid)
+ {
+ }
+ /**
+ * @param int $colordepthid
+ *
+ * @return string
+ */
+ public function QuicktimeColorNameLookup($colordepthid)
+ {
+ }
+ /**
+ * @param int $stik
+ *
+ * @return string
+ */
+ public function QuicktimeSTIKLookup($stik)
+ {
+ }
+ /**
+ * @param int $audio_profile_id
+ *
+ * @return string
+ */
+ public function QuicktimeIODSaudioProfileName($audio_profile_id)
+ {
+ }
+ /**
+ * @param int $video_profile_id
+ *
+ * @return string
+ */
+ public function QuicktimeIODSvideoProfileName($video_profile_id)
+ {
+ }
+ /**
+ * @param int $rtng
+ *
+ * @return string
+ */
+ public function QuicktimeContentRatingLookup($rtng)
+ {
+ }
+ /**
+ * @param int $akid
+ *
+ * @return string
+ */
+ public function QuicktimeStoreAccountTypeLookup($akid)
+ {
+ }
+ /**
+ * @param int $sfid
+ *
+ * @return string
+ */
+ public function QuicktimeStoreFrontCodeLookup($sfid)
+ {
+ }
+ /**
+ * @param string $keyname
+ * @param string|array $data
+ * @param string $boxname
+ *
+ * @return bool
+ */
+ public function CopyToAppropriateCommentsSection($keyname, $data, $boxname = '')
+ {
+ }
+ /**
+ * @param string $lstring
+ * @param int $count
+ *
+ * @return string
+ */
+ public function LociString($lstring, &$count)
+ {
+ }
+ /**
+ * @param string $nullterminatedstring
+ *
+ * @return string
+ */
+ public function NoNullString($nullterminatedstring)
+ {
+ }
+ /**
+ * @param string $pascalstring
+ *
+ * @return string
+ */
+ public function Pascal2String($pascalstring)
+ {
+ }
+ /**
+ * @param string $pascalstring
+ *
+ * @return string
+ */
+ public function MaybePascal2String($pascalstring)
+ {
+ }
+ /**
+ * Helper functions for m4b audiobook chapters
+ * code by Steffen Hartmann 2015-Nov-08.
+ *
+ * @param array $info
+ * @param string $tag
+ * @param string $history
+ * @param array $result
+ */
+ public function search_tag_by_key($info, $tag, $history, &$result)
+ {
+ }
+ /**
+ * @param array $info
+ * @param string $k
+ * @param string $v
+ * @param string $history
+ * @param array $result
+ */
+ public function search_tag_by_pair($info, $k, $v, $history, &$result)
+ {
+ }
+ /**
+ * @param array $info
+ *
+ * @return array
+ */
+ public function quicktime_time_to_sample_table($info)
+ {
+ }
+ /**
+ * @param array $info
+ *
+ * @return int
+ */
+ public function quicktime_bookmark_time_scale($info)
+ {
+ }
+ /*
+ // END helper functions for m4b audiobook chapters
+ */
+ }
+ class getid3_riff extends \getid3_handler
+ {
+ protected $container = 'riff';
+ // default
+ /**
+ * @return bool
+ *
+ * @throws getid3_exception
+ */
+ public function Analyze()
+ {
+ }
+ /**
+ * @param int $startoffset
+ * @param int $maxoffset
+ *
+ * @return array|false
+ *
+ * @throws Exception
+ * @throws getid3_exception
+ */
+ public function ParseRIFFAMV($startoffset, $maxoffset)
+ {
+ }
+ /**
+ * @param int $startoffset
+ * @param int $maxoffset
+ *
+ * @return array|false
+ * @throws getid3_exception
+ */
+ public function ParseRIFF($startoffset, $maxoffset)
+ {
+ }
+ /**
+ * @param string $RIFFdata
+ *
+ * @return bool
+ */
+ public function ParseRIFFdata(&$RIFFdata)
+ {
+ }
+ /**
+ * @param array $RIFFinfoArray
+ * @param array $CommentsTargetArray
+ *
+ * @return bool
+ */
+ public static function parseComments(&$RIFFinfoArray, &$CommentsTargetArray)
+ {
+ }
+ /**
+ * @param string $WaveFormatExData
+ *
+ * @return array
+ */
+ public static function parseWAVEFORMATex($WaveFormatExData)
+ {
+ }
+ /**
+ * @param string $WavPackChunkData
+ *
+ * @return bool
+ */
+ public function parseWavPackHeader($WavPackChunkData)
+ {
+ }
+ /**
+ * @param string $BITMAPINFOHEADER
+ * @param bool $littleEndian
+ *
+ * @return array
+ */
+ public static function ParseBITMAPINFOHEADER($BITMAPINFOHEADER, $littleEndian = \true)
+ {
+ }
+ /**
+ * @param string $DIVXTAG
+ * @param bool $raw
+ *
+ * @return array
+ */
+ public static function ParseDIVXTAG($DIVXTAG, $raw = \false)
+ {
+ }
+ /**
+ * @param string $tagshortname
+ *
+ * @return string
+ */
+ public static function waveSNDMtagLookup($tagshortname)
+ {
+ }
+ /**
+ * @param int $wFormatTag
+ *
+ * @return string
+ */
+ public static function wFormatTagLookup($wFormatTag)
+ {
+ }
+ /**
+ * @param string $fourcc
+ *
+ * @return string
+ */
+ public static function fourccLookup($fourcc)
+ {
+ }
+ }
+ class getid3_ac3 extends \getid3_handler
+ {
+ const syncword = 0xb77;
+ /**
+ * @return bool
+ */
+ public function Analyze()
+ {
+ }
+ /**
+ * @param int $fscod
+ *
+ * @return int|string|false
+ */
+ public static function sampleRateCodeLookup($fscod)
+ {
+ }
+ /**
+ * @param int $fscod2
+ *
+ * @return int|string|false
+ */
+ public static function sampleRateCodeLookup2($fscod2)
+ {
+ }
+ /**
+ * @param int $bsmod
+ * @param int $acmod
+ *
+ * @return string|false
+ */
+ public static function serviceTypeLookup($bsmod, $acmod)
+ {
+ }
+ /**
+ * @param int $acmod
+ *
+ * @return array|false
+ */
+ public static function audioCodingModeLookup($acmod)
+ {
+ }
+ /**
+ * @param int $cmixlev
+ *
+ * @return int|float|string|false
+ */
+ public static function centerMixLevelLookup($cmixlev)
+ {
+ }
+ /**
+ * @param int $surmixlev
+ *
+ * @return int|float|string|false
+ */
+ public static function surroundMixLevelLookup($surmixlev)
+ {
+ }
+ /**
+ * @param int $dsurmod
+ *
+ * @return string|false
+ */
+ public static function dolbySurroundModeLookup($dsurmod)
+ {
+ }
+ /**
+ * @param int $acmod
+ * @param bool $lfeon
+ *
+ * @return array
+ */
+ public static function channelsEnabledLookup($acmod, $lfeon)
+ {
+ }
+ /**
+ * @param int $compre
+ *
+ * @return float|int
+ */
+ public static function heavyCompression($compre)
+ {
+ }
+ /**
+ * @param int $roomtyp
+ *
+ * @return string|false
+ */
+ public static function roomTypeLookup($roomtyp)
+ {
+ }
+ /**
+ * @param int $frmsizecod
+ * @param int $fscod
+ *
+ * @return int|false
+ */
+ public static function frameSizeLookup($frmsizecod, $fscod)
+ {
+ }
+ /**
+ * @param int $frmsizecod
+ *
+ * @return int|false
+ */
+ public static function bitrateLookup($frmsizecod)
+ {
+ }
+ /**
+ * @param int $numblkscod
+ *
+ * @return int|false
+ */
+ public static function blocksPerSyncFrame($numblkscod)
+ {
+ }
+ }
+ /**
+ * @tutorial http://wiki.multimedia.cx/index.php?title=DTS
+ */
+ class getid3_dts extends \getid3_handler
+ {
+ /**
+ * Default DTS syncword used in native .cpt or .dts formats.
+ */
+ const syncword = "\xfe\x80\x01";
+ /**
+ * Possible syncwords indicating bitstream encoding.
+ */
+ public static $syncwords = array(
+ 0 => "\xfe\x80\x01",
+ // raw big-endian
+ 1 => "\xfe\x01\x80",
+ // raw little-endian
+ 2 => "\x1f\xff\xe8\x00",
+ // 14-bit big-endian
+ 3 => "\xff\x1f\x00\xe8",
+ );
+ // 14-bit little-endian
+ /**
+ * @return bool
+ */
+ public function Analyze()
+ {
+ }
+ /**
+ * @param int $index
+ *
+ * @return int|string|false
+ */
+ public static function bitrateLookup($index)
+ {
+ }
+ /**
+ * @param int $index
+ *
+ * @return int|string|false
+ */
+ public static function sampleRateLookup($index)
+ {
+ }
+ /**
+ * @param int $index
+ *
+ * @return int|false
+ */
+ public static function bitPerSampleLookup($index)
+ {
+ }
+ /**
+ * @param int $index
+ *
+ * @return int|false
+ */
+ public static function numChannelsLookup($index)
+ {
+ }
+ /**
+ * @param int $index
+ *
+ * @return string
+ */
+ public static function channelArrangementLookup($index)
+ {
+ }
+ /**
+ * @param int $index
+ * @param int $version
+ *
+ * @return int|false
+ */
+ public static function dialogNormalization($index, $version)
+ {
+ }
+ }
+ /**
+ * @tutorial http://flac.sourceforge.net/format.html
+ */
+ class getid3_flac extends \getid3_handler
+ {
+ const syncword = 'fLaC';
+ /**
+ * @return bool
+ */
+ public function Analyze()
+ {
+ }
+ /**
+ * @return bool
+ */
+ public function parseMETAdata()
+ {
+ }
+ /**
+ * @param string $BlockData
+ *
+ * @return array
+ */
+ public static function parseSTREAMINFOdata($BlockData)
+ {
+ }
+ /**
+ * Parse METADATA_BLOCK_PICTURE flac structure and extract attachment
+ * External usage: audio.ogg
+ *
+ * @return bool
+ */
+ public function parsePICTURE()
+ {
+ }
+ /**
+ * @param int $blocktype
+ *
+ * @return string
+ */
+ public static function metaBlockTypeLookup($blocktype)
+ {
+ }
+ /**
+ * @param int $applicationid
+ *
+ * @return string
+ */
+ public static function applicationIDLookup($applicationid)
+ {
+ }
+ /**
+ * @param int $type_id
+ *
+ * @return string
+ */
+ public static function pictureTypeLookup($type_id)
+ {
+ }
+ }
+ class getid3_mp3 extends \getid3_handler
+ {
+ /**
+ * Forces getID3() to scan the file byte-by-byte and log all the valid audio frame headers - extremely slow,
+ * unrecommended, but may provide data from otherwise-unusable files.
+ *
+ * @var bool
+ */
+ public $allow_bruteforce = \false;
+ /**
+ * number of frames to scan to determine if MPEG-audio sequence is valid
+ * Lower this number to 5-20 for faster scanning
+ * Increase this number to 50+ for most accurate detection of valid VBR/CBR mpeg-audio streams
+ *
+ * @var int
+ */
+ public $mp3_valid_check_frames = 50;
+ /**
+ * @return bool
+ */
+ public function Analyze()
+ {
+ }
+ /**
+ * @return string
+ */
+ public function GuessEncoderOptions()
+ {
+ }
+ /**
+ * @param int $offset
+ * @param array $info
+ * @param bool $recursivesearch
+ * @param bool $ScanAsCBR
+ * @param bool $FastMPEGheaderScan
+ *
+ * @return bool
+ */
+ public function decodeMPEGaudioHeader($offset, &$info, $recursivesearch = \true, $ScanAsCBR = \false, $FastMPEGheaderScan = \false)
+ {
+ }
+ /**
+ * @param int $offset
+ * @param int $nextframetestoffset
+ * @param bool $ScanAsCBR
+ *
+ * @return bool
+ */
+ public function RecursiveFrameScanning(&$offset, &$nextframetestoffset, $ScanAsCBR)
+ {
+ }
+ /**
+ * @param int $offset
+ * @param bool $deepscan
+ *
+ * @return int|false
+ */
+ public function FreeFormatFrameLength($offset, $deepscan = \false)
+ {
+ }
+ /**
+ * @return bool
+ */
+ public function getOnlyMPEGaudioInfoBruteForce()
+ {
+ }
+ /**
+ * @param int $avdataoffset
+ * @param bool $BitrateHistogram
+ *
+ * @return bool
+ */
+ public function getOnlyMPEGaudioInfo($avdataoffset, $BitrateHistogram = \false)
+ {
+ }
+ /**
+ * @return array
+ */
+ public static function MPEGaudioVersionArray()
+ {
+ }
+ /**
+ * @return array
+ */
+ public static function MPEGaudioLayerArray()
+ {
+ }
+ /**
+ * @return array
+ */
+ public static function MPEGaudioBitrateArray()
+ {
+ }
+ /**
+ * @return array
+ */
+ public static function MPEGaudioFrequencyArray()
+ {
+ }
+ /**
+ * @return array
+ */
+ public static function MPEGaudioChannelModeArray()
+ {
+ }
+ /**
+ * @return array
+ */
+ public static function MPEGaudioModeExtensionArray()
+ {
+ }
+ /**
+ * @return array
+ */
+ public static function MPEGaudioEmphasisArray()
+ {
+ }
+ /**
+ * @param string $head4
+ * @param bool $allowBitrate15
+ *
+ * @return bool
+ */
+ public static function MPEGaudioHeaderBytesValid($head4, $allowBitrate15 = \false)
+ {
+ }
+ /**
+ * @param array $rawarray
+ * @param bool $echoerrors
+ * @param bool $allowBitrate15
+ *
+ * @return bool
+ */
+ public static function MPEGaudioHeaderValid($rawarray, $echoerrors = \false, $allowBitrate15 = \false)
+ {
+ }
+ /**
+ * @param string $Header4Bytes
+ *
+ * @return array|false
+ */
+ public static function MPEGaudioHeaderDecode($Header4Bytes)
+ {
+ }
+ /**
+ * @param int|string $bitrate
+ * @param string $version
+ * @param string $layer
+ * @param bool $padding
+ * @param int $samplerate
+ *
+ * @return int|false
+ */
+ public static function MPEGaudioFrameLength(&$bitrate, &$version, &$layer, $padding, &$samplerate)
+ {
+ }
+ /**
+ * @param float|int $bit_rate
+ *
+ * @return int|float|string
+ */
+ public static function ClosestStandardMP3Bitrate($bit_rate)
+ {
+ }
+ /**
+ * @param string $version
+ * @param string $channelmode
+ *
+ * @return int
+ */
+ public static function XingVBRidOffset($version, $channelmode)
+ {
+ }
+ /**
+ * @param int $VBRmethodID
+ *
+ * @return string
+ */
+ public static function LAMEvbrMethodLookup($VBRmethodID)
+ {
+ }
+ /**
+ * @param int $StereoModeID
+ *
+ * @return string
+ */
+ public static function LAMEmiscStereoModeLookup($StereoModeID)
+ {
+ }
+ /**
+ * @param int $SourceSampleFrequencyID
+ *
+ * @return string
+ */
+ public static function LAMEmiscSourceSampleFrequencyLookup($SourceSampleFrequencyID)
+ {
+ }
+ /**
+ * @param int $SurroundInfoID
+ *
+ * @return string
+ */
+ public static function LAMEsurroundInfoLookup($SurroundInfoID)
+ {
+ }
+ /**
+ * @param array $LAMEtag
+ *
+ * @return string
+ */
+ public static function LAMEpresetUsedLookup($LAMEtag)
+ {
+ }
+ }
+ class getid3_ogg extends \getid3_handler
+ {
+ /**
+ * @link http://xiph.org/vorbis/doc/Vorbis_I_spec.html
+ *
+ * @return bool
+ */
+ public function Analyze()
+ {
+ }
+ /**
+ * @param string $filedata
+ * @param int $filedataoffset
+ * @param array $oggpageinfo
+ *
+ * @return bool
+ */
+ public function ParseVorbisPageHeader(&$filedata, &$filedataoffset, &$oggpageinfo)
+ {
+ }
+ /**
+ * @link http://tools.ietf.org/html/draft-ietf-codec-oggopus-03
+ *
+ * @param string $filedata
+ * @param int $filedataoffset
+ * @param array $oggpageinfo
+ *
+ * @return bool
+ */
+ public function ParseOpusPageHeader(&$filedata, &$filedataoffset, &$oggpageinfo)
+ {
+ }
+ /**
+ * @return array|false
+ */
+ public function ParseOggPageHeader()
+ {
+ }
+ /**
+ * @link http://xiph.org/vorbis/doc/Vorbis_I_spec.html#x1-810005
+ *
+ * @return bool
+ */
+ public function ParseVorbisComments()
+ {
+ }
+ /**
+ * @param int $mode
+ *
+ * @return string|null
+ */
+ public static function SpeexBandModeLookup($mode)
+ {
+ }
+ /**
+ * @param array $OggInfoArray
+ * @param int $SegmentNumber
+ *
+ * @return int
+ */
+ public static function OggPageSegmentLength($OggInfoArray, $SegmentNumber = 1)
+ {
+ }
+ /**
+ * @param int $nominal_bitrate
+ *
+ * @return float
+ */
+ public static function get_quality_from_nominal_bitrate($nominal_bitrate)
+ {
+ }
+ /**
+ * @param int $colorspace_id
+ *
+ * @return string|null
+ */
+ public static function TheoraColorSpace($colorspace_id)
+ {
+ }
+ /**
+ * @param int $pixelformat_id
+ *
+ * @return string|null
+ */
+ public static function TheoraPixelFormat($pixelformat_id)
+ {
+ }
+ }
+ class getid3_apetag extends \getid3_handler
+ {
+ /**
+ * true: return full data for all attachments;
+ * false: return no data for all attachments;
+ * integer: return data for attachments <= than this;
+ * string: save as file to this directory.
+ *
+ * @var int|bool|string
+ */
+ public $inline_attachments = \true;
+ public $overrideendoffset = 0;
+ /**
+ * @return bool
+ */
+ public function Analyze()
+ {
+ }
+ /**
+ * @param string $APEheaderFooterData
+ *
+ * @return array|false
+ */
+ public function parseAPEheaderFooter($APEheaderFooterData)
+ {
+ }
+ /**
+ * @param int $rawflagint
+ *
+ * @return array
+ */
+ public function parseAPEtagFlags($rawflagint)
+ {
+ }
+ /**
+ * @param int $contenttypeid
+ *
+ * @return string
+ */
+ public function APEcontentTypeFlagLookup($contenttypeid)
+ {
+ }
+ /**
+ * @param string $itemkey
+ *
+ * @return bool
+ */
+ public function APEtagItemIsUTF8Lookup($itemkey)
+ {
+ }
+ }
+ class getid3_id3v1 extends \getid3_handler
+ {
+ /**
+ * @return bool
+ */
+ public function Analyze()
+ {
+ }
+ /**
+ * @param string $str
+ *
+ * @return string
+ */
+ public static function cutfield($str)
+ {
+ }
+ /**
+ * @param bool $allowSCMPXextended
+ *
+ * @return string[]
+ */
+ public static function ArrayOfGenres($allowSCMPXextended = \false)
+ {
+ }
+ /**
+ * @param string $genreid
+ * @param bool $allowSCMPXextended
+ *
+ * @return string|false
+ */
+ public static function LookupGenreName($genreid, $allowSCMPXextended = \true)
+ {
+ }
+ /**
+ * @param string $genre
+ * @param bool $allowSCMPXextended
+ *
+ * @return string|false
+ */
+ public static function LookupGenreID($genre, $allowSCMPXextended = \false)
+ {
+ }
+ /**
+ * @param string $OriginalGenre
+ *
+ * @return string|false
+ */
+ public static function StandardiseID3v1GenreName($OriginalGenre)
+ {
+ }
+ /**
+ * @param string $title
+ * @param string $artist
+ * @param string $album
+ * @param string $year
+ * @param int $genreid
+ * @param string $comment
+ * @param int|string $track
+ *
+ * @return string
+ */
+ public static function GenerateID3v1Tag($title, $artist, $album, $year, $genreid, $comment, $track = '')
+ {
+ }
+ }
+ class getid3_id3v2 extends \getid3_handler
+ {
+ public $StartingOffset = 0;
+ /**
+ * @return bool
+ */
+ public function Analyze()
+ {
+ }
+ /**
+ * @param string $genrestring
+ *
+ * @return array
+ */
+ public function ParseID3v2GenreString($genrestring)
+ {
+ }
+ /**
+ * @param array $parsedFrame
+ *
+ * @return bool
+ */
+ public function ParseID3v2Frame(&$parsedFrame)
+ {
+ }
+ /**
+ * @param string $data
+ *
+ * @return string
+ */
+ public function DeUnsynchronise($data)
+ {
+ }
+ /**
+ * @param int $index
+ *
+ * @return string
+ */
+ public function LookupExtendedHeaderRestrictionsTagSizeLimits($index)
+ {
+ }
+ /**
+ * @param int $index
+ *
+ * @return string
+ */
+ public function LookupExtendedHeaderRestrictionsTextEncodings($index)
+ {
+ }
+ /**
+ * @param int $index
+ *
+ * @return string
+ */
+ public function LookupExtendedHeaderRestrictionsTextFieldSize($index)
+ {
+ }
+ /**
+ * @param int $index
+ *
+ * @return string
+ */
+ public function LookupExtendedHeaderRestrictionsImageEncoding($index)
+ {
+ }
+ /**
+ * @param int $index
+ *
+ * @return string
+ */
+ public function LookupExtendedHeaderRestrictionsImageSizeSize($index)
+ {
+ }
+ /**
+ * @param string $currencyid
+ *
+ * @return string
+ */
+ public function LookupCurrencyUnits($currencyid)
+ {
+ }
+ /**
+ * @param string $currencyid
+ *
+ * @return string
+ */
+ public function LookupCurrencyCountry($currencyid)
+ {
+ }
+ /**
+ * @param string $languagecode
+ * @param bool $casesensitive
+ *
+ * @return string
+ */
+ public static function LanguageLookup($languagecode, $casesensitive = \false)
+ {
+ }
+ /**
+ * @param int $index
+ *
+ * @return string
+ */
+ public static function ETCOEventLookup($index)
+ {
+ }
+ /**
+ * @param int $index
+ *
+ * @return string
+ */
+ public static function SYTLContentTypeLookup($index)
+ {
+ }
+ /**
+ * @param int $index
+ * @param bool $returnarray
+ *
+ * @return array|string
+ */
+ public static function APICPictureTypeLookup($index, $returnarray = \false)
+ {
+ }
+ /**
+ * @param int $index
+ *
+ * @return string
+ */
+ public static function COMRReceivedAsLookup($index)
+ {
+ }
+ /**
+ * @param int $index
+ *
+ * @return string
+ */
+ public static function RVA2ChannelTypeLookup($index)
+ {
+ }
+ /**
+ * @param string $framename
+ *
+ * @return string
+ */
+ public static function FrameNameLongLookup($framename)
+ {
+ }
+ /**
+ * @param string $framename
+ *
+ * @return string
+ */
+ public static function FrameNameShortLookup($framename)
+ {
+ }
+ /**
+ * @param string $encoding
+ *
+ * @return string
+ */
+ public static function TextEncodingTerminatorLookup($encoding)
+ {
+ }
+ /**
+ * @param int $encoding
+ *
+ * @return string
+ */
+ public static function TextEncodingNameLookup($encoding)
+ {
+ }
+ /**
+ * @param string $string
+ * @param string $terminator
+ *
+ * @return string
+ */
+ public static function RemoveStringTerminator($string, $terminator)
+ {
+ }
+ /**
+ * @param string $string
+ *
+ * @return string
+ */
+ public static function MakeUTF16emptyStringEmpty($string)
+ {
+ }
+ /**
+ * @param string $framename
+ * @param int $id3v2majorversion
+ *
+ * @return bool|int
+ */
+ public static function IsValidID3v2FrameName($framename, $id3v2majorversion)
+ {
+ }
+ /**
+ * @param string $numberstring
+ * @param bool $allowdecimal
+ * @param bool $allownegative
+ *
+ * @return bool
+ */
+ public static function IsANumber($numberstring, $allowdecimal = \false, $allownegative = \false)
+ {
+ }
+ /**
+ * @param string $datestamp
+ *
+ * @return bool
+ */
+ public static function IsValidDateStampString($datestamp)
+ {
+ }
+ /**
+ * @param int $majorversion
+ *
+ * @return int
+ */
+ public static function ID3v2HeaderLength($majorversion)
+ {
+ }
+ /**
+ * @param string $frame_name
+ *
+ * @return string|false
+ */
+ public static function ID3v22iTunesBrokenFrameName($frame_name)
+ {
+ }
+ }
+ class getid3_lyrics3 extends \getid3_handler
+ {
+ /**
+ * @return bool
+ */
+ public function Analyze()
+ {
+ }
+ /**
+ * @param int $endoffset
+ * @param int $version
+ * @param int $length
+ *
+ * @return bool
+ */
+ public function getLyrics3Data($endoffset, $version, $length)
+ {
+ }
+ /**
+ * @param string $rawtimestamp
+ *
+ * @return int|false
+ */
+ public function Lyrics3Timestamp2Seconds($rawtimestamp)
+ {
+ }
+ /**
+ * @param array $Lyrics3data
+ *
+ * @return bool
+ */
+ public function Lyrics3LyricsTimestampParse(&$Lyrics3data)
+ {
+ }
+ /**
+ * @param string $char
+ *
+ * @return bool|null
+ */
+ public function IntString2Bool($char)
+ {
+ }
+ }
+ /**
+ * IXR_Base64
+ *
+ * @package IXR
+ * @since 1.5.0
+ */
+ class IXR_Base64
+ {
+ var $data;
+ /**
+ * PHP5 constructor.
+ */
+ function __construct($data)
+ {
+ }
+ /**
+ * PHP4 constructor.
+ */
+ public function IXR_Base64($data)
+ {
+ }
+ function getXml()
+ {
+ }
+ }
+ /**
+ * IXR_Client
+ *
+ * @package IXR
+ * @since 1.5.0
+ *
+ */
+ class IXR_Client
+ {
+ var $server;
+ var $port;
+ var $path;
+ var $useragent;
+ var $response;
+ var $message = \false;
+ var $debug = \false;
+ var $timeout;
+ var $headers = array();
+ // Storage place for an error message
+ var $error = \false;
+ /**
+ * PHP5 constructor.
+ */
+ function __construct($server, $path = \false, $port = 80, $timeout = 15)
+ {
+ }
+ /**
+ * PHP4 constructor.
+ */
+ public function IXR_Client($server, $path = \false, $port = 80, $timeout = 15)
+ {
+ }
+ /**
+ * @since 1.5.0
+ * @since 5.5.0 Formalized the existing `...$args` parameter by adding it
+ * to the function signature.
+ *
+ * @return bool
+ */
+ function query(...$args)
+ {
+ }
+ function getResponse()
+ {
+ }
+ function isError()
+ {
+ }
+ function getErrorCode()
+ {
+ }
+ function getErrorMessage()
+ {
+ }
+ }
+ /**
+ * IXR_ClientMulticall
+ *
+ * @package IXR
+ * @since 1.5.0
+ */
+ class IXR_ClientMulticall extends \IXR_Client
+ {
+ var $calls = array();
+ /**
+ * PHP5 constructor.
+ */
+ function __construct($server, $path = \false, $port = 80)
+ {
+ }
+ /**
+ * PHP4 constructor.
+ */
+ public function IXR_ClientMulticall($server, $path = \false, $port = 80)
+ {
+ }
+ /**
+ * @since 1.5.0
+ * @since 5.5.0 Formalized the existing `...$args` parameter by adding it
+ * to the function signature.
+ */
+ function addCall(...$args)
+ {
+ }
+ /**
+ * @since 1.5.0
+ * @since 5.5.0 Formalized the existing `...$args` parameter by adding it
+ * to the function signature.
+ *
+ * @return bool
+ */
+ function query(...$args)
+ {
+ }
+ }
+ /**
+ * IXR_Date
+ *
+ * @package IXR
+ * @since 1.5.0
+ */
+ class IXR_Date
+ {
+ var $year;
+ var $month;
+ var $day;
+ var $hour;
+ var $minute;
+ var $second;
+ var $timezone;
+ /**
+ * PHP5 constructor.
+ */
+ function __construct($time)
+ {
+ }
+ /**
+ * PHP4 constructor.
+ */
+ public function IXR_Date($time)
+ {
+ }
+ function parseTimestamp($timestamp)
+ {
+ }
+ function parseIso($iso)
+ {
+ }
+ function getIso()
+ {
+ }
+ function getXml()
+ {
+ }
+ function getTimestamp()
+ {
+ }
+ }
+ /**
+ * IXR_Error
+ *
+ * @package IXR
+ * @since 1.5.0
+ */
+ class IXR_Error
+ {
+ var $code;
+ var $message;
+ /**
+ * PHP5 constructor.
+ */
+ function __construct($code, $message)
+ {
+ }
+ /**
+ * PHP4 constructor.
+ */
+ public function IXR_Error($code, $message)
+ {
+ }
+ function getXml()
+ {
+ }
+ }
+ /**
+ * IXR_Server
+ *
+ * @package IXR
+ * @since 1.5.0
+ */
+ class IXR_Server
+ {
+ var $data;
+ var $callbacks = array();
+ var $message;
+ var $capabilities;
+ /**
+ * PHP5 constructor.
+ */
+ function __construct($callbacks = \false, $data = \false, $wait = \false)
+ {
+ }
+ /**
+ * PHP4 constructor.
+ */
+ public function IXR_Server($callbacks = \false, $data = \false, $wait = \false)
+ {
+ }
+ function serve($data = \false)
+ {
+ }
+ function call($methodname, $args)
+ {
+ }
+ function error($error, $message = \false)
+ {
+ }
+ function output($xml)
+ {
+ }
+ function hasMethod($method)
+ {
+ }
+ function setCapabilities()
+ {
+ }
+ function getCapabilities($args)
+ {
+ }
+ function setCallbacks()
+ {
+ }
+ function listMethods($args)
+ {
+ }
+ function multiCall($methodcalls)
+ {
+ }
+ }
+ /**
+ * IXR_IntrospectionServer
+ *
+ * @package IXR
+ * @since 1.5.0
+ */
+ class IXR_IntrospectionServer extends \IXR_Server
+ {
+ var $signatures;
+ var $help;
+ /**
+ * PHP5 constructor.
+ */
+ function __construct()
+ {
+ }
+ /**
+ * PHP4 constructor.
+ */
+ public function IXR_IntrospectionServer()
+ {
+ }
+ function addCallback($method, $callback, $args, $help)
+ {
+ }
+ function call($methodname, $args)
+ {
+ }
+ function methodSignature($method)
+ {
+ }
+ function methodHelp($method)
+ {
+ }
+ }
+ /**
+ * IXR_MESSAGE
+ *
+ * @package IXR
+ * @since 1.5.0
+ *
+ */
+ class IXR_Message
+ {
+ var $message = \false;
+ var $messageType = \false;
+ // methodCall / methodResponse / fault
+ var $faultCode = \false;
+ var $faultString = \false;
+ var $methodName = '';
+ var $params = array();
+ // Current variable stacks
+ var $_arraystructs = array();
+ // The stack used to keep track of the current array/struct
+ var $_arraystructstypes = array();
+ // Stack keeping track of if things are structs or array
+ var $_currentStructName = array();
+ // A stack as well
+ var $_param;
+ var $_value;
+ var $_currentTag;
+ var $_currentTagContents;
+ // The XML parser
+ var $_parser;
+ /**
+ * PHP5 constructor.
+ */
+ function __construct($message)
+ {
+ }
+ /**
+ * PHP4 constructor.
+ */
+ public function IXR_Message($message)
+ {
+ }
+ function parse()
+ {
+ }
+ function tag_open($parser, $tag, $attr)
+ {
+ }
+ function cdata($parser, $cdata)
+ {
+ }
+ function tag_close($parser, $tag)
+ {
+ }
+ }
+ /**
+ * IXR_Request
+ *
+ * @package IXR
+ * @since 1.5.0
+ */
+ class IXR_Request
+ {
+ var $method;
+ var $args;
+ var $xml;
+ /**
+ * PHP5 constructor.
+ */
+ function __construct($method, $args)
+ {
+ }
+ /**
+ * PHP4 constructor.
+ */
+ public function IXR_Request($method, $args)
+ {
+ }
+ function getLength()
+ {
+ }
+ function getXml()
+ {
+ }
+ }
+ /**
+ * IXR_Value
+ *
+ * @package IXR
+ * @since 1.5.0
+ */
+ class IXR_Value
+ {
+ var $data;
+ var $type;
+ /**
+ * PHP5 constructor.
+ */
+ function __construct($data, $type = \false)
+ {
+ }
+ /**
+ * PHP4 constructor.
+ */
+ public function IXR_Value($data, $type = \false)
+ {
+ }
+ function calculateType()
+ {
+ }
+ function getXml()
+ {
+ }
+ /**
+ * Checks whether or not the supplied array is a struct or not
+ *
+ * @param array $array
+ * @return bool
+ */
+ function isStruct($array)
+ {
+ }
+ }
+}
+namespace PHPMailer\PHPMailer {
+ /**
+ * PHPMailer exception handler.
+ *
+ * @author Marcus Bointon
+ */
+ class Exception extends \Exception
+ {
+ /**
+ * Prettify error message output.
+ *
+ * @return string
+ */
+ public function errorMessage()
+ {
+ }
+ }
+ /**
+ * PHPMailer - PHP email creation and transport class.
+ *
+ * @author Marcus Bointon (Synchro/coolbru)
+ * @author Jim Jagielski (jimjag)
+ * @author Andy Prevost (codeworxtech)
+ * @author Brent R. Matzelle (original founder)
+ */
+ class PHPMailer
+ {
+ const CHARSET_ASCII = 'us-ascii';
+ const CHARSET_ISO88591 = 'iso-8859-1';
+ const CHARSET_UTF8 = 'utf-8';
+ const CONTENT_TYPE_PLAINTEXT = 'text/plain';
+ const CONTENT_TYPE_TEXT_CALENDAR = 'text/calendar';
+ const CONTENT_TYPE_TEXT_HTML = 'text/html';
+ const CONTENT_TYPE_MULTIPART_ALTERNATIVE = 'multipart/alternative';
+ const CONTENT_TYPE_MULTIPART_MIXED = 'multipart/mixed';
+ const CONTENT_TYPE_MULTIPART_RELATED = 'multipart/related';
+ const ENCODING_7BIT = '7bit';
+ const ENCODING_8BIT = '8bit';
+ const ENCODING_BASE64 = 'base64';
+ const ENCODING_BINARY = 'binary';
+ const ENCODING_QUOTED_PRINTABLE = 'quoted-printable';
+ const ENCRYPTION_STARTTLS = 'tls';
+ const ENCRYPTION_SMTPS = 'ssl';
+ const ICAL_METHOD_REQUEST = 'REQUEST';
+ const ICAL_METHOD_PUBLISH = 'PUBLISH';
+ const ICAL_METHOD_REPLY = 'REPLY';
+ const ICAL_METHOD_ADD = 'ADD';
+ const ICAL_METHOD_CANCEL = 'CANCEL';
+ const ICAL_METHOD_REFRESH = 'REFRESH';
+ const ICAL_METHOD_COUNTER = 'COUNTER';
+ const ICAL_METHOD_DECLINECOUNTER = 'DECLINECOUNTER';
+ /**
+ * Email priority.
+ * Options: null (default), 1 = High, 3 = Normal, 5 = low.
+ * When null, the header is not set at all.
+ *
+ * @var int|null
+ */
+ public $Priority;
+ /**
+ * The character set of the message.
+ *
+ * @var string
+ */
+ public $CharSet = self::CHARSET_ISO88591;
+ /**
+ * The MIME Content-type of the message.
+ *
+ * @var string
+ */
+ public $ContentType = self::CONTENT_TYPE_PLAINTEXT;
+ /**
+ * The message encoding.
+ * Options: "8bit", "7bit", "binary", "base64", and "quoted-printable".
+ *
+ * @var string
+ */
+ public $Encoding = self::ENCODING_8BIT;
+ /**
+ * Holds the most recent mailer error message.
+ *
+ * @var string
+ */
+ public $ErrorInfo = '';
+ /**
+ * The From email address for the message.
+ *
+ * @var string
+ */
+ public $From = '';
+ /**
+ * The From name of the message.
+ *
+ * @var string
+ */
+ public $FromName = '';
+ /**
+ * The envelope sender of the message.
+ * This will usually be turned into a Return-Path header by the receiver,
+ * and is the address that bounces will be sent to.
+ * If not empty, will be passed via `-f` to sendmail or as the 'MAIL FROM' value over SMTP.
+ *
+ * @var string
+ */
+ public $Sender = '';
+ /**
+ * The Subject of the message.
+ *
+ * @var string
+ */
+ public $Subject = '';
+ /**
+ * An HTML or plain text message body.
+ * If HTML then call isHTML(true).
+ *
+ * @var string
+ */
+ public $Body = '';
+ /**
+ * The plain-text message body.
+ * This body can be read by mail clients that do not have HTML email
+ * capability such as mutt & Eudora.
+ * Clients that can read HTML will view the normal Body.
+ *
+ * @var string
+ */
+ public $AltBody = '';
+ /**
+ * An iCal message part body.
+ * Only supported in simple alt or alt_inline message types
+ * To generate iCal event structures, use classes like EasyPeasyICS or iCalcreator.
+ *
+ * @see http://sprain.ch/blog/downloads/php-class-easypeasyics-create-ical-files-with-php/
+ * @see http://kigkonsult.se/iCalcreator/
+ *
+ * @var string
+ */
+ public $Ical = '';
+ /**
+ * Value-array of "method" in Contenttype header "text/calendar"
+ *
+ * @var string[]
+ */
+ protected static $IcalMethods = [self::ICAL_METHOD_REQUEST, self::ICAL_METHOD_PUBLISH, self::ICAL_METHOD_REPLY, self::ICAL_METHOD_ADD, self::ICAL_METHOD_CANCEL, self::ICAL_METHOD_REFRESH, self::ICAL_METHOD_COUNTER, self::ICAL_METHOD_DECLINECOUNTER];
+ /**
+ * The complete compiled MIME message body.
+ *
+ * @var string
+ */
+ protected $MIMEBody = '';
+ /**
+ * The complete compiled MIME message headers.
+ *
+ * @var string
+ */
+ protected $MIMEHeader = '';
+ /**
+ * Extra headers that createHeader() doesn't fold in.
+ *
+ * @var string
+ */
+ protected $mailHeader = '';
+ /**
+ * Word-wrap the message body to this number of chars.
+ * Set to 0 to not wrap. A useful value here is 78, for RFC2822 section 2.1.1 compliance.
+ *
+ * @see static::STD_LINE_LENGTH
+ *
+ * @var int
+ */
+ public $WordWrap = 0;
+ /**
+ * Which method to use to send mail.
+ * Options: "mail", "sendmail", or "smtp".
+ *
+ * @var string
+ */
+ public $Mailer = 'mail';
+ /**
+ * The path to the sendmail program.
+ *
+ * @var string
+ */
+ public $Sendmail = '/usr/sbin/sendmail';
+ /**
+ * Whether mail() uses a fully sendmail-compatible MTA.
+ * One which supports sendmail's "-oi -f" options.
+ *
+ * @var bool
+ */
+ public $UseSendmailOptions = true;
+ /**
+ * The email address that a reading confirmation should be sent to, also known as read receipt.
+ *
+ * @var string
+ */
+ public $ConfirmReadingTo = '';
+ /**
+ * The hostname to use in the Message-ID header and as default HELO string.
+ * If empty, PHPMailer attempts to find one with, in order,
+ * $_SERVER['SERVER_NAME'], gethostname(), php_uname('n'), or the value
+ * 'localhost.localdomain'.
+ *
+ * @see PHPMailer::$Helo
+ *
+ * @var string
+ */
+ public $Hostname = '';
+ /**
+ * An ID to be used in the Message-ID header.
+ * If empty, a unique id will be generated.
+ * You can set your own, but it must be in the format "",
+ * as defined in RFC5322 section 3.6.4 or it will be ignored.
+ *
+ * @see https://tools.ietf.org/html/rfc5322#section-3.6.4
+ *
+ * @var string
+ */
+ public $MessageID = '';
+ /**
+ * The message Date to be used in the Date header.
+ * If empty, the current date will be added.
+ *
+ * @var string
+ */
+ public $MessageDate = '';
+ /**
+ * SMTP hosts.
+ * Either a single hostname or multiple semicolon-delimited hostnames.
+ * You can also specify a different port
+ * for each host by using this format: [hostname:port]
+ * (e.g. "smtp1.example.com:25;smtp2.example.com").
+ * You can also specify encryption type, for example:
+ * (e.g. "tls://smtp1.example.com:587;ssl://smtp2.example.com:465").
+ * Hosts will be tried in order.
+ *
+ * @var string
+ */
+ public $Host = 'localhost';
+ /**
+ * The default SMTP server port.
+ *
+ * @var int
+ */
+ public $Port = 25;
+ /**
+ * The SMTP HELO/EHLO name used for the SMTP connection.
+ * Default is $Hostname. If $Hostname is empty, PHPMailer attempts to find
+ * one with the same method described above for $Hostname.
+ *
+ * @see PHPMailer::$Hostname
+ *
+ * @var string
+ */
+ public $Helo = '';
+ /**
+ * What kind of encryption to use on the SMTP connection.
+ * Options: '', static::ENCRYPTION_STARTTLS, or static::ENCRYPTION_SMTPS.
+ *
+ * @var string
+ */
+ public $SMTPSecure = '';
+ /**
+ * Whether to enable TLS encryption automatically if a server supports it,
+ * even if `SMTPSecure` is not set to 'tls'.
+ * Be aware that in PHP >= 5.6 this requires that the server's certificates are valid.
+ *
+ * @var bool
+ */
+ public $SMTPAutoTLS = true;
+ /**
+ * Whether to use SMTP authentication.
+ * Uses the Username and Password properties.
+ *
+ * @see PHPMailer::$Username
+ * @see PHPMailer::$Password
+ *
+ * @var bool
+ */
+ public $SMTPAuth = false;
+ /**
+ * Options array passed to stream_context_create when connecting via SMTP.
+ *
+ * @var array
+ */
+ public $SMTPOptions = [];
+ /**
+ * SMTP username.
+ *
+ * @var string
+ */
+ public $Username = '';
+ /**
+ * SMTP password.
+ *
+ * @var string
+ */
+ public $Password = '';
+ /**
+ * SMTP authentication type. Options are CRAM-MD5, LOGIN, PLAIN, XOAUTH2.
+ * If not specified, the first one from that list that the server supports will be selected.
+ *
+ * @var string
+ */
+ public $AuthType = '';
+ /**
+ * An implementation of the PHPMailer OAuthTokenProvider interface.
+ *
+ * @var OAuthTokenProvider
+ */
+ protected $oauth;
+ /**
+ * The SMTP server timeout in seconds.
+ * Default of 5 minutes (300sec) is from RFC2821 section 4.5.3.2.
+ *
+ * @var int
+ */
+ public $Timeout = 300;
+ /**
+ * Comma separated list of DSN notifications
+ * 'NEVER' under no circumstances a DSN must be returned to the sender.
+ * If you use NEVER all other notifications will be ignored.
+ * 'SUCCESS' will notify you when your mail has arrived at its destination.
+ * 'FAILURE' will arrive if an error occurred during delivery.
+ * 'DELAY' will notify you if there is an unusual delay in delivery, but the actual
+ * delivery's outcome (success or failure) is not yet decided.
+ *
+ * @see https://tools.ietf.org/html/rfc3461 See section 4.1 for more information about NOTIFY
+ */
+ public $dsn = '';
+ /**
+ * SMTP class debug output mode.
+ * Debug output level.
+ * Options:
+ * @see SMTP::DEBUG_OFF: No output
+ * @see SMTP::DEBUG_CLIENT: Client messages
+ * @see SMTP::DEBUG_SERVER: Client and server messages
+ * @see SMTP::DEBUG_CONNECTION: As SERVER plus connection status
+ * @see SMTP::DEBUG_LOWLEVEL: Noisy, low-level data output, rarely needed
+ *
+ * @see SMTP::$do_debug
+ *
+ * @var int
+ */
+ public $SMTPDebug = 0;
+ /**
+ * How to handle debug output.
+ * Options:
+ * * `echo` Output plain-text as-is, appropriate for CLI
+ * * `html` Output escaped, line breaks converted to ` `, appropriate for browser output
+ * * `error_log` Output to error log as configured in php.ini
+ * By default PHPMailer will use `echo` if run from a `cli` or `cli-server` SAPI, `html` otherwise.
+ * Alternatively, you can provide a callable expecting two params: a message string and the debug level:
+ *
+ * ```php
+ * $mail->Debugoutput = function($str, $level) {echo "debug level $level; message: $str";};
+ * ```
+ *
+ * Alternatively, you can pass in an instance of a PSR-3 compatible logger, though only `debug`
+ * level output is used:
+ *
+ * ```php
+ * $mail->Debugoutput = new myPsr3Logger;
+ * ```
+ *
+ * @see SMTP::$Debugoutput
+ *
+ * @var string|callable|\Psr\Log\LoggerInterface
+ */
+ public $Debugoutput = 'echo';
+ /**
+ * Whether to keep the SMTP connection open after each message.
+ * If this is set to true then the connection will remain open after a send,
+ * and closing the connection will require an explicit call to smtpClose().
+ * It's a good idea to use this if you are sending multiple messages as it reduces overhead.
+ * See the mailing list example for how to use it.
+ *
+ * @var bool
+ */
+ public $SMTPKeepAlive = false;
+ /**
+ * Whether to split multiple to addresses into multiple messages
+ * or send them all in one message.
+ * Only supported in `mail` and `sendmail` transports, not in SMTP.
+ *
+ * @var bool
+ *
+ * @deprecated 6.0.0 PHPMailer isn't a mailing list manager!
+ */
+ public $SingleTo = false;
+ /**
+ * Storage for addresses when SingleTo is enabled.
+ *
+ * @var array
+ */
+ protected $SingleToArray = [];
+ /**
+ * Whether to generate VERP addresses on send.
+ * Only applicable when sending via SMTP.
+ *
+ * @see https://en.wikipedia.org/wiki/Variable_envelope_return_path
+ * @see http://www.postfix.org/VERP_README.html Postfix VERP info
+ *
+ * @var bool
+ */
+ public $do_verp = false;
+ /**
+ * Whether to allow sending messages with an empty body.
+ *
+ * @var bool
+ */
+ public $AllowEmpty = false;
+ /**
+ * DKIM selector.
+ *
+ * @var string
+ */
+ public $DKIM_selector = '';
+ /**
+ * DKIM Identity.
+ * Usually the email address used as the source of the email.
+ *
+ * @var string
+ */
+ public $DKIM_identity = '';
+ /**
+ * DKIM passphrase.
+ * Used if your key is encrypted.
+ *
+ * @var string
+ */
+ public $DKIM_passphrase = '';
+ /**
+ * DKIM signing domain name.
+ *
+ * @example 'example.com'
+ *
+ * @var string
+ */
+ public $DKIM_domain = '';
+ /**
+ * DKIM Copy header field values for diagnostic use.
+ *
+ * @var bool
+ */
+ public $DKIM_copyHeaderFields = true;
+ /**
+ * DKIM Extra signing headers.
+ *
+ * @example ['List-Unsubscribe', 'List-Help']
+ *
+ * @var array
+ */
+ public $DKIM_extraHeaders = [];
+ /**
+ * DKIM private key file path.
+ *
+ * @var string
+ */
+ public $DKIM_private = '';
+ /**
+ * DKIM private key string.
+ *
+ * If set, takes precedence over `$DKIM_private`.
+ *
+ * @var string
+ */
+ public $DKIM_private_string = '';
+ /**
+ * Callback Action function name.
+ *
+ * The function that handles the result of the send email action.
+ * It is called out by send() for each email sent.
+ *
+ * Value can be any php callable: http://www.php.net/is_callable
+ *
+ * Parameters:
+ * bool $result result of the send action
+ * array $to email addresses of the recipients
+ * array $cc cc email addresses
+ * array $bcc bcc email addresses
+ * string $subject the subject
+ * string $body the email body
+ * string $from email address of sender
+ * string $extra extra information of possible use
+ * "smtp_transaction_id' => last smtp transaction id
+ *
+ * @var string
+ */
+ public $action_function = '';
+ /**
+ * What to put in the X-Mailer header.
+ * Options: An empty string for PHPMailer default, whitespace/null for none, or a string to use.
+ *
+ * @var string|null
+ */
+ public $XMailer = '';
+ /**
+ * Which validator to use by default when validating email addresses.
+ * May be a callable to inject your own validator, but there are several built-in validators.
+ * The default validator uses PHP's FILTER_VALIDATE_EMAIL filter_var option.
+ *
+ * @see PHPMailer::validateAddress()
+ *
+ * @var string|callable
+ */
+ public static $validator = 'php';
+ /**
+ * An instance of the SMTP sender class.
+ *
+ * @var SMTP
+ */
+ protected $smtp;
+ /**
+ * The array of 'to' names and addresses.
+ *
+ * @var array
+ */
+ protected $to = [];
+ /**
+ * The array of 'cc' names and addresses.
+ *
+ * @var array
+ */
+ protected $cc = [];
+ /**
+ * The array of 'bcc' names and addresses.
+ *
+ * @var array
+ */
+ protected $bcc = [];
+ /**
+ * The array of reply-to names and addresses.
+ *
+ * @var array
+ */
+ protected $ReplyTo = [];
+ /**
+ * An array of all kinds of addresses.
+ * Includes all of $to, $cc, $bcc.
+ *
+ * @see PHPMailer::$to
+ * @see PHPMailer::$cc
+ * @see PHPMailer::$bcc
+ *
+ * @var array
+ */
+ protected $all_recipients = [];
+ /**
+ * An array of names and addresses queued for validation.
+ * In send(), valid and non duplicate entries are moved to $all_recipients
+ * and one of $to, $cc, or $bcc.
+ * This array is used only for addresses with IDN.
+ *
+ * @see PHPMailer::$to
+ * @see PHPMailer::$cc
+ * @see PHPMailer::$bcc
+ * @see PHPMailer::$all_recipients
+ *
+ * @var array
+ */
+ protected $RecipientsQueue = [];
+ /**
+ * An array of reply-to names and addresses queued for validation.
+ * In send(), valid and non duplicate entries are moved to $ReplyTo.
+ * This array is used only for addresses with IDN.
+ *
+ * @see PHPMailer::$ReplyTo
+ *
+ * @var array
+ */
+ protected $ReplyToQueue = [];
+ /**
+ * The array of attachments.
+ *
+ * @var array
+ */
+ protected $attachment = [];
+ /**
+ * The array of custom headers.
+ *
+ * @var array
+ */
+ protected $CustomHeader = [];
+ /**
+ * The most recent Message-ID (including angular brackets).
+ *
+ * @var string
+ */
+ protected $lastMessageID = '';
+ /**
+ * The message's MIME type.
+ *
+ * @var string
+ */
+ protected $message_type = '';
+ /**
+ * The array of MIME boundary strings.
+ *
+ * @var array
+ */
+ protected $boundary = [];
+ /**
+ * The array of available text strings for the current language.
+ *
+ * @var array
+ */
+ protected $language = [];
+ /**
+ * The number of errors encountered.
+ *
+ * @var int
+ */
+ protected $error_count = 0;
+ /**
+ * The S/MIME certificate file path.
+ *
+ * @var string
+ */
+ protected $sign_cert_file = '';
+ /**
+ * The S/MIME key file path.
+ *
+ * @var string
+ */
+ protected $sign_key_file = '';
+ /**
+ * The optional S/MIME extra certificates ("CA Chain") file path.
+ *
+ * @var string
+ */
+ protected $sign_extracerts_file = '';
+ /**
+ * The S/MIME password for the key.
+ * Used only if the key is encrypted.
+ *
+ * @var string
+ */
+ protected $sign_key_pass = '';
+ /**
+ * Whether to throw exceptions for errors.
+ *
+ * @var bool
+ */
+ protected $exceptions = false;
+ /**
+ * Unique ID used for message ID and boundaries.
+ *
+ * @var string
+ */
+ protected $uniqueid = '';
+ /**
+ * The PHPMailer Version number.
+ *
+ * @var string
+ */
+ const VERSION = '6.6.5';
+ /**
+ * Error severity: message only, continue processing.
+ *
+ * @var int
+ */
+ const STOP_MESSAGE = 0;
+ /**
+ * Error severity: message, likely ok to continue processing.
+ *
+ * @var int
+ */
+ const STOP_CONTINUE = 1;
+ /**
+ * Error severity: message, plus full stop, critical error reached.
+ *
+ * @var int
+ */
+ const STOP_CRITICAL = 2;
+ /**
+ * The SMTP standard CRLF line break.
+ * If you want to change line break format, change static::$LE, not this.
+ */
+ const CRLF = "\r\n";
+ /**
+ * "Folding White Space" a white space string used for line folding.
+ */
+ const FWS = ' ';
+ /**
+ * SMTP RFC standard line ending; Carriage Return, Line Feed.
+ *
+ * @var string
+ */
+ protected static $LE = self::CRLF;
+ /**
+ * The maximum line length supported by mail().
+ *
+ * Background: mail() will sometimes corrupt messages
+ * with headers headers longer than 65 chars, see #818.
+ *
+ * @var int
+ */
+ const MAIL_MAX_LINE_LENGTH = 63;
+ /**
+ * The maximum line length allowed by RFC 2822 section 2.1.1.
+ *
+ * @var int
+ */
+ const MAX_LINE_LENGTH = 998;
+ /**
+ * The lower maximum line length allowed by RFC 2822 section 2.1.1.
+ * This length does NOT include the line break
+ * 76 means that lines will be 77 or 78 chars depending on whether
+ * the line break format is LF or CRLF; both are valid.
+ *
+ * @var int
+ */
+ const STD_LINE_LENGTH = 76;
+ /**
+ * Constructor.
+ *
+ * @param bool $exceptions Should we throw external exceptions?
+ */
+ public function __construct($exceptions = null)
+ {
+ }
+ /**
+ * Destructor.
+ */
+ public function __destruct()
+ {
+ }
+ /**
+ * Output debugging info via a user-defined method.
+ * Only generates output if debug output is enabled.
+ *
+ * @see PHPMailer::$Debugoutput
+ * @see PHPMailer::$SMTPDebug
+ *
+ * @param string $str
+ */
+ protected function edebug($str)
+ {
+ }
+ /**
+ * Sets message type to HTML or plain.
+ *
+ * @param bool $isHtml True for HTML mode
+ */
+ public function isHTML($isHtml = true)
+ {
+ }
+ /**
+ * Send messages using SMTP.
+ */
+ public function isSMTP()
+ {
+ }
+ /**
+ * Send messages using PHP's mail() function.
+ */
+ public function isMail()
+ {
+ }
+ /**
+ * Send messages using $Sendmail.
+ */
+ public function isSendmail()
+ {
+ }
+ /**
+ * Send messages using qmail.
+ */
+ public function isQmail()
+ {
+ }
+ /**
+ * Add a "To" address.
+ *
+ * @param string $address The email address to send to
+ * @param string $name
+ *
+ * @throws Exception
+ *
+ * @return bool true on success, false if address already used or invalid in some way
+ */
+ public function addAddress($address, $name = '')
+ {
+ }
+ /**
+ * Add a "CC" address.
+ *
+ * @param string $address The email address to send to
+ * @param string $name
+ *
+ * @throws Exception
+ *
+ * @return bool true on success, false if address already used or invalid in some way
+ */
+ public function addCC($address, $name = '')
+ {
+ }
+ /**
+ * Add a "BCC" address.
+ *
+ * @param string $address The email address to send to
+ * @param string $name
+ *
+ * @throws Exception
+ *
+ * @return bool true on success, false if address already used or invalid in some way
+ */
+ public function addBCC($address, $name = '')
+ {
+ }
+ /**
+ * Add a "Reply-To" address.
+ *
+ * @param string $address The email address to reply to
+ * @param string $name
+ *
+ * @throws Exception
+ *
+ * @return bool true on success, false if address already used or invalid in some way
+ */
+ public function addReplyTo($address, $name = '')
+ {
+ }
+ /**
+ * Add an address to one of the recipient arrays or to the ReplyTo array. Because PHPMailer
+ * can't validate addresses with an IDN without knowing the PHPMailer::$CharSet (that can still
+ * be modified after calling this function), addition of such addresses is delayed until send().
+ * Addresses that have been added already return false, but do not throw exceptions.
+ *
+ * @param string $kind One of 'to', 'cc', 'bcc', or 'ReplyTo'
+ * @param string $address The email address
+ * @param string $name An optional username associated with the address
+ *
+ * @throws Exception
+ *
+ * @return bool true on success, false if address already used or invalid in some way
+ */
+ protected function addOrEnqueueAnAddress($kind, $address, $name)
+ {
+ }
+ /**
+ * Add an address to one of the recipient arrays or to the ReplyTo array.
+ * Addresses that have been added already return false, but do not throw exceptions.
+ *
+ * @param string $kind One of 'to', 'cc', 'bcc', or 'ReplyTo'
+ * @param string $address The email address to send, resp. to reply to
+ * @param string $name
+ *
+ * @throws Exception
+ *
+ * @return bool true on success, false if address already used or invalid in some way
+ */
+ protected function addAnAddress($kind, $address, $name = '')
+ {
+ }
+ /**
+ * Parse and validate a string containing one or more RFC822-style comma-separated email addresses
+ * of the form "display name " into an array of name/address pairs.
+ * Uses the imap_rfc822_parse_adrlist function if the IMAP extension is available.
+ * Note that quotes in the name part are removed.
+ *
+ * @see http://www.andrew.cmu.edu/user/agreen1/testing/mrbs/web/Mail/RFC822.php A more careful implementation
+ *
+ * @param string $addrstr The address list string
+ * @param bool $useimap Whether to use the IMAP extension to parse the list
+ * @param string $charset The charset to use when decoding the address list string.
+ *
+ * @return array
+ */
+ public static function parseAddresses($addrstr, $useimap = true, $charset = self::CHARSET_ISO88591)
+ {
+ }
+ /**
+ * Set the From and FromName properties.
+ *
+ * @param string $address
+ * @param string $name
+ * @param bool $auto Whether to also set the Sender address, defaults to true
+ *
+ * @throws Exception
+ *
+ * @return bool
+ */
+ public function setFrom($address, $name = '', $auto = true)
+ {
+ }
+ /**
+ * Return the Message-ID header of the last email.
+ * Technically this is the value from the last time the headers were created,
+ * but it's also the message ID of the last sent message except in
+ * pathological cases.
+ *
+ * @return string
+ */
+ public function getLastMessageID()
+ {
+ }
+ /**
+ * Check that a string looks like an email address.
+ * Validation patterns supported:
+ * * `auto` Pick best pattern automatically;
+ * * `pcre8` Use the squiloople.com pattern, requires PCRE > 8.0;
+ * * `pcre` Use old PCRE implementation;
+ * * `php` Use PHP built-in FILTER_VALIDATE_EMAIL;
+ * * `html5` Use the pattern given by the HTML5 spec for 'email' type form input elements.
+ * * `noregex` Don't use a regex: super fast, really dumb.
+ * Alternatively you may pass in a callable to inject your own validator, for example:
+ *
+ * ```php
+ * PHPMailer::validateAddress('user@example.com', function($address) {
+ * return (strpos($address, '@') !== false);
+ * });
+ * ```
+ *
+ * You can also set the PHPMailer::$validator static to a callable, allowing built-in methods to use your validator.
+ *
+ * @param string $address The email address to check
+ * @param string|callable $patternselect Which pattern to use
+ *
+ * @return bool
+ */
+ public static function validateAddress($address, $patternselect = null)
+ {
+ }
+ /**
+ * Tells whether IDNs (Internationalized Domain Names) are supported or not. This requires the
+ * `intl` and `mbstring` PHP extensions.
+ *
+ * @return bool `true` if required functions for IDN support are present
+ */
+ public static function idnSupported()
+ {
+ }
+ /**
+ * Converts IDN in given email address to its ASCII form, also known as punycode, if possible.
+ * Important: Address must be passed in same encoding as currently set in PHPMailer::$CharSet.
+ * This function silently returns unmodified address if:
+ * - No conversion is necessary (i.e. domain name is not an IDN, or is already in ASCII form)
+ * - Conversion to punycode is impossible (e.g. required PHP functions are not available)
+ * or fails for any reason (e.g. domain contains characters not allowed in an IDN).
+ *
+ * @see PHPMailer::$CharSet
+ *
+ * @param string $address The email address to convert
+ *
+ * @return string The encoded address in ASCII form
+ */
+ public function punyencodeAddress($address)
+ {
+ }
+ /**
+ * Create a message and send it.
+ * Uses the sending method specified by $Mailer.
+ *
+ * @throws Exception
+ *
+ * @return bool false on error - See the ErrorInfo property for details of the error
+ */
+ public function send()
+ {
+ }
+ /**
+ * Prepare a message for sending.
+ *
+ * @throws Exception
+ *
+ * @return bool
+ */
+ public function preSend()
+ {
+ }
+ /**
+ * Actually send a message via the selected mechanism.
+ *
+ * @throws Exception
+ *
+ * @return bool
+ */
+ public function postSend()
+ {
+ }
+ /**
+ * Send mail using the $Sendmail program.
+ *
+ * @see PHPMailer::$Sendmail
+ *
+ * @param string $header The message headers
+ * @param string $body The message body
+ *
+ * @throws Exception
+ *
+ * @return bool
+ */
+ protected function sendmailSend($header, $body)
+ {
+ }
+ /**
+ * Fix CVE-2016-10033 and CVE-2016-10045 by disallowing potentially unsafe shell characters.
+ * Note that escapeshellarg and escapeshellcmd are inadequate for our purposes, especially on Windows.
+ *
+ * @see https://github.com/PHPMailer/PHPMailer/issues/924 CVE-2016-10045 bug report
+ *
+ * @param string $string The string to be validated
+ *
+ * @return bool
+ */
+ protected static function isShellSafe($string)
+ {
+ }
+ /**
+ * Check whether a file path is of a permitted type.
+ * Used to reject URLs and phar files from functions that access local file paths,
+ * such as addAttachment.
+ *
+ * @param string $path A relative or absolute path to a file
+ *
+ * @return bool
+ */
+ protected static function isPermittedPath($path)
+ {
+ }
+ /**
+ * Check whether a file path is safe, accessible, and readable.
+ *
+ * @param string $path A relative or absolute path to a file
+ *
+ * @return bool
+ */
+ protected static function fileIsAccessible($path)
+ {
+ }
+ /**
+ * Send mail using the PHP mail() function.
+ *
+ * @see http://www.php.net/manual/en/book.mail.php
+ *
+ * @param string $header The message headers
+ * @param string $body The message body
+ *
+ * @throws Exception
+ *
+ * @return bool
+ */
+ protected function mailSend($header, $body)
+ {
+ }
+ /**
+ * Get an instance to use for SMTP operations.
+ * Override this function to load your own SMTP implementation,
+ * or set one with setSMTPInstance.
+ *
+ * @return SMTP
+ */
+ public function getSMTPInstance()
+ {
+ }
+ /**
+ * Provide an instance to use for SMTP operations.
+ *
+ * @return SMTP
+ */
+ public function setSMTPInstance(\PHPMailer\PHPMailer\SMTP $smtp)
+ {
+ }
+ /**
+ * Send mail via SMTP.
+ * Returns false if there is a bad MAIL FROM, RCPT, or DATA input.
+ *
+ * @see PHPMailer::setSMTPInstance() to use a different class.
+ *
+ * @uses \PHPMailer\PHPMailer\SMTP
+ *
+ * @param string $header The message headers
+ * @param string $body The message body
+ *
+ * @throws Exception
+ *
+ * @return bool
+ */
+ protected function smtpSend($header, $body)
+ {
+ }
+ /**
+ * Initiate a connection to an SMTP server.
+ * Returns false if the operation failed.
+ *
+ * @param array $options An array of options compatible with stream_context_create()
+ *
+ * @throws Exception
+ *
+ * @uses \PHPMailer\PHPMailer\SMTP
+ *
+ * @return bool
+ */
+ public function smtpConnect($options = null)
+ {
+ }
+ /**
+ * Close the active SMTP session if one exists.
+ */
+ public function smtpClose()
+ {
+ }
+ /**
+ * Set the language for error messages.
+ * The default language is English.
+ *
+ * @param string $langcode ISO 639-1 2-character language code (e.g. French is "fr")
+ * Optionally, the language code can be enhanced with a 4-character
+ * script annotation and/or a 2-character country annotation.
+ * @param string $lang_path Path to the language file directory, with trailing separator (slash)
+ * Do not set this from user input!
+ *
+ * @return bool Returns true if the requested language was loaded, false otherwise.
+ */
+ public function setLanguage($langcode = 'en', $lang_path = '')
+ {
+ }
+ /**
+ * Get the array of strings for the current language.
+ *
+ * @return array
+ */
+ public function getTranslations()
+ {
+ }
+ /**
+ * Create recipient headers.
+ *
+ * @param string $type
+ * @param array $addr An array of recipients,
+ * where each recipient is a 2-element indexed array with element 0 containing an address
+ * and element 1 containing a name, like:
+ * [['joe@example.com', 'Joe User'], ['zoe@example.com', 'Zoe User']]
+ *
+ * @return string
+ */
+ public function addrAppend($type, $addr)
+ {
+ }
+ /**
+ * Format an address for use in a message header.
+ *
+ * @param array $addr A 2-element indexed array, element 0 containing an address, element 1 containing a name like
+ * ['joe@example.com', 'Joe User']
+ *
+ * @return string
+ */
+ public function addrFormat($addr)
+ {
+ }
+ /**
+ * Word-wrap message.
+ * For use with mailers that do not automatically perform wrapping
+ * and for quoted-printable encoded messages.
+ * Original written by philippe.
+ *
+ * @param string $message The message to wrap
+ * @param int $length The line length to wrap to
+ * @param bool $qp_mode Whether to run in Quoted-Printable mode
+ *
+ * @return string
+ */
+ public function wrapText($message, $length, $qp_mode = false)
+ {
+ }
+ /**
+ * Find the last character boundary prior to $maxLength in a utf-8
+ * quoted-printable encoded string.
+ * Original written by Colin Brown.
+ *
+ * @param string $encodedText utf-8 QP text
+ * @param int $maxLength Find the last character boundary prior to this length
+ *
+ * @return int
+ */
+ public function utf8CharBoundary($encodedText, $maxLength)
+ {
+ }
+ /**
+ * Apply word wrapping to the message body.
+ * Wraps the message body to the number of chars set in the WordWrap property.
+ * You should only do this to plain-text bodies as wrapping HTML tags may break them.
+ * This is called automatically by createBody(), so you don't need to call it yourself.
+ */
+ public function setWordWrap()
+ {
+ }
+ /**
+ * Assemble message headers.
+ *
+ * @return string The assembled headers
+ */
+ public function createHeader()
+ {
+ }
+ /**
+ * Get the message MIME type headers.
+ *
+ * @return string
+ */
+ public function getMailMIME()
+ {
+ }
+ /**
+ * Returns the whole MIME message.
+ * Includes complete headers and body.
+ * Only valid post preSend().
+ *
+ * @see PHPMailer::preSend()
+ *
+ * @return string
+ */
+ public function getSentMIMEMessage()
+ {
+ }
+ /**
+ * Create a unique ID to use for boundaries.
+ *
+ * @return string
+ */
+ protected function generateId()
+ {
+ }
+ /**
+ * Assemble the message body.
+ * Returns an empty string on failure.
+ *
+ * @throws Exception
+ *
+ * @return string The assembled message body
+ */
+ public function createBody()
+ {
+ }
+ /**
+ * Return the start of a message boundary.
+ *
+ * @param string $boundary
+ * @param string $charSet
+ * @param string $contentType
+ * @param string $encoding
+ *
+ * @return string
+ */
+ protected function getBoundary($boundary, $charSet, $contentType, $encoding)
+ {
+ }
+ /**
+ * Return the end of a message boundary.
+ *
+ * @param string $boundary
+ *
+ * @return string
+ */
+ protected function endBoundary($boundary)
+ {
+ }
+ /**
+ * Set the message type.
+ * PHPMailer only supports some preset message types, not arbitrary MIME structures.
+ */
+ protected function setMessageType()
+ {
+ }
+ /**
+ * Format a header line.
+ *
+ * @param string $name
+ * @param string|int $value
+ *
+ * @return string
+ */
+ public function headerLine($name, $value)
+ {
+ }
+ /**
+ * Return a formatted mail line.
+ *
+ * @param string $value
+ *
+ * @return string
+ */
+ public function textLine($value)
+ {
+ }
+ /**
+ * Add an attachment from a path on the filesystem.
+ * Never use a user-supplied path to a file!
+ * Returns false if the file could not be found or read.
+ * Explicitly *does not* support passing URLs; PHPMailer is not an HTTP client.
+ * If you need to do that, fetch the resource yourself and pass it in via a local file or string.
+ *
+ * @param string $path Path to the attachment
+ * @param string $name Overrides the attachment name
+ * @param string $encoding File encoding (see $Encoding)
+ * @param string $type MIME type, e.g. `image/jpeg`; determined automatically from $path if not specified
+ * @param string $disposition Disposition to use
+ *
+ * @throws Exception
+ *
+ * @return bool
+ */
+ public function addAttachment($path, $name = '', $encoding = self::ENCODING_BASE64, $type = '', $disposition = 'attachment')
+ {
+ }
+ /**
+ * Return the array of attachments.
+ *
+ * @return array
+ */
+ public function getAttachments()
+ {
+ }
+ /**
+ * Attach all file, string, and binary attachments to the message.
+ * Returns an empty string on failure.
+ *
+ * @param string $disposition_type
+ * @param string $boundary
+ *
+ * @throws Exception
+ *
+ * @return string
+ */
+ protected function attachAll($disposition_type, $boundary)
+ {
+ }
+ /**
+ * Encode a file attachment in requested format.
+ * Returns an empty string on failure.
+ *
+ * @param string $path The full path to the file
+ * @param string $encoding The encoding to use; one of 'base64', '7bit', '8bit', 'binary', 'quoted-printable'
+ *
+ * @return string
+ */
+ protected function encodeFile($path, $encoding = self::ENCODING_BASE64)
+ {
+ }
+ /**
+ * Encode a string in requested format.
+ * Returns an empty string on failure.
+ *
+ * @param string $str The text to encode
+ * @param string $encoding The encoding to use; one of 'base64', '7bit', '8bit', 'binary', 'quoted-printable'
+ *
+ * @throws Exception
+ *
+ * @return string
+ */
+ public function encodeString($str, $encoding = self::ENCODING_BASE64)
+ {
+ }
+ /**
+ * Encode a header value (not including its label) optimally.
+ * Picks shortest of Q, B, or none. Result includes folding if needed.
+ * See RFC822 definitions for phrase, comment and text positions.
+ *
+ * @param string $str The header value to encode
+ * @param string $position What context the string will be used in
+ *
+ * @return string
+ */
+ public function encodeHeader($str, $position = 'text')
+ {
+ }
+ /**
+ * Check if a string contains multi-byte characters.
+ *
+ * @param string $str multi-byte text to wrap encode
+ *
+ * @return bool
+ */
+ public function hasMultiBytes($str)
+ {
+ }
+ /**
+ * Does a string contain any 8-bit chars (in any charset)?
+ *
+ * @param string $text
+ *
+ * @return bool
+ */
+ public function has8bitChars($text)
+ {
+ }
+ /**
+ * Encode and wrap long multibyte strings for mail headers
+ * without breaking lines within a character.
+ * Adapted from a function by paravoid.
+ *
+ * @see http://www.php.net/manual/en/function.mb-encode-mimeheader.php#60283
+ *
+ * @param string $str multi-byte text to wrap encode
+ * @param string $linebreak string to use as linefeed/end-of-line
+ *
+ * @return string
+ */
+ public function base64EncodeWrapMB($str, $linebreak = null)
+ {
+ }
+ /**
+ * Encode a string in quoted-printable format.
+ * According to RFC2045 section 6.7.
+ *
+ * @param string $string The text to encode
+ *
+ * @return string
+ */
+ public function encodeQP($string)
+ {
+ }
+ /**
+ * Encode a string using Q encoding.
+ *
+ * @see http://tools.ietf.org/html/rfc2047#section-4.2
+ *
+ * @param string $str the text to encode
+ * @param string $position Where the text is going to be used, see the RFC for what that means
+ *
+ * @return string
+ */
+ public function encodeQ($str, $position = 'text')
+ {
+ }
+ /**
+ * Add a string or binary attachment (non-filesystem).
+ * This method can be used to attach ascii or binary data,
+ * such as a BLOB record from a database.
+ *
+ * @param string $string String attachment data
+ * @param string $filename Name of the attachment
+ * @param string $encoding File encoding (see $Encoding)
+ * @param string $type File extension (MIME) type
+ * @param string $disposition Disposition to use
+ *
+ * @throws Exception
+ *
+ * @return bool True on successfully adding an attachment
+ */
+ public function addStringAttachment($string, $filename, $encoding = self::ENCODING_BASE64, $type = '', $disposition = 'attachment')
+ {
+ }
+ /**
+ * Add an embedded (inline) attachment from a file.
+ * This can include images, sounds, and just about any other document type.
+ * These differ from 'regular' attachments in that they are intended to be
+ * displayed inline with the message, not just attached for download.
+ * This is used in HTML messages that embed the images
+ * the HTML refers to using the `$cid` value in `img` tags, for example ` `.
+ * Never use a user-supplied path to a file!
+ *
+ * @param string $path Path to the attachment
+ * @param string $cid Content ID of the attachment; Use this to reference
+ * the content when using an embedded image in HTML
+ * @param string $name Overrides the attachment filename
+ * @param string $encoding File encoding (see $Encoding) defaults to `base64`
+ * @param string $type File MIME type (by default mapped from the `$path` filename's extension)
+ * @param string $disposition Disposition to use: `inline` (default) or `attachment`
+ * (unlikely you want this – {@see `addAttachment()`} instead)
+ *
+ * @return bool True on successfully adding an attachment
+ * @throws Exception
+ *
+ */
+ public function addEmbeddedImage($path, $cid, $name = '', $encoding = self::ENCODING_BASE64, $type = '', $disposition = 'inline')
+ {
+ }
+ /**
+ * Add an embedded stringified attachment.
+ * This can include images, sounds, and just about any other document type.
+ * If your filename doesn't contain an extension, be sure to set the $type to an appropriate MIME type.
+ *
+ * @param string $string The attachment binary data
+ * @param string $cid Content ID of the attachment; Use this to reference
+ * the content when using an embedded image in HTML
+ * @param string $name A filename for the attachment. If this contains an extension,
+ * PHPMailer will attempt to set a MIME type for the attachment.
+ * For example 'file.jpg' would get an 'image/jpeg' MIME type.
+ * @param string $encoding File encoding (see $Encoding), defaults to 'base64'
+ * @param string $type MIME type - will be used in preference to any automatically derived type
+ * @param string $disposition Disposition to use
+ *
+ * @throws Exception
+ *
+ * @return bool True on successfully adding an attachment
+ */
+ public function addStringEmbeddedImage($string, $cid, $name = '', $encoding = self::ENCODING_BASE64, $type = '', $disposition = 'inline')
+ {
+ }
+ /**
+ * Validate encodings.
+ *
+ * @param string $encoding
+ *
+ * @return bool
+ */
+ protected function validateEncoding($encoding)
+ {
+ }
+ /**
+ * Check if an embedded attachment is present with this cid.
+ *
+ * @param string $cid
+ *
+ * @return bool
+ */
+ protected function cidExists($cid)
+ {
+ }
+ /**
+ * Check if an inline attachment is present.
+ *
+ * @return bool
+ */
+ public function inlineImageExists()
+ {
+ }
+ /**
+ * Check if an attachment (non-inline) is present.
+ *
+ * @return bool
+ */
+ public function attachmentExists()
+ {
+ }
+ /**
+ * Check if this message has an alternative body set.
+ *
+ * @return bool
+ */
+ public function alternativeExists()
+ {
+ }
+ /**
+ * Clear queued addresses of given kind.
+ *
+ * @param string $kind 'to', 'cc', or 'bcc'
+ */
+ public function clearQueuedAddresses($kind)
+ {
+ }
+ /**
+ * Clear all To recipients.
+ */
+ public function clearAddresses()
+ {
+ }
+ /**
+ * Clear all CC recipients.
+ */
+ public function clearCCs()
+ {
+ }
+ /**
+ * Clear all BCC recipients.
+ */
+ public function clearBCCs()
+ {
+ }
+ /**
+ * Clear all ReplyTo recipients.
+ */
+ public function clearReplyTos()
+ {
+ }
+ /**
+ * Clear all recipient types.
+ */
+ public function clearAllRecipients()
+ {
+ }
+ /**
+ * Clear all filesystem, string, and binary attachments.
+ */
+ public function clearAttachments()
+ {
+ }
+ /**
+ * Clear all custom headers.
+ */
+ public function clearCustomHeaders()
+ {
+ }
+ /**
+ * Add an error message to the error container.
+ *
+ * @param string $msg
+ */
+ protected function setError($msg)
+ {
+ }
+ /**
+ * Return an RFC 822 formatted date.
+ *
+ * @return string
+ */
+ public static function rfcDate()
+ {
+ }
+ /**
+ * Get the server hostname.
+ * Returns 'localhost.localdomain' if unknown.
+ *
+ * @return string
+ */
+ protected function serverHostname()
+ {
+ }
+ /**
+ * Validate whether a string contains a valid value to use as a hostname or IP address.
+ * IPv6 addresses must include [], e.g. `[::1]`, not just `::1`.
+ *
+ * @param string $host The host name or IP address to check
+ *
+ * @return bool
+ */
+ public static function isValidHost($host)
+ {
+ }
+ /**
+ * Get an error message in the current language.
+ *
+ * @param string $key
+ *
+ * @return string
+ */
+ protected function lang($key)
+ {
+ }
+ /**
+ * Check if an error occurred.
+ *
+ * @return bool True if an error did occur
+ */
+ public function isError()
+ {
+ }
+ /**
+ * Add a custom header.
+ * $name value can be overloaded to contain
+ * both header name and value (name:value).
+ *
+ * @param string $name Custom header name
+ * @param string|null $value Header value
+ *
+ * @throws Exception
+ */
+ public function addCustomHeader($name, $value = null)
+ {
+ }
+ /**
+ * Returns all custom headers.
+ *
+ * @return array
+ */
+ public function getCustomHeaders()
+ {
+ }
+ /**
+ * Create a message body from an HTML string.
+ * Automatically inlines images and creates a plain-text version by converting the HTML,
+ * overwriting any existing values in Body and AltBody.
+ * Do not source $message content from user input!
+ * $basedir is prepended when handling relative URLs, e.g. and must not be empty
+ * will look for an image file in $basedir/images/a.png and convert it to inline.
+ * If you don't provide a $basedir, relative paths will be left untouched (and thus probably break in email)
+ * Converts data-uri images into embedded attachments.
+ * If you don't want to apply these transformations to your HTML, just set Body and AltBody directly.
+ *
+ * @param string $message HTML message string
+ * @param string $basedir Absolute path to a base directory to prepend to relative paths to images
+ * @param bool|callable $advanced Whether to use the internal HTML to text converter
+ * or your own custom converter
+ * @return string The transformed message body
+ *
+ * @throws Exception
+ *
+ * @see PHPMailer::html2text()
+ */
+ public function msgHTML($message, $basedir = '', $advanced = false)
+ {
+ }
+ /**
+ * Convert an HTML string into plain text.
+ * This is used by msgHTML().
+ * Note - older versions of this function used a bundled advanced converter
+ * which was removed for license reasons in #232.
+ * Example usage:
+ *
+ * ```php
+ * //Use default conversion
+ * $plain = $mail->html2text($html);
+ * //Use your own custom converter
+ * $plain = $mail->html2text($html, function($html) {
+ * $converter = new MyHtml2text($html);
+ * return $converter->get_text();
+ * });
+ * ```
+ *
+ * @param string $html The HTML text to convert
+ * @param bool|callable $advanced Any boolean value to use the internal converter,
+ * or provide your own callable for custom conversion.
+ * *Never* pass user-supplied data into this parameter
+ *
+ * @return string
+ */
+ public function html2text($html, $advanced = false)
+ {
+ }
+ /**
+ * Get the MIME type for a file extension.
+ *
+ * @param string $ext File extension
+ *
+ * @return string MIME type of file
+ */
+ public static function _mime_types($ext = '')
+ {
+ }
+ /**
+ * Map a file name to a MIME type.
+ * Defaults to 'application/octet-stream', i.e.. arbitrary binary data.
+ *
+ * @param string $filename A file name or full path, does not need to exist as a file
+ *
+ * @return string
+ */
+ public static function filenameToType($filename)
+ {
+ }
+ /**
+ * Multi-byte-safe pathinfo replacement.
+ * Drop-in replacement for pathinfo(), but multibyte- and cross-platform-safe.
+ *
+ * @see http://www.php.net/manual/en/function.pathinfo.php#107461
+ *
+ * @param string $path A filename or path, does not need to exist as a file
+ * @param int|string $options Either a PATHINFO_* constant,
+ * or a string name to return only the specified piece
+ *
+ * @return string|array
+ */
+ public static function mb_pathinfo($path, $options = null)
+ {
+ }
+ /**
+ * Set or reset instance properties.
+ * You should avoid this function - it's more verbose, less efficient, more error-prone and
+ * harder to debug than setting properties directly.
+ * Usage Example:
+ * `$mail->set('SMTPSecure', static::ENCRYPTION_STARTTLS);`
+ * is the same as:
+ * `$mail->SMTPSecure = static::ENCRYPTION_STARTTLS;`.
+ *
+ * @param string $name The property name to set
+ * @param mixed $value The value to set the property to
+ *
+ * @return bool
+ */
+ public function set($name, $value = '')
+ {
+ }
+ /**
+ * Strip newlines to prevent header injection.
+ *
+ * @param string $str
+ *
+ * @return string
+ */
+ public function secureHeader($str)
+ {
+ }
+ /**
+ * Normalize line breaks in a string.
+ * Converts UNIX LF, Mac CR and Windows CRLF line breaks into a single line break format.
+ * Defaults to CRLF (for message bodies) and preserves consecutive breaks.
+ *
+ * @param string $text
+ * @param string $breaktype What kind of line break to use; defaults to static::$LE
+ *
+ * @return string
+ */
+ public static function normalizeBreaks($text, $breaktype = null)
+ {
+ }
+ /**
+ * Remove trailing breaks from a string.
+ *
+ * @param string $text
+ *
+ * @return string The text to remove breaks from
+ */
+ public static function stripTrailingWSP($text)
+ {
+ }
+ /**
+ * Return the current line break format string.
+ *
+ * @return string
+ */
+ public static function getLE()
+ {
+ }
+ /**
+ * Set the line break format string, e.g. "\r\n".
+ *
+ * @param string $le
+ */
+ protected static function setLE($le)
+ {
+ }
+ /**
+ * Set the public and private key files and password for S/MIME signing.
+ *
+ * @param string $cert_filename
+ * @param string $key_filename
+ * @param string $key_pass Password for private key
+ * @param string $extracerts_filename Optional path to chain certificate
+ */
+ public function sign($cert_filename, $key_filename, $key_pass, $extracerts_filename = '')
+ {
+ }
+ /**
+ * Quoted-Printable-encode a DKIM header.
+ *
+ * @param string $txt
+ *
+ * @return string
+ */
+ public function DKIM_QP($txt)
+ {
+ }
+ /**
+ * Generate a DKIM signature.
+ *
+ * @param string $signHeader
+ *
+ * @throws Exception
+ *
+ * @return string The DKIM signature value
+ */
+ public function DKIM_Sign($signHeader)
+ {
+ }
+ /**
+ * Generate a DKIM canonicalization header.
+ * Uses the 'relaxed' algorithm from RFC6376 section 3.4.2.
+ * Canonicalized headers should *always* use CRLF, regardless of mailer setting.
+ *
+ * @see https://tools.ietf.org/html/rfc6376#section-3.4.2
+ *
+ * @param string $signHeader Header
+ *
+ * @return string
+ */
+ public function DKIM_HeaderC($signHeader)
+ {
+ }
+ /**
+ * Generate a DKIM canonicalization body.
+ * Uses the 'simple' algorithm from RFC6376 section 3.4.3.
+ * Canonicalized bodies should *always* use CRLF, regardless of mailer setting.
+ *
+ * @see https://tools.ietf.org/html/rfc6376#section-3.4.3
+ *
+ * @param string $body Message Body
+ *
+ * @return string
+ */
+ public function DKIM_BodyC($body)
+ {
+ }
+ /**
+ * Create the DKIM header and body in a new message header.
+ *
+ * @param string $headers_line Header lines
+ * @param string $subject Subject
+ * @param string $body Body
+ *
+ * @throws Exception
+ *
+ * @return string
+ */
+ public function DKIM_Add($headers_line, $subject, $body)
+ {
+ }
+ /**
+ * Detect if a string contains a line longer than the maximum line length
+ * allowed by RFC 2822 section 2.1.1.
+ *
+ * @param string $str
+ *
+ * @return bool
+ */
+ public static function hasLineLongerThanMax($str)
+ {
+ }
+ /**
+ * If a string contains any "special" characters, double-quote the name,
+ * and escape any double quotes with a backslash.
+ *
+ * @param string $str
+ *
+ * @return string
+ *
+ * @see RFC822 3.4.1
+ */
+ public static function quotedString($str)
+ {
+ }
+ /**
+ * Allows for public read access to 'to' property.
+ * Before the send() call, queued addresses (i.e. with IDN) are not yet included.
+ *
+ * @return array
+ */
+ public function getToAddresses()
+ {
+ }
+ /**
+ * Allows for public read access to 'cc' property.
+ * Before the send() call, queued addresses (i.e. with IDN) are not yet included.
+ *
+ * @return array
+ */
+ public function getCcAddresses()
+ {
+ }
+ /**
+ * Allows for public read access to 'bcc' property.
+ * Before the send() call, queued addresses (i.e. with IDN) are not yet included.
+ *
+ * @return array
+ */
+ public function getBccAddresses()
+ {
+ }
+ /**
+ * Allows for public read access to 'ReplyTo' property.
+ * Before the send() call, queued addresses (i.e. with IDN) are not yet included.
+ *
+ * @return array
+ */
+ public function getReplyToAddresses()
+ {
+ }
+ /**
+ * Allows for public read access to 'all_recipients' property.
+ * Before the send() call, queued addresses (i.e. with IDN) are not yet included.
+ *
+ * @return array
+ */
+ public function getAllRecipientAddresses()
+ {
+ }
+ /**
+ * Perform a callback.
+ *
+ * @param bool $isSent
+ * @param array $to
+ * @param array $cc
+ * @param array $bcc
+ * @param string $subject
+ * @param string $body
+ * @param string $from
+ * @param array $extra
+ */
+ protected function doCallback($isSent, $to, $cc, $bcc, $subject, $body, $from, $extra)
+ {
+ }
+ /**
+ * Get the OAuthTokenProvider instance.
+ *
+ * @return OAuthTokenProvider
+ */
+ public function getOAuth()
+ {
+ }
+ /**
+ * Set an OAuthTokenProvider instance.
+ */
+ public function setOAuth(\PHPMailer\PHPMailer\OAuthTokenProvider $oauth)
+ {
+ }
+ }
+ /**
+ * PHPMailer RFC821 SMTP email transport class.
+ * Implements RFC 821 SMTP commands and provides some utility methods for sending mail to an SMTP server.
+ *
+ * @author Chris Ryan
+ * @author Marcus Bointon
+ */
+ class SMTP
+ {
+ /**
+ * The PHPMailer SMTP version number.
+ *
+ * @var string
+ */
+ const VERSION = '6.6.5';
+ /**
+ * SMTP line break constant.
+ *
+ * @var string
+ */
+ const LE = "\r\n";
+ /**
+ * The SMTP port to use if one is not specified.
+ *
+ * @var int
+ */
+ const DEFAULT_PORT = 25;
+ /**
+ * The maximum line length allowed by RFC 5321 section 4.5.3.1.6,
+ * *excluding* a trailing CRLF break.
+ *
+ * @see https://tools.ietf.org/html/rfc5321#section-4.5.3.1.6
+ *
+ * @var int
+ */
+ const MAX_LINE_LENGTH = 998;
+ /**
+ * The maximum line length allowed for replies in RFC 5321 section 4.5.3.1.5,
+ * *including* a trailing CRLF line break.
+ *
+ * @see https://tools.ietf.org/html/rfc5321#section-4.5.3.1.5
+ *
+ * @var int
+ */
+ const MAX_REPLY_LENGTH = 512;
+ /**
+ * Debug level for no output.
+ *
+ * @var int
+ */
+ const DEBUG_OFF = 0;
+ /**
+ * Debug level to show client -> server messages.
+ *
+ * @var int
+ */
+ const DEBUG_CLIENT = 1;
+ /**
+ * Debug level to show client -> server and server -> client messages.
+ *
+ * @var int
+ */
+ const DEBUG_SERVER = 2;
+ /**
+ * Debug level to show connection status, client -> server and server -> client messages.
+ *
+ * @var int
+ */
+ const DEBUG_CONNECTION = 3;
+ /**
+ * Debug level to show all messages.
+ *
+ * @var int
+ */
+ const DEBUG_LOWLEVEL = 4;
+ /**
+ * Debug output level.
+ * Options:
+ * * self::DEBUG_OFF (`0`) No debug output, default
+ * * self::DEBUG_CLIENT (`1`) Client commands
+ * * self::DEBUG_SERVER (`2`) Client commands and server responses
+ * * self::DEBUG_CONNECTION (`3`) As DEBUG_SERVER plus connection status
+ * * self::DEBUG_LOWLEVEL (`4`) Low-level data output, all messages.
+ *
+ * @var int
+ */
+ public $do_debug = self::DEBUG_OFF;
+ /**
+ * How to handle debug output.
+ * Options:
+ * * `echo` Output plain-text as-is, appropriate for CLI
+ * * `html` Output escaped, line breaks converted to ` `, appropriate for browser output
+ * * `error_log` Output to error log as configured in php.ini
+ * Alternatively, you can provide a callable expecting two params: a message string and the debug level:
+ *
+ * ```php
+ * $smtp->Debugoutput = function($str, $level) {echo "debug level $level; message: $str";};
+ * ```
+ *
+ * Alternatively, you can pass in an instance of a PSR-3 compatible logger, though only `debug`
+ * level output is used:
+ *
+ * ```php
+ * $mail->Debugoutput = new myPsr3Logger;
+ * ```
+ *
+ * @var string|callable|\Psr\Log\LoggerInterface
+ */
+ public $Debugoutput = 'echo';
+ /**
+ * Whether to use VERP.
+ *
+ * @see http://en.wikipedia.org/wiki/Variable_envelope_return_path
+ * @see http://www.postfix.org/VERP_README.html Info on VERP
+ *
+ * @var bool
+ */
+ public $do_verp = false;
+ /**
+ * The timeout value for connection, in seconds.
+ * Default of 5 minutes (300sec) is from RFC2821 section 4.5.3.2.
+ * This needs to be quite high to function correctly with hosts using greetdelay as an anti-spam measure.
+ *
+ * @see http://tools.ietf.org/html/rfc2821#section-4.5.3.2
+ *
+ * @var int
+ */
+ public $Timeout = 300;
+ /**
+ * How long to wait for commands to complete, in seconds.
+ * Default of 5 minutes (300sec) is from RFC2821 section 4.5.3.2.
+ *
+ * @var int
+ */
+ public $Timelimit = 300;
+ /**
+ * Patterns to extract an SMTP transaction id from reply to a DATA command.
+ * The first capture group in each regex will be used as the ID.
+ * MS ESMTP returns the message ID, which may not be correct for internal tracking.
+ *
+ * @var string[]
+ */
+ protected $smtp_transaction_id_patterns = ['exim' => '/[\\d]{3} OK id=(.*)/', 'sendmail' => '/[\\d]{3} 2.0.0 (.*) Message/', 'postfix' => '/[\\d]{3} 2.0.0 Ok: queued as (.*)/', 'Microsoft_ESMTP' => '/[0-9]{3} 2.[\\d].0 (.*)@(?:.*) Queued mail for delivery/', 'Amazon_SES' => '/[\\d]{3} Ok (.*)/', 'SendGrid' => '/[\\d]{3} Ok: queued as (.*)/', 'CampaignMonitor' => '/[\\d]{3} 2.0.0 OK:([a-zA-Z\\d]{48})/', 'Haraka' => '/[\\d]{3} Message Queued \\((.*)\\)/', 'Mailjet' => '/[\\d]{3} OK queued as (.*)/'];
+ /**
+ * The last transaction ID issued in response to a DATA command,
+ * if one was detected.
+ *
+ * @var string|bool|null
+ */
+ protected $last_smtp_transaction_id;
+ /**
+ * The socket for the server connection.
+ *
+ * @var ?resource
+ */
+ protected $smtp_conn;
+ /**
+ * Error information, if any, for the last SMTP command.
+ *
+ * @var array
+ */
+ protected $error = ['error' => '', 'detail' => '', 'smtp_code' => '', 'smtp_code_ex' => ''];
+ /**
+ * The reply the server sent to us for HELO.
+ * If null, no HELO string has yet been received.
+ *
+ * @var string|null
+ */
+ protected $helo_rply;
+ /**
+ * The set of SMTP extensions sent in reply to EHLO command.
+ * Indexes of the array are extension names.
+ * Value at index 'HELO' or 'EHLO' (according to command that was sent)
+ * represents the server name. In case of HELO it is the only element of the array.
+ * Other values can be boolean TRUE or an array containing extension options.
+ * If null, no HELO/EHLO string has yet been received.
+ *
+ * @var array|null
+ */
+ protected $server_caps;
+ /**
+ * The most recent reply received from the server.
+ *
+ * @var string
+ */
+ protected $last_reply = '';
+ /**
+ * Output debugging info via a user-selected method.
+ *
+ * @param string $str Debug string to output
+ * @param int $level The debug level of this message; see DEBUG_* constants
+ *
+ * @see SMTP::$Debugoutput
+ * @see SMTP::$do_debug
+ */
+ protected function edebug($str, $level = 0)
+ {
+ }
+ /**
+ * Connect to an SMTP server.
+ *
+ * @param string $host SMTP server IP or host name
+ * @param int $port The port number to connect to
+ * @param int $timeout How long to wait for the connection to open
+ * @param array $options An array of options for stream_context_create()
+ *
+ * @return bool
+ */
+ public function connect($host, $port = null, $timeout = 30, $options = [])
+ {
+ }
+ /**
+ * Create connection to the SMTP server.
+ *
+ * @param string $host SMTP server IP or host name
+ * @param int $port The port number to connect to
+ * @param int $timeout How long to wait for the connection to open
+ * @param array $options An array of options for stream_context_create()
+ *
+ * @return false|resource
+ */
+ protected function getSMTPConnection($host, $port = null, $timeout = 30, $options = [])
+ {
+ }
+ /**
+ * Initiate a TLS (encrypted) session.
+ *
+ * @return bool
+ */
+ public function startTLS()
+ {
+ }
+ /**
+ * Perform SMTP authentication.
+ * Must be run after hello().
+ *
+ * @see hello()
+ *
+ * @param string $username The user name
+ * @param string $password The password
+ * @param string $authtype The auth type (CRAM-MD5, PLAIN, LOGIN, XOAUTH2)
+ * @param OAuthTokenProvider $OAuth An optional OAuthTokenProvider instance for XOAUTH2 authentication
+ *
+ * @return bool True if successfully authenticated
+ */
+ public function authenticate($username, $password, $authtype = null, $OAuth = null)
+ {
+ }
+ /**
+ * Calculate an MD5 HMAC hash.
+ * Works like hash_hmac('md5', $data, $key)
+ * in case that function is not available.
+ *
+ * @param string $data The data to hash
+ * @param string $key The key to hash with
+ *
+ * @return string
+ */
+ protected function hmac($data, $key)
+ {
+ }
+ /**
+ * Check connection state.
+ *
+ * @return bool True if connected
+ */
+ public function connected()
+ {
+ }
+ /**
+ * Close the socket and clean up the state of the class.
+ * Don't use this function without first trying to use QUIT.
+ *
+ * @see quit()
+ */
+ public function close()
+ {
+ }
+ /**
+ * Send an SMTP DATA command.
+ * Issues a data command and sends the msg_data to the server,
+ * finalizing the mail transaction. $msg_data is the message
+ * that is to be send with the headers. Each header needs to be
+ * on a single line followed by a with the message headers
+ * and the message body being separated by an additional .
+ * Implements RFC 821: DATA .
+ *
+ * @param string $msg_data Message data to send
+ *
+ * @return bool
+ */
+ public function data($msg_data)
+ {
+ }
+ /**
+ * Send an SMTP HELO or EHLO command.
+ * Used to identify the sending server to the receiving server.
+ * This makes sure that client and server are in a known state.
+ * Implements RFC 821: HELO
+ * and RFC 2821 EHLO.
+ *
+ * @param string $host The host name or IP to connect to
+ *
+ * @return bool
+ */
+ public function hello($host = '')
+ {
+ }
+ /**
+ * Send an SMTP HELO or EHLO command.
+ * Low-level implementation used by hello().
+ *
+ * @param string $hello The HELO string
+ * @param string $host The hostname to say we are
+ *
+ * @return bool
+ *
+ * @see hello()
+ */
+ protected function sendHello($hello, $host)
+ {
+ }
+ /**
+ * Parse a reply to HELO/EHLO command to discover server extensions.
+ * In case of HELO, the only parameter that can be discovered is a server name.
+ *
+ * @param string $type `HELO` or `EHLO`
+ */
+ protected function parseHelloFields($type)
+ {
+ }
+ /**
+ * Send an SMTP MAIL command.
+ * Starts a mail transaction from the email address specified in
+ * $from. Returns true if successful or false otherwise. If True
+ * the mail transaction is started and then one or more recipient
+ * commands may be called followed by a data command.
+ * Implements RFC 821: MAIL FROM: .
+ *
+ * @param string $from Source address of this message
+ *
+ * @return bool
+ */
+ public function mail($from)
+ {
+ }
+ /**
+ * Send an SMTP QUIT command.
+ * Closes the socket if there is no error or the $close_on_error argument is true.
+ * Implements from RFC 821: QUIT .
+ *
+ * @param bool $close_on_error Should the connection close if an error occurs?
+ *
+ * @return bool
+ */
+ public function quit($close_on_error = true)
+ {
+ }
+ /**
+ * Send an SMTP RCPT command.
+ * Sets the TO argument to $toaddr.
+ * Returns true if the recipient was accepted false if it was rejected.
+ * Implements from RFC 821: RCPT TO: .
+ *
+ * @param string $address The address the message is being sent to
+ * @param string $dsn Comma separated list of DSN notifications. NEVER, SUCCESS, FAILURE
+ * or DELAY. If you specify NEVER all other notifications are ignored.
+ *
+ * @return bool
+ */
+ public function recipient($address, $dsn = '')
+ {
+ }
+ /**
+ * Send an SMTP RSET command.
+ * Abort any transaction that is currently in progress.
+ * Implements RFC 821: RSET .
+ *
+ * @return bool True on success
+ */
+ public function reset()
+ {
+ }
+ /**
+ * Send a command to an SMTP server and check its return code.
+ *
+ * @param string $command The command name - not sent to the server
+ * @param string $commandstring The actual command to send
+ * @param int|array $expect One or more expected integer success codes
+ *
+ * @return bool True on success
+ */
+ protected function sendCommand($command, $commandstring, $expect)
+ {
+ }
+ /**
+ * Send an SMTP SAML command.
+ * Starts a mail transaction from the email address specified in $from.
+ * Returns true if successful or false otherwise. If True
+ * the mail transaction is started and then one or more recipient
+ * commands may be called followed by a data command. This command
+ * will send the message to the users terminal if they are logged
+ * in and send them an email.
+ * Implements RFC 821: SAML FROM: .
+ *
+ * @param string $from The address the message is from
+ *
+ * @return bool
+ */
+ public function sendAndMail($from)
+ {
+ }
+ /**
+ * Send an SMTP VRFY command.
+ *
+ * @param string $name The name to verify
+ *
+ * @return bool
+ */
+ public function verify($name)
+ {
+ }
+ /**
+ * Send an SMTP NOOP command.
+ * Used to keep keep-alives alive, doesn't actually do anything.
+ *
+ * @return bool
+ */
+ public function noop()
+ {
+ }
+ /**
+ * Send an SMTP TURN command.
+ * This is an optional command for SMTP that this class does not support.
+ * This method is here to make the RFC821 Definition complete for this class
+ * and _may_ be implemented in future.
+ * Implements from RFC 821: TURN .
+ *
+ * @return bool
+ */
+ public function turn()
+ {
+ }
+ /**
+ * Send raw data to the server.
+ *
+ * @param string $data The data to send
+ * @param string $command Optionally, the command this is part of, used only for controlling debug output
+ *
+ * @return int|bool The number of bytes sent to the server or false on error
+ */
+ public function client_send($data, $command = '')
+ {
+ }
+ /**
+ * Get the latest error.
+ *
+ * @return array
+ */
+ public function getError()
+ {
+ }
+ /**
+ * Get SMTP extensions available on the server.
+ *
+ * @return array|null
+ */
+ public function getServerExtList()
+ {
+ }
+ /**
+ * Get metadata about the SMTP server from its HELO/EHLO response.
+ * The method works in three ways, dependent on argument value and current state:
+ * 1. HELO/EHLO has not been sent - returns null and populates $this->error.
+ * 2. HELO has been sent -
+ * $name == 'HELO': returns server name
+ * $name == 'EHLO': returns boolean false
+ * $name == any other string: returns null and populates $this->error
+ * 3. EHLO has been sent -
+ * $name == 'HELO'|'EHLO': returns the server name
+ * $name == any other string: if extension $name exists, returns True
+ * or its options (e.g. AUTH mechanisms supported). Otherwise returns False.
+ *
+ * @param string $name Name of SMTP extension or 'HELO'|'EHLO'
+ *
+ * @return string|bool|null
+ */
+ public function getServerExt($name)
+ {
+ }
+ /**
+ * Get the last reply from the server.
+ *
+ * @return string
+ */
+ public function getLastReply()
+ {
+ }
+ /**
+ * Read the SMTP server's response.
+ * Either before eof or socket timeout occurs on the operation.
+ * With SMTP we can tell if we have more lines to read if the
+ * 4th character is '-' symbol. If it is a space then we don't
+ * need to read anything else.
+ *
+ * @return string
+ */
+ protected function get_lines()
+ {
+ }
+ /**
+ * Enable or disable VERP address generation.
+ *
+ * @param bool $enabled
+ */
+ public function setVerp($enabled = false)
+ {
+ }
+ /**
+ * Get VERP address generation mode.
+ *
+ * @return bool
+ */
+ public function getVerp()
+ {
+ }
+ /**
+ * Set error messages and codes.
+ *
+ * @param string $message The error message
+ * @param string $detail Further detail on the error
+ * @param string $smtp_code An associated SMTP error code
+ * @param string $smtp_code_ex Extended SMTP code
+ */
+ protected function setError($message, $detail = '', $smtp_code = '', $smtp_code_ex = '')
+ {
+ }
+ /**
+ * Set debug output method.
+ *
+ * @param string|callable $method The name of the mechanism to use for debugging output, or a callable to handle it
+ */
+ public function setDebugOutput($method = 'echo')
+ {
+ }
+ /**
+ * Get debug output method.
+ *
+ * @return string
+ */
+ public function getDebugOutput()
+ {
+ }
+ /**
+ * Set debug output level.
+ *
+ * @param int $level
+ */
+ public function setDebugLevel($level = 0)
+ {
+ }
+ /**
+ * Get debug output level.
+ *
+ * @return int
+ */
+ public function getDebugLevel()
+ {
+ }
+ /**
+ * Set SMTP timeout.
+ *
+ * @param int $timeout The timeout duration in seconds
+ */
+ public function setTimeout($timeout = 0)
+ {
+ }
+ /**
+ * Get SMTP timeout.
+ *
+ * @return int
+ */
+ public function getTimeout()
+ {
+ }
+ /**
+ * Reports an error number and string.
+ *
+ * @param int $errno The error number returned by PHP
+ * @param string $errmsg The error message returned by PHP
+ * @param string $errfile The file the error occurred in
+ * @param int $errline The line number the error occurred on
+ */
+ protected function errorHandler($errno, $errmsg, $errfile = '', $errline = 0)
+ {
+ }
+ /**
+ * Extract and return the ID of the last SMTP transaction based on
+ * a list of patterns provided in SMTP::$smtp_transaction_id_patterns.
+ * Relies on the host providing the ID in response to a DATA command.
+ * If no reply has been received yet, it will return null.
+ * If no pattern was matched, it will return false.
+ *
+ * @return bool|string|null
+ */
+ protected function recordLastTransactionID()
+ {
+ }
+ /**
+ * Get the queue/transaction ID of the last SMTP transaction
+ * If no reply has been received yet, it will return null.
+ * If no pattern was matched, it will return false.
+ *
+ * @return bool|string|null
+ *
+ * @see recordLastTransactionID()
+ */
+ public function getLastTransactionID()
+ {
+ }
+ }
+}
+namespace {
+ /**
+ * Authentication provider interface
+ *
+ * @package Requests
+ * @subpackage Authentication
+ */
+ /**
+ * Authentication provider interface
+ *
+ * Implement this interface to act as an authentication provider.
+ *
+ * Parameters should be passed via the constructor where possible, as this
+ * makes it much easier for users to use your provider.
+ *
+ * @see Requests_Hooks
+ * @package Requests
+ * @subpackage Authentication
+ */
+ interface Requests_Auth
+ {
+ /**
+ * Register hooks as needed
+ *
+ * This method is called in {@see Requests::request} when the user has set
+ * an instance as the 'auth' option. Use this callback to register all the
+ * hooks you'll need.
+ *
+ * @see Requests_Hooks::register
+ * @param Requests_Hooks $hooks Hook system
+ */
+ public function register(\Requests_Hooks $hooks);
+ }
+ /**
+ * Basic Authentication provider
+ *
+ * @package Requests
+ * @subpackage Authentication
+ */
+ /**
+ * Basic Authentication provider
+ *
+ * Provides a handler for Basic HTTP authentication via the Authorization
+ * header.
+ *
+ * @package Requests
+ * @subpackage Authentication
+ */
+ class Requests_Auth_Basic implements \Requests_Auth
+ {
+ /**
+ * Username
+ *
+ * @var string
+ */
+ public $user;
+ /**
+ * Password
+ *
+ * @var string
+ */
+ public $pass;
+ /**
+ * Constructor
+ *
+ * @throws Requests_Exception On incorrect number of arguments (`authbasicbadargs`)
+ * @param array|null $args Array of user and password. Must have exactly two elements
+ */
+ public function __construct($args = \null)
+ {
+ }
+ /**
+ * Register the necessary callbacks
+ *
+ * @see curl_before_send
+ * @see fsockopen_header
+ * @param Requests_Hooks $hooks Hook system
+ */
+ public function register(\Requests_Hooks $hooks)
+ {
+ }
+ /**
+ * Set cURL parameters before the data is sent
+ *
+ * @param resource $handle cURL resource
+ */
+ public function curl_before_send(&$handle)
+ {
+ }
+ /**
+ * Add extra headers to the request before sending
+ *
+ * @param string $out HTTP header string
+ */
+ public function fsockopen_header(&$out)
+ {
+ }
+ /**
+ * Get the authentication string (user:pass)
+ *
+ * @return string
+ */
+ public function getAuthString()
+ {
+ }
+ }
+ /**
+ * Cookie storage object
+ *
+ * @package Requests
+ * @subpackage Cookies
+ */
+ /**
+ * Cookie storage object
+ *
+ * @package Requests
+ * @subpackage Cookies
+ */
+ class Requests_Cookie
+ {
+ /**
+ * Cookie name.
+ *
+ * @var string
+ */
+ public $name;
+ /**
+ * Cookie value.
+ *
+ * @var string
+ */
+ public $value;
+ /**
+ * Cookie attributes
+ *
+ * Valid keys are (currently) path, domain, expires, max-age, secure and
+ * httponly.
+ *
+ * @var Requests_Utility_CaseInsensitiveDictionary|array Array-like object
+ */
+ public $attributes = array();
+ /**
+ * Cookie flags
+ *
+ * Valid keys are (currently) creation, last-access, persistent and
+ * host-only.
+ *
+ * @var array
+ */
+ public $flags = array();
+ /**
+ * Reference time for relative calculations
+ *
+ * This is used in place of `time()` when calculating Max-Age expiration and
+ * checking time validity.
+ *
+ * @var int
+ */
+ public $reference_time = 0;
+ /**
+ * Create a new cookie object
+ *
+ * @param string $name
+ * @param string $value
+ * @param array|Requests_Utility_CaseInsensitiveDictionary $attributes Associative array of attribute data
+ */
+ public function __construct($name, $value, $attributes = array(), $flags = array(), $reference_time = \null)
+ {
+ }
+ /**
+ * Check if a cookie is expired.
+ *
+ * Checks the age against $this->reference_time to determine if the cookie
+ * is expired.
+ *
+ * @return boolean True if expired, false if time is valid.
+ */
+ public function is_expired()
+ {
+ }
+ /**
+ * Check if a cookie is valid for a given URI
+ *
+ * @param Requests_IRI $uri URI to check
+ * @return boolean Whether the cookie is valid for the given URI
+ */
+ public function uri_matches(\Requests_IRI $uri)
+ {
+ }
+ /**
+ * Check if a cookie is valid for a given domain
+ *
+ * @param string $string Domain to check
+ * @return boolean Whether the cookie is valid for the given domain
+ */
+ public function domain_matches($string)
+ {
+ }
+ /**
+ * Check if a cookie is valid for a given path
+ *
+ * From the path-match check in RFC 6265 section 5.1.4
+ *
+ * @param string $request_path Path to check
+ * @return boolean Whether the cookie is valid for the given path
+ */
+ public function path_matches($request_path)
+ {
+ }
+ /**
+ * Normalize cookie and attributes
+ *
+ * @return boolean Whether the cookie was successfully normalized
+ */
+ public function normalize()
+ {
+ }
+ /**
+ * Parse an individual cookie attribute
+ *
+ * Handles parsing individual attributes from the cookie values.
+ *
+ * @param string $name Attribute name
+ * @param string|boolean $value Attribute value (string value, or true if empty/flag)
+ * @return mixed Value if available, or null if the attribute value is invalid (and should be skipped)
+ */
+ protected function normalize_attribute($name, $value)
+ {
+ }
+ /**
+ * Format a cookie for a Cookie header
+ *
+ * This is used when sending cookies to a server.
+ *
+ * @return string Cookie formatted for Cookie header
+ */
+ public function format_for_header()
+ {
+ }
+ /**
+ * Format a cookie for a Cookie header
+ *
+ * @codeCoverageIgnore
+ * @deprecated Use {@see Requests_Cookie::format_for_header}
+ * @return string
+ */
+ public function formatForHeader()
+ {
+ }
+ /**
+ * Format a cookie for a Set-Cookie header
+ *
+ * This is used when sending cookies to clients. This isn't really
+ * applicable to client-side usage, but might be handy for debugging.
+ *
+ * @return string Cookie formatted for Set-Cookie header
+ */
+ public function format_for_set_cookie()
+ {
+ }
+ /**
+ * Format a cookie for a Set-Cookie header
+ *
+ * @codeCoverageIgnore
+ * @deprecated Use {@see Requests_Cookie::format_for_set_cookie}
+ * @return string
+ */
+ public function formatForSetCookie()
+ {
+ }
+ /**
+ * Get the cookie value
+ *
+ * Attributes and other data can be accessed via methods.
+ */
+ public function __toString()
+ {
+ }
+ /**
+ * Parse a cookie string into a cookie object
+ *
+ * Based on Mozilla's parsing code in Firefox and related projects, which
+ * is an intentional deviation from RFC 2109 and RFC 2616. RFC 6265
+ * specifies some of this handling, but not in a thorough manner.
+ *
+ * @param string Cookie header value (from a Set-Cookie header)
+ * @return Requests_Cookie Parsed cookie object
+ */
+ public static function parse($string, $name = '', $reference_time = \null)
+ {
+ }
+ /**
+ * Parse all Set-Cookie headers from request headers
+ *
+ * @param Requests_Response_Headers $headers Headers to parse from
+ * @param Requests_IRI|null $origin URI for comparing cookie origins
+ * @param int|null $time Reference time for expiration calculation
+ * @return array
+ */
+ public static function parse_from_headers(\Requests_Response_Headers $headers, \Requests_IRI $origin = \null, $time = \null)
+ {
+ }
+ /**
+ * Parse all Set-Cookie headers from request headers
+ *
+ * @codeCoverageIgnore
+ * @deprecated Use {@see Requests_Cookie::parse_from_headers}
+ * @return array
+ */
+ public static function parseFromHeaders(\Requests_Response_Headers $headers)
+ {
+ }
+ }
+ /**
+ * Cookie holder object
+ *
+ * @package Requests
+ * @subpackage Cookies
+ */
+ /**
+ * Cookie holder object
+ *
+ * @package Requests
+ * @subpackage Cookies
+ */
+ class Requests_Cookie_Jar implements \ArrayAccess, \IteratorAggregate
+ {
+ /**
+ * Actual item data
+ *
+ * @var array
+ */
+ protected $cookies = array();
+ /**
+ * Create a new jar
+ *
+ * @param array $cookies Existing cookie values
+ */
+ public function __construct($cookies = array())
+ {
+ }
+ /**
+ * Normalise cookie data into a Requests_Cookie
+ *
+ * @param string|Requests_Cookie $cookie
+ * @return Requests_Cookie
+ */
+ public function normalize_cookie($cookie, $key = \null)
+ {
+ }
+ /**
+ * Normalise cookie data into a Requests_Cookie
+ *
+ * @codeCoverageIgnore
+ * @deprecated Use {@see Requests_Cookie_Jar::normalize_cookie}
+ * @return Requests_Cookie
+ */
+ public function normalizeCookie($cookie, $key = \null)
+ {
+ }
+ /**
+ * Check if the given item exists
+ *
+ * @param string $key Item key
+ * @return boolean Does the item exist?
+ */
+ #[ReturnTypeWillChange]
+ public function offsetExists($key)
+ {
+ }
+ /**
+ * Get the value for the item
+ *
+ * @param string $key Item key
+ * @return string|null Item value (null if offsetExists is false)
+ */
+ #[ReturnTypeWillChange]
+ public function offsetGet($key)
+ {
+ }
+ /**
+ * Set the given item
+ *
+ * @throws Requests_Exception On attempting to use dictionary as list (`invalidset`)
+ *
+ * @param string $key Item name
+ * @param string $value Item value
+ */
+ #[ReturnTypeWillChange]
+ public function offsetSet($key, $value)
+ {
+ }
+ /**
+ * Unset the given header
+ *
+ * @param string $key
+ */
+ #[ReturnTypeWillChange]
+ public function offsetUnset($key)
+ {
+ }
+ /**
+ * Get an iterator for the data
+ *
+ * @return ArrayIterator
+ */
+ #[ReturnTypeWillChange]
+ public function getIterator()
+ {
+ }
+ /**
+ * Register the cookie handler with the request's hooking system
+ *
+ * @param Requests_Hooker $hooks Hooking system
+ */
+ public function register(\Requests_Hooker $hooks)
+ {
+ }
+ /**
+ * Add Cookie header to a request if we have any
+ *
+ * As per RFC 6265, cookies are separated by '; '
+ *
+ * @param string $url
+ * @param array $headers
+ * @param array $data
+ * @param string $type
+ * @param array $options
+ */
+ public function before_request($url, &$headers, &$data, &$type, &$options)
+ {
+ }
+ /**
+ * Parse all cookies from a response and attach them to the response
+ *
+ * @var Requests_Response $response
+ */
+ public function before_redirect_check(\Requests_Response $return)
+ {
+ }
+ }
+ /**
+ * Exception for HTTP requests
+ *
+ * @package Requests
+ */
+ /**
+ * Exception for HTTP requests
+ *
+ * @package Requests
+ */
+ class Requests_Exception extends \Exception
+ {
+ /**
+ * Type of exception
+ *
+ * @var string
+ */
+ protected $type;
+ /**
+ * Data associated with the exception
+ *
+ * @var mixed
+ */
+ protected $data;
+ /**
+ * Create a new exception
+ *
+ * @param string $message Exception message
+ * @param string $type Exception type
+ * @param mixed $data Associated data
+ * @param integer $code Exception numerical code, if applicable
+ */
+ public function __construct($message, $type, $data = \null, $code = 0)
+ {
+ }
+ /**
+ * Like {@see getCode()}, but a string code.
+ *
+ * @codeCoverageIgnore
+ * @return string
+ */
+ public function getType()
+ {
+ }
+ /**
+ * Gives any relevant data
+ *
+ * @codeCoverageIgnore
+ * @return mixed
+ */
+ public function getData()
+ {
+ }
+ }
+ /**
+ * Exception based on HTTP response
+ *
+ * @package Requests
+ */
+ /**
+ * Exception based on HTTP response
+ *
+ * @package Requests
+ */
+ class Requests_Exception_HTTP extends \Requests_Exception
+ {
+ /**
+ * HTTP status code
+ *
+ * @var integer
+ */
+ protected $code = 0;
+ /**
+ * Reason phrase
+ *
+ * @var string
+ */
+ protected $reason = 'Unknown';
+ /**
+ * Create a new exception
+ *
+ * There is no mechanism to pass in the status code, as this is set by the
+ * subclass used. Reason phrases can vary, however.
+ *
+ * @param string|null $reason Reason phrase
+ * @param mixed $data Associated data
+ */
+ public function __construct($reason = \null, $data = \null)
+ {
+ }
+ /**
+ * Get the status message
+ */
+ public function getReason()
+ {
+ }
+ /**
+ * Get the correct exception class for a given error code
+ *
+ * @param int|bool $code HTTP status code, or false if unavailable
+ * @return string Exception class name to use
+ */
+ public static function get_class($code)
+ {
+ }
+ }
+ /**
+ * Exception for 304 Not Modified responses
+ *
+ * @package Requests
+ */
+ /**
+ * Exception for 304 Not Modified responses
+ *
+ * @package Requests
+ */
+ class Requests_Exception_HTTP_304 extends \Requests_Exception_HTTP
+ {
+ /**
+ * HTTP status code
+ *
+ * @var integer
+ */
+ protected $code = 304;
+ /**
+ * Reason phrase
+ *
+ * @var string
+ */
+ protected $reason = 'Not Modified';
+ }
+ /**
+ * Exception for 305 Use Proxy responses
+ *
+ * @package Requests
+ */
+ /**
+ * Exception for 305 Use Proxy responses
+ *
+ * @package Requests
+ */
+ class Requests_Exception_HTTP_305 extends \Requests_Exception_HTTP
+ {
+ /**
+ * HTTP status code
+ *
+ * @var integer
+ */
+ protected $code = 305;
+ /**
+ * Reason phrase
+ *
+ * @var string
+ */
+ protected $reason = 'Use Proxy';
+ }
+ /**
+ * Exception for 306 Switch Proxy responses
+ *
+ * @package Requests
+ */
+ /**
+ * Exception for 306 Switch Proxy responses
+ *
+ * @package Requests
+ */
+ class Requests_Exception_HTTP_306 extends \Requests_Exception_HTTP
+ {
+ /**
+ * HTTP status code
+ *
+ * @var integer
+ */
+ protected $code = 306;
+ /**
+ * Reason phrase
+ *
+ * @var string
+ */
+ protected $reason = 'Switch Proxy';
+ }
+ /**
+ * Exception for 400 Bad Request responses
+ *
+ * @package Requests
+ */
+ /**
+ * Exception for 400 Bad Request responses
+ *
+ * @package Requests
+ */
+ class Requests_Exception_HTTP_400 extends \Requests_Exception_HTTP
+ {
+ /**
+ * HTTP status code
+ *
+ * @var integer
+ */
+ protected $code = 400;
+ /**
+ * Reason phrase
+ *
+ * @var string
+ */
+ protected $reason = 'Bad Request';
+ }
+ /**
+ * Exception for 401 Unauthorized responses
+ *
+ * @package Requests
+ */
+ /**
+ * Exception for 401 Unauthorized responses
+ *
+ * @package Requests
+ */
+ class Requests_Exception_HTTP_401 extends \Requests_Exception_HTTP
+ {
+ /**
+ * HTTP status code
+ *
+ * @var integer
+ */
+ protected $code = 401;
+ /**
+ * Reason phrase
+ *
+ * @var string
+ */
+ protected $reason = 'Unauthorized';
+ }
+ /**
+ * Exception for 402 Payment Required responses
+ *
+ * @package Requests
+ */
+ /**
+ * Exception for 402 Payment Required responses
+ *
+ * @package Requests
+ */
+ class Requests_Exception_HTTP_402 extends \Requests_Exception_HTTP
+ {
+ /**
+ * HTTP status code
+ *
+ * @var integer
+ */
+ protected $code = 402;
+ /**
+ * Reason phrase
+ *
+ * @var string
+ */
+ protected $reason = 'Payment Required';
+ }
+ /**
+ * Exception for 403 Forbidden responses
+ *
+ * @package Requests
+ */
+ /**
+ * Exception for 403 Forbidden responses
+ *
+ * @package Requests
+ */
+ class Requests_Exception_HTTP_403 extends \Requests_Exception_HTTP
+ {
+ /**
+ * HTTP status code
+ *
+ * @var integer
+ */
+ protected $code = 403;
+ /**
+ * Reason phrase
+ *
+ * @var string
+ */
+ protected $reason = 'Forbidden';
+ }
+ /**
+ * Exception for 404 Not Found responses
+ *
+ * @package Requests
+ */
+ /**
+ * Exception for 404 Not Found responses
+ *
+ * @package Requests
+ */
+ class Requests_Exception_HTTP_404 extends \Requests_Exception_HTTP
+ {
+ /**
+ * HTTP status code
+ *
+ * @var integer
+ */
+ protected $code = 404;
+ /**
+ * Reason phrase
+ *
+ * @var string
+ */
+ protected $reason = 'Not Found';
+ }
+ /**
+ * Exception for 405 Method Not Allowed responses
+ *
+ * @package Requests
+ */
+ /**
+ * Exception for 405 Method Not Allowed responses
+ *
+ * @package Requests
+ */
+ class Requests_Exception_HTTP_405 extends \Requests_Exception_HTTP
+ {
+ /**
+ * HTTP status code
+ *
+ * @var integer
+ */
+ protected $code = 405;
+ /**
+ * Reason phrase
+ *
+ * @var string
+ */
+ protected $reason = 'Method Not Allowed';
+ }
+ /**
+ * Exception for 406 Not Acceptable responses
+ *
+ * @package Requests
+ */
+ /**
+ * Exception for 406 Not Acceptable responses
+ *
+ * @package Requests
+ */
+ class Requests_Exception_HTTP_406 extends \Requests_Exception_HTTP
+ {
+ /**
+ * HTTP status code
+ *
+ * @var integer
+ */
+ protected $code = 406;
+ /**
+ * Reason phrase
+ *
+ * @var string
+ */
+ protected $reason = 'Not Acceptable';
+ }
+ /**
+ * Exception for 407 Proxy Authentication Required responses
+ *
+ * @package Requests
+ */
+ /**
+ * Exception for 407 Proxy Authentication Required responses
+ *
+ * @package Requests
+ */
+ class Requests_Exception_HTTP_407 extends \Requests_Exception_HTTP
+ {
+ /**
+ * HTTP status code
+ *
+ * @var integer
+ */
+ protected $code = 407;
+ /**
+ * Reason phrase
+ *
+ * @var string
+ */
+ protected $reason = 'Proxy Authentication Required';
+ }
+ /**
+ * Exception for 408 Request Timeout responses
+ *
+ * @package Requests
+ */
+ /**
+ * Exception for 408 Request Timeout responses
+ *
+ * @package Requests
+ */
+ class Requests_Exception_HTTP_408 extends \Requests_Exception_HTTP
+ {
+ /**
+ * HTTP status code
+ *
+ * @var integer
+ */
+ protected $code = 408;
+ /**
+ * Reason phrase
+ *
+ * @var string
+ */
+ protected $reason = 'Request Timeout';
+ }
+ /**
+ * Exception for 409 Conflict responses
+ *
+ * @package Requests
+ */
+ /**
+ * Exception for 409 Conflict responses
+ *
+ * @package Requests
+ */
+ class Requests_Exception_HTTP_409 extends \Requests_Exception_HTTP
+ {
+ /**
+ * HTTP status code
+ *
+ * @var integer
+ */
+ protected $code = 409;
+ /**
+ * Reason phrase
+ *
+ * @var string
+ */
+ protected $reason = 'Conflict';
+ }
+ /**
+ * Exception for 410 Gone responses
+ *
+ * @package Requests
+ */
+ /**
+ * Exception for 410 Gone responses
+ *
+ * @package Requests
+ */
+ class Requests_Exception_HTTP_410 extends \Requests_Exception_HTTP
+ {
+ /**
+ * HTTP status code
+ *
+ * @var integer
+ */
+ protected $code = 410;
+ /**
+ * Reason phrase
+ *
+ * @var string
+ */
+ protected $reason = 'Gone';
+ }
+ /**
+ * Exception for 411 Length Required responses
+ *
+ * @package Requests
+ */
+ /**
+ * Exception for 411 Length Required responses
+ *
+ * @package Requests
+ */
+ class Requests_Exception_HTTP_411 extends \Requests_Exception_HTTP
+ {
+ /**
+ * HTTP status code
+ *
+ * @var integer
+ */
+ protected $code = 411;
+ /**
+ * Reason phrase
+ *
+ * @var string
+ */
+ protected $reason = 'Length Required';
+ }
+ /**
+ * Exception for 412 Precondition Failed responses
+ *
+ * @package Requests
+ */
+ /**
+ * Exception for 412 Precondition Failed responses
+ *
+ * @package Requests
+ */
+ class Requests_Exception_HTTP_412 extends \Requests_Exception_HTTP
+ {
+ /**
+ * HTTP status code
+ *
+ * @var integer
+ */
+ protected $code = 412;
+ /**
+ * Reason phrase
+ *
+ * @var string
+ */
+ protected $reason = 'Precondition Failed';
+ }
+ /**
+ * Exception for 413 Request Entity Too Large responses
+ *
+ * @package Requests
+ */
+ /**
+ * Exception for 413 Request Entity Too Large responses
+ *
+ * @package Requests
+ */
+ class Requests_Exception_HTTP_413 extends \Requests_Exception_HTTP
+ {
+ /**
+ * HTTP status code
+ *
+ * @var integer
+ */
+ protected $code = 413;
+ /**
+ * Reason phrase
+ *
+ * @var string
+ */
+ protected $reason = 'Request Entity Too Large';
+ }
+ /**
+ * Exception for 414 Request-URI Too Large responses
+ *
+ * @package Requests
+ */
+ /**
+ * Exception for 414 Request-URI Too Large responses
+ *
+ * @package Requests
+ */
+ class Requests_Exception_HTTP_414 extends \Requests_Exception_HTTP
+ {
+ /**
+ * HTTP status code
+ *
+ * @var integer
+ */
+ protected $code = 414;
+ /**
+ * Reason phrase
+ *
+ * @var string
+ */
+ protected $reason = 'Request-URI Too Large';
+ }
+ /**
+ * Exception for 415 Unsupported Media Type responses
+ *
+ * @package Requests
+ */
+ /**
+ * Exception for 415 Unsupported Media Type responses
+ *
+ * @package Requests
+ */
+ class Requests_Exception_HTTP_415 extends \Requests_Exception_HTTP
+ {
+ /**
+ * HTTP status code
+ *
+ * @var integer
+ */
+ protected $code = 415;
+ /**
+ * Reason phrase
+ *
+ * @var string
+ */
+ protected $reason = 'Unsupported Media Type';
+ }
+ /**
+ * Exception for 416 Requested Range Not Satisfiable responses
+ *
+ * @package Requests
+ */
+ /**
+ * Exception for 416 Requested Range Not Satisfiable responses
+ *
+ * @package Requests
+ */
+ class Requests_Exception_HTTP_416 extends \Requests_Exception_HTTP
+ {
+ /**
+ * HTTP status code
+ *
+ * @var integer
+ */
+ protected $code = 416;
+ /**
+ * Reason phrase
+ *
+ * @var string
+ */
+ protected $reason = 'Requested Range Not Satisfiable';
+ }
+ /**
+ * Exception for 417 Expectation Failed responses
+ *
+ * @package Requests
+ */
+ /**
+ * Exception for 417 Expectation Failed responses
+ *
+ * @package Requests
+ */
+ class Requests_Exception_HTTP_417 extends \Requests_Exception_HTTP
+ {
+ /**
+ * HTTP status code
+ *
+ * @var integer
+ */
+ protected $code = 417;
+ /**
+ * Reason phrase
+ *
+ * @var string
+ */
+ protected $reason = 'Expectation Failed';
+ }
+ /**
+ * Exception for 418 I'm A Teapot responses
+ *
+ * @see https://tools.ietf.org/html/rfc2324
+ * @package Requests
+ */
+ /**
+ * Exception for 418 I'm A Teapot responses
+ *
+ * @see https://tools.ietf.org/html/rfc2324
+ * @package Requests
+ */
+ class Requests_Exception_HTTP_418 extends \Requests_Exception_HTTP
+ {
+ /**
+ * HTTP status code
+ *
+ * @var integer
+ */
+ protected $code = 418;
+ /**
+ * Reason phrase
+ *
+ * @var string
+ */
+ protected $reason = "I'm A Teapot";
+ }
+ /**
+ * Exception for 428 Precondition Required responses
+ *
+ * @see https://tools.ietf.org/html/rfc6585
+ * @package Requests
+ */
+ /**
+ * Exception for 428 Precondition Required responses
+ *
+ * @see https://tools.ietf.org/html/rfc6585
+ * @package Requests
+ */
+ class Requests_Exception_HTTP_428 extends \Requests_Exception_HTTP
+ {
+ /**
+ * HTTP status code
+ *
+ * @var integer
+ */
+ protected $code = 428;
+ /**
+ * Reason phrase
+ *
+ * @var string
+ */
+ protected $reason = 'Precondition Required';
+ }
+ /**
+ * Exception for 429 Too Many Requests responses
+ *
+ * @see https://tools.ietf.org/html/draft-nottingham-http-new-status-04
+ * @package Requests
+ */
+ /**
+ * Exception for 429 Too Many Requests responses
+ *
+ * @see https://tools.ietf.org/html/draft-nottingham-http-new-status-04
+ * @package Requests
+ */
+ class Requests_Exception_HTTP_429 extends \Requests_Exception_HTTP
+ {
+ /**
+ * HTTP status code
+ *
+ * @var integer
+ */
+ protected $code = 429;
+ /**
+ * Reason phrase
+ *
+ * @var string
+ */
+ protected $reason = 'Too Many Requests';
+ }
+ /**
+ * Exception for 431 Request Header Fields Too Large responses
+ *
+ * @see https://tools.ietf.org/html/rfc6585
+ * @package Requests
+ */
+ /**
+ * Exception for 431 Request Header Fields Too Large responses
+ *
+ * @see https://tools.ietf.org/html/rfc6585
+ * @package Requests
+ */
+ class Requests_Exception_HTTP_431 extends \Requests_Exception_HTTP
+ {
+ /**
+ * HTTP status code
+ *
+ * @var integer
+ */
+ protected $code = 431;
+ /**
+ * Reason phrase
+ *
+ * @var string
+ */
+ protected $reason = 'Request Header Fields Too Large';
+ }
+ /**
+ * Exception for 500 Internal Server Error responses
+ *
+ * @package Requests
+ */
+ /**
+ * Exception for 500 Internal Server Error responses
+ *
+ * @package Requests
+ */
+ class Requests_Exception_HTTP_500 extends \Requests_Exception_HTTP
+ {
+ /**
+ * HTTP status code
+ *
+ * @var integer
+ */
+ protected $code = 500;
+ /**
+ * Reason phrase
+ *
+ * @var string
+ */
+ protected $reason = 'Internal Server Error';
+ }
+ /**
+ * Exception for 501 Not Implemented responses
+ *
+ * @package Requests
+ */
+ /**
+ * Exception for 501 Not Implemented responses
+ *
+ * @package Requests
+ */
+ class Requests_Exception_HTTP_501 extends \Requests_Exception_HTTP
+ {
+ /**
+ * HTTP status code
+ *
+ * @var integer
+ */
+ protected $code = 501;
+ /**
+ * Reason phrase
+ *
+ * @var string
+ */
+ protected $reason = 'Not Implemented';
+ }
+ /**
+ * Exception for 502 Bad Gateway responses
+ *
+ * @package Requests
+ */
+ /**
+ * Exception for 502 Bad Gateway responses
+ *
+ * @package Requests
+ */
+ class Requests_Exception_HTTP_502 extends \Requests_Exception_HTTP
+ {
+ /**
+ * HTTP status code
+ *
+ * @var integer
+ */
+ protected $code = 502;
+ /**
+ * Reason phrase
+ *
+ * @var string
+ */
+ protected $reason = 'Bad Gateway';
+ }
+ /**
+ * Exception for 503 Service Unavailable responses
+ *
+ * @package Requests
+ */
+ /**
+ * Exception for 503 Service Unavailable responses
+ *
+ * @package Requests
+ */
+ class Requests_Exception_HTTP_503 extends \Requests_Exception_HTTP
+ {
+ /**
+ * HTTP status code
+ *
+ * @var integer
+ */
+ protected $code = 503;
+ /**
+ * Reason phrase
+ *
+ * @var string
+ */
+ protected $reason = 'Service Unavailable';
+ }
+ /**
+ * Exception for 504 Gateway Timeout responses
+ *
+ * @package Requests
+ */
+ /**
+ * Exception for 504 Gateway Timeout responses
+ *
+ * @package Requests
+ */
+ class Requests_Exception_HTTP_504 extends \Requests_Exception_HTTP
+ {
+ /**
+ * HTTP status code
+ *
+ * @var integer
+ */
+ protected $code = 504;
+ /**
+ * Reason phrase
+ *
+ * @var string
+ */
+ protected $reason = 'Gateway Timeout';
+ }
+ /**
+ * Exception for 505 HTTP Version Not Supported responses
+ *
+ * @package Requests
+ */
+ /**
+ * Exception for 505 HTTP Version Not Supported responses
+ *
+ * @package Requests
+ */
+ class Requests_Exception_HTTP_505 extends \Requests_Exception_HTTP
+ {
+ /**
+ * HTTP status code
+ *
+ * @var integer
+ */
+ protected $code = 505;
+ /**
+ * Reason phrase
+ *
+ * @var string
+ */
+ protected $reason = 'HTTP Version Not Supported';
+ }
+ /**
+ * Exception for 511 Network Authentication Required responses
+ *
+ * @see https://tools.ietf.org/html/rfc6585
+ * @package Requests
+ */
+ /**
+ * Exception for 511 Network Authentication Required responses
+ *
+ * @see https://tools.ietf.org/html/rfc6585
+ * @package Requests
+ */
+ class Requests_Exception_HTTP_511 extends \Requests_Exception_HTTP
+ {
+ /**
+ * HTTP status code
+ *
+ * @var integer
+ */
+ protected $code = 511;
+ /**
+ * Reason phrase
+ *
+ * @var string
+ */
+ protected $reason = 'Network Authentication Required';
+ }
+ /**
+ * Exception for unknown status responses
+ *
+ * @package Requests
+ */
+ /**
+ * Exception for unknown status responses
+ *
+ * @package Requests
+ */
+ class Requests_Exception_HTTP_Unknown extends \Requests_Exception_HTTP
+ {
+ /**
+ * HTTP status code
+ *
+ * @var integer|bool Code if available, false if an error occurred
+ */
+ protected $code = 0;
+ /**
+ * Reason phrase
+ *
+ * @var string
+ */
+ protected $reason = 'Unknown';
+ /**
+ * Create a new exception
+ *
+ * If `$data` is an instance of {@see Requests_Response}, uses the status
+ * code from it. Otherwise, sets as 0
+ *
+ * @param string|null $reason Reason phrase
+ * @param mixed $data Associated data
+ */
+ public function __construct($reason = \null, $data = \null)
+ {
+ }
+ }
+ class Requests_Exception_Transport extends \Requests_Exception
+ {
+ }
+ class Requests_Exception_Transport_cURL extends \Requests_Exception_Transport
+ {
+ const EASY = 'cURLEasy';
+ const MULTI = 'cURLMulti';
+ const SHARE = 'cURLShare';
+ /**
+ * cURL error code
+ *
+ * @var integer
+ */
+ protected $code = -1;
+ /**
+ * Which type of cURL error
+ *
+ * EASY|MULTI|SHARE
+ *
+ * @var string
+ */
+ protected $type = 'Unknown';
+ /**
+ * Clear text error message
+ *
+ * @var string
+ */
+ protected $reason = 'Unknown';
+ public function __construct($message, $type, $data = \null, $code = 0)
+ {
+ }
+ /**
+ * Get the error message
+ */
+ public function getReason()
+ {
+ }
+ }
+ /**
+ * Event dispatcher
+ *
+ * @package Requests
+ * @subpackage Utilities
+ */
+ /**
+ * Event dispatcher
+ *
+ * @package Requests
+ * @subpackage Utilities
+ */
+ interface Requests_Hooker
+ {
+ /**
+ * Register a callback for a hook
+ *
+ * @param string $hook Hook name
+ * @param callback $callback Function/method to call on event
+ * @param int $priority Priority number. <0 is executed earlier, >0 is executed later
+ */
+ public function register($hook, $callback, $priority = 0);
+ /**
+ * Dispatch a message
+ *
+ * @param string $hook Hook name
+ * @param array $parameters Parameters to pass to callbacks
+ * @return boolean Successfulness
+ */
+ public function dispatch($hook, $parameters = array());
+ }
+ /**
+ * Handles adding and dispatching events
+ *
+ * @package Requests
+ * @subpackage Utilities
+ */
+ /**
+ * Handles adding and dispatching events
+ *
+ * @package Requests
+ * @subpackage Utilities
+ */
+ class Requests_Hooks implements \Requests_Hooker
+ {
+ /**
+ * Registered callbacks for each hook
+ *
+ * @var array
+ */
+ protected $hooks = array();
+ /**
+ * Constructor
+ */
+ public function __construct()
+ {
+ }
+ /**
+ * Register a callback for a hook
+ *
+ * @param string $hook Hook name
+ * @param callback $callback Function/method to call on event
+ * @param int $priority Priority number. <0 is executed earlier, >0 is executed later
+ */
+ public function register($hook, $callback, $priority = 0)
+ {
+ }
+ /**
+ * Dispatch a message
+ *
+ * @param string $hook Hook name
+ * @param array $parameters Parameters to pass to callbacks
+ * @return boolean Successfulness
+ */
+ public function dispatch($hook, $parameters = array())
+ {
+ }
+ }
+ /**
+ * IDNA URL encoder
+ *
+ * Note: Not fully compliant, as nameprep does nothing yet.
+ *
+ * @package Requests
+ * @subpackage Utilities
+ * @see https://tools.ietf.org/html/rfc3490 IDNA specification
+ * @see https://tools.ietf.org/html/rfc3492 Punycode/Bootstrap specification
+ */
+ class Requests_IDNAEncoder
+ {
+ /**
+ * ACE prefix used for IDNA
+ *
+ * @see https://tools.ietf.org/html/rfc3490#section-5
+ * @var string
+ */
+ const ACE_PREFIX = 'xn--';
+ /**#@+
+ * Bootstrap constant for Punycode
+ *
+ * @see https://tools.ietf.org/html/rfc3492#section-5
+ * @var int
+ */
+ const BOOTSTRAP_BASE = 36;
+ const BOOTSTRAP_TMIN = 1;
+ const BOOTSTRAP_TMAX = 26;
+ const BOOTSTRAP_SKEW = 38;
+ const BOOTSTRAP_DAMP = 700;
+ const BOOTSTRAP_INITIAL_BIAS = 72;
+ const BOOTSTRAP_INITIAL_N = 128;
+ /**#@-*/
+ /**
+ * Encode a hostname using Punycode
+ *
+ * @param string $string Hostname
+ * @return string Punycode-encoded hostname
+ */
+ public static function encode($string)
+ {
+ }
+ /**
+ * Convert a UTF-8 string to an ASCII string using Punycode
+ *
+ * @throws Requests_Exception Provided string longer than 64 ASCII characters (`idna.provided_too_long`)
+ * @throws Requests_Exception Prepared string longer than 64 ASCII characters (`idna.prepared_too_long`)
+ * @throws Requests_Exception Provided string already begins with xn-- (`idna.provided_is_prefixed`)
+ * @throws Requests_Exception Encoded string longer than 64 ASCII characters (`idna.encoded_too_long`)
+ *
+ * @param string $string ASCII or UTF-8 string (max length 64 characters)
+ * @return string ASCII string
+ */
+ public static function to_ascii($string)
+ {
+ }
+ /**
+ * Check whether a given string contains only ASCII characters
+ *
+ * @internal (Testing found regex was the fastest implementation)
+ *
+ * @param string $string
+ * @return bool Is the string ASCII-only?
+ */
+ protected static function is_ascii($string)
+ {
+ }
+ /**
+ * Prepare a string for use as an IDNA name
+ *
+ * @todo Implement this based on RFC 3491 and the newer 5891
+ * @param string $string
+ * @return string Prepared string
+ */
+ protected static function nameprep($string)
+ {
+ }
+ /**
+ * Convert a UTF-8 string to a UCS-4 codepoint array
+ *
+ * Based on Requests_IRI::replace_invalid_with_pct_encoding()
+ *
+ * @throws Requests_Exception Invalid UTF-8 codepoint (`idna.invalidcodepoint`)
+ * @param string $input
+ * @return array Unicode code points
+ */
+ protected static function utf8_to_codepoints($input)
+ {
+ }
+ /**
+ * RFC3492-compliant encoder
+ *
+ * @internal Pseudo-code from Section 6.3 is commented with "#" next to relevant code
+ * @throws Requests_Exception On character outside of the domain (never happens with Punycode) (`idna.character_outside_domain`)
+ *
+ * @param string $input UTF-8 encoded string to encode
+ * @return string Punycode-encoded string
+ */
+ public static function punycode_encode($input)
+ {
+ }
+ /**
+ * Convert a digit to its respective character
+ *
+ * @see https://tools.ietf.org/html/rfc3492#section-5
+ * @throws Requests_Exception On invalid digit (`idna.invalid_digit`)
+ *
+ * @param int $digit Digit in the range 0-35
+ * @return string Single character corresponding to digit
+ */
+ protected static function digit_to_char($digit)
+ {
+ }
+ /**
+ * Adapt the bias
+ *
+ * @see https://tools.ietf.org/html/rfc3492#section-6.1
+ * @param int $delta
+ * @param int $numpoints
+ * @param bool $firsttime
+ * @return int New bias
+ *
+ * function adapt(delta,numpoints,firsttime):
+ */
+ protected static function adapt($delta, $numpoints, $firsttime)
+ {
+ }
+ }
+ /**
+ * Class to validate and to work with IPv6 addresses
+ *
+ * @package Requests
+ * @subpackage Utilities
+ */
+ /**
+ * Class to validate and to work with IPv6 addresses
+ *
+ * This was originally based on the PEAR class of the same name, but has been
+ * entirely rewritten.
+ *
+ * @package Requests
+ * @subpackage Utilities
+ */
+ class Requests_IPv6
+ {
+ /**
+ * Uncompresses an IPv6 address
+ *
+ * RFC 4291 allows you to compress consecutive zero pieces in an address to
+ * '::'. This method expects a valid IPv6 address and expands the '::' to
+ * the required number of zero pieces.
+ *
+ * Example: FF01::101 -> FF01:0:0:0:0:0:0:101
+ * ::1 -> 0:0:0:0:0:0:0:1
+ *
+ * @author Alexander Merz
+ * @author elfrink at introweb dot nl
+ * @author Josh Peck
+ * @copyright 2003-2005 The PHP Group
+ * @license http://www.opensource.org/licenses/bsd-license.php
+ * @param string $ip An IPv6 address
+ * @return string The uncompressed IPv6 address
+ */
+ public static function uncompress($ip)
+ {
+ }
+ /**
+ * Compresses an IPv6 address
+ *
+ * RFC 4291 allows you to compress consecutive zero pieces in an address to
+ * '::'. This method expects a valid IPv6 address and compresses consecutive
+ * zero pieces to '::'.
+ *
+ * Example: FF01:0:0:0:0:0:0:101 -> FF01::101
+ * 0:0:0:0:0:0:0:1 -> ::1
+ *
+ * @see uncompress()
+ * @param string $ip An IPv6 address
+ * @return string The compressed IPv6 address
+ */
+ public static function compress($ip)
+ {
+ }
+ /**
+ * Splits an IPv6 address into the IPv6 and IPv4 representation parts
+ *
+ * RFC 4291 allows you to represent the last two parts of an IPv6 address
+ * using the standard IPv4 representation
+ *
+ * Example: 0:0:0:0:0:0:13.1.68.3
+ * 0:0:0:0:0:FFFF:129.144.52.38
+ *
+ * @param string $ip An IPv6 address
+ * @return string[] [0] contains the IPv6 represented part, and [1] the IPv4 represented part
+ */
+ protected static function split_v6_v4($ip)
+ {
+ }
+ /**
+ * Checks an IPv6 address
+ *
+ * Checks if the given IP is a valid IPv6 address
+ *
+ * @param string $ip An IPv6 address
+ * @return bool true if $ip is a valid IPv6 address
+ */
+ public static function check_ipv6($ip)
+ {
+ }
+ }
+ /**
+ * IRI parser/serialiser/normaliser
+ *
+ * @package Requests
+ * @subpackage Utilities
+ */
+ /**
+ * IRI parser/serialiser/normaliser
+ *
+ * Copyright (c) 2007-2010, Geoffrey Sneddon and Steve Minutillo.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * * Neither the name of the SimplePie Team 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 HOLDERS AND 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.
+ *
+ * @package Requests
+ * @subpackage Utilities
+ * @author Geoffrey Sneddon
+ * @author Steve Minutillo
+ * @copyright 2007-2009 Geoffrey Sneddon and Steve Minutillo
+ * @license http://www.opensource.org/licenses/bsd-license.php
+ * @link http://hg.gsnedders.com/iri/
+ *
+ * @property string $iri IRI we're working with
+ * @property-read string $uri IRI in URI form, {@see to_uri}
+ * @property string $scheme Scheme part of the IRI
+ * @property string $authority Authority part, formatted for a URI (userinfo + host + port)
+ * @property string $iauthority Authority part of the IRI (userinfo + host + port)
+ * @property string $userinfo Userinfo part, formatted for a URI (after '://' and before '@')
+ * @property string $iuserinfo Userinfo part of the IRI (after '://' and before '@')
+ * @property string $host Host part, formatted for a URI
+ * @property string $ihost Host part of the IRI
+ * @property string $port Port part of the IRI (after ':')
+ * @property string $path Path part, formatted for a URI (after first '/')
+ * @property string $ipath Path part of the IRI (after first '/')
+ * @property string $query Query part, formatted for a URI (after '?')
+ * @property string $iquery Query part of the IRI (after '?')
+ * @property string $fragment Fragment, formatted for a URI (after '#')
+ * @property string $ifragment Fragment part of the IRI (after '#')
+ */
+ class Requests_IRI
+ {
+ /**
+ * Scheme
+ *
+ * @var string|null
+ */
+ protected $scheme = \null;
+ /**
+ * User Information
+ *
+ * @var string|null
+ */
+ protected $iuserinfo = \null;
+ /**
+ * ihost
+ *
+ * @var string|null
+ */
+ protected $ihost = \null;
+ /**
+ * Port
+ *
+ * @var string|null
+ */
+ protected $port = \null;
+ /**
+ * ipath
+ *
+ * @var string
+ */
+ protected $ipath = '';
+ /**
+ * iquery
+ *
+ * @var string|null
+ */
+ protected $iquery = \null;
+ /**
+ * ifragment|null
+ *
+ * @var string
+ */
+ protected $ifragment = \null;
+ /**
+ * Normalization database
+ *
+ * Each key is the scheme, each value is an array with each key as the IRI
+ * part and value as the default value for that part.
+ *
+ * @var array
+ */
+ protected $normalization = array('acap' => array('port' => 674), 'dict' => array('port' => 2628), 'file' => array('ihost' => 'localhost'), 'http' => array('port' => 80), 'https' => array('port' => 443));
+ /**
+ * Return the entire IRI when you try and read the object as a string
+ *
+ * @return string
+ */
+ public function __toString()
+ {
+ }
+ /**
+ * Overload __set() to provide access via properties
+ *
+ * @param string $name Property name
+ * @param mixed $value Property value
+ */
+ public function __set($name, $value)
+ {
+ }
+ /**
+ * Overload __get() to provide access via properties
+ *
+ * @param string $name Property name
+ * @return mixed
+ */
+ public function __get($name)
+ {
+ }
+ /**
+ * Overload __isset() to provide access via properties
+ *
+ * @param string $name Property name
+ * @return bool
+ */
+ public function __isset($name)
+ {
+ }
+ /**
+ * Overload __unset() to provide access via properties
+ *
+ * @param string $name Property name
+ */
+ public function __unset($name)
+ {
+ }
+ /**
+ * Create a new IRI object, from a specified string
+ *
+ * @param string|null $iri
+ */
+ public function __construct($iri = \null)
+ {
+ }
+ /**
+ * Create a new IRI object by resolving a relative IRI
+ *
+ * Returns false if $base is not absolute, otherwise an IRI.
+ *
+ * @param Requests_IRI|string $base (Absolute) Base IRI
+ * @param Requests_IRI|string $relative Relative IRI
+ * @return Requests_IRI|false
+ */
+ public static function absolutize($base, $relative)
+ {
+ }
+ /**
+ * Parse an IRI into scheme/authority/path/query/fragment segments
+ *
+ * @param string $iri
+ * @return array
+ */
+ protected function parse_iri($iri)
+ {
+ }
+ /**
+ * Remove dot segments from a path
+ *
+ * @param string $input
+ * @return string
+ */
+ protected function remove_dot_segments($input)
+ {
+ }
+ /**
+ * Replace invalid character with percent encoding
+ *
+ * @param string $string Input string
+ * @param string $extra_chars Valid characters not in iunreserved or
+ * iprivate (this is ASCII-only)
+ * @param bool $iprivate Allow iprivate
+ * @return string
+ */
+ protected function replace_invalid_with_pct_encoding($string, $extra_chars, $iprivate = \false)
+ {
+ }
+ /**
+ * Callback function for preg_replace_callback.
+ *
+ * Removes sequences of percent encoded bytes that represent UTF-8
+ * encoded characters in iunreserved
+ *
+ * @param array $match PCRE match
+ * @return string Replacement
+ */
+ protected function remove_iunreserved_percent_encoded($match)
+ {
+ }
+ protected function scheme_normalization()
+ {
+ }
+ /**
+ * Check if the object represents a valid IRI. This needs to be done on each
+ * call as some things change depending on another part of the IRI.
+ *
+ * @return bool
+ */
+ public function is_valid()
+ {
+ }
+ /**
+ * Set the entire IRI. Returns true on success, false on failure (if there
+ * are any invalid characters).
+ *
+ * @param string $iri
+ * @return bool
+ */
+ protected function set_iri($iri)
+ {
+ }
+ /**
+ * Set the scheme. Returns true on success, false on failure (if there are
+ * any invalid characters).
+ *
+ * @param string $scheme
+ * @return bool
+ */
+ protected function set_scheme($scheme)
+ {
+ }
+ /**
+ * Set the authority. Returns true on success, false on failure (if there are
+ * any invalid characters).
+ *
+ * @param string $authority
+ * @return bool
+ */
+ protected function set_authority($authority)
+ {
+ }
+ /**
+ * Set the iuserinfo.
+ *
+ * @param string $iuserinfo
+ * @return bool
+ */
+ protected function set_userinfo($iuserinfo)
+ {
+ }
+ /**
+ * Set the ihost. Returns true on success, false on failure (if there are
+ * any invalid characters).
+ *
+ * @param string $ihost
+ * @return bool
+ */
+ protected function set_host($ihost)
+ {
+ }
+ /**
+ * Set the port. Returns true on success, false on failure (if there are
+ * any invalid characters).
+ *
+ * @param string $port
+ * @return bool
+ */
+ protected function set_port($port)
+ {
+ }
+ /**
+ * Set the ipath.
+ *
+ * @param string $ipath
+ * @return bool
+ */
+ protected function set_path($ipath)
+ {
+ }
+ /**
+ * Set the iquery.
+ *
+ * @param string $iquery
+ * @return bool
+ */
+ protected function set_query($iquery)
+ {
+ }
+ /**
+ * Set the ifragment.
+ *
+ * @param string $ifragment
+ * @return bool
+ */
+ protected function set_fragment($ifragment)
+ {
+ }
+ /**
+ * Convert an IRI to a URI (or parts thereof)
+ *
+ * @param string|bool IRI to convert (or false from {@see get_iri})
+ * @return string|false URI if IRI is valid, false otherwise.
+ */
+ protected function to_uri($string)
+ {
+ }
+ /**
+ * Get the complete IRI
+ *
+ * @return string|false
+ */
+ protected function get_iri()
+ {
+ }
+ /**
+ * Get the complete URI
+ *
+ * @return string
+ */
+ protected function get_uri()
+ {
+ }
+ /**
+ * Get the complete iauthority
+ *
+ * @return string|null
+ */
+ protected function get_iauthority()
+ {
+ }
+ /**
+ * Get the complete authority
+ *
+ * @return string
+ */
+ protected function get_authority()
+ {
+ }
+ }
+ /**
+ * Proxy connection interface
+ *
+ * @package Requests
+ * @subpackage Proxy
+ * @since 1.6
+ */
+ /**
+ * Proxy connection interface
+ *
+ * Implement this interface to handle proxy settings and authentication
+ *
+ * Parameters should be passed via the constructor where possible, as this
+ * makes it much easier for users to use your provider.
+ *
+ * @see Requests_Hooks
+ * @package Requests
+ * @subpackage Proxy
+ * @since 1.6
+ */
+ interface Requests_Proxy
+ {
+ /**
+ * Register hooks as needed
+ *
+ * This method is called in {@see Requests::request} when the user has set
+ * an instance as the 'auth' option. Use this callback to register all the
+ * hooks you'll need.
+ *
+ * @see Requests_Hooks::register
+ * @param Requests_Hooks $hooks Hook system
+ */
+ public function register(\Requests_Hooks $hooks);
+ }
+ /**
+ * HTTP Proxy connection interface
+ *
+ * @package Requests
+ * @subpackage Proxy
+ * @since 1.6
+ */
+ /**
+ * HTTP Proxy connection interface
+ *
+ * Provides a handler for connection via an HTTP proxy
+ *
+ * @package Requests
+ * @subpackage Proxy
+ * @since 1.6
+ */
+ class Requests_Proxy_HTTP implements \Requests_Proxy
+ {
+ /**
+ * Proxy host and port
+ *
+ * Notation: "host:port" (eg 127.0.0.1:8080 or someproxy.com:3128)
+ *
+ * @var string
+ */
+ public $proxy;
+ /**
+ * Username
+ *
+ * @var string
+ */
+ public $user;
+ /**
+ * Password
+ *
+ * @var string
+ */
+ public $pass;
+ /**
+ * Do we need to authenticate? (ie username & password have been provided)
+ *
+ * @var boolean
+ */
+ public $use_authentication;
+ /**
+ * Constructor
+ *
+ * @since 1.6
+ * @throws Requests_Exception On incorrect number of arguments (`authbasicbadargs`)
+ * @param array|null $args Array of user and password. Must have exactly two elements
+ */
+ public function __construct($args = \null)
+ {
+ }
+ /**
+ * Register the necessary callbacks
+ *
+ * @since 1.6
+ * @see curl_before_send
+ * @see fsockopen_remote_socket
+ * @see fsockopen_remote_host_path
+ * @see fsockopen_header
+ * @param Requests_Hooks $hooks Hook system
+ */
+ public function register(\Requests_Hooks $hooks)
+ {
+ }
+ /**
+ * Set cURL parameters before the data is sent
+ *
+ * @since 1.6
+ * @param resource $handle cURL resource
+ */
+ public function curl_before_send(&$handle)
+ {
+ }
+ /**
+ * Alter remote socket information before opening socket connection
+ *
+ * @since 1.6
+ * @param string $remote_socket Socket connection string
+ */
+ public function fsockopen_remote_socket(&$remote_socket)
+ {
+ }
+ /**
+ * Alter remote path before getting stream data
+ *
+ * @since 1.6
+ * @param string $path Path to send in HTTP request string ("GET ...")
+ * @param string $url Full URL we're requesting
+ */
+ public function fsockopen_remote_host_path(&$path, $url)
+ {
+ }
+ /**
+ * Add extra headers to the request before sending
+ *
+ * @since 1.6
+ * @param string $out HTTP header string
+ */
+ public function fsockopen_header(&$out)
+ {
+ }
+ /**
+ * Get the authentication string (user:pass)
+ *
+ * @since 1.6
+ * @return string
+ */
+ public function get_auth_string()
+ {
+ }
+ }
+ /**
+ * HTTP response class
+ *
+ * Contains a response from Requests::request()
+ * @package Requests
+ */
+ /**
+ * HTTP response class
+ *
+ * Contains a response from Requests::request()
+ * @package Requests
+ */
+ class Requests_Response
+ {
+ /**
+ * Constructor
+ */
+ public function __construct()
+ {
+ }
+ /**
+ * Response body
+ *
+ * @var string
+ */
+ public $body = '';
+ /**
+ * Raw HTTP data from the transport
+ *
+ * @var string
+ */
+ public $raw = '';
+ /**
+ * Headers, as an associative array
+ *
+ * @var Requests_Response_Headers Array-like object representing headers
+ */
+ public $headers = array();
+ /**
+ * Status code, false if non-blocking
+ *
+ * @var integer|boolean
+ */
+ public $status_code = \false;
+ /**
+ * Protocol version, false if non-blocking
+ *
+ * @var float|boolean
+ */
+ public $protocol_version = \false;
+ /**
+ * Whether the request succeeded or not
+ *
+ * @var boolean
+ */
+ public $success = \false;
+ /**
+ * Number of redirects the request used
+ *
+ * @var integer
+ */
+ public $redirects = 0;
+ /**
+ * URL requested
+ *
+ * @var string
+ */
+ public $url = '';
+ /**
+ * Previous requests (from redirects)
+ *
+ * @var array Array of Requests_Response objects
+ */
+ public $history = array();
+ /**
+ * Cookies from the request
+ *
+ * @var Requests_Cookie_Jar Array-like object representing a cookie jar
+ */
+ public $cookies = array();
+ /**
+ * Is the response a redirect?
+ *
+ * @return boolean True if redirect (3xx status), false if not.
+ */
+ public function is_redirect()
+ {
+ }
+ /**
+ * Throws an exception if the request was not successful
+ *
+ * @throws Requests_Exception If `$allow_redirects` is false, and code is 3xx (`response.no_redirects`)
+ * @throws Requests_Exception_HTTP On non-successful status code. Exception class corresponds to code (e.g. {@see Requests_Exception_HTTP_404})
+ * @param boolean $allow_redirects Set to false to throw on a 3xx as well
+ */
+ public function throw_for_status($allow_redirects = \true)
+ {
+ }
+ }
+ /**
+ * Case-insensitive dictionary, suitable for HTTP headers
+ *
+ * @package Requests
+ * @subpackage Utilities
+ */
+ /**
+ * Case-insensitive dictionary, suitable for HTTP headers
+ *
+ * @package Requests
+ * @subpackage Utilities
+ */
+ class Requests_Utility_CaseInsensitiveDictionary implements \ArrayAccess, \IteratorAggregate
+ {
+ /**
+ * Actual item data
+ *
+ * @var array
+ */
+ protected $data = array();
+ /**
+ * Creates a case insensitive dictionary.
+ *
+ * @param array $data Dictionary/map to convert to case-insensitive
+ */
+ public function __construct(array $data = array())
+ {
+ }
+ /**
+ * Check if the given item exists
+ *
+ * @param string $key Item key
+ * @return boolean Does the item exist?
+ */
+ #[ReturnTypeWillChange]
+ public function offsetExists($key)
+ {
+ }
+ /**
+ * Get the value for the item
+ *
+ * @param string $key Item key
+ * @return string|null Item value (null if offsetExists is false)
+ */
+ #[ReturnTypeWillChange]
+ public function offsetGet($key)
+ {
+ }
+ /**
+ * Set the given item
+ *
+ * @throws Requests_Exception On attempting to use dictionary as list (`invalidset`)
+ *
+ * @param string $key Item name
+ * @param string $value Item value
+ */
+ #[ReturnTypeWillChange]
+ public function offsetSet($key, $value)
+ {
+ }
+ /**
+ * Unset the given header
+ *
+ * @param string $key
+ */
+ #[ReturnTypeWillChange]
+ public function offsetUnset($key)
+ {
+ }
+ /**
+ * Get an iterator for the data
+ *
+ * @return ArrayIterator
+ */
+ #[ReturnTypeWillChange]
+ public function getIterator()
+ {
+ }
+ /**
+ * Get the headers as an array
+ *
+ * @return array Header data
+ */
+ public function getAll()
+ {
+ }
+ }
+ /**
+ * Case-insensitive dictionary, suitable for HTTP headers
+ *
+ * @package Requests
+ */
+ /**
+ * Case-insensitive dictionary, suitable for HTTP headers
+ *
+ * @package Requests
+ */
+ class Requests_Response_Headers extends \Requests_Utility_CaseInsensitiveDictionary
+ {
+ /**
+ * Get the given header
+ *
+ * Unlike {@see self::getValues()}, this returns a string. If there are
+ * multiple values, it concatenates them with a comma as per RFC2616.
+ *
+ * Avoid using this where commas may be used unquoted in values, such as
+ * Set-Cookie headers.
+ *
+ * @param string $key
+ * @return string|null Header value
+ */
+ public function offsetGet($key)
+ {
+ }
+ /**
+ * Set the given item
+ *
+ * @throws Requests_Exception On attempting to use dictionary as list (`invalidset`)
+ *
+ * @param string $key Item name
+ * @param string $value Item value
+ */
+ public function offsetSet($key, $value)
+ {
+ }
+ /**
+ * Get all values for a given header
+ *
+ * @param string $key
+ * @return array|null Header values
+ */
+ public function getValues($key)
+ {
+ }
+ /**
+ * Flattens a value into a string
+ *
+ * Converts an array into a string by imploding values with a comma, as per
+ * RFC2616's rules for folding headers.
+ *
+ * @param string|array $value Value to flatten
+ * @return string Flattened value
+ */
+ public function flatten($value)
+ {
+ }
+ /**
+ * Get an iterator for the data
+ *
+ * Converts the internal
+ * @return ArrayIterator
+ */
+ public function getIterator()
+ {
+ }
+ }
+ /**
+ * SSL utilities for Requests
+ *
+ * @package Requests
+ * @subpackage Utilities
+ */
+ /**
+ * SSL utilities for Requests
+ *
+ * Collection of utilities for working with and verifying SSL certificates.
+ *
+ * @package Requests
+ * @subpackage Utilities
+ */
+ class Requests_SSL
+ {
+ /**
+ * Verify the certificate against common name and subject alternative names
+ *
+ * Unfortunately, PHP doesn't check the certificate against the alternative
+ * names, leading things like 'https://www.github.com/' to be invalid.
+ *
+ * @see https://tools.ietf.org/html/rfc2818#section-3.1 RFC2818, Section 3.1
+ *
+ * @throws Requests_Exception On not obtaining a match for the host (`fsockopen.ssl.no_match`)
+ * @param string $host Host name to verify against
+ * @param array $cert Certificate data from openssl_x509_parse()
+ * @return bool
+ */
+ public static function verify_certificate($host, $cert)
+ {
+ }
+ /**
+ * Verify that a reference name is valid
+ *
+ * Verifies a dNSName for HTTPS usage, (almost) as per Firefox's rules:
+ * - Wildcards can only occur in a name with more than 3 components
+ * - Wildcards can only occur as the last character in the first
+ * component
+ * - Wildcards may be preceded by additional characters
+ *
+ * We modify these rules to be a bit stricter and only allow the wildcard
+ * character to be the full first component; that is, with the exclusion of
+ * the third rule.
+ *
+ * @param string $reference Reference dNSName
+ * @return boolean Is the name valid?
+ */
+ public static function verify_reference_name($reference)
+ {
+ }
+ /**
+ * Match a hostname against a dNSName reference
+ *
+ * @param string $host Requested host
+ * @param string $reference dNSName to match against
+ * @return boolean Does the domain match?
+ */
+ public static function match_domain($host, $reference)
+ {
+ }
+ }
+ /**
+ * Session handler for persistent requests and default parameters
+ *
+ * @package Requests
+ * @subpackage Session Handler
+ */
+ /**
+ * Session handler for persistent requests and default parameters
+ *
+ * Allows various options to be set as default values, and merges both the
+ * options and URL properties together. A base URL can be set for all requests,
+ * with all subrequests resolved from this. Base options can be set (including
+ * a shared cookie jar), then overridden for individual requests.
+ *
+ * @package Requests
+ * @subpackage Session Handler
+ */
+ class Requests_Session
+ {
+ /**
+ * Base URL for requests
+ *
+ * URLs will be made absolute using this as the base
+ *
+ * @var string|null
+ */
+ public $url = \null;
+ /**
+ * Base headers for requests
+ *
+ * @var array
+ */
+ public $headers = array();
+ /**
+ * Base data for requests
+ *
+ * If both the base data and the per-request data are arrays, the data will
+ * be merged before sending the request.
+ *
+ * @var array
+ */
+ public $data = array();
+ /**
+ * Base options for requests
+ *
+ * The base options are merged with the per-request data for each request.
+ * The only default option is a shared cookie jar between requests.
+ *
+ * Values here can also be set directly via properties on the Session
+ * object, e.g. `$session->useragent = 'X';`
+ *
+ * @var array
+ */
+ public $options = array();
+ /**
+ * Create a new session
+ *
+ * @param string|null $url Base URL for requests
+ * @param array $headers Default headers for requests
+ * @param array $data Default data for requests
+ * @param array $options Default options for requests
+ */
+ public function __construct($url = \null, $headers = array(), $data = array(), $options = array())
+ {
+ }
+ /**
+ * Get a property's value
+ *
+ * @param string $key Property key
+ * @return mixed|null Property value, null if none found
+ */
+ public function __get($key)
+ {
+ }
+ /**
+ * Set a property's value
+ *
+ * @param string $key Property key
+ * @param mixed $value Property value
+ */
+ public function __set($key, $value)
+ {
+ }
+ /**
+ * Remove a property's value
+ *
+ * @param string $key Property key
+ */
+ public function __isset($key)
+ {
+ }
+ /**
+ * Remove a property's value
+ *
+ * @param string $key Property key
+ */
+ public function __unset($key)
+ {
+ }
+ /**#@+
+ * @see request()
+ * @param string $url
+ * @param array $headers
+ * @param array $options
+ * @return Requests_Response
+ */
+ /**
+ * Send a GET request
+ */
+ public function get($url, $headers = array(), $options = array())
+ {
+ }
+ /**
+ * Send a HEAD request
+ */
+ public function head($url, $headers = array(), $options = array())
+ {
+ }
+ /**
+ * Send a DELETE request
+ */
+ public function delete($url, $headers = array(), $options = array())
+ {
+ }
+ /**#@-*/
+ /**#@+
+ * @see request()
+ * @param string $url
+ * @param array $headers
+ * @param array $data
+ * @param array $options
+ * @return Requests_Response
+ */
+ /**
+ * Send a POST request
+ */
+ public function post($url, $headers = array(), $data = array(), $options = array())
+ {
+ }
+ /**
+ * Send a PUT request
+ */
+ public function put($url, $headers = array(), $data = array(), $options = array())
+ {
+ }
+ /**
+ * Send a PATCH request
+ *
+ * Note: Unlike {@see post} and {@see put}, `$headers` is required, as the
+ * specification recommends that should send an ETag
+ *
+ * @link https://tools.ietf.org/html/rfc5789
+ */
+ public function patch($url, $headers, $data = array(), $options = array())
+ {
+ }
+ /**#@-*/
+ /**
+ * Main interface for HTTP requests
+ *
+ * This method initiates a request and sends it via a transport before
+ * parsing.
+ *
+ * @see Requests::request()
+ *
+ * @throws Requests_Exception On invalid URLs (`nonhttp`)
+ *
+ * @param string $url URL to request
+ * @param array $headers Extra headers to send with the request
+ * @param array|null $data Data to send either as a query string for GET/HEAD requests, or in the body for POST requests
+ * @param string $type HTTP request type (use Requests constants)
+ * @param array $options Options for the request (see {@see Requests::request})
+ * @return Requests_Response
+ */
+ public function request($url, $headers = array(), $data = array(), $type = \Requests::GET, $options = array())
+ {
+ }
+ /**
+ * Send multiple HTTP requests simultaneously
+ *
+ * @see Requests::request_multiple()
+ *
+ * @param array $requests Requests data (see {@see Requests::request_multiple})
+ * @param array $options Global and default options (see {@see Requests::request})
+ * @return array Responses (either Requests_Response or a Requests_Exception object)
+ */
+ public function request_multiple($requests, $options = array())
+ {
+ }
+ /**
+ * Merge a request's data with the default data
+ *
+ * @param array $request Request data (same form as {@see request_multiple})
+ * @param boolean $merge_options Should we merge options as well?
+ * @return array Request data
+ */
+ protected function merge_request($request, $merge_options = \true)
+ {
+ }
+ }
+ /**
+ * Base HTTP transport
+ *
+ * @package Requests
+ * @subpackage Transport
+ */
+ /**
+ * Base HTTP transport
+ *
+ * @package Requests
+ * @subpackage Transport
+ */
+ interface Requests_Transport
+ {
+ /**
+ * Perform a request
+ *
+ * @param string $url URL to request
+ * @param array $headers Associative array of request headers
+ * @param string|array $data Data to send either as the POST body, or as parameters in the URL for a GET/HEAD
+ * @param array $options Request options, see {@see Requests::response()} for documentation
+ * @return string Raw HTTP result
+ */
+ public function request($url, $headers = array(), $data = array(), $options = array());
+ /**
+ * Send multiple requests simultaneously
+ *
+ * @param array $requests Request data (array of 'url', 'headers', 'data', 'options') as per {@see Requests_Transport::request}
+ * @param array $options Global options, see {@see Requests::response()} for documentation
+ * @return array Array of Requests_Response objects (may contain Requests_Exception or string responses as well)
+ */
+ public function request_multiple($requests, $options);
+ /**
+ * Self-test whether the transport can be used
+ * @return bool
+ */
+ public static function test();
+ }
+ /**
+ * cURL HTTP transport
+ *
+ * @package Requests
+ * @subpackage Transport
+ */
+ /**
+ * cURL HTTP transport
+ *
+ * @package Requests
+ * @subpackage Transport
+ */
+ class Requests_Transport_cURL implements \Requests_Transport
+ {
+ const CURL_7_10_5 = 0x70a05;
+ const CURL_7_16_2 = 0x71002;
+ /**
+ * Raw HTTP data
+ *
+ * @var string
+ */
+ public $headers = '';
+ /**
+ * Raw body data
+ *
+ * @var string
+ */
+ public $response_data = '';
+ /**
+ * Information on the current request
+ *
+ * @var array cURL information array, see {@see https://secure.php.net/curl_getinfo}
+ */
+ public $info;
+ /**
+ * cURL version number
+ *
+ * @var int
+ */
+ public $version;
+ /**
+ * cURL handle
+ *
+ * @var resource
+ */
+ protected $handle;
+ /**
+ * Hook dispatcher instance
+ *
+ * @var Requests_Hooks
+ */
+ protected $hooks;
+ /**
+ * Have we finished the headers yet?
+ *
+ * @var boolean
+ */
+ protected $done_headers = \false;
+ /**
+ * If streaming to a file, keep the file pointer
+ *
+ * @var resource
+ */
+ protected $stream_handle;
+ /**
+ * How many bytes are in the response body?
+ *
+ * @var int
+ */
+ protected $response_bytes;
+ /**
+ * What's the maximum number of bytes we should keep?
+ *
+ * @var int|bool Byte count, or false if no limit.
+ */
+ protected $response_byte_limit;
+ /**
+ * Constructor
+ */
+ public function __construct()
+ {
+ }
+ /**
+ * Destructor
+ */
+ public function __destruct()
+ {
+ }
+ /**
+ * Perform a request
+ *
+ * @throws Requests_Exception On a cURL error (`curlerror`)
+ *
+ * @param string $url URL to request
+ * @param array $headers Associative array of request headers
+ * @param string|array $data Data to send either as the POST body, or as parameters in the URL for a GET/HEAD
+ * @param array $options Request options, see {@see Requests::response()} for documentation
+ * @return string Raw HTTP result
+ */
+ public function request($url, $headers = array(), $data = array(), $options = array())
+ {
+ }
+ /**
+ * Send multiple requests simultaneously
+ *
+ * @param array $requests Request data
+ * @param array $options Global options
+ * @return array Array of Requests_Response objects (may contain Requests_Exception or string responses as well)
+ */
+ public function request_multiple($requests, $options)
+ {
+ }
+ /**
+ * Get the cURL handle for use in a multi-request
+ *
+ * @param string $url URL to request
+ * @param array $headers Associative array of request headers
+ * @param string|array $data Data to send either as the POST body, or as parameters in the URL for a GET/HEAD
+ * @param array $options Request options, see {@see Requests::response()} for documentation
+ * @return resource Subrequest's cURL handle
+ */
+ public function &get_subrequest_handle($url, $headers, $data, $options)
+ {
+ }
+ /**
+ * Setup the cURL handle for the given data
+ *
+ * @param string $url URL to request
+ * @param array $headers Associative array of request headers
+ * @param string|array $data Data to send either as the POST body, or as parameters in the URL for a GET/HEAD
+ * @param array $options Request options, see {@see Requests::response()} for documentation
+ */
+ protected function setup_handle($url, $headers, $data, $options)
+ {
+ }
+ /**
+ * Process a response
+ *
+ * @param string $response Response data from the body
+ * @param array $options Request options
+ * @return string|false HTTP response data including headers. False if non-blocking.
+ * @throws Requests_Exception
+ */
+ public function process_response($response, $options)
+ {
+ }
+ /**
+ * Collect the headers as they are received
+ *
+ * @param resource $handle cURL resource
+ * @param string $headers Header string
+ * @return integer Length of provided header
+ */
+ public function stream_headers($handle, $headers)
+ {
+ }
+ /**
+ * Collect data as it's received
+ *
+ * @since 1.6.1
+ *
+ * @param resource $handle cURL resource
+ * @param string $data Body data
+ * @return integer Length of provided data
+ */
+ public function stream_body($handle, $data)
+ {
+ }
+ /**
+ * Format a URL given GET data
+ *
+ * @param string $url
+ * @param array|object $data Data to build query using, see {@see https://secure.php.net/http_build_query}
+ * @return string URL with data
+ */
+ protected static function format_get($url, $data)
+ {
+ }
+ /**
+ * Whether this transport is valid
+ *
+ * @codeCoverageIgnore
+ * @return boolean True if the transport is valid, false otherwise.
+ */
+ public static function test($capabilities = array())
+ {
+ }
+ /**
+ * Get the correct "Expect" header for the given request data.
+ *
+ * @param string|array $data Data to send either as the POST body, or as parameters in the URL for a GET/HEAD.
+ * @return string The "Expect" header.
+ */
+ protected function get_expect_header($data)
+ {
+ }
+ }
+ /**
+ * fsockopen HTTP transport
+ *
+ * @package Requests
+ * @subpackage Transport
+ */
+ /**
+ * fsockopen HTTP transport
+ *
+ * @package Requests
+ * @subpackage Transport
+ */
+ class Requests_Transport_fsockopen implements \Requests_Transport
+ {
+ /**
+ * Second to microsecond conversion
+ *
+ * @var integer
+ */
+ const SECOND_IN_MICROSECONDS = 1000000;
+ /**
+ * Raw HTTP data
+ *
+ * @var string
+ */
+ public $headers = '';
+ /**
+ * Stream metadata
+ *
+ * @var array Associative array of properties, see {@see https://secure.php.net/stream_get_meta_data}
+ */
+ public $info;
+ /**
+ * What's the maximum number of bytes we should keep?
+ *
+ * @var int|bool Byte count, or false if no limit.
+ */
+ protected $max_bytes = \false;
+ protected $connect_error = '';
+ /**
+ * Perform a request
+ *
+ * @throws Requests_Exception On failure to connect to socket (`fsockopenerror`)
+ * @throws Requests_Exception On socket timeout (`timeout`)
+ *
+ * @param string $url URL to request
+ * @param array $headers Associative array of request headers
+ * @param string|array $data Data to send either as the POST body, or as parameters in the URL for a GET/HEAD
+ * @param array $options Request options, see {@see Requests::response()} for documentation
+ * @return string Raw HTTP result
+ */
+ public function request($url, $headers = array(), $data = array(), $options = array())
+ {
+ }
+ /**
+ * Send multiple requests simultaneously
+ *
+ * @param array $requests Request data (array of 'url', 'headers', 'data', 'options') as per {@see Requests_Transport::request}
+ * @param array $options Global options, see {@see Requests::response()} for documentation
+ * @return array Array of Requests_Response objects (may contain Requests_Exception or string responses as well)
+ */
+ public function request_multiple($requests, $options)
+ {
+ }
+ /**
+ * Retrieve the encodings we can accept
+ *
+ * @return string Accept-Encoding header value
+ */
+ protected static function accept_encoding()
+ {
+ }
+ /**
+ * Format a URL given GET data
+ *
+ * @param array $url_parts
+ * @param array|object $data Data to build query using, see {@see https://secure.php.net/http_build_query}
+ * @return string URL with data
+ */
+ protected static function format_get($url_parts, $data)
+ {
+ }
+ /**
+ * Error handler for stream_socket_client()
+ *
+ * @param int $errno Error number (e.g. E_WARNING)
+ * @param string $errstr Error message
+ */
+ public function connect_error_handler($errno, $errstr)
+ {
+ }
+ /**
+ * Verify the certificate against common name and subject alternative names
+ *
+ * Unfortunately, PHP doesn't check the certificate against the alternative
+ * names, leading things like 'https://www.github.com/' to be invalid.
+ * Instead
+ *
+ * @see https://tools.ietf.org/html/rfc2818#section-3.1 RFC2818, Section 3.1
+ *
+ * @throws Requests_Exception On failure to connect via TLS (`fsockopen.ssl.connect_error`)
+ * @throws Requests_Exception On not obtaining a match for the host (`fsockopen.ssl.no_match`)
+ * @param string $host Host name to verify against
+ * @param resource $context Stream context
+ * @return bool
+ */
+ public function verify_certificate_from_context($host, $context)
+ {
+ }
+ /**
+ * Whether this transport is valid
+ *
+ * @codeCoverageIgnore
+ * @return boolean True if the transport is valid, false otherwise.
+ */
+ public static function test($capabilities = array())
+ {
+ }
+ }
+ /**
+ * Iterator for arrays requiring filtered values
+ *
+ * @package Requests
+ * @subpackage Utilities
+ */
+ /**
+ * Iterator for arrays requiring filtered values
+ *
+ * @package Requests
+ * @subpackage Utilities
+ */
+ class Requests_Utility_FilteredIterator extends \ArrayIterator
+ {
+ /**
+ * Callback to run as a filter
+ *
+ * @var callable
+ */
+ protected $callback;
+ /**
+ * Create a new iterator
+ *
+ * @param array $data
+ * @param callable $callback Callback to be called on each value
+ */
+ public function __construct($data, $callback)
+ {
+ }
+ /**
+ * Get the current item's value after filtering
+ *
+ * @return string
+ */
+ #[ReturnTypeWillChange]
+ public function current()
+ {
+ }
+ /**
+ * @inheritdoc
+ */
+ #[ReturnTypeWillChange]
+ public function unserialize($serialized)
+ {
+ }
+ /**
+ * @inheritdoc
+ *
+ * @phpcs:disable PHPCompatibility.FunctionNameRestrictions.ReservedFunctionNames.MethodDoubleUnderscore,PHPCompatibility.FunctionNameRestrictions.NewMagicMethods.__unserializeFound
+ */
+ #[ReturnTypeWillChange]
+ public function __unserialize($serialized)
+ {
+ }
+ public function __wakeup()
+ {
+ }
+ }
+ /**
+ * SimplePie
+ *
+ * A PHP-Based RSS and Atom Feed Framework.
+ * Takes the hard work out of managing a complete RSS/Atom solution.
+ *
+ * Copyright (c) 2004-2016, Ryan Parman, Sam Sneddon, Ryan McCue, and contributors
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification, are
+ * permitted provided that the following conditions are met:
+ *
+ * * Redistributions of source code must retain the above copyright notice, this list of
+ * conditions and the following disclaimer.
+ *
+ * * Redistributions in binary form must reproduce the above copyright notice, this list
+ * of conditions and the following disclaimer in the documentation and/or other materials
+ * provided with the distribution.
+ *
+ * * Neither the name of the SimplePie Team 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 HOLDERS
+ * AND 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.
+ *
+ * @package SimplePie
+ * @copyright 2004-2016 Ryan Parman, Sam Sneddon, Ryan McCue
+ * @author Ryan Parman
+ * @author Sam Sneddon
+ * @author Ryan McCue
+ * @link http://simplepie.org/ SimplePie
+ * @license http://www.opensource.org/licenses/bsd-license.php BSD License
+ */
+ /**
+ * Manages all author-related data
+ *
+ * Used by {@see SimplePie_Item::get_author()} and {@see SimplePie::get_authors()}
+ *
+ * This class can be overloaded with {@see SimplePie::set_author_class()}
+ *
+ * @package SimplePie
+ * @subpackage API
+ */
+ class SimplePie_Author
+ {
+ /**
+ * Author's name
+ *
+ * @var string
+ * @see get_name()
+ */
+ var $name;
+ /**
+ * Author's link
+ *
+ * @var string
+ * @see get_link()
+ */
+ var $link;
+ /**
+ * Author's email address
+ *
+ * @var string
+ * @see get_email()
+ */
+ var $email;
+ /**
+ * Constructor, used to input the data
+ *
+ * @param string $name
+ * @param string $link
+ * @param string $email
+ */
+ public function __construct($name = \null, $link = \null, $email = \null)
+ {
+ }
+ /**
+ * String-ified version
+ *
+ * @return string
+ */
+ public function __toString()
+ {
+ }
+ /**
+ * Author's name
+ *
+ * @return string|null
+ */
+ public function get_name()
+ {
+ }
+ /**
+ * Author's link
+ *
+ * @return string|null
+ */
+ public function get_link()
+ {
+ }
+ /**
+ * Author's email address
+ *
+ * @return string|null
+ */
+ public function get_email()
+ {
+ }
+ }
+ /**
+ * SimplePie
+ *
+ * A PHP-Based RSS and Atom Feed Framework.
+ * Takes the hard work out of managing a complete RSS/Atom solution.
+ *
+ * Copyright (c) 2004-2016, Ryan Parman, Sam Sneddon, Ryan McCue, and contributors
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification, are
+ * permitted provided that the following conditions are met:
+ *
+ * * Redistributions of source code must retain the above copyright notice, this list of
+ * conditions and the following disclaimer.
+ *
+ * * Redistributions in binary form must reproduce the above copyright notice, this list
+ * of conditions and the following disclaimer in the documentation and/or other materials
+ * provided with the distribution.
+ *
+ * * Neither the name of the SimplePie Team 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 HOLDERS
+ * AND 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.
+ *
+ * @package SimplePie
+ * @copyright 2004-2016 Ryan Parman, Sam Sneddon, Ryan McCue
+ * @author Ryan Parman
+ * @author Sam Sneddon
+ * @author Ryan McCue
+ * @link http://simplepie.org/ SimplePie
+ * @license http://www.opensource.org/licenses/bsd-license.php BSD License
+ */
+ /**
+ * Used to create cache objects
+ *
+ * This class can be overloaded with {@see SimplePie::set_cache_class()},
+ * although the preferred way is to create your own handler
+ * via {@see register()}
+ *
+ * @package SimplePie
+ * @subpackage Caching
+ */
+ class SimplePie_Cache
+ {
+ /**
+ * Cache handler classes
+ *
+ * These receive 3 parameters to their constructor, as documented in
+ * {@see register()}
+ * @var array
+ */
+ protected static $handlers = array('mysql' => 'SimplePie_Cache_MySQL', 'memcache' => 'SimplePie_Cache_Memcache', 'memcached' => 'SimplePie_Cache_Memcached', 'redis' => 'SimplePie_Cache_Redis');
+ /**
+ * Create a new SimplePie_Cache object
+ *
+ * @param string $location URL location (scheme is used to determine handler)
+ * @param string $filename Unique identifier for cache object
+ * @param string $extension 'spi' or 'spc'
+ * @return SimplePie_Cache_Base Type of object depends on scheme of `$location`
+ */
+ public static function get_handler($location, $filename, $extension)
+ {
+ }
+ /**
+ * Create a new SimplePie_Cache object
+ *
+ * @deprecated Use {@see get_handler} instead
+ */
+ public function create($location, $filename, $extension)
+ {
+ }
+ /**
+ * Register a handler
+ *
+ * @param string $type DSN type to register for
+ * @param string $class Name of handler class. Must implement SimplePie_Cache_Base
+ */
+ public static function register($type, $class)
+ {
+ }
+ /**
+ * Parse a URL into an array
+ *
+ * @param string $url
+ * @return array
+ */
+ public static function parse_URL($url)
+ {
+ }
+ }
+ /**
+ * SimplePie
+ *
+ * A PHP-Based RSS and Atom Feed Framework.
+ * Takes the hard work out of managing a complete RSS/Atom solution.
+ *
+ * Copyright (c) 2004-2016, Ryan Parman, Sam Sneddon, Ryan McCue, and contributors
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification, are
+ * permitted provided that the following conditions are met:
+ *
+ * * Redistributions of source code must retain the above copyright notice, this list of
+ * conditions and the following disclaimer.
+ *
+ * * Redistributions in binary form must reproduce the above copyright notice, this list
+ * of conditions and the following disclaimer in the documentation and/or other materials
+ * provided with the distribution.
+ *
+ * * Neither the name of the SimplePie Team 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 HOLDERS
+ * AND 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.
+ *
+ * @package SimplePie
+ * @copyright 2004-2016 Ryan Parman, Sam Sneddon, Ryan McCue
+ * @author Ryan Parman
+ * @author Sam Sneddon
+ * @author Ryan McCue
+ * @link http://simplepie.org/ SimplePie
+ * @license http://www.opensource.org/licenses/bsd-license.php BSD License
+ */
+ /**
+ * Base for cache objects
+ *
+ * Classes to be used with {@see SimplePie_Cache::register()} are expected
+ * to implement this interface.
+ *
+ * @package SimplePie
+ * @subpackage Caching
+ */
+ interface SimplePie_Cache_Base
+ {
+ /**
+ * Feed cache type
+ *
+ * @var string
+ */
+ const TYPE_FEED = 'spc';
+ /**
+ * Image cache type
+ *
+ * @var string
+ */
+ const TYPE_IMAGE = 'spi';
+ /**
+ * Create a new cache object
+ *
+ * @param string $location Location string (from SimplePie::$cache_location)
+ * @param string $name Unique ID for the cache
+ * @param string $type Either TYPE_FEED for SimplePie data, or TYPE_IMAGE for image data
+ */
+ public function __construct($location, $name, $type);
+ /**
+ * Save data to the cache
+ *
+ * @param array|SimplePie $data Data to store in the cache. If passed a SimplePie object, only cache the $data property
+ * @return bool Successfulness
+ */
+ public function save($data);
+ /**
+ * Retrieve the data saved to the cache
+ *
+ * @return array Data for SimplePie::$data
+ */
+ public function load();
+ /**
+ * Retrieve the last modified time for the cache
+ *
+ * @return int Timestamp
+ */
+ public function mtime();
+ /**
+ * Set the last modified time to the current time
+ *
+ * @return bool Success status
+ */
+ public function touch();
+ /**
+ * Remove the cache
+ *
+ * @return bool Success status
+ */
+ public function unlink();
+ }
+ /**
+ * SimplePie
+ *
+ * A PHP-Based RSS and Atom Feed Framework.
+ * Takes the hard work out of managing a complete RSS/Atom solution.
+ *
+ * Copyright (c) 2004-2016, Ryan Parman, Sam Sneddon, Ryan McCue, and contributors
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification, are
+ * permitted provided that the following conditions are met:
+ *
+ * * Redistributions of source code must retain the above copyright notice, this list of
+ * conditions and the following disclaimer.
+ *
+ * * Redistributions in binary form must reproduce the above copyright notice, this list
+ * of conditions and the following disclaimer in the documentation and/or other materials
+ * provided with the distribution.
+ *
+ * * Neither the name of the SimplePie Team 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 HOLDERS
+ * AND 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.
+ *
+ * @package SimplePie
+ * @copyright 2004-2016 Ryan Parman, Sam Sneddon, Ryan McCue
+ * @author Ryan Parman
+ * @author Sam Sneddon
+ * @author Ryan McCue
+ * @link http://simplepie.org/ SimplePie
+ * @license http://www.opensource.org/licenses/bsd-license.php BSD License
+ */
+ /**
+ * Base class for database-based caches
+ *
+ * @package SimplePie
+ * @subpackage Caching
+ */
+ abstract class SimplePie_Cache_DB implements \SimplePie_Cache_Base
+ {
+ /**
+ * Helper for database conversion
+ *
+ * Converts a given {@see SimplePie} object into data to be stored
+ *
+ * @param SimplePie $data
+ * @return array First item is the serialized data for storage, second item is the unique ID for this item
+ */
+ protected static function prepare_simplepie_object_for_cache($data)
+ {
+ }
+ }
+ /**
+ * SimplePie
+ *
+ * A PHP-Based RSS and Atom Feed Framework.
+ * Takes the hard work out of managing a complete RSS/Atom solution.
+ *
+ * Copyright (c) 2004-2016, Ryan Parman, Sam Sneddon, Ryan McCue, and contributors
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification, are
+ * permitted provided that the following conditions are met:
+ *
+ * * Redistributions of source code must retain the above copyright notice, this list of
+ * conditions and the following disclaimer.
+ *
+ * * Redistributions in binary form must reproduce the above copyright notice, this list
+ * of conditions and the following disclaimer in the documentation and/or other materials
+ * provided with the distribution.
+ *
+ * * Neither the name of the SimplePie Team 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 HOLDERS
+ * AND 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.
+ *
+ * @package SimplePie
+ * @copyright 2004-2016 Ryan Parman, Sam Sneddon, Ryan McCue
+ * @author Ryan Parman
+ * @author Sam Sneddon
+ * @author Ryan McCue
+ * @link http://simplepie.org/ SimplePie
+ * @license http://www.opensource.org/licenses/bsd-license.php BSD License
+ */
+ /**
+ * Caches data to the filesystem
+ *
+ * @package SimplePie
+ * @subpackage Caching
+ */
+ class SimplePie_Cache_File implements \SimplePie_Cache_Base
+ {
+ /**
+ * Location string
+ *
+ * @see SimplePie::$cache_location
+ * @var string
+ */
+ protected $location;
+ /**
+ * Filename
+ *
+ * @var string
+ */
+ protected $filename;
+ /**
+ * File extension
+ *
+ * @var string
+ */
+ protected $extension;
+ /**
+ * File path
+ *
+ * @var string
+ */
+ protected $name;
+ /**
+ * Create a new cache object
+ *
+ * @param string $location Location string (from SimplePie::$cache_location)
+ * @param string $name Unique ID for the cache
+ * @param string $type Either TYPE_FEED for SimplePie data, or TYPE_IMAGE for image data
+ */
+ public function __construct($location, $name, $type)
+ {
+ }
+ /**
+ * Save data to the cache
+ *
+ * @param array|SimplePie $data Data to store in the cache. If passed a SimplePie object, only cache the $data property
+ * @return bool Successfulness
+ */
+ public function save($data)
+ {
+ }
+ /**
+ * Retrieve the data saved to the cache
+ *
+ * @return array Data for SimplePie::$data
+ */
+ public function load()
+ {
+ }
+ /**
+ * Retrieve the last modified time for the cache
+ *
+ * @return int Timestamp
+ */
+ public function mtime()
+ {
+ }
+ /**
+ * Set the last modified time to the current time
+ *
+ * @return bool Success status
+ */
+ public function touch()
+ {
+ }
+ /**
+ * Remove the cache
+ *
+ * @return bool Success status
+ */
+ public function unlink()
+ {
+ }
+ }
+ /**
+ * SimplePie
+ *
+ * A PHP-Based RSS and Atom Feed Framework.
+ * Takes the hard work out of managing a complete RSS/Atom solution.
+ *
+ * Copyright (c) 2004-2016, Ryan Parman, Sam Sneddon, Ryan McCue, and contributors
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification, are
+ * permitted provided that the following conditions are met:
+ *
+ * * Redistributions of source code must retain the above copyright notice, this list of
+ * conditions and the following disclaimer.
+ *
+ * * Redistributions in binary form must reproduce the above copyright notice, this list
+ * of conditions and the following disclaimer in the documentation and/or other materials
+ * provided with the distribution.
+ *
+ * * Neither the name of the SimplePie Team 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 HOLDERS
+ * AND 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.
+ *
+ * @package SimplePie
+ * @copyright 2004-2016 Ryan Parman, Sam Sneddon, Ryan McCue
+ * @author Ryan Parman
+ * @author Sam Sneddon
+ * @author Ryan McCue
+ * @link http://simplepie.org/ SimplePie
+ * @license http://www.opensource.org/licenses/bsd-license.php BSD License
+ */
+ /**
+ * Caches data to memcache
+ *
+ * Registered for URLs with the "memcache" protocol
+ *
+ * For example, `memcache://localhost:11211/?timeout=3600&prefix=sp_` will
+ * connect to memcache on `localhost` on port 11211. All tables will be
+ * prefixed with `sp_` and data will expire after 3600 seconds
+ *
+ * @package SimplePie
+ * @subpackage Caching
+ * @uses Memcache
+ */
+ class SimplePie_Cache_Memcache implements \SimplePie_Cache_Base
+ {
+ /**
+ * Memcache instance
+ *
+ * @var Memcache
+ */
+ protected $cache;
+ /**
+ * Options
+ *
+ * @var array
+ */
+ protected $options;
+ /**
+ * Cache name
+ *
+ * @var string
+ */
+ protected $name;
+ /**
+ * Create a new cache object
+ *
+ * @param string $location Location string (from SimplePie::$cache_location)
+ * @param string $name Unique ID for the cache
+ * @param string $type Either TYPE_FEED for SimplePie data, or TYPE_IMAGE for image data
+ */
+ public function __construct($location, $name, $type)
+ {
+ }
+ /**
+ * Save data to the cache
+ *
+ * @param array|SimplePie $data Data to store in the cache. If passed a SimplePie object, only cache the $data property
+ * @return bool Successfulness
+ */
+ public function save($data)
+ {
+ }
+ /**
+ * Retrieve the data saved to the cache
+ *
+ * @return array Data for SimplePie::$data
+ */
+ public function load()
+ {
+ }
+ /**
+ * Retrieve the last modified time for the cache
+ *
+ * @return int Timestamp
+ */
+ public function mtime()
+ {
+ }
+ /**
+ * Set the last modified time to the current time
+ *
+ * @return bool Success status
+ */
+ public function touch()
+ {
+ }
+ /**
+ * Remove the cache
+ *
+ * @return bool Success status
+ */
+ public function unlink()
+ {
+ }
+ }
+ /**
+ * SimplePie
+ *
+ * A PHP-Based RSS and Atom Feed Framework.
+ * Takes the hard work out of managing a complete RSS/Atom solution.
+ *
+ * Copyright (c) 2004-2016, Ryan Parman, Sam Sneddon, Ryan McCue, and contributors
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification, are
+ * permitted provided that the following conditions are met:
+ *
+ * * Redistributions of source code must retain the above copyright notice, this list of
+ * conditions and the following disclaimer.
+ *
+ * * Redistributions in binary form must reproduce the above copyright notice, this list
+ * of conditions and the following disclaimer in the documentation and/or other materials
+ * provided with the distribution.
+ *
+ * * Neither the name of the SimplePie Team 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 HOLDERS
+ * AND 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.
+ *
+ * @package SimplePie
+ * @copyright 2004-2016 Ryan Parman, Sam Sneddon, Ryan McCue
+ * @author Ryan Parman
+ * @author Sam Sneddon
+ * @author Ryan McCue
+ * @link http://simplepie.org/ SimplePie
+ * @license http://www.opensource.org/licenses/bsd-license.php BSD License
+ */
+ /**
+ * Caches data to memcached
+ *
+ * Registered for URLs with the "memcached" protocol
+ *
+ * For example, `memcached://localhost:11211/?timeout=3600&prefix=sp_` will
+ * connect to memcached on `localhost` on port 11211. All tables will be
+ * prefixed with `sp_` and data will expire after 3600 seconds
+ *
+ * @package SimplePie
+ * @subpackage Caching
+ * @author Paul L. McNeely
+ * @uses Memcached
+ */
+ class SimplePie_Cache_Memcached implements \SimplePie_Cache_Base
+ {
+ /**
+ * Memcached instance
+ * @var Memcached
+ */
+ protected $cache;
+ /**
+ * Options
+ * @var array
+ */
+ protected $options;
+ /**
+ * Cache name
+ * @var string
+ */
+ protected $name;
+ /**
+ * Create a new cache object
+ * @param string $location Location string (from SimplePie::$cache_location)
+ * @param string $name Unique ID for the cache
+ * @param string $type Either TYPE_FEED for SimplePie data, or TYPE_IMAGE for image data
+ */
+ public function __construct($location, $name, $type)
+ {
+ }
+ /**
+ * Save data to the cache
+ * @param array|SimplePie $data Data to store in the cache. If passed a SimplePie object, only cache the $data property
+ * @return bool Successfulness
+ */
+ public function save($data)
+ {
+ }
+ /**
+ * Retrieve the data saved to the cache
+ * @return array Data for SimplePie::$data
+ */
+ public function load()
+ {
+ }
+ /**
+ * Retrieve the last modified time for the cache
+ * @return int Timestamp
+ */
+ public function mtime()
+ {
+ }
+ /**
+ * Set the last modified time to the current time
+ * @return bool Success status
+ */
+ public function touch()
+ {
+ }
+ /**
+ * Remove the cache
+ * @return bool Success status
+ */
+ public function unlink()
+ {
+ }
+ }
+ /**
+ * SimplePie
+ *
+ * A PHP-Based RSS and Atom Feed Framework.
+ * Takes the hard work out of managing a complete RSS/Atom solution.
+ *
+ * Copyright (c) 2004-2016, Ryan Parman, Sam Sneddon, Ryan McCue, and contributors
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification, are
+ * permitted provided that the following conditions are met:
+ *
+ * * Redistributions of source code must retain the above copyright notice, this list of
+ * conditions and the following disclaimer.
+ *
+ * * Redistributions in binary form must reproduce the above copyright notice, this list
+ * of conditions and the following disclaimer in the documentation and/or other materials
+ * provided with the distribution.
+ *
+ * * Neither the name of the SimplePie Team 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 HOLDERS
+ * AND 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.
+ *
+ * @package SimplePie
+ * @copyright 2004-2016 Ryan Parman, Sam Sneddon, Ryan McCue
+ * @author Ryan Parman
+ * @author Sam Sneddon
+ * @author Ryan McCue
+ * @link http://simplepie.org/ SimplePie
+ * @license http://www.opensource.org/licenses/bsd-license.php BSD License
+ */
+ /**
+ * Caches data to a MySQL database
+ *
+ * Registered for URLs with the "mysql" protocol
+ *
+ * For example, `mysql://root:password@localhost:3306/mydb?prefix=sp_` will
+ * connect to the `mydb` database on `localhost` on port 3306, with the user
+ * `root` and the password `password`. All tables will be prefixed with `sp_`
+ *
+ * @package SimplePie
+ * @subpackage Caching
+ */
+ class SimplePie_Cache_MySQL extends \SimplePie_Cache_DB
+ {
+ /**
+ * PDO instance
+ *
+ * @var PDO
+ */
+ protected $mysql;
+ /**
+ * Options
+ *
+ * @var array
+ */
+ protected $options;
+ /**
+ * Cache ID
+ *
+ * @var string
+ */
+ protected $id;
+ /**
+ * Create a new cache object
+ *
+ * @param string $location Location string (from SimplePie::$cache_location)
+ * @param string $name Unique ID for the cache
+ * @param string $type Either TYPE_FEED for SimplePie data, or TYPE_IMAGE for image data
+ */
+ public function __construct($location, $name, $type)
+ {
+ }
+ /**
+ * Save data to the cache
+ *
+ * @param array|SimplePie $data Data to store in the cache. If passed a SimplePie object, only cache the $data property
+ * @return bool Successfulness
+ */
+ public function save($data)
+ {
+ }
+ /**
+ * Retrieve the data saved to the cache
+ *
+ * @return array Data for SimplePie::$data
+ */
+ public function load()
+ {
+ }
+ /**
+ * Retrieve the last modified time for the cache
+ *
+ * @return int Timestamp
+ */
+ public function mtime()
+ {
+ }
+ /**
+ * Set the last modified time to the current time
+ *
+ * @return bool Success status
+ */
+ public function touch()
+ {
+ }
+ /**
+ * Remove the cache
+ *
+ * @return bool Success status
+ */
+ public function unlink()
+ {
+ }
+ }
+ /**
+ * SimplePie Redis Cache Extension
+ *
+ * @package SimplePie
+ * @author Jan Kozak
+ * @link http://galvani.cz/
+ * @license http://www.opensource.org/licenses/bsd-license.php BSD License
+ * @version 0.2.9
+ */
+ /**
+ * Caches data to redis
+ *
+ * Registered for URLs with the "redis" protocol
+ *
+ * For example, `redis://localhost:6379/?timeout=3600&prefix=sp_&dbIndex=0` will
+ * connect to redis on `localhost` on port 6379. All tables will be
+ * prefixed with `simple_primary-` and data will expire after 3600 seconds
+ *
+ * @package SimplePie
+ * @subpackage Caching
+ * @uses Redis
+ */
+ class SimplePie_Cache_Redis implements \SimplePie_Cache_Base
+ {
+ /**
+ * Redis instance
+ *
+ * @var \Redis
+ */
+ protected $cache;
+ /**
+ * Options
+ *
+ * @var array
+ */
+ protected $options;
+ /**
+ * Cache name
+ *
+ * @var string
+ */
+ protected $name;
+ /**
+ * Cache Data
+ *
+ * @var type
+ */
+ protected $data;
+ /**
+ * Create a new cache object
+ *
+ * @param string $location Location string (from SimplePie::$cache_location)
+ * @param string $name Unique ID for the cache
+ * @param string $type Either TYPE_FEED for SimplePie data, or TYPE_IMAGE for image data
+ */
+ public function __construct($location, $name, $options = \null)
+ {
+ }
+ /**
+ * @param \Redis $cache
+ */
+ public function setRedisClient(\Redis $cache)
+ {
+ }
+ /**
+ * Save data to the cache
+ *
+ * @param array|SimplePie $data Data to store in the cache. If passed a SimplePie object, only cache the $data property
+ * @return bool Successfulness
+ */
+ public function save($data)
+ {
+ }
+ /**
+ * Retrieve the data saved to the cache
+ *
+ * @return array Data for SimplePie::$data
+ */
+ public function load()
+ {
+ }
+ /**
+ * Retrieve the last modified time for the cache
+ *
+ * @return int Timestamp
+ */
+ public function mtime()
+ {
+ }
+ /**
+ * Set the last modified time to the current time
+ *
+ * @return bool Success status
+ */
+ public function touch()
+ {
+ }
+ /**
+ * Remove the cache
+ *
+ * @return bool Success status
+ */
+ public function unlink()
+ {
+ }
+ }
+ /**
+ * SimplePie
+ *
+ * A PHP-Based RSS and Atom Feed Framework.
+ * Takes the hard work out of managing a complete RSS/Atom solution.
+ *
+ * Copyright (c) 2004-2016, Ryan Parman, Sam Sneddon, Ryan McCue, and contributors
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification, are
+ * permitted provided that the following conditions are met:
+ *
+ * * Redistributions of source code must retain the above copyright notice, this list of
+ * conditions and the following disclaimer.
+ *
+ * * Redistributions in binary form must reproduce the above copyright notice, this list
+ * of conditions and the following disclaimer in the documentation and/or other materials
+ * provided with the distribution.
+ *
+ * * Neither the name of the SimplePie Team 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 HOLDERS
+ * AND 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.
+ *
+ * @package SimplePie
+ * @copyright 2004-2016 Ryan Parman, Sam Sneddon, Ryan McCue
+ * @author Ryan Parman
+ * @author Sam Sneddon
+ * @author Ryan McCue
+ * @link http://simplepie.org/ SimplePie
+ * @license http://www.opensource.org/licenses/bsd-license.php BSD License
+ */
+ /**
+ * Handles `` captions as defined in Media RSS.
+ *
+ * Used by {@see SimplePie_Enclosure::get_caption()} and {@see SimplePie_Enclosure::get_captions()}
+ *
+ * This class can be overloaded with {@see SimplePie::set_caption_class()}
+ *
+ * @package SimplePie
+ * @subpackage API
+ */
+ class SimplePie_Caption
+ {
+ /**
+ * Content type
+ *
+ * @var string
+ * @see get_type()
+ */
+ var $type;
+ /**
+ * Language
+ *
+ * @var string
+ * @see get_language()
+ */
+ var $lang;
+ /**
+ * Start time
+ *
+ * @var string
+ * @see get_starttime()
+ */
+ var $startTime;
+ /**
+ * End time
+ *
+ * @var string
+ * @see get_endtime()
+ */
+ var $endTime;
+ /**
+ * Caption text
+ *
+ * @var string
+ * @see get_text()
+ */
+ var $text;
+ /**
+ * Constructor, used to input the data
+ *
+ * For documentation on all the parameters, see the corresponding
+ * properties and their accessors
+ */
+ public function __construct($type = \null, $lang = \null, $startTime = \null, $endTime = \null, $text = \null)
+ {
+ }
+ /**
+ * String-ified version
+ *
+ * @return string
+ */
+ public function __toString()
+ {
+ }
+ /**
+ * Get the end time
+ *
+ * @return string|null Time in the format 'hh:mm:ss.SSS'
+ */
+ public function get_endtime()
+ {
+ }
+ /**
+ * Get the language
+ *
+ * @link http://tools.ietf.org/html/rfc3066
+ * @return string|null Language code as per RFC 3066
+ */
+ public function get_language()
+ {
+ }
+ /**
+ * Get the start time
+ *
+ * @return string|null Time in the format 'hh:mm:ss.SSS'
+ */
+ public function get_starttime()
+ {
+ }
+ /**
+ * Get the text of the caption
+ *
+ * @return string|null
+ */
+ public function get_text()
+ {
+ }
+ /**
+ * Get the content type (not MIME type)
+ *
+ * @return string|null Either 'text' or 'html'
+ */
+ public function get_type()
+ {
+ }
+ }
+ /**
+ * SimplePie
+ *
+ * A PHP-Based RSS and Atom Feed Framework.
+ * Takes the hard work out of managing a complete RSS/Atom solution.
+ *
+ * Copyright (c) 2004-2016, Ryan Parman, Sam Sneddon, Ryan McCue, and contributors
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification, are
+ * permitted provided that the following conditions are met:
+ *
+ * * Redistributions of source code must retain the above copyright notice, this list of
+ * conditions and the following disclaimer.
+ *
+ * * Redistributions in binary form must reproduce the above copyright notice, this list
+ * of conditions and the following disclaimer in the documentation and/or other materials
+ * provided with the distribution.
+ *
+ * * Neither the name of the SimplePie Team 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 HOLDERS
+ * AND 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.
+ *
+ * @package SimplePie
+ * @copyright 2004-2016 Ryan Parman, Sam Sneddon, Ryan McCue
+ * @author Ryan Parman
+ * @author Sam Sneddon
+ * @author Ryan McCue
+ * @link http://simplepie.org/ SimplePie
+ * @license http://www.opensource.org/licenses/bsd-license.php BSD License
+ */
+ /**
+ * Manages all category-related data
+ *
+ * Used by {@see SimplePie_Item::get_category()} and {@see SimplePie_Item::get_categories()}
+ *
+ * This class can be overloaded with {@see SimplePie::set_category_class()}
+ *
+ * @package SimplePie
+ * @subpackage API
+ */
+ class SimplePie_Category
+ {
+ /**
+ * Category identifier
+ *
+ * @var string|null
+ * @see get_term
+ */
+ var $term;
+ /**
+ * Categorization scheme identifier
+ *
+ * @var string|null
+ * @see get_scheme()
+ */
+ var $scheme;
+ /**
+ * Human readable label
+ *
+ * @var string|null
+ * @see get_label()
+ */
+ var $label;
+ /**
+ * Category type
+ *
+ * category for
+ * subject for
+ *
+ * @var string|null
+ * @see get_type()
+ */
+ var $type;
+ /**
+ * Constructor, used to input the data
+ *
+ * @param string|null $term
+ * @param string|null $scheme
+ * @param string|null $label
+ * @param string|null $type
+ */
+ public function __construct($term = \null, $scheme = \null, $label = \null, $type = \null)
+ {
+ }
+ /**
+ * String-ified version
+ *
+ * @return string
+ */
+ public function __toString()
+ {
+ }
+ /**
+ * Get the category identifier
+ *
+ * @return string|null
+ */
+ public function get_term()
+ {
+ }
+ /**
+ * Get the categorization scheme identifier
+ *
+ * @return string|null
+ */
+ public function get_scheme()
+ {
+ }
+ /**
+ * Get the human readable label
+ *
+ * @param bool $strict
+ * @return string|null
+ */
+ public function get_label($strict = \false)
+ {
+ }
+ /**
+ * Get the category type
+ *
+ * @return string|null
+ */
+ public function get_type()
+ {
+ }
+ }
+ /**
+ * SimplePie
+ *
+ * A PHP-Based RSS and Atom Feed Framework.
+ * Takes the hard work out of managing a complete RSS/Atom solution.
+ *
+ * Copyright (c) 2004-2016, Ryan Parman, Sam Sneddon, Ryan McCue, and contributors
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification, are
+ * permitted provided that the following conditions are met:
+ *
+ * * Redistributions of source code must retain the above copyright notice, this list of
+ * conditions and the following disclaimer.
+ *
+ * * Redistributions in binary form must reproduce the above copyright notice, this list
+ * of conditions and the following disclaimer in the documentation and/or other materials
+ * provided with the distribution.
+ *
+ * * Neither the name of the SimplePie Team 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 HOLDERS
+ * AND 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.
+ *
+ * @package SimplePie
+ * @copyright 2004-2016 Ryan Parman, Sam Sneddon, Ryan McCue
+ * @author Ryan Parman
+ * @author Sam Sneddon
+ * @author Ryan McCue
+ * @link http://simplepie.org/ SimplePie
+ * @license http://www.opensource.org/licenses/bsd-license.php BSD License
+ */
+ /**
+ * Content-type sniffing
+ *
+ * Based on the rules in http://tools.ietf.org/html/draft-abarth-mime-sniff-06
+ *
+ * This is used since we can't always trust Content-Type headers, and is based
+ * upon the HTML5 parsing rules.
+ *
+ *
+ * This class can be overloaded with {@see SimplePie::set_content_type_sniffer_class()}
+ *
+ * @package SimplePie
+ * @subpackage HTTP
+ */
+ class SimplePie_Content_Type_Sniffer
+ {
+ /**
+ * File object
+ *
+ * @var SimplePie_File
+ */
+ var $file;
+ /**
+ * Create an instance of the class with the input file
+ *
+ * @param SimplePie_Content_Type_Sniffer $file Input file
+ */
+ public function __construct($file)
+ {
+ }
+ /**
+ * Get the Content-Type of the specified file
+ *
+ * @return string Actual Content-Type
+ */
+ public function get_type()
+ {
+ }
+ /**
+ * Sniff text or binary
+ *
+ * @return string Actual Content-Type
+ */
+ public function text_or_binary()
+ {
+ }
+ /**
+ * Sniff unknown
+ *
+ * @return string Actual Content-Type
+ */
+ public function unknown()
+ {
+ }
+ /**
+ * Sniff images
+ *
+ * @return string Actual Content-Type
+ */
+ public function image()
+ {
+ }
+ /**
+ * Sniff HTML
+ *
+ * @return string Actual Content-Type
+ */
+ public function feed_or_html()
+ {
+ }
+ }
+ /**
+ * SimplePie
+ *
+ * A PHP-Based RSS and Atom Feed Framework.
+ * Takes the hard work out of managing a complete RSS/Atom solution.
+ *
+ * Copyright (c) 2004-2016, Ryan Parman, Sam Sneddon, Ryan McCue, and contributors
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification, are
+ * permitted provided that the following conditions are met:
+ *
+ * * Redistributions of source code must retain the above copyright notice, this list of
+ * conditions and the following disclaimer.
+ *
+ * * Redistributions in binary form must reproduce the above copyright notice, this list
+ * of conditions and the following disclaimer in the documentation and/or other materials
+ * provided with the distribution.
+ *
+ * * Neither the name of the SimplePie Team 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 HOLDERS
+ * AND 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.
+ *
+ * @package SimplePie
+ * @copyright 2004-2016 Ryan Parman, Sam Sneddon, Ryan McCue
+ * @author Ryan Parman
+ * @author Sam Sneddon
+ * @author Ryan McCue
+ * @link http://simplepie.org/ SimplePie
+ * @license http://www.opensource.org/licenses/bsd-license.php BSD License
+ */
+ /**
+ * Manages `` copyright tags as defined in Media RSS
+ *
+ * Used by {@see SimplePie_Enclosure::get_copyright()}
+ *
+ * This class can be overloaded with {@see SimplePie::set_copyright_class()}
+ *
+ * @package SimplePie
+ * @subpackage API
+ */
+ class SimplePie_Copyright
+ {
+ /**
+ * Copyright URL
+ *
+ * @var string
+ * @see get_url()
+ */
+ var $url;
+ /**
+ * Attribution
+ *
+ * @var string
+ * @see get_attribution()
+ */
+ var $label;
+ /**
+ * Constructor, used to input the data
+ *
+ * For documentation on all the parameters, see the corresponding
+ * properties and their accessors
+ */
+ public function __construct($url = \null, $label = \null)
+ {
+ }
+ /**
+ * String-ified version
+ *
+ * @return string
+ */
+ public function __toString()
+ {
+ }
+ /**
+ * Get the copyright URL
+ *
+ * @return string|null URL to copyright information
+ */
+ public function get_url()
+ {
+ }
+ /**
+ * Get the attribution text
+ *
+ * @return string|null
+ */
+ public function get_attribution()
+ {
+ }
+ }
+ /**
+ * SimplePie
+ *
+ * @package SimplePie
+ * @subpackage API
+ */
+ class SimplePie
+ {
+ /**
+ * @var array Raw data
+ * @access private
+ */
+ public $data = array();
+ /**
+ * @var mixed Error string
+ * @access private
+ */
+ public $error;
+ /**
+ * @var int HTTP status code
+ * @see SimplePie::status_code()
+ * @access private
+ */
+ public $status_code;
+ /**
+ * @var object Instance of SimplePie_Sanitize (or other class)
+ * @see SimplePie::set_sanitize_class()
+ * @access private
+ */
+ public $sanitize;
+ /**
+ * @var string SimplePie Useragent
+ * @see SimplePie::set_useragent()
+ * @access private
+ */
+ public $useragent = \SIMPLEPIE_USERAGENT;
+ /**
+ * @var string Feed URL
+ * @see SimplePie::set_feed_url()
+ * @access private
+ */
+ public $feed_url;
+ /**
+ * @var string Original feed URL, or new feed URL iff HTTP 301 Moved Permanently
+ * @see SimplePie::subscribe_url()
+ * @access private
+ */
+ public $permanent_url = \null;
+ /**
+ * @var object Instance of SimplePie_File to use as a feed
+ * @see SimplePie::set_file()
+ * @access private
+ */
+ public $file;
+ /**
+ * @var string Raw feed data
+ * @see SimplePie::set_raw_data()
+ * @access private
+ */
+ public $raw_data;
+ /**
+ * @var int Timeout for fetching remote files
+ * @see SimplePie::set_timeout()
+ * @access private
+ */
+ public $timeout = 10;
+ /**
+ * @var array Custom curl options
+ * @see SimplePie::set_curl_options()
+ * @access private
+ */
+ public $curl_options = array();
+ /**
+ * @var bool Forces fsockopen() to be used for remote files instead
+ * of cURL, even if a new enough version is installed
+ * @see SimplePie::force_fsockopen()
+ * @access private
+ */
+ public $force_fsockopen = \false;
+ /**
+ * @var bool Force the given data/URL to be treated as a feed no matter what
+ * it appears like
+ * @see SimplePie::force_feed()
+ * @access private
+ */
+ public $force_feed = \false;
+ /**
+ * @var bool Enable/Disable Caching
+ * @see SimplePie::enable_cache()
+ * @access private
+ */
+ public $cache = \true;
+ /**
+ * @var bool Force SimplePie to fallback to expired cache, if enabled,
+ * when feed is unavailable.
+ * @see SimplePie::force_cache_fallback()
+ * @access private
+ */
+ public $force_cache_fallback = \false;
+ /**
+ * @var int Cache duration (in seconds)
+ * @see SimplePie::set_cache_duration()
+ * @access private
+ */
+ public $cache_duration = 3600;
+ /**
+ * @var int Auto-discovery cache duration (in seconds)
+ * @see SimplePie::set_autodiscovery_cache_duration()
+ * @access private
+ */
+ public $autodiscovery_cache_duration = 604800;
+ // 7 Days.
+ /**
+ * @var string Cache location (relative to executing script)
+ * @see SimplePie::set_cache_location()
+ * @access private
+ */
+ public $cache_location = './cache';
+ /**
+ * @var string Function that creates the cache filename
+ * @see SimplePie::set_cache_name_function()
+ * @access private
+ */
+ public $cache_name_function = 'md5';
+ /**
+ * @var bool Reorder feed by date descending
+ * @see SimplePie::enable_order_by_date()
+ * @access private
+ */
+ public $order_by_date = \true;
+ /**
+ * @var mixed Force input encoding to be set to the follow value
+ * (false, or anything type-cast to false, disables this feature)
+ * @see SimplePie::set_input_encoding()
+ * @access private
+ */
+ public $input_encoding = \false;
+ /**
+ * @var int Feed Autodiscovery Level
+ * @see SimplePie::set_autodiscovery_level()
+ * @access private
+ */
+ public $autodiscovery = \SIMPLEPIE_LOCATOR_ALL;
+ /**
+ * Class registry object
+ *
+ * @var SimplePie_Registry
+ */
+ public $registry;
+ /**
+ * @var int Maximum number of feeds to check with autodiscovery
+ * @see SimplePie::set_max_checked_feeds()
+ * @access private
+ */
+ public $max_checked_feeds = 10;
+ /**
+ * @var array All the feeds found during the autodiscovery process
+ * @see SimplePie::get_all_discovered_feeds()
+ * @access private
+ */
+ public $all_discovered_feeds = array();
+ /**
+ * @var string Web-accessible path to the handler_image.php file.
+ * @see SimplePie::set_image_handler()
+ * @access private
+ */
+ public $image_handler = '';
+ /**
+ * @var array Stores the URLs when multiple feeds are being initialized.
+ * @see SimplePie::set_feed_url()
+ * @access private
+ */
+ public $multifeed_url = array();
+ /**
+ * @var array Stores SimplePie objects when multiple feeds initialized.
+ * @access private
+ */
+ public $multifeed_objects = array();
+ /**
+ * @var array Stores the get_object_vars() array for use with multifeeds.
+ * @see SimplePie::set_feed_url()
+ * @access private
+ */
+ public $config_settings = \null;
+ /**
+ * @var integer Stores the number of items to return per-feed with multifeeds.
+ * @see SimplePie::set_item_limit()
+ * @access private
+ */
+ public $item_limit = 0;
+ /**
+ * @var bool Stores if last-modified and/or etag headers were sent with the
+ * request when checking a feed.
+ */
+ public $check_modified = \false;
+ /**
+ * @var array Stores the default attributes to be stripped by strip_attributes().
+ * @see SimplePie::strip_attributes()
+ * @access private
+ */
+ public $strip_attributes = array('bgsound', 'class', 'expr', 'id', 'style', 'onclick', 'onerror', 'onfinish', 'onmouseover', 'onmouseout', 'onfocus', 'onblur', 'lowsrc', 'dynsrc');
+ /**
+ * @var array Stores the default attributes to add to different tags by add_attributes().
+ * @see SimplePie::add_attributes()
+ * @access private
+ */
+ public $add_attributes = array('audio' => array('preload' => 'none'), 'iframe' => array('sandbox' => 'allow-scripts allow-same-origin'), 'video' => array('preload' => 'none'));
+ /**
+ * @var array Stores the default tags to be stripped by strip_htmltags().
+ * @see SimplePie::strip_htmltags()
+ * @access private
+ */
+ public $strip_htmltags = array('base', 'blink', 'body', 'doctype', 'embed', 'font', 'form', 'frame', 'frameset', 'html', 'iframe', 'input', 'marquee', 'meta', 'noscript', 'object', 'param', 'script', 'style');
+ /**
+ * @var bool Should we throw exceptions, or use the old-style error property?
+ * @access private
+ */
+ public $enable_exceptions = \false;
+ /**
+ * The SimplePie class contains feed level data and options
+ *
+ * To use SimplePie, create the SimplePie object with no parameters. You can
+ * then set configuration options using the provided methods. After setting
+ * them, you must initialise the feed using $feed->init(). At that point the
+ * object's methods and properties will be available to you.
+ *
+ * Previously, it was possible to pass in the feed URL along with cache
+ * options directly into the constructor. This has been removed as of 1.3 as
+ * it caused a lot of confusion.
+ *
+ * @since 1.0 Preview Release
+ */
+ public function __construct()
+ {
+ }
+ /**
+ * Used for converting object to a string
+ */
+ public function __toString()
+ {
+ }
+ /**
+ * Remove items that link back to this before destroying this object
+ */
+ public function __destruct()
+ {
+ }
+ /**
+ * Force the given data/URL to be treated as a feed
+ *
+ * This tells SimplePie to ignore the content-type provided by the server.
+ * Be careful when using this option, as it will also disable autodiscovery.
+ *
+ * @since 1.1
+ * @param bool $enable Force the given data/URL to be treated as a feed
+ */
+ public function force_feed($enable = \false)
+ {
+ }
+ /**
+ * Set the URL of the feed you want to parse
+ *
+ * This allows you to enter the URL of the feed you want to parse, or the
+ * website you want to try to use auto-discovery on. This takes priority
+ * over any set raw data.
+ *
+ * You can set multiple feeds to mash together by passing an array instead
+ * of a string for the $url. Remember that with each additional feed comes
+ * additional processing and resources.
+ *
+ * @since 1.0 Preview Release
+ * @see set_raw_data()
+ * @param string|array $url This is the URL (or array of URLs) that you want to parse.
+ */
+ public function set_feed_url($url)
+ {
+ }
+ /**
+ * Set an instance of {@see SimplePie_File} to use as a feed
+ *
+ * @param SimplePie_File &$file
+ * @return bool True on success, false on failure
+ */
+ public function set_file(&$file)
+ {
+ }
+ /**
+ * Set the raw XML data to parse
+ *
+ * Allows you to use a string of RSS/Atom data instead of a remote feed.
+ *
+ * If you have a feed available as a string in PHP, you can tell SimplePie
+ * to parse that data string instead of a remote feed. Any set feed URL
+ * takes precedence.
+ *
+ * @since 1.0 Beta 3
+ * @param string $data RSS or Atom data as a string.
+ * @see set_feed_url()
+ */
+ public function set_raw_data($data)
+ {
+ }
+ /**
+ * Set the default timeout for fetching remote feeds
+ *
+ * This allows you to change the maximum time the feed's server to respond
+ * and send the feed back.
+ *
+ * @since 1.0 Beta 3
+ * @param int $timeout The maximum number of seconds to spend waiting to retrieve a feed.
+ */
+ public function set_timeout($timeout = 10)
+ {
+ }
+ /**
+ * Set custom curl options
+ *
+ * This allows you to change default curl options
+ *
+ * @since 1.0 Beta 3
+ * @param array $curl_options Curl options to add to default settings
+ */
+ public function set_curl_options(array $curl_options = array())
+ {
+ }
+ /**
+ * Force SimplePie to use fsockopen() instead of cURL
+ *
+ * @since 1.0 Beta 3
+ * @param bool $enable Force fsockopen() to be used
+ */
+ public function force_fsockopen($enable = \false)
+ {
+ }
+ /**
+ * Enable/disable caching in SimplePie.
+ *
+ * This option allows you to disable caching all-together in SimplePie.
+ * However, disabling the cache can lead to longer load times.
+ *
+ * @since 1.0 Preview Release
+ * @param bool $enable Enable caching
+ */
+ public function enable_cache($enable = \true)
+ {
+ }
+ /**
+ * SimplePie to continue to fall back to expired cache, if enabled, when
+ * feed is unavailable.
+ *
+ * This tells SimplePie to ignore any file errors and fall back to cache
+ * instead. This only works if caching is enabled and cached content
+ * still exists.
+ * @param bool $enable Force use of cache on fail.
+ */
+ public function force_cache_fallback($enable = \false)
+ {
+ }
+ /**
+ * Set the length of time (in seconds) that the contents of a feed will be
+ * cached
+ *
+ * @param int $seconds The feed content cache duration
+ */
+ public function set_cache_duration($seconds = 3600)
+ {
+ }
+ /**
+ * Set the length of time (in seconds) that the autodiscovered feed URL will
+ * be cached
+ *
+ * @param int $seconds The autodiscovered feed URL cache duration.
+ */
+ public function set_autodiscovery_cache_duration($seconds = 604800)
+ {
+ }
+ /**
+ * Set the file system location where the cached files should be stored
+ *
+ * @param string $location The file system location.
+ */
+ public function set_cache_location($location = './cache')
+ {
+ }
+ /**
+ * Return the filename (i.e. hash, without path and without extension) of the file to cache a given URL.
+ * @param string $url The URL of the feed to be cached.
+ * @return string A filename (i.e. hash, without path and without extension).
+ */
+ public function get_cache_filename($url)
+ {
+ }
+ /**
+ * Set whether feed items should be sorted into reverse chronological order
+ *
+ * @param bool $enable Sort as reverse chronological order.
+ */
+ public function enable_order_by_date($enable = \true)
+ {
+ }
+ /**
+ * Set the character encoding used to parse the feed
+ *
+ * This overrides the encoding reported by the feed, however it will fall
+ * back to the normal encoding detection if the override fails
+ *
+ * @param string $encoding Character encoding
+ */
+ public function set_input_encoding($encoding = \false)
+ {
+ }
+ /**
+ * Set how much feed autodiscovery to do
+ *
+ * @see SIMPLEPIE_LOCATOR_NONE
+ * @see SIMPLEPIE_LOCATOR_AUTODISCOVERY
+ * @see SIMPLEPIE_LOCATOR_LOCAL_EXTENSION
+ * @see SIMPLEPIE_LOCATOR_LOCAL_BODY
+ * @see SIMPLEPIE_LOCATOR_REMOTE_EXTENSION
+ * @see SIMPLEPIE_LOCATOR_REMOTE_BODY
+ * @see SIMPLEPIE_LOCATOR_ALL
+ * @param int $level Feed Autodiscovery Level (level can be a combination of the above constants, see bitwise OR operator)
+ */
+ public function set_autodiscovery_level($level = \SIMPLEPIE_LOCATOR_ALL)
+ {
+ }
+ /**
+ * Get the class registry
+ *
+ * Use this to override SimplePie's default classes
+ * @see SimplePie_Registry
+ * @return SimplePie_Registry
+ */
+ public function &get_registry()
+ {
+ }
+ /**#@+
+ * Useful when you are overloading or extending SimplePie's default classes.
+ *
+ * @deprecated Use {@see get_registry()} instead
+ * @link http://php.net/manual/en/language.oop5.basic.php#language.oop5.basic.extends PHP5 extends documentation
+ * @param string $class Name of custom class
+ * @return boolean True on success, false otherwise
+ */
+ /**
+ * Set which class SimplePie uses for caching
+ */
+ public function set_cache_class($class = 'SimplePie_Cache')
+ {
+ }
+ /**
+ * Set which class SimplePie uses for auto-discovery
+ */
+ public function set_locator_class($class = 'SimplePie_Locator')
+ {
+ }
+ /**
+ * Set which class SimplePie uses for XML parsing
+ */
+ public function set_parser_class($class = 'SimplePie_Parser')
+ {
+ }
+ /**
+ * Set which class SimplePie uses for remote file fetching
+ */
+ public function set_file_class($class = 'SimplePie_File')
+ {
+ }
+ /**
+ * Set which class SimplePie uses for data sanitization
+ */
+ public function set_sanitize_class($class = 'SimplePie_Sanitize')
+ {
+ }
+ /**
+ * Set which class SimplePie uses for handling feed items
+ */
+ public function set_item_class($class = 'SimplePie_Item')
+ {
+ }
+ /**
+ * Set which class SimplePie uses for handling author data
+ */
+ public function set_author_class($class = 'SimplePie_Author')
+ {
+ }
+ /**
+ * Set which class SimplePie uses for handling category data
+ */
+ public function set_category_class($class = 'SimplePie_Category')
+ {
+ }
+ /**
+ * Set which class SimplePie uses for feed enclosures
+ */
+ public function set_enclosure_class($class = 'SimplePie_Enclosure')
+ {
+ }
+ /**
+ * Set which class SimplePie uses for `` captions
+ */
+ public function set_caption_class($class = 'SimplePie_Caption')
+ {
+ }
+ /**
+ * Set which class SimplePie uses for ``
+ */
+ public function set_copyright_class($class = 'SimplePie_Copyright')
+ {
+ }
+ /**
+ * Set which class SimplePie uses for ``
+ */
+ public function set_credit_class($class = 'SimplePie_Credit')
+ {
+ }
+ /**
+ * Set which class SimplePie uses for ``
+ */
+ public function set_rating_class($class = 'SimplePie_Rating')
+ {
+ }
+ /**
+ * Set which class SimplePie uses for `