diff --git a/.github/workflows/php.yml b/.github/workflows/php.yml
index 06117f843..42608ae40 100644
--- a/.github/workflows/php.yml
+++ b/.github/workflows/php.yml
@@ -30,5 +30,8 @@ jobs:
- name: Run PHPUnit
run: vendor/bin/phpunit
+ - name: Psalm
+ run: ./vendor/bin/psalm --show-info=false --threads=8 --diff
+
- name: Run PHPCS
run: ./vendor/bin/phpcs --runtime-set ignore_warnings_on_exit 1 src modules woocommerce-paypal-payments.php --extensions=php
diff --git a/README.md b/README.md
index 86d1d87b8..71f714e7d 100644
--- a/README.md
+++ b/README.md
@@ -21,6 +21,7 @@ PayPal's latest complete payments processing solution. Accept PayPal, Pay Later,
1. `$ composer install`
2. `$ ./vendor/bin/phpunit`
3. `$ ./vendor/bin/phpcs`
+4. `$ ./vendor/bin/psalm`
### Docker
diff --git a/composer.json b/composer.json
index 67b00d086..f92d4dbff 100644
--- a/composer.json
+++ b/composer.json
@@ -17,7 +17,10 @@
"require-dev": {
"woocommerce/woocommerce-sniffs": "^0.1.0",
"phpunit/phpunit": "^7.0 | ^8.0 | ^9.0",
- "brain/monkey": "^2.4"
+ "brain/monkey": "^2.4",
+ "php-stubs/wordpress-stubs": "^5.0@stable",
+ "php-stubs/woocommerce-stubs": "^5.0@stable",
+ "vimeo/psalm": "^4.0"
},
"autoload": {
"psr-4": {
diff --git a/composer.lock b/composer.lock
index 85469abd8..9298513e8 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": "0b4f7dd4cc7706bd902a10f64dbd095e",
+ "content-hash": "5ec79a51fc5a2f5576f38dd6e4e87b2d",
"packages": [
{
"name": "container-interop/service-provider",
@@ -35,6 +35,10 @@
],
"description": "Promoting container interoperability through standard service providers",
"homepage": "https://github.com/container-interop/service-provider",
+ "support": {
+ "issues": "https://github.com/container-interop/service-provider/issues",
+ "source": "https://github.com/container-interop/service-provider/tree/master"
+ },
"time": "2017-09-20T14:13:36+00:00"
},
{
@@ -190,6 +194,10 @@
}
],
"description": "Interfaces for modules",
+ "support": {
+ "issues": "https://github.com/Dhii/module-interface/issues",
+ "source": "https://github.com/Dhii/module-interface/tree/v0.3.0-alpha2"
+ },
"time": "2021-08-23T08:23:01+00:00"
},
{
@@ -239,6 +247,10 @@
"container-interop",
"psr"
],
+ "support": {
+ "issues": "https://github.com/php-fig/container/issues",
+ "source": "https://github.com/php-fig/container/tree/master"
+ },
"time": "2017-02-14T16:28:37+00:00"
},
{
@@ -286,6 +298,9 @@
"psr",
"psr-3"
],
+ "support": {
+ "source": "https://github.com/php-fig/log/tree/1.1.4"
+ },
"time": "2021-05-03T11:20:27+00:00"
},
{
@@ -326,6 +341,10 @@
}
],
"description": "A polyfill for getallheaders.",
+ "support": {
+ "issues": "https://github.com/ralouphie/getallheaders/issues",
+ "source": "https://github.com/ralouphie/getallheaders/tree/develop"
+ },
"time": "2019-03-08T08:55:37+00:00"
},
{
@@ -379,6 +398,162 @@
}
],
"packages-dev": [
+ {
+ "name": "amphp/amp",
+ "version": "v2.6.1",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/amphp/amp.git",
+ "reference": "c5fc66a78ee38d7ac9195a37bacaf940eb3f65ae"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/amphp/amp/zipball/c5fc66a78ee38d7ac9195a37bacaf940eb3f65ae",
+ "reference": "c5fc66a78ee38d7ac9195a37bacaf940eb3f65ae",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=7.1"
+ },
+ "require-dev": {
+ "amphp/php-cs-fixer-config": "dev-master",
+ "amphp/phpunit-util": "^1",
+ "ext-json": "*",
+ "jetbrains/phpstorm-stubs": "^2019.3",
+ "phpunit/phpunit": "^7 | ^8 | ^9",
+ "psalm/phar": "^3.11@dev",
+ "react/promise": "^2"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "2.x-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Amp\\": "lib"
+ },
+ "files": [
+ "lib/functions.php",
+ "lib/Internal/functions.php"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Daniel Lowrey",
+ "email": "rdlowrey@php.net"
+ },
+ {
+ "name": "Aaron Piotrowski",
+ "email": "aaron@trowski.com"
+ },
+ {
+ "name": "Bob Weinand",
+ "email": "bobwei9@hotmail.com"
+ },
+ {
+ "name": "Niklas Keller",
+ "email": "me@kelunik.com"
+ }
+ ],
+ "description": "A non-blocking concurrency framework for PHP applications.",
+ "homepage": "http://amphp.org/amp",
+ "keywords": [
+ "async",
+ "asynchronous",
+ "awaitable",
+ "concurrency",
+ "event",
+ "event-loop",
+ "future",
+ "non-blocking",
+ "promise"
+ ],
+ "funding": [
+ {
+ "url": "https://github.com/amphp",
+ "type": "github"
+ }
+ ],
+ "time": "2021-09-23T18:43:08+00:00"
+ },
+ {
+ "name": "amphp/byte-stream",
+ "version": "v1.8.1",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/amphp/byte-stream.git",
+ "reference": "acbd8002b3536485c997c4e019206b3f10ca15bd"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/amphp/byte-stream/zipball/acbd8002b3536485c997c4e019206b3f10ca15bd",
+ "reference": "acbd8002b3536485c997c4e019206b3f10ca15bd",
+ "shasum": ""
+ },
+ "require": {
+ "amphp/amp": "^2",
+ "php": ">=7.1"
+ },
+ "require-dev": {
+ "amphp/php-cs-fixer-config": "dev-master",
+ "amphp/phpunit-util": "^1.4",
+ "friendsofphp/php-cs-fixer": "^2.3",
+ "jetbrains/phpstorm-stubs": "^2019.3",
+ "phpunit/phpunit": "^6 || ^7 || ^8",
+ "psalm/phar": "^3.11.4"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.x-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Amp\\ByteStream\\": "lib"
+ },
+ "files": [
+ "lib/functions.php"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Aaron Piotrowski",
+ "email": "aaron@trowski.com"
+ },
+ {
+ "name": "Niklas Keller",
+ "email": "me@kelunik.com"
+ }
+ ],
+ "description": "A stream abstraction to make working with non-blocking I/O simple.",
+ "homepage": "http://amphp.org/byte-stream",
+ "keywords": [
+ "amp",
+ "amphp",
+ "async",
+ "io",
+ "non-blocking",
+ "stream"
+ ],
+ "funding": [
+ {
+ "url": "https://github.com/amphp",
+ "type": "github"
+ }
+ ],
+ "time": "2021-03-30T17:13:30+00:00"
+ },
{
"name": "antecedent/patchwork",
"version": "2.1.15",
@@ -421,6 +596,10 @@
"runkit",
"testing"
],
+ "support": {
+ "issues": "https://github.com/antecedent/patchwork/issues",
+ "source": "https://github.com/antecedent/patchwork/tree/2.1.15"
+ },
"time": "2021-08-22T08:00:13+00:00"
},
{
@@ -487,8 +666,216 @@
"test",
"testing"
],
+ "support": {
+ "issues": "https://github.com/Brain-WP/BrainMonkey/issues",
+ "source": "https://github.com/Brain-WP/BrainMonkey"
+ },
"time": "2020-10-13T17:56:14+00:00"
},
+ {
+ "name": "composer/package-versions-deprecated",
+ "version": "1.11.99.4",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/composer/package-versions-deprecated.git",
+ "reference": "b174585d1fe49ceed21928a945138948cb394600"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/composer/package-versions-deprecated/zipball/b174585d1fe49ceed21928a945138948cb394600",
+ "reference": "b174585d1fe49ceed21928a945138948cb394600",
+ "shasum": ""
+ },
+ "require": {
+ "composer-plugin-api": "^1.1.0 || ^2.0",
+ "php": "^7 || ^8"
+ },
+ "replace": {
+ "ocramius/package-versions": "1.11.99"
+ },
+ "require-dev": {
+ "composer/composer": "^1.9.3 || ^2.0@dev",
+ "ext-zip": "^1.13",
+ "phpunit/phpunit": "^6.5 || ^7"
+ },
+ "type": "composer-plugin",
+ "extra": {
+ "class": "PackageVersions\\Installer",
+ "branch-alias": {
+ "dev-master": "1.x-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "PackageVersions\\": "src/PackageVersions"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Marco Pivetta",
+ "email": "ocramius@gmail.com"
+ },
+ {
+ "name": "Jordi Boggiano",
+ "email": "j.boggiano@seld.be"
+ }
+ ],
+ "description": "Composer plugin that provides efficient querying for installed package versions (no runtime IO)",
+ "funding": [
+ {
+ "url": "https://packagist.com",
+ "type": "custom"
+ },
+ {
+ "url": "https://github.com/composer",
+ "type": "github"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/composer/composer",
+ "type": "tidelift"
+ }
+ ],
+ "time": "2021-09-13T08:41:34+00:00"
+ },
+ {
+ "name": "composer/semver",
+ "version": "3.2.5",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/composer/semver.git",
+ "reference": "31f3ea725711245195f62e54ffa402d8ef2fdba9"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/composer/semver/zipball/31f3ea725711245195f62e54ffa402d8ef2fdba9",
+ "reference": "31f3ea725711245195f62e54ffa402d8ef2fdba9",
+ "shasum": ""
+ },
+ "require": {
+ "php": "^5.3.2 || ^7.0 || ^8.0"
+ },
+ "require-dev": {
+ "phpstan/phpstan": "^0.12.54",
+ "symfony/phpunit-bridge": "^4.2 || ^5"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-main": "3.x-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Composer\\Semver\\": "src"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Nils Adermann",
+ "email": "naderman@naderman.de",
+ "homepage": "http://www.naderman.de"
+ },
+ {
+ "name": "Jordi Boggiano",
+ "email": "j.boggiano@seld.be",
+ "homepage": "http://seld.be"
+ },
+ {
+ "name": "Rob Bast",
+ "email": "rob.bast@gmail.com",
+ "homepage": "http://robbast.nl"
+ }
+ ],
+ "description": "Semver library that offers utilities, version constraint parsing and validation.",
+ "keywords": [
+ "semantic",
+ "semver",
+ "validation",
+ "versioning"
+ ],
+ "funding": [
+ {
+ "url": "https://packagist.com",
+ "type": "custom"
+ },
+ {
+ "url": "https://github.com/composer",
+ "type": "github"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/composer/composer",
+ "type": "tidelift"
+ }
+ ],
+ "time": "2021-05-24T12:41:47+00:00"
+ },
+ {
+ "name": "composer/xdebug-handler",
+ "version": "2.0.2",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/composer/xdebug-handler.git",
+ "reference": "84674dd3a7575ba617f5a76d7e9e29a7d3891339"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/composer/xdebug-handler/zipball/84674dd3a7575ba617f5a76d7e9e29a7d3891339",
+ "reference": "84674dd3a7575ba617f5a76d7e9e29a7d3891339",
+ "shasum": ""
+ },
+ "require": {
+ "php": "^5.3.2 || ^7.0 || ^8.0",
+ "psr/log": "^1 || ^2 || ^3"
+ },
+ "require-dev": {
+ "phpstan/phpstan": "^0.12.55",
+ "symfony/phpunit-bridge": "^4.2 || ^5"
+ },
+ "type": "library",
+ "autoload": {
+ "psr-4": {
+ "Composer\\XdebugHandler\\": "src"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "John Stevenson",
+ "email": "john-stevenson@blueyonder.co.uk"
+ }
+ ],
+ "description": "Restarts a process without Xdebug.",
+ "keywords": [
+ "Xdebug",
+ "performance"
+ ],
+ "funding": [
+ {
+ "url": "https://packagist.com",
+ "type": "custom"
+ },
+ {
+ "url": "https://github.com/composer",
+ "type": "github"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/composer/composer",
+ "type": "tidelift"
+ }
+ ],
+ "time": "2021-07-31T17:03:58+00:00"
+ },
{
"name": "dealerdirect/phpcodesniffer-composer-installer",
"version": "v0.7.1",
@@ -553,8 +940,45 @@
"stylecheck",
"tests"
],
+ "support": {
+ "issues": "https://github.com/dealerdirect/phpcodesniffer-composer-installer/issues",
+ "source": "https://github.com/dealerdirect/phpcodesniffer-composer-installer"
+ },
"time": "2020-12-07T18:04:37+00:00"
},
+ {
+ "name": "dnoegel/php-xdg-base-dir",
+ "version": "v0.1.1",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/dnoegel/php-xdg-base-dir.git",
+ "reference": "8f8a6e48c5ecb0f991c2fdcf5f154a47d85f9ffd"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/dnoegel/php-xdg-base-dir/zipball/8f8a6e48c5ecb0f991c2fdcf5f154a47d85f9ffd",
+ "reference": "8f8a6e48c5ecb0f991c2fdcf5f154a47d85f9ffd",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.3.2"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "~7.0|~6.0|~5.0|~4.8.35"
+ },
+ "type": "library",
+ "autoload": {
+ "psr-4": {
+ "XdgBaseDir\\": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "description": "implementation of xdg base directory specification for php",
+ "time": "2019-12-04T15:06:13+00:00"
+ },
{
"name": "doctrine/instantiator",
"version": "1.4.0",
@@ -604,8 +1028,119 @@
"constructor",
"instantiate"
],
+ "support": {
+ "issues": "https://github.com/doctrine/instantiator/issues",
+ "source": "https://github.com/doctrine/instantiator/tree/1.4.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"
+ }
+ ],
"time": "2020-11-10T18:47:58+00:00"
},
+ {
+ "name": "felixfbecker/advanced-json-rpc",
+ "version": "v3.2.1",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/felixfbecker/php-advanced-json-rpc.git",
+ "reference": "b5f37dbff9a8ad360ca341f3240dc1c168b45447"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/felixfbecker/php-advanced-json-rpc/zipball/b5f37dbff9a8ad360ca341f3240dc1c168b45447",
+ "reference": "b5f37dbff9a8ad360ca341f3240dc1c168b45447",
+ "shasum": ""
+ },
+ "require": {
+ "netresearch/jsonmapper": "^1.0 || ^2.0 || ^3.0 || ^4.0",
+ "php": "^7.1 || ^8.0",
+ "phpdocumentor/reflection-docblock": "^4.3.4 || ^5.0.0"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "^7.0 || ^8.0"
+ },
+ "type": "library",
+ "autoload": {
+ "psr-4": {
+ "AdvancedJsonRpc\\": "lib/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "ISC"
+ ],
+ "authors": [
+ {
+ "name": "Felix Becker",
+ "email": "felix.b@outlook.com"
+ }
+ ],
+ "description": "A more advanced JSONRPC implementation",
+ "time": "2021-06-11T22:34:44+00:00"
+ },
+ {
+ "name": "felixfbecker/language-server-protocol",
+ "version": "1.5.1",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/felixfbecker/php-language-server-protocol.git",
+ "reference": "9d846d1f5cf101deee7a61c8ba7caa0a975cd730"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/felixfbecker/php-language-server-protocol/zipball/9d846d1f5cf101deee7a61c8ba7caa0a975cd730",
+ "reference": "9d846d1f5cf101deee7a61c8ba7caa0a975cd730",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=7.1"
+ },
+ "require-dev": {
+ "phpstan/phpstan": "*",
+ "squizlabs/php_codesniffer": "^3.1",
+ "vimeo/psalm": "^4.0"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.x-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "LanguageServerProtocol\\": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "ISC"
+ ],
+ "authors": [
+ {
+ "name": "Felix Becker",
+ "email": "felix.b@outlook.com"
+ }
+ ],
+ "description": "PHP classes for the Language Server Protocol",
+ "keywords": [
+ "language",
+ "microsoft",
+ "php",
+ "server"
+ ],
+ "time": "2021-02-22T14:02:09+00:00"
+ },
{
"name": "hamcrest/hamcrest-php",
"version": "v2.0.1",
@@ -651,6 +1186,10 @@
"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"
},
{
@@ -764,8 +1303,165 @@
"object",
"object graph"
],
+ "support": {
+ "issues": "https://github.com/myclabs/DeepCopy/issues",
+ "source": "https://github.com/myclabs/DeepCopy/tree/1.10.2"
+ },
+ "funding": [
+ {
+ "url": "https://tidelift.com/funding/github/packagist/myclabs/deep-copy",
+ "type": "tidelift"
+ }
+ ],
"time": "2020-11-13T09:40:50+00:00"
},
+ {
+ "name": "netresearch/jsonmapper",
+ "version": "v4.0.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/cweiske/jsonmapper.git",
+ "reference": "8bbc021a8edb2e4a7ea2f8ad4fa9ec9dce2fcb8d"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/cweiske/jsonmapper/zipball/8bbc021a8edb2e4a7ea2f8ad4fa9ec9dce2fcb8d",
+ "reference": "8bbc021a8edb2e4a7ea2f8ad4fa9ec9dce2fcb8d",
+ "shasum": ""
+ },
+ "require": {
+ "ext-json": "*",
+ "ext-pcre": "*",
+ "ext-reflection": "*",
+ "ext-spl": "*",
+ "php": ">=7.1"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "~7.5 || ~8.0 || ~9.0",
+ "squizlabs/php_codesniffer": "~3.5"
+ },
+ "type": "library",
+ "autoload": {
+ "psr-0": {
+ "JsonMapper": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "OSL-3.0"
+ ],
+ "authors": [
+ {
+ "name": "Christian Weiske",
+ "email": "cweiske@cweiske.de",
+ "homepage": "http://github.com/cweiske/jsonmapper/",
+ "role": "Developer"
+ }
+ ],
+ "description": "Map nested JSON structures onto PHP classes",
+ "time": "2020-12-01T19:48:11+00:00"
+ },
+ {
+ "name": "nikic/php-parser",
+ "version": "v4.13.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/nikic/PHP-Parser.git",
+ "reference": "50953a2691a922aa1769461637869a0a2faa3f53"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/50953a2691a922aa1769461637869a0a2faa3f53",
+ "reference": "50953a2691a922aa1769461637869a0a2faa3f53",
+ "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"
+ },
+ "bin": [
+ "bin/php-parse"
+ ],
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "4.9-dev"
+ }
+ },
+ "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"
+ ],
+ "time": "2021-09-20T12:20:58+00:00"
+ },
+ {
+ "name": "openlss/lib-array2xml",
+ "version": "1.0.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/nullivex/lib-array2xml.git",
+ "reference": "a91f18a8dfc69ffabe5f9b068bc39bb202c81d90"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/nullivex/lib-array2xml/zipball/a91f18a8dfc69ffabe5f9b068bc39bb202c81d90",
+ "reference": "a91f18a8dfc69ffabe5f9b068bc39bb202c81d90",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.3.2"
+ },
+ "type": "library",
+ "autoload": {
+ "psr-0": {
+ "LSS": ""
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "Apache-2.0"
+ ],
+ "authors": [
+ {
+ "name": "Bryan Tong",
+ "email": "bryan@nullivex.com",
+ "homepage": "https://www.nullivex.com"
+ },
+ {
+ "name": "Tony Butler",
+ "email": "spudz76@gmail.com",
+ "homepage": "https://www.nullivex.com"
+ }
+ ],
+ "description": "Array2XML conversion library credit to lalit.org",
+ "homepage": "https://www.nullivex.com",
+ "keywords": [
+ "array",
+ "array conversion",
+ "xml",
+ "xml conversion"
+ ],
+ "time": "2019-03-29T20:06:56+00:00"
+ },
{
"name": "phar-io/manifest",
"version": "1.0.3",
@@ -819,6 +1515,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/master"
+ },
"time": "2018-07-08T19:23:20+00:00"
},
{
@@ -866,8 +1566,92 @@
}
],
"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/master"
+ },
"time": "2018-07-08T19:19:57+00:00"
},
+ {
+ "name": "php-stubs/woocommerce-stubs",
+ "version": "v5.7.1",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/php-stubs/woocommerce-stubs.git",
+ "reference": "8857cad4eaed5eead02f6adaaf197c46f93283b7"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/php-stubs/woocommerce-stubs/zipball/8857cad4eaed5eead02f6adaaf197c46f93283b7",
+ "reference": "8857cad4eaed5eead02f6adaaf197c46f93283b7",
+ "shasum": ""
+ },
+ "require": {
+ "php-stubs/wordpress-stubs": "^5.3.0"
+ },
+ "require-dev": {
+ "giacocorsiglia/stubs-generator": "^0.5.0",
+ "php": "~7.1"
+ },
+ "suggest": {
+ "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": "WooCommerce function and class declaration stubs for static analysis.",
+ "homepage": "https://github.com/php-stubs/woocommerce-stubs",
+ "keywords": [
+ "PHPStan",
+ "static analysis",
+ "woocommerce",
+ "wordpress"
+ ],
+ "time": "2021-09-24T09:45:54+00:00"
+ },
+ {
+ "name": "php-stubs/wordpress-stubs",
+ "version": "v5.8.1",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/php-stubs/wordpress-stubs.git",
+ "reference": "8b333464d3183bccde2fdbb814e3cae592434943"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/php-stubs/wordpress-stubs/zipball/8b333464d3183bccde2fdbb814e3cae592434943",
+ "reference": "8b333464d3183bccde2fdbb814e3cae592434943",
+ "shasum": ""
+ },
+ "replace": {
+ "giacocorsiglia/wordpress-stubs": "*"
+ },
+ "require-dev": {
+ "giacocorsiglia/stubs-generator": "^0.5.0",
+ "php": "~7.1"
+ },
+ "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"
+ ],
+ "time": "2021-09-09T22:10:19+00:00"
+ },
{
"name": "phpcompatibility/php-compatibility",
"version": "9.3.5",
@@ -924,6 +1708,10 @@
"phpcs",
"standards"
],
+ "support": {
+ "issues": "https://github.com/PHPCompatibility/PHPCompatibility/issues",
+ "source": "https://github.com/PHPCompatibility/PHPCompatibility"
+ },
"time": "2019-12-27T09:44:58+00:00"
},
{
@@ -976,6 +1764,10 @@
"polyfill",
"standards"
],
+ "support": {
+ "issues": "https://github.com/PHPCompatibility/PHPCompatibilityParagonie/issues",
+ "source": "https://github.com/PHPCompatibility/PHPCompatibilityParagonie"
+ },
"time": "2021-02-15T10:24:51+00:00"
},
{
@@ -1026,6 +1818,10 @@
"standards",
"wordpress"
],
+ "support": {
+ "issues": "https://github.com/PHPCompatibility/PHPCompatibilityWP/issues",
+ "source": "https://github.com/PHPCompatibility/PHPCompatibilityWP"
+ },
"time": "2021-07-21T11:09:57+00:00"
},
{
@@ -1075,6 +1871,10 @@
"reflection",
"static analysis"
],
+ "support": {
+ "issues": "https://github.com/phpDocumentor/ReflectionCommon/issues",
+ "source": "https://github.com/phpDocumentor/ReflectionCommon/tree/master"
+ },
"time": "2020-04-27T09:25:28+00:00"
},
{
@@ -1127,6 +1927,10 @@
}
],
"description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.",
+ "support": {
+ "issues": "https://github.com/phpDocumentor/ReflectionDocBlock/issues",
+ "source": "https://github.com/phpDocumentor/ReflectionDocBlock/tree/release/4.x"
+ },
"time": "2019-12-28T18:55:12+00:00"
},
{
@@ -1174,6 +1978,10 @@
}
],
"description": "A PSR-5 based resolver of Class names, Types and Structural Element Names",
+ "support": {
+ "issues": "https://github.com/phpDocumentor/TypeResolver/issues",
+ "source": "https://github.com/phpDocumentor/TypeResolver/tree/0.7.2"
+ },
"time": "2019-08-22T18:11:29+00:00"
},
{
@@ -1237,6 +2045,10 @@
"spy",
"stub"
],
+ "support": {
+ "issues": "https://github.com/phpspec/prophecy/issues",
+ "source": "https://github.com/phpspec/prophecy/tree/v1.10.3"
+ },
"time": "2020-03-05T15:02:03+00:00"
},
{
@@ -1300,6 +2112,10 @@
"testing",
"xunit"
],
+ "support": {
+ "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues",
+ "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/master"
+ },
"time": "2018-10-31T16:06:48+00:00"
},
{
@@ -1350,6 +2166,16 @@
"filesystem",
"iterator"
],
+ "support": {
+ "issues": "https://github.com/sebastianbergmann/php-file-iterator/issues",
+ "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/2.0.4"
+ },
+ "funding": [
+ {
+ "url": "https://github.com/sebastianbergmann",
+ "type": "github"
+ }
+ ],
"time": "2021-07-19T06:46:01+00:00"
},
{
@@ -1391,6 +2217,10 @@
"keywords": [
"template"
],
+ "support": {
+ "issues": "https://github.com/sebastianbergmann/php-text-template/issues",
+ "source": "https://github.com/sebastianbergmann/php-text-template/tree/1.2.1"
+ },
"time": "2015-06-21T13:50:34+00:00"
},
{
@@ -1440,6 +2270,16 @@
"keywords": [
"timer"
],
+ "support": {
+ "issues": "https://github.com/sebastianbergmann/php-timer/issues",
+ "source": "https://github.com/sebastianbergmann/php-timer/tree/2.1.3"
+ },
+ "funding": [
+ {
+ "url": "https://github.com/sebastianbergmann",
+ "type": "github"
+ }
+ ],
"time": "2020-11-30T08:20:02+00:00"
},
{
@@ -1489,6 +2329,16 @@
"keywords": [
"tokenizer"
],
+ "support": {
+ "issues": "https://github.com/sebastianbergmann/php-token-stream/issues",
+ "source": "https://github.com/sebastianbergmann/php-token-stream/tree/3.1.3"
+ },
+ "funding": [
+ {
+ "url": "https://github.com/sebastianbergmann",
+ "type": "github"
+ }
+ ],
"abandoned": true,
"time": "2021-07-26T12:15:06+00:00"
},
@@ -1574,6 +2424,10 @@
"testing",
"xunit"
],
+ "support": {
+ "issues": "https://github.com/sebastianbergmann/phpunit/issues",
+ "source": "https://github.com/sebastianbergmann/phpunit/tree/7.5.20"
+ },
"time": "2020-01-08T08:45:45+00:00"
},
{
@@ -1619,6 +2473,16 @@
],
"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/1.0.2"
+ },
+ "funding": [
+ {
+ "url": "https://github.com/sebastianbergmann",
+ "type": "github"
+ }
+ ],
"time": "2020-11-30T08:15:22+00:00"
},
{
@@ -1683,6 +2547,16 @@
"compare",
"equality"
],
+ "support": {
+ "issues": "https://github.com/sebastianbergmann/comparator/issues",
+ "source": "https://github.com/sebastianbergmann/comparator/tree/3.0.3"
+ },
+ "funding": [
+ {
+ "url": "https://github.com/sebastianbergmann",
+ "type": "github"
+ }
+ ],
"time": "2020-11-30T08:04:30+00:00"
},
{
@@ -1739,6 +2613,16 @@
"unidiff",
"unified diff"
],
+ "support": {
+ "issues": "https://github.com/sebastianbergmann/diff/issues",
+ "source": "https://github.com/sebastianbergmann/diff/tree/3.0.3"
+ },
+ "funding": [
+ {
+ "url": "https://github.com/sebastianbergmann",
+ "type": "github"
+ }
+ ],
"time": "2020-11-30T07:59:04+00:00"
},
{
@@ -1792,6 +2676,16 @@
"environment",
"hhvm"
],
+ "support": {
+ "issues": "https://github.com/sebastianbergmann/environment/issues",
+ "source": "https://github.com/sebastianbergmann/environment/tree/4.2.4"
+ },
+ "funding": [
+ {
+ "url": "https://github.com/sebastianbergmann",
+ "type": "github"
+ }
+ ],
"time": "2020-11-30T07:53:42+00:00"
},
{
@@ -1859,6 +2753,16 @@
"export",
"exporter"
],
+ "support": {
+ "issues": "https://github.com/sebastianbergmann/exporter/issues",
+ "source": "https://github.com/sebastianbergmann/exporter/tree/3.1.3"
+ },
+ "funding": [
+ {
+ "url": "https://github.com/sebastianbergmann",
+ "type": "github"
+ }
+ ],
"time": "2020-11-30T07:47:53+00:00"
},
{
@@ -1910,6 +2814,10 @@
"keywords": [
"global state"
],
+ "support": {
+ "issues": "https://github.com/sebastianbergmann/global-state/issues",
+ "source": "https://github.com/sebastianbergmann/global-state/tree/2.0.0"
+ },
"time": "2017-04-27T15:39:26+00:00"
},
{
@@ -1957,6 +2865,16 @@
],
"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/3.0.4"
+ },
+ "funding": [
+ {
+ "url": "https://github.com/sebastianbergmann",
+ "type": "github"
+ }
+ ],
"time": "2020-11-30T07:40:27+00:00"
},
{
@@ -2002,6 +2920,16 @@
],
"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/1.1.2"
+ },
+ "funding": [
+ {
+ "url": "https://github.com/sebastianbergmann",
+ "type": "github"
+ }
+ ],
"time": "2020-11-30T07:37:18+00:00"
},
{
@@ -2055,6 +2983,16 @@
],
"description": "Provides functionality to recursively process PHP variables",
"homepage": "http://www.github.com/sebastianbergmann/recursion-context",
+ "support": {
+ "issues": "https://github.com/sebastianbergmann/recursion-context/issues",
+ "source": "https://github.com/sebastianbergmann/recursion-context/tree/3.0.1"
+ },
+ "funding": [
+ {
+ "url": "https://github.com/sebastianbergmann",
+ "type": "github"
+ }
+ ],
"time": "2020-11-30T07:34:24+00:00"
},
{
@@ -2097,6 +3035,16 @@
],
"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/2.0.2"
+ },
+ "funding": [
+ {
+ "url": "https://github.com/sebastianbergmann",
+ "type": "github"
+ }
+ ],
"time": "2020-11-30T07:30:19+00:00"
},
{
@@ -2140,20 +3088,24 @@
],
"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/master"
+ },
"time": "2016-10-03T07:35:21+00:00"
},
{
"name": "squizlabs/php_codesniffer",
- "version": "3.6.0",
+ "version": "3.6.1",
"source": {
"type": "git",
"url": "https://github.com/squizlabs/PHP_CodeSniffer.git",
- "reference": "ffced0d2c8fa8e6cdc4d695a743271fab6c38625"
+ "reference": "f268ca40d54617c6e06757f83f699775c9b3ff2e"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/ffced0d2c8fa8e6cdc4d695a743271fab6c38625",
- "reference": "ffced0d2c8fa8e6cdc4d695a743271fab6c38625",
+ "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/f268ca40d54617c6e06757f83f699775c9b3ff2e",
+ "reference": "f268ca40d54617c6e06757f83f699775c9b3ff2e",
"shasum": ""
},
"require": {
@@ -2191,7 +3143,94 @@
"phpcs",
"standards"
],
- "time": "2021-04-09T00:54:41+00:00"
+ "time": "2021-10-11T04:00:11+00:00"
+ },
+ {
+ "name": "symfony/console",
+ "version": "v4.4.30",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/console.git",
+ "reference": "a3f7189a0665ee33b50e9e228c46f50f5acbed22"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/console/zipball/a3f7189a0665ee33b50e9e228c46f50f5acbed22",
+ "reference": "a3f7189a0665ee33b50e9e228c46f50f5acbed22",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=7.1.3",
+ "symfony/polyfill-mbstring": "~1.0",
+ "symfony/polyfill-php73": "^1.8",
+ "symfony/polyfill-php80": "^1.16",
+ "symfony/service-contracts": "^1.1|^2"
+ },
+ "conflict": {
+ "psr/log": ">=3",
+ "symfony/dependency-injection": "<3.4",
+ "symfony/event-dispatcher": "<4.3|>=5",
+ "symfony/lock": "<4.4",
+ "symfony/process": "<3.3"
+ },
+ "provide": {
+ "psr/log-implementation": "1.0|2.0"
+ },
+ "require-dev": {
+ "psr/log": "^1|^2",
+ "symfony/config": "^3.4|^4.0|^5.0",
+ "symfony/dependency-injection": "^3.4|^4.0|^5.0",
+ "symfony/event-dispatcher": "^4.3",
+ "symfony/lock": "^4.4|^5.0",
+ "symfony/process": "^3.4|^4.0|^5.0",
+ "symfony/var-dumper": "^4.3|^5.0"
+ },
+ "suggest": {
+ "psr/log": "For using the console logger",
+ "symfony/event-dispatcher": "",
+ "symfony/lock": "",
+ "symfony/process": ""
+ },
+ "type": "library",
+ "autoload": {
+ "psr-4": {
+ "Symfony\\Component\\Console\\": ""
+ },
+ "exclude-from-classmap": [
+ "/Tests/"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Fabien Potencier",
+ "email": "fabien@symfony.com"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "https://symfony.com/contributors"
+ }
+ ],
+ "description": "Eases the creation of beautiful and testable command line interfaces",
+ "homepage": "https://symfony.com",
+ "funding": [
+ {
+ "url": "https://symfony.com/sponsor",
+ "type": "custom"
+ },
+ {
+ "url": "https://github.com/fabpot",
+ "type": "github"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+ "type": "tidelift"
+ }
+ ],
+ "time": "2021-08-25T19:27:26+00:00"
},
{
"name": "symfony/polyfill-ctype",
@@ -2253,8 +3292,334 @@
"polyfill",
"portable"
],
+ "support": {
+ "source": "https://github.com/symfony/polyfill-ctype/tree/v1.23.0"
+ },
+ "funding": [
+ {
+ "url": "https://symfony.com/sponsor",
+ "type": "custom"
+ },
+ {
+ "url": "https://github.com/fabpot",
+ "type": "github"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+ "type": "tidelift"
+ }
+ ],
"time": "2021-02-19T12:13:01+00:00"
},
+ {
+ "name": "symfony/polyfill-mbstring",
+ "version": "v1.23.1",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/polyfill-mbstring.git",
+ "reference": "9174a3d80210dca8daa7f31fec659150bbeabfc6"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/9174a3d80210dca8daa7f31fec659150bbeabfc6",
+ "reference": "9174a3d80210dca8daa7f31fec659150bbeabfc6",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=7.1"
+ },
+ "suggest": {
+ "ext-mbstring": "For best performance"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-main": "1.23-dev"
+ },
+ "thanks": {
+ "name": "symfony/polyfill",
+ "url": "https://github.com/symfony/polyfill"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Symfony\\Polyfill\\Mbstring\\": ""
+ },
+ "files": [
+ "bootstrap.php"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Nicolas Grekas",
+ "email": "p@tchwork.com"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "https://symfony.com/contributors"
+ }
+ ],
+ "description": "Symfony polyfill for the Mbstring extension",
+ "homepage": "https://symfony.com",
+ "keywords": [
+ "compatibility",
+ "mbstring",
+ "polyfill",
+ "portable",
+ "shim"
+ ],
+ "funding": [
+ {
+ "url": "https://symfony.com/sponsor",
+ "type": "custom"
+ },
+ {
+ "url": "https://github.com/fabpot",
+ "type": "github"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+ "type": "tidelift"
+ }
+ ],
+ "time": "2021-05-27T12:26:48+00:00"
+ },
+ {
+ "name": "symfony/polyfill-php73",
+ "version": "v1.23.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/polyfill-php73.git",
+ "reference": "fba8933c384d6476ab14fb7b8526e5287ca7e010"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/fba8933c384d6476ab14fb7b8526e5287ca7e010",
+ "reference": "fba8933c384d6476ab14fb7b8526e5287ca7e010",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=7.1"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-main": "1.23-dev"
+ },
+ "thanks": {
+ "name": "symfony/polyfill",
+ "url": "https://github.com/symfony/polyfill"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Symfony\\Polyfill\\Php73\\": ""
+ },
+ "files": [
+ "bootstrap.php"
+ ],
+ "classmap": [
+ "Resources/stubs"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Nicolas Grekas",
+ "email": "p@tchwork.com"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "https://symfony.com/contributors"
+ }
+ ],
+ "description": "Symfony polyfill backporting some PHP 7.3+ features to lower PHP versions",
+ "homepage": "https://symfony.com",
+ "keywords": [
+ "compatibility",
+ "polyfill",
+ "portable",
+ "shim"
+ ],
+ "funding": [
+ {
+ "url": "https://symfony.com/sponsor",
+ "type": "custom"
+ },
+ {
+ "url": "https://github.com/fabpot",
+ "type": "github"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+ "type": "tidelift"
+ }
+ ],
+ "time": "2021-02-19T12:13:01+00:00"
+ },
+ {
+ "name": "symfony/polyfill-php80",
+ "version": "v1.23.1",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/polyfill-php80.git",
+ "reference": "1100343ed1a92e3a38f9ae122fc0eb21602547be"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/1100343ed1a92e3a38f9ae122fc0eb21602547be",
+ "reference": "1100343ed1a92e3a38f9ae122fc0eb21602547be",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=7.1"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-main": "1.23-dev"
+ },
+ "thanks": {
+ "name": "symfony/polyfill",
+ "url": "https://github.com/symfony/polyfill"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Symfony\\Polyfill\\Php80\\": ""
+ },
+ "files": [
+ "bootstrap.php"
+ ],
+ "classmap": [
+ "Resources/stubs"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Ion Bazan",
+ "email": "ion.bazan@gmail.com"
+ },
+ {
+ "name": "Nicolas Grekas",
+ "email": "p@tchwork.com"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "https://symfony.com/contributors"
+ }
+ ],
+ "description": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions",
+ "homepage": "https://symfony.com",
+ "keywords": [
+ "compatibility",
+ "polyfill",
+ "portable",
+ "shim"
+ ],
+ "funding": [
+ {
+ "url": "https://symfony.com/sponsor",
+ "type": "custom"
+ },
+ {
+ "url": "https://github.com/fabpot",
+ "type": "github"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+ "type": "tidelift"
+ }
+ ],
+ "time": "2021-07-28T13:41:28+00:00"
+ },
+ {
+ "name": "symfony/service-contracts",
+ "version": "v1.1.9",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/service-contracts.git",
+ "reference": "b776d18b303a39f56c63747bcb977ad4b27aca26"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/service-contracts/zipball/b776d18b303a39f56c63747bcb977ad4b27aca26",
+ "reference": "b776d18b303a39f56c63747bcb977ad4b27aca26",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=7.1.3",
+ "psr/container": "^1.0"
+ },
+ "suggest": {
+ "symfony/service-implementation": ""
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.1-dev"
+ },
+ "thanks": {
+ "name": "symfony/contracts",
+ "url": "https://github.com/symfony/contracts"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Symfony\\Contracts\\Service\\": ""
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Nicolas Grekas",
+ "email": "p@tchwork.com"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "https://symfony.com/contributors"
+ }
+ ],
+ "description": "Generic abstractions related to writing services",
+ "homepage": "https://symfony.com",
+ "keywords": [
+ "abstractions",
+ "contracts",
+ "decoupling",
+ "interfaces",
+ "interoperability",
+ "standards"
+ ],
+ "funding": [
+ {
+ "url": "https://symfony.com/sponsor",
+ "type": "custom"
+ },
+ {
+ "url": "https://github.com/fabpot",
+ "type": "github"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+ "type": "tidelift"
+ }
+ ],
+ "time": "2020-07-06T13:19:58+00:00"
+ },
{
"name": "theseer/tokenizer",
"version": "1.1.3",
@@ -2293,8 +3658,113 @@
}
],
"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/master"
+ },
"time": "2019-06-13T22:48:21+00:00"
},
+ {
+ "name": "vimeo/psalm",
+ "version": "4.10.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/vimeo/psalm.git",
+ "reference": "916b098b008f6de4543892b1e0651c1c3b92cbfa"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/vimeo/psalm/zipball/916b098b008f6de4543892b1e0651c1c3b92cbfa",
+ "reference": "916b098b008f6de4543892b1e0651c1c3b92cbfa",
+ "shasum": ""
+ },
+ "require": {
+ "amphp/amp": "^2.4.2",
+ "amphp/byte-stream": "^1.5",
+ "composer/package-versions-deprecated": "^1.8.0",
+ "composer/semver": "^1.4 || ^2.0 || ^3.0",
+ "composer/xdebug-handler": "^1.1 || ^2.0",
+ "dnoegel/php-xdg-base-dir": "^0.1.1",
+ "ext-ctype": "*",
+ "ext-dom": "*",
+ "ext-json": "*",
+ "ext-libxml": "*",
+ "ext-mbstring": "*",
+ "ext-simplexml": "*",
+ "ext-tokenizer": "*",
+ "felixfbecker/advanced-json-rpc": "^3.0.3",
+ "felixfbecker/language-server-protocol": "^1.5",
+ "netresearch/jsonmapper": "^1.0 || ^2.0 || ^3.0 || ^4.0",
+ "nikic/php-parser": "^4.12",
+ "openlss/lib-array2xml": "^1.0",
+ "php": "^7.1|^8",
+ "sebastian/diff": "^3.0 || ^4.0",
+ "symfony/console": "^3.4.17 || ^4.1.6 || ^5.0",
+ "webmozart/path-util": "^2.3"
+ },
+ "provide": {
+ "psalm/psalm": "self.version"
+ },
+ "require-dev": {
+ "bamarni/composer-bin-plugin": "^1.2",
+ "brianium/paratest": "^4.0||^6.0",
+ "ext-curl": "*",
+ "php-parallel-lint/php-parallel-lint": "^1.2",
+ "phpdocumentor/reflection-docblock": "^5",
+ "phpmyadmin/sql-parser": "5.1.0||dev-master",
+ "phpspec/prophecy": ">=1.9.0",
+ "phpunit/phpunit": "^9.0",
+ "psalm/plugin-phpunit": "^0.16",
+ "slevomat/coding-standard": "^7.0",
+ "squizlabs/php_codesniffer": "^3.5",
+ "symfony/process": "^4.3 || ^5.0",
+ "weirdan/prophecy-shim": "^1.0 || ^2.0"
+ },
+ "suggest": {
+ "ext-igbinary": "^2.0.5"
+ },
+ "bin": [
+ "psalm",
+ "psalm-language-server",
+ "psalm-plugin",
+ "psalm-refactor",
+ "psalter"
+ ],
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "4.x-dev",
+ "dev-3.x": "3.x-dev",
+ "dev-2.x": "2.x-dev",
+ "dev-1.x": "1.x-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Psalm\\": "src/Psalm/"
+ },
+ "files": [
+ "src/functions.php",
+ "src/spl_object_id.php"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Matthew Brown"
+ }
+ ],
+ "description": "A static analysis tool for finding errors in PHP applications",
+ "keywords": [
+ "code",
+ "inspection",
+ "php"
+ ],
+ "time": "2021-09-04T21:00:09+00:00"
+ },
{
"name": "webmozart/assert",
"version": "1.9.1",
@@ -2342,8 +3812,58 @@
"check",
"validate"
],
+ "support": {
+ "issues": "https://github.com/webmozarts/assert/issues",
+ "source": "https://github.com/webmozarts/assert/tree/1.9.1"
+ },
"time": "2020-07-08T17:02:28+00:00"
},
+ {
+ "name": "webmozart/path-util",
+ "version": "2.3.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/webmozart/path-util.git",
+ "reference": "d939f7edc24c9a1bb9c0dee5cb05d8e859490725"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/webmozart/path-util/zipball/d939f7edc24c9a1bb9c0dee5cb05d8e859490725",
+ "reference": "d939f7edc24c9a1bb9c0dee5cb05d8e859490725",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.3.3",
+ "webmozart/assert": "~1.0"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "^4.6",
+ "sebastian/version": "^1.0.1"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "2.3-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Webmozart\\PathUtil\\": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Bernhard Schussek",
+ "email": "bschussek@gmail.com"
+ }
+ ],
+ "description": "A robust cross-platform utility for normalizing, comparing and modifying file paths.",
+ "time": "2015-12-17T08:42:14+00:00"
+ },
{
"name": "woocommerce/woocommerce-sniffs",
"version": "0.1.1",
@@ -2382,6 +3902,10 @@
"woocommerce",
"wordpress"
],
+ "support": {
+ "issues": "https://github.com/woocommerce/woocommerce-sniffs/issues",
+ "source": "https://github.com/woocommerce/woocommerce-sniffs/tree/0.1.1"
+ },
"time": "2021-07-29T17:25:16+00:00"
},
{
@@ -2428,12 +3952,20 @@
"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": {
+ "php-stubs/wordpress-stubs": 0,
+ "php-stubs/woocommerce-stubs": 0
+ },
"prefer-stable": true,
"prefer-lowest": false,
"platform": {
diff --git a/modules/ppcp-api-client/services.php b/modules/ppcp-api-client/services.php
index 060570793..9e1e5ef2e 100644
--- a/modules/ppcp-api-client/services.php
+++ b/modules/ppcp-api-client/services.php
@@ -219,10 +219,10 @@ return array(
'api.factory.webhook' => static function ( ContainerInterface $container ): WebhookFactory {
return new WebhookFactory();
},
- 'api.factory.webhook-event' => static function ( $container ): WebhookEventFactory {
+ 'api.factory.webhook-event' => static function ( ContainerInterface $container ): WebhookEventFactory {
return new WebhookEventFactory();
},
- 'api.factory.capture' => static function ( $container ): CaptureFactory {
+ 'api.factory.capture' => static function ( ContainerInterface $container ): CaptureFactory {
$amount_factory = $container->get( 'api.factory.amount' );
return new CaptureFactory( $amount_factory );
diff --git a/modules/ppcp-api-client/src/Entity/Capture.php b/modules/ppcp-api-client/src/Entity/Capture.php
index c45f8351a..0aacf49b5 100644
--- a/modules/ppcp-api-client/src/Entity/Capture.php
+++ b/modules/ppcp-api-client/src/Entity/Capture.php
@@ -164,7 +164,7 @@ class Capture {
* @return array
*/
public function to_array() : array {
- $data = array(
+ $data = array(
'id' => $this->id(),
'status' => $this->status()->name(),
'amount' => $this->amount()->to_array(),
@@ -173,8 +173,9 @@ class Capture {
'invoice_id' => $this->invoice_id(),
'custom_id' => $this->custom_id(),
);
- if ( $this->status()->details() ) {
- $data['status_details'] = array( 'reason' => $this->status()->details()->reason() );
+ $details = $this->status()->details();
+ if ( $details ) {
+ $data['status_details'] = array( 'reason' => $details->reason() );
}
return $data;
}
diff --git a/modules/ppcp-api-client/src/Entity/Webhook.php b/modules/ppcp-api-client/src/Entity/Webhook.php
index b2e8ab2dd..8cd6bc120 100644
--- a/modules/ppcp-api-client/src/Entity/Webhook.php
+++ b/modules/ppcp-api-client/src/Entity/Webhook.php
@@ -40,9 +40,9 @@ class Webhook {
/**
* Webhook constructor.
*
- * @param string $url The URL of the webhook.
- * @param string[] $event_types The associated event types.
- * @param string $id The id of the webhook.
+ * @param string $url The URL of the webhook.
+ * @param stdClass[] $event_types The associated event types.
+ * @param string $id The id of the webhook.
*/
public function __construct( string $url, array $event_types, string $id = '' ) {
$this->url = $url;
diff --git a/modules/ppcp-api-client/src/Factory/WebhookFactory.php b/modules/ppcp-api-client/src/Factory/WebhookFactory.php
index 91a7da4a3..413dbd66a 100644
--- a/modules/ppcp-api-client/src/Factory/WebhookFactory.php
+++ b/modules/ppcp-api-client/src/Factory/WebhookFactory.php
@@ -9,6 +9,7 @@ declare(strict_types=1);
namespace WooCommerce\PayPalCommerce\ApiClient\Factory;
+use stdClass;
use WooCommerce\PayPalCommerce\ApiClient\Entity\Webhook;
use WooCommerce\PayPalCommerce\ApiClient\Exception\RuntimeException;
@@ -20,15 +21,15 @@ class WebhookFactory {
/**
* Returns a webhook for a URL with an array of event types associated to this URL.
*
- * @param string $url The URL.
- * @param array $event_types The event types to which this URL listens to.
+ * @param string $url The URL.
+ * @param string[] $event_types The event types to which this URL listens to.
*
* @return Webhook
*/
public function for_url_and_events( string $url, array $event_types ): Webhook {
$event_types = array_map(
- static function ( string $type ): array {
- return array( 'name' => $type );
+ static function ( string $type ): stdClass {
+ return (object) array( 'name' => $type );
},
$event_types
);
@@ -52,12 +53,12 @@ class WebhookFactory {
/**
* Returns a Webhook based of a PayPal JSON response.
*
- * @param \stdClass $data The JSON object.
+ * @param stdClass $data The JSON object.
*
* @return Webhook
* @throws RuntimeException When JSON object is malformed.
*/
- public function from_paypal_response( \stdClass $data ): Webhook {
+ public function from_paypal_response( stdClass $data ): Webhook {
if ( ! isset( $data->id ) ) {
throw new RuntimeException(
__( 'No id for webhook given.', 'woocommerce-paypal-payments' )
diff --git a/modules/ppcp-compat/services.php b/modules/ppcp-compat/services.php
index 223d468b6..258a1e7be 100644
--- a/modules/ppcp-compat/services.php
+++ b/modules/ppcp-compat/services.php
@@ -9,6 +9,8 @@ declare(strict_types=1);
namespace WooCommerce\PayPalCommerce\Compat;
+use Psr\Container\ContainerInterface;
+
return array(
'compat.ppec.mock-gateway' => static function( $container ) {
@@ -23,7 +25,7 @@ return array(
return new PPEC\MockGateway( $title );
},
- 'compat.ppec.subscriptions-handler' => static function ( $container ) {
+ 'compat.ppec.subscriptions-handler' => static function ( ContainerInterface $container ) {
$ppcp_renewal_handler = $container->get( 'subscription.renewal-handler' );
$gateway = $container->get( 'compat.ppec.mock-gateway' );
diff --git a/modules/ppcp-status-report/services.php b/modules/ppcp-status-report/services.php
index a35a89dfb..dccad7256 100644
--- a/modules/ppcp-status-report/services.php
+++ b/modules/ppcp-status-report/services.php
@@ -10,7 +10,7 @@ declare(strict_types=1);
namespace WooCommerce\PayPalCommerce\StatusReport;
return array(
- 'status-report.renderer' => static function ( $container ): Renderer {
+ 'status-report.renderer' => static function (): Renderer {
return new Renderer();
},
);
diff --git a/modules/ppcp-vaulting/services.php b/modules/ppcp-vaulting/services.php
index b1b3ea7af..e81fc55ad 100644
--- a/modules/ppcp-vaulting/services.php
+++ b/modules/ppcp-vaulting/services.php
@@ -9,17 +9,18 @@ declare(strict_types=1);
namespace WooCommerce\PayPalCommerce\Vaulting;
+use Psr\Container\ContainerInterface;
use WooCommerce\PayPalCommerce\Vaulting\Assets\MyAccountPaymentsAssets;
use WooCommerce\PayPalCommerce\Vaulting\Endpoint\DeletePaymentTokenEndpoint;
return array(
- 'vaulting.module-url' => static function ( $container ): string {
+ 'vaulting.module-url' => static function ( ContainerInterface $container ): string {
return plugins_url(
'/modules/ppcp-vaulting/',
dirname( __FILE__, 3 ) . '/woocommerce-paypal-payments.php'
);
},
- 'vaulting.assets.myaccount-payments' => function( $container ) : MyAccountPaymentsAssets {
+ 'vaulting.assets.myaccount-payments' => function( ContainerInterface $container ) : MyAccountPaymentsAssets {
return new MyAccountPaymentsAssets(
$container->get( 'vaulting.module-url' )
);
@@ -27,12 +28,12 @@ return array(
'vaulting.payment-tokens-renderer' => static function (): PaymentTokensRenderer {
return new PaymentTokensRenderer();
},
- 'vaulting.repository.payment-token' => static function ( $container ): PaymentTokenRepository {
+ 'vaulting.repository.payment-token' => static function ( ContainerInterface $container ): PaymentTokenRepository {
$factory = $container->get( 'api.factory.payment-token' );
$endpoint = $container->get( 'api.endpoint.payment-token' );
return new PaymentTokenRepository( $factory, $endpoint );
},
- 'vaulting.endpoint.delete' => function( $container ) : DeletePaymentTokenEndpoint {
+ 'vaulting.endpoint.delete' => function( ContainerInterface $container ) : DeletePaymentTokenEndpoint {
return new DeletePaymentTokenEndpoint(
$container->get( 'vaulting.repository.payment-token' ),
$container->get( 'button.request-data' ),
diff --git a/modules/ppcp-wc-gateway/extensions.php b/modules/ppcp-wc-gateway/extensions.php
index d8fcae8b9..09b0cbd8a 100644
--- a/modules/ppcp-wc-gateway/extensions.php
+++ b/modules/ppcp-wc-gateway/extensions.php
@@ -20,15 +20,15 @@ use Psr\Log\LoggerInterface;
return array(
- 'api.merchant_email' => static function ( $container ): string {
+ 'api.merchant_email' => static function ( ContainerInterface $container ): string {
$settings = $container->get( 'wcgateway.settings' );
return $settings->has( 'merchant_email' ) ? (string) $settings->get( 'merchant_email' ) : '';
},
- 'api.merchant_id' => static function ( $container ): string {
+ 'api.merchant_id' => static function ( ContainerInterface $container ): string {
$settings = $container->get( 'wcgateway.settings' );
return $settings->has( 'merchant_id' ) ? (string) $settings->get( 'merchant_id' ) : '';
},
- 'api.partner_merchant_id' => static function ( $container ): string {
+ 'api.partner_merchant_id' => static function ( ContainerInterface $container ): string {
$environment = $container->get( 'onboarding.environment' );
/**
@@ -39,20 +39,20 @@ return array(
return $environment->current_environment_is( Environment::SANDBOX ) ?
(string) $container->get( 'api.partner_merchant_id-sandbox' ) : (string) $container->get( 'api.partner_merchant_id-production' );
},
- 'api.key' => static function ( $container ): string {
+ 'api.key' => static function ( ContainerInterface $container ): string {
$settings = $container->get( 'wcgateway.settings' );
$key = $settings->has( 'client_id' ) ? (string) $settings->get( 'client_id' ) : '';
return $key;
},
- 'api.secret' => static function ( $container ): string {
+ 'api.secret' => static function ( ContainerInterface $container ): string {
$settings = $container->get( 'wcgateway.settings' );
return $settings->has( 'client_secret' ) ? (string) $settings->get( 'client_secret' ) : '';
},
- 'api.prefix' => static function ( $container ): string {
+ 'api.prefix' => static function ( ContainerInterface $container ): string {
$settings = $container->get( 'wcgateway.settings' );
return $settings->has( 'prefix' ) ? (string) $settings->get( 'prefix' ) : 'WC-';
},
- 'api.endpoint.order' => static function ( $container ): OrderEndpoint {
+ 'api.endpoint.order' => static function ( ContainerInterface $container ): OrderEndpoint {
$order_factory = $container->get( 'api.factory.order' );
$patch_collection_factory = $container->get( 'api.factory.patch-collection-factory' );
$logger = $container->get( 'woocommerce.logger.woocommerce' );
@@ -85,7 +85,7 @@ return array(
$bn_code
);
},
- 'woocommerce.logger.woocommerce' => function ( $container ): LoggerInterface {
+ 'woocommerce.logger.woocommerce' => function ( ContainerInterface $container ): LoggerInterface {
$settings = $container->get( 'wcgateway.settings' );
if ( ! function_exists( 'wc_get_logger' ) || ! $settings->has( 'logging_enabled' ) || ! $settings->get( 'logging_enabled' ) ) {
return new NullLogger();
diff --git a/modules/ppcp-wc-gateway/services.php b/modules/ppcp-wc-gateway/services.php
index 7ae429d8d..f6b7fb5ee 100644
--- a/modules/ppcp-wc-gateway/services.php
+++ b/modules/ppcp-wc-gateway/services.php
@@ -113,13 +113,13 @@ return array(
$settings = $container->get( 'wcgateway.settings' );
return new DisableGateways( $session_handler, $settings );
},
- 'wcgateway.is-wc-payments-page' => static function ( $container ): bool {
+ 'wcgateway.is-wc-payments-page' => static function ( ContainerInterface $container ): bool {
$page = isset( $_GET['page'] ) ? sanitize_text_field( wp_unslash( $_GET['page'] ) ) : '';
$tab = isset( $_GET['tab'] ) ? sanitize_text_field( wp_unslash( $_GET['tab'] ) ) : '';
return 'wc-settings' === $page && 'checkout' === $tab;
},
- 'wcgateway.is-ppcp-settings-page' => static function ( $container ): bool {
+ 'wcgateway.is-ppcp-settings-page' => static function ( ContainerInterface $container ): bool {
if ( ! $container->get( 'wcgateway.is-wc-payments-page' ) ) {
return false;
}
@@ -128,7 +128,7 @@ return array(
return in_array( $section, array( PayPalGateway::ID, CreditCardGateway::ID, WebhooksStatusPage::ID ), true );
},
- 'wcgateway.current-ppcp-settings-page-id' => static function ( $container ): string {
+ 'wcgateway.current-ppcp-settings-page-id' => static function ( ContainerInterface $container ): string {
if ( ! $container->get( 'wcgateway.is-ppcp-settings-page' ) ) {
return '';
}
@@ -155,7 +155,7 @@ return array(
return new DccWithoutPayPalAdminNotice( $state, $settings, $is_payments_page, $is_ppcp_settings_page );
},
'wcgateway.notice.authorize-order-action' =>
- static function ( $container ): AuthorizeOrderActionNotice {
+ static function ( ContainerInterface $container ): AuthorizeOrderActionNotice {
return new AuthorizeOrderActionNotice();
},
'wcgateway.settings.sections-renderer' => static function ( ContainerInterface $container ): SectionsRenderer {
@@ -1973,10 +1973,10 @@ return array(
dirname( __FILE__, 3 ) . '/woocommerce-paypal-payments.php'
);
},
- 'wcgateway.relative-path' => static function( $container ): string {
+ 'wcgateway.relative-path' => static function( ContainerInterface $container ): string {
return 'modules/ppcp-wc-gateway/';
},
- 'wcgateway.absolute-path' => static function( $container ): string {
+ 'wcgateway.absolute-path' => static function( ContainerInterface $container ): string {
return plugin_dir_path(
dirname( __FILE__, 3 ) . '/woocommerce-paypal-payments.php'
) .
@@ -1993,15 +1993,15 @@ return array(
);
},
- 'wcgateway.transaction-url-sandbox' => static function ( $container ): string {
+ 'wcgateway.transaction-url-sandbox' => static function ( ContainerInterface $container ): string {
return 'https://www.sandbox.paypal.com/cgi-bin/webscr?cmd=_view-a-trans&id=%s';
},
- 'wcgateway.transaction-url-live' => static function ( $container ): string {
+ 'wcgateway.transaction-url-live' => static function ( ContainerInterface $container ): string {
return 'https://www.paypal.com/cgi-bin/webscr?cmd=_view-a-trans&id=%s';
},
- 'wcgateway.transaction-url-provider' => static function ( $container ): TransactionUrlProvider {
+ 'wcgateway.transaction-url-provider' => static function ( ContainerInterface $container ): TransactionUrlProvider {
$sandbox_url_base = $container->get( 'wcgateway.transaction-url-sandbox' );
$live_url_base = $container->get( 'wcgateway.transaction-url-live' );
@@ -2015,7 +2015,7 @@ return array(
return new DCCProductStatus( $settings, $partner_endpoint );
},
- 'button.helper.messages-disclaimers' => static function ( $container ): MessagesDisclaimers {
+ 'button.helper.messages-disclaimers' => static function ( ContainerInterface $container ): MessagesDisclaimers {
return new MessagesDisclaimers();
},
);
diff --git a/modules/ppcp-wc-gateway/src/Processor/PaymentsStatusHandlingTrait.php b/modules/ppcp-wc-gateway/src/Processor/PaymentsStatusHandlingTrait.php
index 5e2929d81..3baebcec6 100644
--- a/modules/ppcp-wc-gateway/src/Processor/PaymentsStatusHandlingTrait.php
+++ b/modules/ppcp-wc-gateway/src/Processor/PaymentsStatusHandlingTrait.php
@@ -55,8 +55,9 @@ trait PaymentsStatusHandlingTrait {
): void {
$status = $capture->status();
- if ( $status->details() ) {
- $this->add_status_details_note( $wc_order, $status->name(), $status->details()->text() );
+ $details = $status->details();
+ if ( $details ) {
+ $this->add_status_details_note( $wc_order, $status->name(), $details->text() );
}
switch ( $status->name() ) {
@@ -95,8 +96,9 @@ trait PaymentsStatusHandlingTrait {
): void {
$status = $authorization->status();
- if ( $status->details() ) {
- $this->add_status_details_note( $wc_order, $status->name(), $status->details()->text() );
+ $details = $status->details();
+ if ( $details ) {
+ $this->add_status_details_note( $wc_order, $status->name(), $details->text() );
}
switch ( $status->name() ) {
diff --git a/modules/ppcp-wc-gateway/src/WCGatewayModule.php b/modules/ppcp-wc-gateway/src/WCGatewayModule.php
index 0905d32ff..ea47a953b 100644
--- a/modules/ppcp-wc-gateway/src/WCGatewayModule.php
+++ b/modules/ppcp-wc-gateway/src/WCGatewayModule.php
@@ -148,9 +148,9 @@ class WCGatewayModule implements ModuleInterface {
/**
* Registers the payment gateways.
*
- * @param ContainerInterface|null $container The container.
+ * @param ContainerInterface $container The container.
*/
- private function register_payment_gateways( ContainerInterface $container = null ) {
+ private function register_payment_gateways( ContainerInterface $container ) {
add_filter(
'woocommerce_payment_gateways',
diff --git a/modules/ppcp-webhooks/services.php b/modules/ppcp-webhooks/services.php
index 96ee08d2c..f9fdb09e0 100644
--- a/modules/ppcp-webhooks/services.php
+++ b/modules/ppcp-webhooks/services.php
@@ -72,7 +72,7 @@ return array(
);
},
- 'webhook.current' => function( $container ) : ?Webhook {
+ 'webhook.current' => function( ContainerInterface $container ) : ?Webhook {
$data = (array) get_option( WebhookRegistrar::KEY, array() );
if ( empty( $data ) ) {
return null;
@@ -91,18 +91,18 @@ return array(
}
},
- 'webhook.is-registered' => function( $container ) : bool {
+ 'webhook.is-registered' => function( ContainerInterface $container ) : bool {
return $container->get( 'webhook.current' ) !== null;
},
- 'webhook.status.registered-webhooks' => function( $container ) : array {
+ 'webhook.status.registered-webhooks' => function( ContainerInterface $container ) : array {
$endpoint = $container->get( 'api.endpoint.webhook' );
assert( $endpoint instanceof WebhookEndpoint );
return $endpoint->list();
},
- 'webhook.status.registered-webhooks-data' => function( $container ) : array {
+ 'webhook.status.registered-webhooks-data' => function( ContainerInterface $container ) : array {
$empty_placeholder = __( 'No webhooks found.', 'woocommerce-paypal-payments' );
$webhooks = array();
@@ -139,7 +139,7 @@ return array(
);
},
- 'webhook.status.simulation' => function( $container ) : WebhookSimulation {
+ 'webhook.status.simulation' => function( ContainerInterface $container ) : WebhookSimulation {
$webhook_endpoint = $container->get( 'api.endpoint.webhook' );
$webhook = $container->get( 'webhook.current' );
return new WebhookSimulation(
@@ -150,13 +150,13 @@ return array(
);
},
- 'webhook.status.assets' => function( $container ) : WebhooksStatusPageAssets {
+ 'webhook.status.assets' => function( ContainerInterface $container ) : WebhooksStatusPageAssets {
return new WebhooksStatusPageAssets(
$container->get( 'webhook.module-url' )
);
},
- 'webhook.endpoint.resubscribe' => static function ( $container ) : ResubscribeEndpoint {
+ 'webhook.endpoint.resubscribe' => static function ( ContainerInterface $container ) : ResubscribeEndpoint {
$registrar = $container->get( 'webhook.registrar' );
$request_data = $container->get( 'button.request-data' );
@@ -166,7 +166,7 @@ return array(
);
},
- 'webhook.endpoint.simulate' => static function ( $container ) : SimulateEndpoint {
+ 'webhook.endpoint.simulate' => static function ( ContainerInterface $container ) : SimulateEndpoint {
$simulation = $container->get( 'webhook.status.simulation' );
$request_data = $container->get( 'button.request-data' );
@@ -175,7 +175,7 @@ return array(
$request_data
);
},
- 'webhook.endpoint.simulation-state' => static function ( $container ) : SimulationStateEndpoint {
+ 'webhook.endpoint.simulation-state' => static function ( ContainerInterface $container ) : SimulationStateEndpoint {
$simulation = $container->get( 'webhook.status.simulation' );
return new SimulationStateEndpoint(
@@ -183,7 +183,7 @@ return array(
);
},
- 'webhook.module-url' => static function ( $container ): string {
+ 'webhook.module-url' => static function ( ContainerInterface $container ): string {
return plugins_url(
'/modules/ppcp-webhooks/',
dirname( __FILE__, 3 ) . '/woocommerce-paypal-payments.php'
diff --git a/modules/ppcp-webhooks/src/Handler/CheckoutOrderApproved.php b/modules/ppcp-webhooks/src/Handler/CheckoutOrderApproved.php
index 3ef0a0e67..01f3375d5 100644
--- a/modules/ppcp-webhooks/src/Handler/CheckoutOrderApproved.php
+++ b/modules/ppcp-webhooks/src/Handler/CheckoutOrderApproved.php
@@ -50,7 +50,7 @@ class CheckoutOrderApproved implements RequestHandler {
/**
* The event types a handler handles.
*
- * @return array
+ * @return string[]
*/
public function event_types(): array {
return array(
diff --git a/modules/ppcp-webhooks/src/Handler/CheckoutOrderCompleted.php b/modules/ppcp-webhooks/src/Handler/CheckoutOrderCompleted.php
index aebb03627..6f950f9fd 100644
--- a/modules/ppcp-webhooks/src/Handler/CheckoutOrderCompleted.php
+++ b/modules/ppcp-webhooks/src/Handler/CheckoutOrderCompleted.php
@@ -39,7 +39,7 @@ class CheckoutOrderCompleted implements RequestHandler {
/**
* The event types a handler handles.
*
- * @return array
+ * @return string[]
*/
public function event_types(): array {
return array(
diff --git a/modules/ppcp-webhooks/src/Handler/PaymentCaptureCompleted.php b/modules/ppcp-webhooks/src/Handler/PaymentCaptureCompleted.php
index 88b0d4ce2..3359b30c7 100644
--- a/modules/ppcp-webhooks/src/Handler/PaymentCaptureCompleted.php
+++ b/modules/ppcp-webhooks/src/Handler/PaymentCaptureCompleted.php
@@ -40,7 +40,7 @@ class PaymentCaptureCompleted implements RequestHandler {
/**
* The event types a handler handles.
*
- * @return array
+ * @return string[]
*/
public function event_types(): array {
return array( 'PAYMENT.CAPTURE.COMPLETED' );
diff --git a/modules/ppcp-webhooks/src/Handler/PaymentCaptureRefunded.php b/modules/ppcp-webhooks/src/Handler/PaymentCaptureRefunded.php
index a9c2ee8d2..bc56dd935 100644
--- a/modules/ppcp-webhooks/src/Handler/PaymentCaptureRefunded.php
+++ b/modules/ppcp-webhooks/src/Handler/PaymentCaptureRefunded.php
@@ -39,7 +39,7 @@ class PaymentCaptureRefunded implements RequestHandler {
/**
* The event types a handler handles.
*
- * @return array
+ * @return string[]
*/
public function event_types(): array {
return array( 'PAYMENT.CAPTURE.REFUNDED' );
diff --git a/modules/ppcp-webhooks/src/Handler/PaymentCaptureReversed.php b/modules/ppcp-webhooks/src/Handler/PaymentCaptureReversed.php
index f04b91b2f..bef765503 100644
--- a/modules/ppcp-webhooks/src/Handler/PaymentCaptureReversed.php
+++ b/modules/ppcp-webhooks/src/Handler/PaymentCaptureReversed.php
@@ -42,7 +42,7 @@ class PaymentCaptureReversed implements RequestHandler {
/**
* The event types a handler handles.
*
- * @return array
+ * @return string[]
*/
public function event_types(): array {
return array(
diff --git a/modules/ppcp-webhooks/src/Handler/RequestHandler.php b/modules/ppcp-webhooks/src/Handler/RequestHandler.php
index 0c744c355..1981dd772 100644
--- a/modules/ppcp-webhooks/src/Handler/RequestHandler.php
+++ b/modules/ppcp-webhooks/src/Handler/RequestHandler.php
@@ -17,7 +17,7 @@ interface RequestHandler {
/**
* The event types a handler handles.
*
- * @return array
+ * @return string[]
*/
public function event_types(): array;
diff --git a/modules/ppcp-webhooks/src/IncomingWebhookEndpoint.php b/modules/ppcp-webhooks/src/IncomingWebhookEndpoint.php
index 7332b7ae4..ed96e6974 100644
--- a/modules/ppcp-webhooks/src/IncomingWebhookEndpoint.php
+++ b/modules/ppcp-webhooks/src/IncomingWebhookEndpoint.php
@@ -248,7 +248,7 @@ class IncomingWebhookEndpoint {
/**
* Returns the event types, which are handled by the endpoint.
*
- * @return array
+ * @return string[]
*/
public function handled_event_types(): array {
$event_types = array();
diff --git a/modules/ppcp-webhooks/src/Status/Assets/WebhooksStatusPageAssets.php b/modules/ppcp-webhooks/src/Status/Assets/WebhooksStatusPageAssets.php
index 3d162e53a..5d5248329 100644
--- a/modules/ppcp-webhooks/src/Status/Assets/WebhooksStatusPageAssets.php
+++ b/modules/ppcp-webhooks/src/Status/Assets/WebhooksStatusPageAssets.php
@@ -47,14 +47,14 @@ class WebhooksStatusPageAssets {
'ppcp-webhooks-status-page-style',
$this->module_url . '/assets/css/status-page.css',
array(),
- 1
+ '1'
);
wp_register_script(
'ppcp-webhooks-status-page',
$this->module_url . '/assets/js/status-page.js',
array(),
- 1,
+ '1',
true
);
diff --git a/modules/ppcp-webhooks/src/Status/WebhookSimulation.php b/modules/ppcp-webhooks/src/Status/WebhookSimulation.php
index c30d7fe5c..82b64d6d9 100644
--- a/modules/ppcp-webhooks/src/Status/WebhookSimulation.php
+++ b/modules/ppcp-webhooks/src/Status/WebhookSimulation.php
@@ -78,7 +78,7 @@ class WebhookSimulation {
*
* @throws Exception If failed to start simulation.
*/
- public function start() {
+ public function start(): void {
if ( ! $this->webhook ) {
throw new Exception( 'Webhooks not registered' );
}
diff --git a/package.json b/package.json
index b5d5bddf3..a6ff7b7ff 100644
--- a/package.json
+++ b/package.json
@@ -28,7 +28,7 @@
"docker:build-js": "docker-compose run --rm build yarn run build:dev",
"docker:composer-update": "docker-compose run --rm composer composer update && docker-compose run --rm composer composer update --lock",
"docker:test": "docker-compose run --rm test vendor/bin/phpunit",
- "docker:lint": "docker-compose run --rm test vendor/bin/phpcs --parallel=8 -s",
+ "docker:lint": "docker-compose run --rm test sh -c 'vendor/bin/phpcs --parallel=8 -s && vendor/bin/psalm --show-info=false --threads=8 --diff'",
"docker:fix-lint": "docker-compose run --rm test vendor/bin/phpcbf",
diff --git a/psalm-baseline.xml b/psalm-baseline.xml
new file mode 100644
index 000000000..1cbd88402
--- /dev/null
+++ b/psalm-baseline.xml
@@ -0,0 +1,1012 @@
+
+
+
+
+ PAYPAL_API_URL
+ PAYPAL_API_URL
+
+
+
+
+ $response
+
+
+
+
+ $customer_id
+
+
+ $response
+
+
+
+
+ $response
+ $response
+
+
+
+
+ authorizations
+ captures
+
+
+ $order->purchase_units()[0]->payments()->authorizations()[0]->status()
+ $order->purchase_units()[0]->payments()->captures()[0]->status()
+
+
+ null
+ null
+
+
+ $response
+ $response
+ $response
+ $response
+ $response
+
+
+
+
+ $response
+
+
+
+
+ $id
+
+
+ $response
+
+
+
+
+ $response
+ $response
+ $response
+
+
+
+
+ $response
+
+
+ wc_print_r( $args['body'], true )
+ wc_print_r( $response['body'], true )
+ wc_print_r( $response['response'], true )
+
+
+ apply_filters( 'ppcp_request_args', $args, $url )
+
+
+
+
+ file_get_contents( 'php://input' )
+
+
+ $response
+ $response
+ $response
+ $response
+
+
+
+
+ $breakdown
+
+
+ to_array
+ to_array
+
+
+
+
+ $discount
+ $handling
+ $insurance
+ $item_total
+ $shipping
+ $shipping_discount
+ $tax_total
+
+
+ $this->discount
+ $this->handling
+ $this->insurance
+ $this->item_total
+ $this->shipping
+ $this->shipping_discount
+ $this->tax_total
+
+
+
+
+ to_array
+
+
+
+
+ format
+ format
+ to_array
+ to_array
+ to_array
+
+
+ return is_a( $unit, PurchaseUnit::class );
+
+
+
+
+ $address
+
+
+ country_code
+ format
+ to_array
+ to_array
+
+
+
+
+ to_array
+ to_array
+
+
+
+
+ to_array
+
+
+
+
+ $amount_total += $breakdown->handling()->value()
+ $amount_total += $breakdown->insurance()->value()
+ $amount_total += $breakdown->item_total()->value()
+ $amount_total += $breakdown->shipping()->value()
+ $amount_total += $breakdown->tax_total()->value()
+ $amount_total -= $breakdown->discount()->value()
+ $amount_total -= $breakdown->shipping_discount()->value()
+ $item->tax()->value() * $item->quantity()
+ $item->unit_amount()->value() * $item->quantity()
+
+
+ item_total
+ item_total
+ tax_total
+ tax_total
+ to_array
+ to_array
+ to_array
+ value
+ value
+ value
+ value
+ value
+ value
+ value
+ value
+ value
+ value
+
+
+
+
+ to_array
+
+
+
+
+ is_a( $product, SellerStatusProduct::class )
+
+
+
+
+ is_string( $capability )
+
+
+
+
+ wp_json_encode( $this->json )
+
+
+ string
+
+
+ new Token( $json )
+
+
+ static
+
+
+ $created
+
+
+
+
+ $event_types
+
+
+ $event->name
+
+
+ $this->event_types
+
+
+ stdClass[]
+
+
+
+
+ $this->status_code
+
+
+ $this->status_code
+
+
+
+
+ $cart->get_cart_contents_total() + $cart->get_discount_total() + $total_fees_amount
+ $item->quantity() * $item->tax()->value()
+ $item->quantity() * $item->unit_amount()->value()
+ $total_fees_amount += (float) $fee->amount
+
+
+ WC()->session->get( 'ppcp_fees' )
+
+
+ value
+
+
+ (float) $item_total
+
+
+ (float) $cart->get_cart_contents_tax()
+ (float) $cart->get_discount_tax()
+ (float) $cart->get_discount_total()
+ (float) $cart->get_shipping_total()
+ (float) $cart->get_total( 'numeric' )
+ (float) $order->get_total()
+ (float) $order->get_total_discount( false )
+ (float) $order->get_total_discount( false )
+
+
+
+
+
+ $fees_from_session
+
+
+ (float) $order->get_item_subtotal( $item, false )
+ (float) $order->get_item_subtotal( $item, true )
+ (int) $item->get_quantity()
+
+
+
+
+ $needs_update
+
+
+
+
+ $national_number
+ $national_number
+
+
+ from_wc_order
+
+
+
+
+ $this->shipping_needed( ... array_values( $items ) ) && is_a( $customer, \WC_Customer::class )
+
+
+
+
+
+ (object) $data->resource
+ (string) $data->event_version
+ (string) $data->resource_type
+ (string) $data->resource_version
+ (string) $data->summary
+
+
+ ''
+ ''
+ ''
+ ''
+ new stdClass()
+
+
+
+
+ delete
+
+
+ (bool) set_transient( $this->prefix . $key, $value )
+
+
+
+
+ strrpos( $locale, '-' )
+
+
+ (string) home_url( \WC_AJAX::get_endpoint( ReturnUrlEndpoint::ENDPOINT ) )
+ (string) wc_get_checkout_url()
+
+
+
+
+ DAY_IN_SECONDS
+
+
+
+
+ CONNECT_WOO_CLIENT_ID
+ CONNECT_WOO_SANDBOX_CLIENT_ID
+
+
+
+
+ 1
+
+
+ $default_fields
+ $id
+
+
+ function ( $default_fields, $id ) {
+
+
+ button_renderer
+ dcc_renderer
+ message_renderer
+
+
+ PAYPAL_INTEGRATION_DATE
+
+
+
+
+ $value
+
+
+ register_ajax_endpoints
+
+
+
+
+ brand
+ card
+ card
+
+
+ $order
+
+
+
+
+ process_checkout_form
+ process_checkout_form_when_creating_account
+ set_bn_code
+ validate_paynow_form
+
+
+ wp_json_encode( $data['payer'] )
+
+
+ $wc_order
+ $wc_order
+ $wc_order
+
+
+ $number
+ $wc_order
+
+
+ $parsed_request_data
+ $purchase_units
+
+
+
+
+ dequeue_nonce_fix
+ enqueue_nonce_fix
+
+
+ $stream
+
+
+ $json
+
+
+ (array) $assoc_array
+ (string) $raw_key
+
+
+
+
+ $order_id
+
+
+ $wc_order
+ wp_unslash( $_REQUEST['ppcp-resume-order'] )
+
+
+ save_meta_data
+ update_meta_data
+ update_meta_data
+
+
+ (int) $this->sanitize_custom_id( $purchase_unit->custom_id() )
+
+
+
+
+ wc_print_r( $result->to_array(), true )
+
+
+ authentication_result
+ authentication_result
+ card
+ card
+ card
+ to_array
+
+
+
+
+ $container
+ $container
+
+
+
+
+ get
+
+
+
+
+ NoteTraits
+
+
+
+
+ wc_gateway_ppec()
+
+
+
+
+ wc_gateway_ppec()
+
+
+
+
+ get_payment_method
+
+
+ get_current_screen()->id
+ get_current_screen()->id
+
+
+ get_payment_method
+
+
+ wcs_get_subscription( absint( $_GET['subscription_id'] ) )
+ wcs_get_subscription( absint( get_query_var( 'order-pay' ) ) )
+ wcs_get_subscription( absint( get_query_var( 'view-subscription' ) ) )
+ wcs_is_view_subscription_page()
+ wcs_order_contains_renewal( $order )
+
+
+
+
+ $container
+
+
+ CONNECT_WOO_MERCHANT_ID
+ CONNECT_WOO_SANDBOX_MERCHANT_ID
+ CONNECT_WOO_SANDBOX_URL
+ CONNECT_WOO_SANDBOX_URL
+ CONNECT_WOO_URL
+ CONNECT_WOO_URL
+ PAYPAL_API_URL
+ PAYPAL_API_URL
+ PAYPAL_SANDBOX_API_URL
+ PAYPAL_SANDBOX_API_URL
+
+
+
+
+ 1
+ 1
+ 1
+
+
+
+
+ $config
+ $field
+ $key
+
+
+
+
+ register_routes
+
+
+ null
+
+
+ ! empty( $url_args ) && is_array( $url_args )
+ is_array( $url_args )
+
+
+ WP_Error|array
+ WP_REST_Request
+ WP_REST_Request
+ WP_REST_Request
+ WP_REST_Request
+
+
+
+
+ render
+ render_button
+
+
+
+
+ is_a( $result, SessionHandler::class )
+
+
+
+
+ get_current_user_id()
+
+
+ run
+
+
+ wp_unslash( $_GET[ $param_name ] )
+
+
+
+
+ render_session_cancellation
+
+
+
+
+ store_session
+
+
+
+
+ getKey
+
+
+
+
+ \WC_Subscriptions_Admin
+
+
+
+
+ current( $tokens )
+
+
+ capture_order
+ process_order
+ renew
+
+
+ (int) $customer->get_id()
+ (int) $customer->get_id()
+ (int) $wc_order->get_customer_id()
+ (int) $wc_order->get_id()
+ (int) $wc_order->get_id()
+ (int) $wc_order->get_id()
+
+
+ apply_filters( 'woocommerce_paypal_payments_subscriptions_get_token_for_customer', null, $customer, $wc_order )
+
+
+
+
+ $amount
+ $amount
+ $default_fields
+ $description
+ $id
+ $id
+ $order
+ $order
+ $subscription
+
+
+ add_payment_token_id
+
+
+ get
+
+
+ \WC_Subscription
+
+
+
+
+ localize
+
+
+
+
+ handle_request
+
+
+
+
+ to_array
+
+
+
+
+ $token->source()
+
+
+ null
+
+
+
+
+ $menu_links
+
+
+ getKey
+
+
+ EP_PAGES
+
+
+
+
+ wp_unslash( $_GET[ SectionsRenderer::KEY ] )
+ wp_unslash( $_GET['page'] )
+ wp_unslash( $_GET['section'] )
+ wp_unslash( $_GET['section'] )
+ wp_unslash( $_GET['tab'] )
+
+
+ $letters
+
+
+
+
+ render
+ render_completed_status
+ render_incomplete_status
+
+
+
+
+ render
+
+
+
+
+ register_admin_assets
+ register_assets
+
+
+ $screen->id
+
+
+
+
+ phone
+ phone
+ phone
+ purchase_units
+
+
+ null
+ null
+ null
+ null
+ null
+
+
+
+
+ card
+
+
+
+
+ $allowed_hosts
+
+
+ handle_request
+
+
+ wp_unslash( $_GET['token'] )
+
+
+ $order
+
+
+
+
+ true
+ true
+
+
+ false
+ false
+
+
+
+
+ $location
+
+
+ display_message
+
+
+ $messages
+
+
+
+
+ capture_authorizations
+
+
+ authorizations
+
+
+ $captures
+
+
+
+
+ set_order_transaction_id
+
+
+ card
+
+
+ $payment_token_repository
+
+
+
+
+ authorizations
+ captures
+
+
+
+
+ wp_json_encode( $payments->to_array() )
+
+
+ $amount
+
+
+
+
+ render
+
+
+
+
+ persist
+ set
+
+
+
+
+ listen
+ listen_for_merchant_id
+ listen_for_vaulting_enabled
+
+
+ wp_unslash( $_GET['merchantId'] )
+ wp_unslash( $_GET['merchantIdInPayPal'] )
+ wp_unslash( $_POST['ppcp-nonce'] )
+
+
+
+
+ $value
+
+
+ $field
+ $field
+ $field
+
+
+ render
+ render_dcc_does_not_apply_info
+ render_dcc_not_active_yet
+ render_dcc_onboarding_info
+ render_text
+
+
+ (int) $colspan
+
+
+
+
+ $args
+ $args
+ $column
+ $columns
+ $field
+ $key
+ $methods
+ $methods
+ $notices
+ $order
+ $order_actions
+ $recipient
+ $value
+ $wc_order_id
+ $wc_order_id
+
+
+ register_checkout_paypal_address_preset
+ register_columns
+ register_order_functionality
+ register_payment_gateways
+
+
+
+
+ $container
+
+
+
+
+ handle_request
+
+
+
+
+ handle_request
+
+
+
+
+ handle_request
+
+
+
+
+ rest_ensure_response( $response )
+ rest_ensure_response( $response )
+ rest_ensure_response( $response )
+ rest_ensure_response( $response )
+ rest_ensure_response( $response )
+
+
+ \WP_REST_Response
+
+
+ $wc_orders
+
+
+ $request['resource']['id']
+ isset( $request['id'] ) ? $request['id'] : ''
+ isset( $request['id'] ) ? $request['id'] : ''
+ isset( $request['id'] ) ? $request['id'] : ''
+ isset( $request['resource']['id'] ) ? $request['resource']['id'] : ''
+
+
+ $request['resource']['id']
+ $request['resource']['id']
+ $request['resource']['purchase_units']
+
+
+
+
+ rest_ensure_response( $response )
+ rest_ensure_response( $response )
+ rest_ensure_response( $response )
+
+
+ \WP_REST_Response
+
+
+ $wc_orders
+
+
+ isset( $request['id'] ) ? $request['id'] : ''
+ isset( $request['resource']['id'] ) ? $request['resource']['id'] : ''
+
+
+ $request['resource']['id']
+ $request['resource']['purchase_units']
+
+
+
+
+ rest_ensure_response( $response )
+ rest_ensure_response( $response )
+ rest_ensure_response( $response )
+ rest_ensure_response( $response )
+
+
+ \WP_REST_Response
+
+
+ $request['resource']['custom_id']
+ isset( $request['id'] ) ? $request['id'] : ''
+ isset( $request['id'] ) ? $request['id'] : ''
+
+
+ $request['resource']['custom_id']
+
+
+
+
+ rest_ensure_response( $response )
+ rest_ensure_response( $response )
+ rest_ensure_response( $response )
+ rest_ensure_response( $response )
+
+
+ \WP_REST_Response
+
+
+ $request['resource']['custom_id']
+ isset( $request['id'] ) ? $request['id'] : ''
+ isset( $request['resource']['id'] ) ? $request['resource']['id'] : ''
+
+
+ $request['resource']['amount']
+ $request['resource']['custom_id']
+ $request['resource']['id']
+
+
+ get_amount
+ get_error_message
+
+
+
+
+ rest_ensure_response( $response )
+ rest_ensure_response( $response )
+ rest_ensure_response( $response )
+
+
+ \WP_REST_Response
+
+
+ $request['resource']['custom_id']
+ isset( $request['id'] ) ? $request['id'] : ''
+ isset( $request['resource']['id'] ) ? $request['resource']['id'] : ''
+
+
+ $request['resource']['custom_id']
+ $request['resource']['id']
+
+
+ (bool) $wc_order->update_status( 'cancelled' )
+
+
+
+
+ rest_ensure_response( $response )
+
+
+ \WP_REST_Response
+
+
+ ( $handler->event_types() ) ? current( $handler->event_types() ) : ''
+
+
+ $request['event_type']
+
+
+
+
diff --git a/psalm.xml.dist b/psalm.xml.dist
new file mode 100644
index 000000000..ee3d4b56c
--- /dev/null
+++ b/psalm.xml.dist
@@ -0,0 +1,153 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+