diff --git a/Makefile b/Makefile
index 5330c89..f3a7d42 100644
--- a/Makefile
+++ b/Makefile
@@ -33,6 +33,7 @@ checkquality:
xmllint --noout view/adminhtml/ui_component/baldwin_urldataintegritychecker_grid_catalog_product_urlpath.xml # schema validation doesn't work here since the xsd includes another xsd ..
vendor/bin/phpstan analyse
+ vendor/bin/psalm
.PHONY: test
test:
diff --git a/composer.json b/composer.json
index 623fc73..75aa5a5 100644
--- a/composer.json
+++ b/composer.json
@@ -28,7 +28,8 @@
"phpcompatibility/php-compatibility": "^9.2",
"phpstan/extension-installer": "^1.0",
"phpstan/phpstan": "^0.11.12",
- "phpunit/phpunit": "^7.5"
+ "phpunit/phpunit": "^7.5",
+ "vimeo/psalm": "^3.9"
},
"config": {
"sort-packages": true
diff --git a/composer.lock b/composer.lock
index 9ac221e..63999e5 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": "c82123f9fcc3b056f7d18d0b86456858",
+ "content-hash": "a3682037b6c73ebe1288efd9e00bc096",
"packages": [
{
"name": "colinmollenhour/credis",
@@ -5102,6 +5102,142 @@
}
],
"packages-dev": [
+ {
+ "name": "amphp/amp",
+ "version": "v2.4.1",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/amphp/amp.git",
+ "reference": "2ac3b550c4997f2ec304faa63c8b2885079a2dc4"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/amphp/amp/zipball/2ac3b550c4997f2ec304faa63c8b2885079a2dc4",
+ "reference": "2ac3b550c4997f2ec304faa63c8b2885079a2dc4",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=7"
+ },
+ "require-dev": {
+ "amphp/php-cs-fixer-config": "dev-master",
+ "amphp/phpunit-util": "^1",
+ "ext-json": "*",
+ "phpstan/phpstan": "^0.8.5",
+ "phpunit/phpunit": "^6.0.9 | ^7",
+ "react/promise": "^2"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "2.0.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"
+ ],
+ "time": "2020-02-10T18:10:57+00:00"
+ },
+ {
+ "name": "amphp/byte-stream",
+ "version": "v1.7.2",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/amphp/byte-stream.git",
+ "reference": "1e52f1752b2e20e2a7e464476ef887a2388e3832"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/amphp/byte-stream/zipball/1e52f1752b2e20e2a7e464476ef887a2388e3832",
+ "reference": "1e52f1752b2e20e2a7e464476ef887a2388e3832",
+ "shasum": ""
+ },
+ "require": {
+ "amphp/amp": "^2"
+ },
+ "require-dev": {
+ "amphp/php-cs-fixer-config": "dev-master",
+ "amphp/phpunit-util": "^1",
+ "friendsofphp/php-cs-fixer": "^2.3",
+ "infection/infection": "^0.9.3",
+ "phpunit/phpunit": "^6"
+ },
+ "type": "library",
+ "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"
+ ],
+ "time": "2020-01-29T18:22:23+00:00"
+ },
{
"name": "bitexpert/phpstan-magento",
"version": "dev-master",
@@ -5525,6 +5661,94 @@
],
"time": "2019-12-19T14:42:54+00:00"
},
+ {
+ "name": "felixfbecker/advanced-json-rpc",
+ "version": "v3.1.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/felixfbecker/php-advanced-json-rpc.git",
+ "reference": "a407a6cb0325cd489c6dff57afcba6baeccc0483"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/felixfbecker/php-advanced-json-rpc/zipball/a407a6cb0325cd489c6dff57afcba6baeccc0483",
+ "reference": "a407a6cb0325cd489c6dff57afcba6baeccc0483",
+ "shasum": ""
+ },
+ "require": {
+ "netresearch/jsonmapper": "^1.0",
+ "php": ">=7.0",
+ "phpdocumentor/reflection-docblock": "^4.0.0 || ^5.0.0"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "^6.0.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": "2020-02-11T20:48:40+00:00"
+ },
+ {
+ "name": "felixfbecker/language-server-protocol",
+ "version": "v1.4.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/felixfbecker/php-language-server-protocol.git",
+ "reference": "378801f6139bb74ac215d81cca1272af61df9a9f"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/felixfbecker/php-language-server-protocol/zipball/378801f6139bb74ac215d81cca1272af61df9a9f",
+ "reference": "378801f6139bb74ac215d81cca1272af61df9a9f",
+ "shasum": ""
+ },
+ "require": {
+ "php": "^7.0"
+ },
+ "require-dev": {
+ "phpstan/phpstan": "*",
+ "phpunit/phpunit": "^6.3",
+ "squizlabs/php_codesniffer": "^3.1"
+ },
+ "type": "library",
+ "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": "2019-06-23T21:03:50+00:00"
+ },
{
"name": "friendsofphp/php-cs-fixer",
"version": "v2.16.1",
@@ -5803,6 +6027,52 @@
],
"time": "2020-01-17T21:11:47+00:00"
},
+ {
+ "name": "netresearch/jsonmapper",
+ "version": "v1.6.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/cweiske/jsonmapper.git",
+ "reference": "0d4d1b48d682a93b6bfedf60b88c7750e9cb0b06"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/cweiske/jsonmapper/zipball/0d4d1b48d682a93b6bfedf60b88c7750e9cb0b06",
+ "reference": "0d4d1b48d682a93b6bfedf60b88c7750e9cb0b06",
+ "shasum": ""
+ },
+ "require": {
+ "ext-json": "*",
+ "ext-pcre": "*",
+ "ext-reflection": "*",
+ "ext-spl": "*",
+ "php": ">=5.6"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "~4.8.35 || ~5.7 || ~6.4",
+ "squizlabs/php_codesniffer": "~1.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": "2019-08-15T19:41:25+00:00"
+ },
{
"name": "nette/bootstrap",
"version": "v3.0.1",
@@ -6434,6 +6704,55 @@
"description": "Composer plugin that provides efficient querying for installed package versions (no runtime IO)",
"time": "2019-11-15T16:17:10+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": "paragonie/random_compat",
"version": "v9.99.99",
@@ -8467,6 +8786,101 @@
"description": "A small library for converting tokenized PHP source code into XML and potentially other formats",
"time": "2019-06-13T22:48:21+00:00"
},
+ {
+ "name": "vimeo/psalm",
+ "version": "3.9.3",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/vimeo/psalm.git",
+ "reference": "2e4154d76e24d1b4e59e6cc2bebef7790cb9e550"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/vimeo/psalm/zipball/2e4154d76e24d1b4e59e6cc2bebef7790cb9e550",
+ "reference": "2e4154d76e24d1b4e59e6cc2bebef7790cb9e550",
+ "shasum": ""
+ },
+ "require": {
+ "amphp/amp": "^2.1",
+ "amphp/byte-stream": "^1.5",
+ "composer/semver": "^1.4",
+ "composer/xdebug-handler": "^1.1",
+ "ext-dom": "*",
+ "ext-json": "*",
+ "ext-libxml": "*",
+ "ext-simplexml": "*",
+ "ext-tokenizer": "*",
+ "felixfbecker/advanced-json-rpc": "^3.0.3",
+ "felixfbecker/language-server-protocol": "^1.4",
+ "netresearch/jsonmapper": "^1.0",
+ "nikic/php-parser": "^4.3",
+ "ocramius/package-versions": "^1.2",
+ "openlss/lib-array2xml": "^1.0",
+ "php": "^7.1.3|^8",
+ "sebastian/diff": "^3.0 || ^4.0",
+ "symfony/console": "^3.4.17 || ^4.1.6 || ^5.0",
+ "webmozart/glob": "^4.1",
+ "webmozart/path-util": "^2.3"
+ },
+ "provide": {
+ "psalm/psalm": "self.version"
+ },
+ "require-dev": {
+ "bamarni/composer-bin-plugin": "^1.2",
+ "ext-curl": "*",
+ "phpmyadmin/sql-parser": "5.1.0",
+ "phpspec/prophecy": ">=1.9.0",
+ "phpunit/phpunit": "^7.5.16 || ^8.0",
+ "psalm/plugin-phpunit": "^0.9",
+ "slevomat/coding-standard": "^5.0",
+ "squizlabs/php_codesniffer": "^3.5",
+ "symfony/process": "^4.3"
+ },
+ "suggest": {
+ "ext-igbinary": "^2.0.5"
+ },
+ "bin": [
+ "psalm",
+ "psalm-language-server",
+ "psalm-plugin",
+ "psalm-refactor",
+ "psalter"
+ ],
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "3.x-dev",
+ "dev-2.x": "2.x-dev",
+ "dev-1.x": "1.x-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Psalm\\Plugin\\": "src/Psalm/Plugin",
+ "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": "2020-02-19T01:30:37+00:00"
+ },
{
"name": "webmozart/assert",
"version": "1.7.0",
@@ -8515,6 +8929,99 @@
],
"time": "2020-02-14T12:15:55+00:00"
},
+ {
+ "name": "webmozart/glob",
+ "version": "4.1.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/webmozart/glob.git",
+ "reference": "3cbf63d4973cf9d780b93d2da8eec7e4a9e63bbe"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/webmozart/glob/zipball/3cbf63d4973cf9d780b93d2da8eec7e4a9e63bbe",
+ "reference": "3cbf63d4973cf9d780b93d2da8eec7e4a9e63bbe",
+ "shasum": ""
+ },
+ "require": {
+ "php": "^5.3.3|^7.0",
+ "webmozart/path-util": "^2.2"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "^4.6",
+ "sebastian/version": "^1.0.1",
+ "symfony/filesystem": "^2.5"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "4.1-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Webmozart\\Glob\\": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Bernhard Schussek",
+ "email": "bschussek@gmail.com"
+ }
+ ],
+ "description": "A PHP implementation of Ant's glob.",
+ "time": "2015-12-29T11:14:33+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": "webonyx/graphql-php",
"version": "v0.13.8",
diff --git a/psalm.xml b/psalm.xml
new file mode 100644
index 0000000..a3b547e
--- /dev/null
+++ b/psalm.xml
@@ -0,0 +1,32 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/view/adminhtml/templates/metadata.phtml b/view/adminhtml/templates/metadata.phtml
index 3dab2b8..0328a15 100644
--- a/view/adminhtml/templates/metadata.phtml
+++ b/view/adminhtml/templates/metadata.phtml
@@ -1,6 +1,8 @@
getMetadata();
?>