diff --git a/composer.json b/composer.json index 224584ec..59f7573d 100644 --- a/composer.json +++ b/composer.json @@ -18,7 +18,7 @@ "config": { "sort-packages": true, "platform": { - "php": "7.4.99" + "php": "8.0.99" }, "allow-plugins": { "dealerdirect/phpcodesniffer-composer-installer": true @@ -31,7 +31,7 @@ } }, "require": { - "php": "^7.4 || ~8.0.0 || ~8.1.0", + "php": "~8.0.0 || ~8.1.0 || ~8.2.0", "laminas/laminas-filter": "^2.13", "laminas/laminas-servicemanager": "^3.16.0", "laminas/laminas-stdlib": "^3.0", @@ -40,11 +40,10 @@ "require-dev": { "ext-json": "*", "laminas/laminas-coding-standard": "~2.4.0", - "laminas/laminas-db": "^2.15.0", - "phpunit/phpunit": "^9.5.24", + "phpunit/phpunit": "^9.5.25", "psalm/plugin-phpunit": "^0.17.0", - "psr/http-message": "^1.0", - "vimeo/psalm": "^4.27.0", + "psr/http-message": "^1.0.1", + "vimeo/psalm": "^4.28", "webmozart/assert": "^1.11" }, "suggest": { diff --git a/composer.lock b/composer.lock index 804756d1..875f25cb 100644 --- a/composer.lock +++ b/composer.lock @@ -4,26 +4,27 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "600e359ef4d099ffd6e7ed04a5e09801", + "content-hash": "d7be72255cf479ec0e424e5fe5bc5506", "packages": [ { "name": "laminas/laminas-filter", - "version": "2.21.0", + "version": "2.23.0", "source": { "type": "git", "url": "https://github.com/laminas/laminas-filter.git", - "reference": "7835f3f3227b1892676cb7366fbed0e521cac845" + "reference": "41cff2f850753f0bb3fc75c5ce011fcad6aa1731" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-filter/zipball/7835f3f3227b1892676cb7366fbed0e521cac845", - "reference": "7835f3f3227b1892676cb7366fbed0e521cac845", + "url": "https://api.github.com/repos/laminas/laminas-filter/zipball/41cff2f850753f0bb3fc75c5ce011fcad6aa1731", + "reference": "41cff2f850753f0bb3fc75c5ce011fcad6aa1731", "shasum": "" }, "require": { + "ext-mbstring": "*", "laminas/laminas-servicemanager": "^3.14.0", "laminas/laminas-stdlib": "^3.13.0", - "php": "^7.4 || ~8.0.0 || ~8.1.0" + "php": "~8.0.0 || ~8.1.0 || ~8.2.0" }, "conflict": { "laminas/laminas-validator": "<2.10.1", @@ -31,14 +32,13 @@ }, "require-dev": { "laminas/laminas-coding-standard": "~2.4.0", - "laminas/laminas-crypt": "^3.5.1", + "laminas/laminas-crypt": "^3.8", "laminas/laminas-uri": "^2.9.1", "pear/archive_tar": "^1.4.14", - "phpspec/prophecy-phpunit": "^2.0.1", - "phpunit/phpunit": "^9.5.24", + "phpunit/phpunit": "^9.5.25", "psalm/plugin-phpunit": "^0.17.0", "psr/http-factory": "^1.0.1", - "vimeo/psalm": "^4.27.0" + "vimeo/psalm": "^4.28" }, "suggest": { "laminas/laminas-crypt": "Laminas\\Crypt component, for encryption filters", @@ -82,25 +82,25 @@ "type": "community_bridge" } ], - "time": "2022-09-30T09:15:24+00:00" + "time": "2022-10-11T10:04:14+00:00" }, { "name": "laminas/laminas-servicemanager", - "version": "3.17.0", + "version": "3.19.0", "source": { "type": "git", "url": "https://github.com/laminas/laminas-servicemanager.git", - "reference": "360be5f16955dd1edbcce1cfaa98ed82a17f02ec" + "reference": "ed160729bb8721127efdaac799f9a298963345b1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-servicemanager/zipball/360be5f16955dd1edbcce1cfaa98ed82a17f02ec", - "reference": "360be5f16955dd1edbcce1cfaa98ed82a17f02ec", + "url": "https://api.github.com/repos/laminas/laminas-servicemanager/zipball/ed160729bb8721127efdaac799f9a298963345b1", + "reference": "ed160729bb8721127efdaac799f9a298963345b1", "shasum": "" }, "require": { "laminas/laminas-stdlib": "^3.2.1", - "php": "~7.4.0 || ~8.0.0 || ~8.1.0", + "php": "~8.0.0 || ~8.1.0 || ~8.2.0", "psr/container": "^1.0" }, "conflict": { @@ -116,17 +116,16 @@ "container-interop/container-interop": "^1.2.0" }, "require-dev": { - "composer/package-versions-deprecated": "^1.0", + "composer/package-versions-deprecated": "^1.11.99.5", "laminas/laminas-coding-standard": "~2.4.0", "laminas/laminas-container-config-test": "^0.7", - "laminas/laminas-dependency-plugin": "^2.1.2", - "mikey179/vfsstream": "^1.6.10@alpha", - "ocramius/proxy-manager": "^2.11", - "phpbench/phpbench": "^1.1", - "phpspec/prophecy-phpunit": "^2.0", - "phpunit/phpunit": "^9.5.5", + "laminas/laminas-dependency-plugin": "^2.2", + "mikey179/vfsstream": "^1.6.11@alpha", + "ocramius/proxy-manager": "^2.14.1", + "phpbench/phpbench": "^1.2.6", + "phpunit/phpunit": "^9.5.25", "psalm/plugin-phpunit": "^0.17.0", - "vimeo/psalm": "^4.8" + "vimeo/psalm": "^4.28" }, "suggest": { "ocramius/proxy-manager": "ProxyManager ^2.1.1 to handle lazy initialization of services" @@ -173,35 +172,34 @@ "type": "community_bridge" } ], - "time": "2022-09-22T11:33:46+00:00" + "time": "2022-10-10T20:59:22+00:00" }, { "name": "laminas/laminas-stdlib", - "version": "3.13.0", + "version": "3.15.0", "source": { "type": "git", "url": "https://github.com/laminas/laminas-stdlib.git", - "reference": "66a6d03c381f6c9f1dd988bf8244f9afb9380d76" + "reference": "63b66bd4b696f024f42616b9d95cdb10e5109c27" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-stdlib/zipball/66a6d03c381f6c9f1dd988bf8244f9afb9380d76", - "reference": "66a6d03c381f6c9f1dd988bf8244f9afb9380d76", + "url": "https://api.github.com/repos/laminas/laminas-stdlib/zipball/63b66bd4b696f024f42616b9d95cdb10e5109c27", + "reference": "63b66bd4b696f024f42616b9d95cdb10e5109c27", "shasum": "" }, "require": { - "php": "^7.4 || ~8.0.0 || ~8.1.0" + "php": "~8.0.0 || ~8.1.0 || ~8.2.0" }, "conflict": { "zendframework/zend-stdlib": "*" }, "require-dev": { - "laminas/laminas-coding-standard": "~2.3.0", + "laminas/laminas-coding-standard": "^2.4.0", "phpbench/phpbench": "^1.2.6", - "phpstan/phpdoc-parser": "^0.5.4", - "phpunit/phpunit": "^9.5.23", + "phpunit/phpunit": "^9.5.25", "psalm/plugin-phpunit": "^0.17.0", - "vimeo/psalm": "^4.26" + "vimeo/psalm": "^4.28" }, "type": "library", "autoload": { @@ -233,26 +231,26 @@ "type": "community_bridge" } ], - "time": "2022-08-24T13:56:50+00:00" + "time": "2022-10-10T19:10:24+00:00" }, { "name": "laminas/laminas-validator", - "version": "2.25.0", + "version": "2.26.0", "source": { "type": "git", "url": "https://github.com/laminas/laminas-validator.git", - "reference": "42de39b78e73b321db7d948cf8530a2764f8b9aa" + "reference": "a995b21d18c63cd1f5d123d0d2cd31a1c2d828dc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-validator/zipball/42de39b78e73b321db7d948cf8530a2764f8b9aa", - "reference": "42de39b78e73b321db7d948cf8530a2764f8b9aa", + "url": "https://api.github.com/repos/laminas/laminas-validator/zipball/a995b21d18c63cd1f5d123d0d2cd31a1c2d828dc", + "reference": "a995b21d18c63cd1f5d123d0d2cd31a1c2d828dc", "shasum": "" }, "require": { "laminas/laminas-servicemanager": "^3.12.0", "laminas/laminas-stdlib": "^3.13", - "php": "^7.4 || ~8.0.0 || ~8.1.0" + "php": "~8.0.0 || ~8.1.0 || ~8.2.0" }, "conflict": { "zendframework/zend-validator": "*" @@ -260,18 +258,17 @@ "require-dev": { "laminas/laminas-coding-standard": "^2.4.0", "laminas/laminas-db": "^2.15.0", - "laminas/laminas-filter": "^2.18.0", + "laminas/laminas-filter": "^2.22", "laminas/laminas-http": "^2.16.0", - "laminas/laminas-i18n": "^2.17.0", + "laminas/laminas-i18n": "^2.19", "laminas/laminas-session": "^2.13.0", "laminas/laminas-uri": "^2.9.1", - "phpspec/prophecy-phpunit": "^2.0", - "phpunit/phpunit": "^9.5.24", + "phpunit/phpunit": "^9.5.25", "psalm/plugin-phpunit": "^0.17.0", - "psr/http-client": "^1.0", - "psr/http-factory": "^1.0", - "psr/http-message": "^1.0", - "vimeo/psalm": "^4.27.0" + "psr/http-client": "^1.0.1", + "psr/http-factory": "^1.0.1", + "psr/http-message": "^1.0.1", + "vimeo/psalm": "^4.28" }, "suggest": { "laminas/laminas-db": "Laminas\\Db component, required by the (No)RecordExists validator", @@ -319,7 +316,7 @@ "type": "community_bridge" } ], - "time": "2022-09-20T11:33:19+00:00" + "time": "2022-10-11T12:58:36+00:00" }, { "name": "psr/container", @@ -1167,77 +1164,6 @@ ], "time": "2022-08-24T17:45:47+00:00" }, - { - "name": "laminas/laminas-db", - "version": "2.15.0", - "source": { - "type": "git", - "url": "https://github.com/laminas/laminas-db.git", - "reference": "1125ef2e55108bdfcc1f0030d3a0f9b895e09606" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-db/zipball/1125ef2e55108bdfcc1f0030d3a0f9b895e09606", - "reference": "1125ef2e55108bdfcc1f0030d3a0f9b895e09606", - "shasum": "" - }, - "require": { - "laminas/laminas-stdlib": "^3.7.1", - "php": "^7.3 || ~8.0.0 || ~8.1.0" - }, - "conflict": { - "zendframework/zend-db": "*" - }, - "require-dev": { - "laminas/laminas-coding-standard": "~2.2.1", - "laminas/laminas-eventmanager": "^3.4.0", - "laminas/laminas-hydrator": "^3.2 || ^4.3", - "laminas/laminas-servicemanager": "^3.7.0", - "phpunit/phpunit": "^9.5.19" - }, - "suggest": { - "laminas/laminas-eventmanager": "Laminas\\EventManager component", - "laminas/laminas-hydrator": "(^3.2 || ^4.3) Laminas\\Hydrator component for using HydratingResultSets", - "laminas/laminas-servicemanager": "Laminas\\ServiceManager component" - }, - "type": "library", - "extra": { - "laminas": { - "component": "Laminas\\Db", - "config-provider": "Laminas\\Db\\ConfigProvider" - } - }, - "autoload": { - "psr-4": { - "Laminas\\Db\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "description": "Database abstraction layer, SQL abstraction, result set abstraction, and RowDataGateway and TableDataGateway implementations", - "homepage": "https://laminas.dev", - "keywords": [ - "db", - "laminas" - ], - "support": { - "chat": "https://laminas.dev/chat", - "docs": "https://docs.laminas.dev/laminas-db/", - "forum": "https://discourse.laminas.dev", - "issues": "https://github.com/laminas/laminas-db/issues", - "rss": "https://github.com/laminas/laminas-db/releases.atom", - "source": "https://github.com/laminas/laminas-db" - }, - "funding": [ - { - "url": "https://funding.communitybridge.org/projects/laminas-project", - "type": "community_bridge" - } - ], - "time": "2022-04-11T13:26:20+00:00" - }, { "name": "myclabs/deep-copy", "version": "1.11.0", @@ -2307,30 +2233,30 @@ }, { "name": "psr/log", - "version": "1.1.4", + "version": "3.0.0", "source": { "type": "git", "url": "https://github.com/php-fig/log.git", - "reference": "d49695b909c3b7628b6289db5479a1c204601f11" + "reference": "fe5ea303b0887d5caefd3d431c3e61ad47037001" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/log/zipball/d49695b909c3b7628b6289db5479a1c204601f11", - "reference": "d49695b909c3b7628b6289db5479a1c204601f11", + "url": "https://api.github.com/repos/php-fig/log/zipball/fe5ea303b0887d5caefd3d431c3e61ad47037001", + "reference": "fe5ea303b0887d5caefd3d431c3e61ad47037001", "shasum": "" }, "require": { - "php": ">=5.3.0" + "php": ">=8.0.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.1.x-dev" + "dev-master": "3.x-dev" } }, "autoload": { "psr-4": { - "Psr\\Log\\": "Psr/Log/" + "Psr\\Log\\": "src" } }, "notification-url": "https://packagist.org/downloads/", @@ -2351,9 +2277,9 @@ "psr-3" ], "support": { - "source": "https://github.com/php-fig/log/tree/1.1.4" + "source": "https://github.com/php-fig/log/tree/3.0.0" }, - "time": "2021-05-03T11:20:27+00:00" + "time": "2021-07-14T16:46:02+00:00" }, { "name": "sebastian/cli-parser", @@ -3438,46 +3364,42 @@ }, { "name": "symfony/console", - "version": "v5.4.13", + "version": "v6.0.13", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "3f97f6c7b7e26848a90c0c0cfb91eeb2bb8618be" + "reference": "8f14753b865651c2aad107ef97475740a9b0730f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/3f97f6c7b7e26848a90c0c0cfb91eeb2bb8618be", - "reference": "3f97f6c7b7e26848a90c0c0cfb91eeb2bb8618be", + "url": "https://api.github.com/repos/symfony/console/zipball/8f14753b865651c2aad107ef97475740a9b0730f", + "reference": "8f14753b865651c2aad107ef97475740a9b0730f", "shasum": "" }, "require": { - "php": ">=7.2.5", - "symfony/deprecation-contracts": "^2.1|^3", + "php": ">=8.0.2", "symfony/polyfill-mbstring": "~1.0", - "symfony/polyfill-php73": "^1.9", - "symfony/polyfill-php80": "^1.16", "symfony/service-contracts": "^1.1|^2|^3", - "symfony/string": "^5.1|^6.0" + "symfony/string": "^5.4|^6.0" }, "conflict": { - "psr/log": ">=3", - "symfony/dependency-injection": "<4.4", - "symfony/dotenv": "<5.1", - "symfony/event-dispatcher": "<4.4", - "symfony/lock": "<4.4", - "symfony/process": "<4.4" + "symfony/dependency-injection": "<5.4", + "symfony/dotenv": "<5.4", + "symfony/event-dispatcher": "<5.4", + "symfony/lock": "<5.4", + "symfony/process": "<5.4" }, "provide": { - "psr/log-implementation": "1.0|2.0" + "psr/log-implementation": "1.0|2.0|3.0" }, "require-dev": { - "psr/log": "^1|^2", - "symfony/config": "^4.4|^5.0|^6.0", - "symfony/dependency-injection": "^4.4|^5.0|^6.0", - "symfony/event-dispatcher": "^4.4|^5.0|^6.0", - "symfony/lock": "^4.4|^5.0|^6.0", - "symfony/process": "^4.4|^5.0|^6.0", - "symfony/var-dumper": "^4.4|^5.0|^6.0" + "psr/log": "^1|^2|^3", + "symfony/config": "^5.4|^6.0", + "symfony/dependency-injection": "^5.4|^6.0", + "symfony/event-dispatcher": "^5.4|^6.0", + "symfony/lock": "^5.4|^6.0", + "symfony/process": "^5.4|^6.0", + "symfony/var-dumper": "^5.4|^6.0" }, "suggest": { "psr/log": "For using the console logger", @@ -3517,7 +3439,7 @@ "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v5.4.13" + "source": "https://github.com/symfony/console/tree/v6.0.13" }, "funding": [ { @@ -3533,29 +3455,29 @@ "type": "tidelift" } ], - "time": "2022-08-26T13:50:20+00:00" + "time": "2022-09-03T14:23:25+00:00" }, { "name": "symfony/deprecation-contracts", - "version": "v2.5.2", + "version": "v3.0.2", "source": { "type": "git", "url": "https://github.com/symfony/deprecation-contracts.git", - "reference": "e8b495ea28c1d97b5e0c121748d6f9b53d075c66" + "reference": "26954b3d62a6c5fd0ea8a2a00c0353a14978d05c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/e8b495ea28c1d97b5e0c121748d6f9b53d075c66", - "reference": "e8b495ea28c1d97b5e0c121748d6f9b53d075c66", + "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/26954b3d62a6c5fd0ea8a2a00c0353a14978d05c", + "reference": "26954b3d62a6c5fd0ea8a2a00c0353a14978d05c", "shasum": "" }, "require": { - "php": ">=7.1" + "php": ">=8.0.2" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "2.5-dev" + "dev-main": "3.0-dev" }, "thanks": { "name": "symfony/contracts", @@ -3584,7 +3506,7 @@ "description": "A generic function and convention to trigger deprecation notices", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/deprecation-contracts/tree/v2.5.2" + "source": "https://github.com/symfony/deprecation-contracts/tree/v3.0.2" }, "funding": [ { @@ -3600,7 +3522,7 @@ "type": "tidelift" } ], - "time": "2022-01-02T09:53:40+00:00" + "time": "2022-01-02T09:55:41+00:00" }, { "name": "symfony/polyfill-ctype", @@ -3932,85 +3854,6 @@ ], "time": "2022-05-24T11:49:31+00:00" }, - { - "name": "symfony/polyfill-php73", - "version": "v1.26.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-php73.git", - "reference": "e440d35fa0286f77fb45b79a03fedbeda9307e85" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/e440d35fa0286f77fb45b79a03fedbeda9307e85", - "reference": "e440d35fa0286f77fb45b79a03fedbeda9307e85", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.26-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, - "autoload": { - "files": [ - "bootstrap.php" - ], - "psr-4": { - "Symfony\\Polyfill\\Php73\\": "" - }, - "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" - ], - "support": { - "source": "https://github.com/symfony/polyfill-php73/tree/v1.26.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": "2022-05-24T11:49:31+00:00" - }, { "name": "symfony/polyfill-php80", "version": "v1.26.0", @@ -4179,34 +4022,33 @@ }, { "name": "symfony/string", - "version": "v5.4.13", + "version": "v6.0.13", "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "2900c668a32138a34118740de3e4d5a701801f53" + "reference": "65e99fb179e7241606377e4042cd2161f3dd1c05" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/2900c668a32138a34118740de3e4d5a701801f53", - "reference": "2900c668a32138a34118740de3e4d5a701801f53", + "url": "https://api.github.com/repos/symfony/string/zipball/65e99fb179e7241606377e4042cd2161f3dd1c05", + "reference": "65e99fb179e7241606377e4042cd2161f3dd1c05", "shasum": "" }, "require": { - "php": ">=7.2.5", + "php": ">=8.0.2", "symfony/polyfill-ctype": "~1.8", "symfony/polyfill-intl-grapheme": "~1.0", "symfony/polyfill-intl-normalizer": "~1.0", - "symfony/polyfill-mbstring": "~1.0", - "symfony/polyfill-php80": "~1.15" + "symfony/polyfill-mbstring": "~1.0" }, "conflict": { - "symfony/translation-contracts": ">=3.0" + "symfony/translation-contracts": "<2.0" }, "require-dev": { - "symfony/error-handler": "^4.4|^5.0|^6.0", - "symfony/http-client": "^4.4|^5.0|^6.0", - "symfony/translation-contracts": "^1.1|^2", - "symfony/var-exporter": "^4.4|^5.0|^6.0" + "symfony/error-handler": "^5.4|^6.0", + "symfony/http-client": "^5.4|^6.0", + "symfony/translation-contracts": "^2.0|^3.0", + "symfony/var-exporter": "^5.4|^6.0" }, "type": "library", "autoload": { @@ -4245,7 +4087,7 @@ "utf8" ], "support": { - "source": "https://github.com/symfony/string/tree/v5.4.13" + "source": "https://github.com/symfony/string/tree/v6.0.13" }, "funding": [ { @@ -4261,7 +4103,7 @@ "type": "tidelift" } ], - "time": "2022-09-01T01:52:16+00:00" + "time": "2022-09-02T08:05:03+00:00" }, { "name": "theseer/tokenizer", @@ -4592,13 +4434,13 @@ "prefer-stable": false, "prefer-lowest": false, "platform": { - "php": "^7.4 || ~8.0.0 || ~8.1.0" + "php": "~8.0.0 || ~8.1.0 || ~8.2.0" }, "platform-dev": { "ext-json": "*" }, "platform-overrides": { - "php": "7.4.99" + "php": "8.0.99" }, "plugin-api-version": "2.3.0" } diff --git a/psalm-baseline.xml b/psalm-baseline.xml index 86dd97cb..45c7d8cf 100644 --- a/psalm-baseline.xml +++ b/psalm-baseline.xml @@ -1,5 +1,5 @@ - + ArrayInput @@ -90,7 +90,7 @@ array<array-key, array> - + $data $data @@ -512,9 +512,6 @@ breakOnFailure breakOnFailure - - $chain - continueIfEmpty diff --git a/src/BaseInputFilter.php b/src/BaseInputFilter.php index a163eaa2..11c3ec88 100644 --- a/src/BaseInputFilter.php +++ b/src/BaseInputFilter.php @@ -18,7 +18,6 @@ use function assert; use function count; use function func_get_args; -use function get_class; use function gettype; use function is_array; use function is_int; @@ -91,7 +90,7 @@ public function add($input, $name = null) __METHOD__, InputInterface::class, InputFilterInterface::class, - is_object($input) ? get_class($input) : gettype($input) + is_object($input) ? $input::class : gettype($input) )); } @@ -201,7 +200,7 @@ public function setData($data) throw new Exception\InvalidArgumentException(sprintf( '%s expects an array or Traversable argument; received %s', __METHOD__, - is_object($data) ? get_class($data) : gettype($data) + is_object($data) ? $data::class : gettype($data) )); } diff --git a/src/CollectionInputFilter.php b/src/CollectionInputFilter.php index 354b2bc8..af20c8ed 100644 --- a/src/CollectionInputFilter.php +++ b/src/CollectionInputFilter.php @@ -8,7 +8,6 @@ use Traversable; use function count; -use function get_class; use function gettype; use function is_array; use function is_iterable; @@ -60,7 +59,7 @@ public function setInputFilter($inputFilter) '%s expects an instance of %s; received "%s"', __METHOD__, BaseInputFilter::class, - is_object($inputFilter) ? get_class($inputFilter) : gettype($inputFilter) + is_object($inputFilter) ? $inputFilter::class : gettype($inputFilter) )); } @@ -144,7 +143,7 @@ public function setData($data) throw new Exception\InvalidArgumentException(sprintf( '%s expects an array or Traversable collection; invalid collection of type %s provided', __METHOD__, - is_object($data) ? get_class($data) : gettype($data) + is_object($data) ? $data::class : gettype($data) )); } @@ -161,7 +160,7 @@ public function setData($data) '%s expects each item in a collection to be an array or Traversable; ' . 'invalid item in collection of type %s detected', __METHOD__, - is_object($item) ? get_class($item) : gettype($item) + is_object($item) ? $item::class : gettype($item) )); } diff --git a/src/Factory.php b/src/Factory.php index b4bf5802..bf428327 100644 --- a/src/Factory.php +++ b/src/Factory.php @@ -13,7 +13,6 @@ use Traversable; use function class_exists; -use function get_class; use function gettype; use function is_array; use function is_callable; @@ -157,7 +156,7 @@ public function createInput($inputSpecification) throw new Exception\InvalidArgumentException(sprintf( '%s expects an array or Traversable; received "%s"', __METHOD__, - is_object($inputSpecification) ? get_class($inputSpecification) : gettype($inputSpecification) + is_object($inputSpecification) ? $inputSpecification::class : gettype($inputSpecification) )); } @@ -251,7 +250,7 @@ public function createInput($inputSpecification) '%s expects the value associated with "filters" to be an array/Traversable of filters' . ' or filter specifications, or a FilterChain; received "%s"', __METHOD__, - is_object($value) ? get_class($value) : gettype($value) + is_object($value) ? $value::class : gettype($value) )); } $this->populateFilters($input->getFilterChain(), $value); @@ -266,7 +265,7 @@ public function createInput($inputSpecification) '%s expects the value associated with "validators" to be an array/Traversable of validators' . ' or validator specifications, or a ValidatorChain; received "%s"', __METHOD__, - is_object($value) ? get_class($value) : gettype($value) + is_object($value) ? $value::class : gettype($value) )); } @@ -306,7 +305,7 @@ public function createInputFilter($inputFilterSpecification) '%s expects an array or Traversable; received "%s"', __METHOD__, is_object($inputFilterSpecification) - ? get_class($inputFilterSpecification) + ? $inputFilterSpecification::class : gettype($inputFilterSpecification) )); } diff --git a/src/InputFilterPluginManager.php b/src/InputFilterPluginManager.php index ba1ef230..49848462 100644 --- a/src/InputFilterPluginManager.php +++ b/src/InputFilterPluginManager.php @@ -15,7 +15,6 @@ use Psr\Container\ContainerInterface; use Psr\Container\ContainerInterface as PsrContainerInterface; -use function get_class; use function gettype; use function is_object; use function sprintf; @@ -143,9 +142,9 @@ public function populateFactoryPluginManagers(Factory $factory) } /** - * {@inheritDoc} (v3) - * + * @inheritDoc * @psalm-assert InstanceType $instance + * @param mixed $instance */ public function validate($instance) { @@ -161,7 +160,7 @@ public function validate($instance) throw new InvalidServiceException(sprintf( 'Plugin of type %s is invalid; must implement %s or %s', - is_object($instance) ? get_class($instance) : gettype($instance), + is_object($instance) ? $instance::class : gettype($instance), InputFilterInterface::class, InputInterface::class ));