diff --git a/.laminas-ci.json b/.laminas-ci.json index 10c5335c..1f673b44 100644 --- a/.laminas-ci.json +++ b/.laminas-ci.json @@ -5,6 +5,6 @@ } ], "ignore_php_platform_requirements": { - "8.2": true + "8.3": true } } \ No newline at end of file diff --git a/composer.json b/composer.json index 83f07d91..d17af16d 100644 --- a/composer.json +++ b/composer.json @@ -18,7 +18,7 @@ "config": { "sort-packages": true, "platform": { - "php": "8.0.99" + "php": "8.1.99" }, "allow-plugins": { "composer/package-versions-deprecated": true, @@ -28,15 +28,14 @@ "extra": { }, "require": { - "php": "~8.0.0 || ~8.1.0 || ~8.2.0", - "laminas/laminas-code": "^3.5.1 || ^4.0.0", - "laminas/laminas-stdlib": "^3.3.1", - "laminas/laminas-zendframework-bridge": "^1.2.0" + "php": "~8.1.0 || ~8.2.0 || ~8.3.0", + "laminas/laminas-code": "^4.7.1", + "laminas/laminas-stdlib": "^3.3.1" }, "require-dev": { - "laminas/laminas-coding-standard": "~1.0.0", + "laminas/laminas-coding-standard": "~2.5.0", "phpunit/phpunit": "^9.5.5", - "psalm/plugin-phpunit": "^0.15.1", + "psalm/plugin-phpunit": "^0.18.0", "vimeo/psalm": "^4.6.4" }, "autoload": { @@ -64,7 +63,7 @@ "test": "phpunit --colors=always", "test-coverage": "phpunit --colors=always --coverage-clover clover.xml" }, - "replace": { - "zendframework/zend-server": "^2.8.1" + "conflict": { + "zendframework/zend-server": "*" } } diff --git a/composer.lock b/composer.lock index a00798d3..4b997719 100644 --- a/composer.lock +++ b/composer.lock @@ -4,39 +4,33 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "0dd3b282e82d622183eb03e20831fb4e", + "content-hash": "fa8b25740026c9475d89c87f44c07b83", "packages": [ { "name": "laminas/laminas-code", - "version": "3.5.1", + "version": "4.13.0", "source": { "type": "git", "url": "https://github.com/laminas/laminas-code.git", - "reference": "b549b70c0bb6e935d497f84f750c82653326ac77" + "reference": "7353d4099ad5388e84737dd16994316a04f48dbf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-code/zipball/b549b70c0bb6e935d497f84f750c82653326ac77", - "reference": "b549b70c0bb6e935d497f84f750c82653326ac77", + "url": "https://api.github.com/repos/laminas/laminas-code/zipball/7353d4099ad5388e84737dd16994316a04f48dbf", + "reference": "7353d4099ad5388e84737dd16994316a04f48dbf", "shasum": "" }, "require": { - "laminas/laminas-eventmanager": "^3.3", - "laminas/laminas-zendframework-bridge": "^1.1", - "php": "^7.3 || ~8.0.0" - }, - "conflict": { - "phpspec/prophecy": "<1.9.0" - }, - "replace": { - "zendframework/zend-code": "^3.4.1" + "php": "~8.1.0 || ~8.2.0 || ~8.3.0" }, "require-dev": { - "doctrine/annotations": "^1.10.4", + "doctrine/annotations": "^2.0.1", "ext-phar": "*", - "laminas/laminas-coding-standard": "^1.0.0", - "laminas/laminas-stdlib": "^3.3.0", - "phpunit/phpunit": "^9.4.2" + "laminas/laminas-coding-standard": "^2.5.0", + "laminas/laminas-stdlib": "^3.17.0", + "phpunit/phpunit": "^10.3.3", + "psalm/plugin-phpunit": "^0.18.4", + "vimeo/psalm": "^5.15.0" }, "suggest": { "doctrine/annotations": "Doctrine\\Common\\Annotations >=1.0 for annotation features", @@ -56,7 +50,8 @@ "homepage": "https://laminas.dev", "keywords": [ "code", - "laminas" + "laminas", + "laminasframework" ], "support": { "chat": "https://laminas.dev/chat", @@ -72,100 +67,34 @@ "type": "community_bridge" } ], - "time": "2020-11-30T20:16:31+00:00" - }, - { - "name": "laminas/laminas-eventmanager", - "version": "3.4.0", - "source": { - "type": "git", - "url": "https://github.com/laminas/laminas-eventmanager.git", - "reference": "a93fd278c97b2d41ebbce5ba048a24e3e6f580ba" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-eventmanager/zipball/a93fd278c97b2d41ebbce5ba048a24e3e6f580ba", - "reference": "a93fd278c97b2d41ebbce5ba048a24e3e6f580ba", - "shasum": "" - }, - "require": { - "php": "^7.3 || ~8.0.0 || ~8.1.0" - }, - "conflict": { - "zendframework/zend-eventmanager": "*" - }, - "require-dev": { - "container-interop/container-interop": "^1.1", - "laminas/laminas-coding-standard": "~2.2.1", - "laminas/laminas-stdlib": "^3.6", - "phpbench/phpbench": "^1.1", - "phpspec/prophecy-phpunit": "^2.0", - "phpunit/phpunit": "^9.5.5" - }, - "suggest": { - "container-interop/container-interop": "^1.1, to use the lazy listeners feature", - "laminas/laminas-stdlib": "^2.7.3 || ^3.0, to use the FilterChain feature" - }, - "type": "library", - "autoload": { - "psr-4": { - "Laminas\\EventManager\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "description": "Trigger and listen to events within a PHP application", - "homepage": "https://laminas.dev", - "keywords": [ - "event", - "eventmanager", - "events", - "laminas" - ], - "support": { - "chat": "https://laminas.dev/chat", - "docs": "https://docs.laminas.dev/laminas-eventmanager/", - "forum": "https://discourse.laminas.dev", - "issues": "https://github.com/laminas/laminas-eventmanager/issues", - "rss": "https://github.com/laminas/laminas-eventmanager/releases.atom", - "source": "https://github.com/laminas/laminas-eventmanager" - }, - "funding": [ - { - "url": "https://funding.communitybridge.org/projects/laminas-project", - "type": "community_bridge" - } - ], - "time": "2021-09-07T22:35:32+00:00" + "time": "2023-10-18T10:00:55+00:00" }, { "name": "laminas/laminas-stdlib", - "version": "3.7.1", + "version": "3.19.0", "source": { "type": "git", "url": "https://github.com/laminas/laminas-stdlib.git", - "reference": "bcd869e2fe88d567800057c1434f2380354fe325" + "reference": "6a192dd0882b514e45506f533b833b623b78fff3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-stdlib/zipball/bcd869e2fe88d567800057c1434f2380354fe325", - "reference": "bcd869e2fe88d567800057c1434f2380354fe325", + "url": "https://api.github.com/repos/laminas/laminas-stdlib/zipball/6a192dd0882b514e45506f533b833b623b78fff3", + "reference": "6a192dd0882b514e45506f533b833b623b78fff3", "shasum": "" }, "require": { - "php": "^7.3 || ~8.0.0 || ~8.1.0" + "php": "~8.1.0 || ~8.2.0 || ~8.3.0" }, "conflict": { "zendframework/zend-stdlib": "*" }, "require-dev": { - "laminas/laminas-coding-standard": "~2.3.0", - "phpbench/phpbench": "^1.0", - "phpunit/phpunit": "^9.3.7", - "psalm/plugin-phpunit": "^0.16.0", - "vimeo/psalm": "^4.7" + "laminas/laminas-coding-standard": "^2.5", + "phpbench/phpbench": "^1.2.15", + "phpunit/phpunit": "^10.5.8", + "psalm/plugin-phpunit": "^0.18.4", + "vimeo/psalm": "^5.20.0" }, "type": "library", "autoload": { @@ -197,69 +126,7 @@ "type": "community_bridge" } ], - "time": "2022-01-21T15:50:46+00:00" - }, - { - "name": "laminas/laminas-zendframework-bridge", - "version": "1.4.1", - "source": { - "type": "git", - "url": "https://github.com/laminas/laminas-zendframework-bridge.git", - "reference": "88bf037259869891afce6504cacc4f8a07b24d0f" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-zendframework-bridge/zipball/88bf037259869891afce6504cacc4f8a07b24d0f", - "reference": "88bf037259869891afce6504cacc4f8a07b24d0f", - "shasum": "" - }, - "require": { - "php": "^7.3 || ~8.0.0 || ~8.1.0" - }, - "require-dev": { - "phpunit/phpunit": "^9.3", - "psalm/plugin-phpunit": "^0.15.1", - "squizlabs/php_codesniffer": "^3.5", - "vimeo/psalm": "^4.6" - }, - "type": "library", - "extra": { - "laminas": { - "module": "Laminas\\ZendFrameworkBridge" - } - }, - "autoload": { - "files": [ - "src/autoload.php" - ], - "psr-4": { - "Laminas\\ZendFrameworkBridge\\": "src//" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "description": "Alias legacy ZF class names to Laminas Project equivalents.", - "keywords": [ - "ZendFramework", - "autoloading", - "laminas", - "zf" - ], - "support": { - "forum": "https://discourse.laminas.dev/", - "issues": "https://github.com/laminas/laminas-zendframework-bridge/issues", - "rss": "https://github.com/laminas/laminas-zendframework-bridge/releases.atom", - "source": "https://github.com/laminas/laminas-zendframework-bridge" - }, - "funding": [ - { - "url": "https://funding.communitybridge.org/projects/laminas-project", - "type": "community_bridge" - } - ], - "time": "2021-12-21T14:34:37+00:00" + "time": "2024-01-19T12:39:49+00:00" } ], "packages-dev": [ @@ -504,30 +371,30 @@ }, { "name": "composer/pcre", - "version": "1.0.1", + "version": "3.1.1", "source": { "type": "git", "url": "https://github.com/composer/pcre.git", - "reference": "67a32d7d6f9f560b726ab25a061b38ff3a80c560" + "reference": "00104306927c7a0919b4ced2aaa6782c1e61a3c9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/pcre/zipball/67a32d7d6f9f560b726ab25a061b38ff3a80c560", - "reference": "67a32d7d6f9f560b726ab25a061b38ff3a80c560", + "url": "https://api.github.com/repos/composer/pcre/zipball/00104306927c7a0919b4ced2aaa6782c1e61a3c9", + "reference": "00104306927c7a0919b4ced2aaa6782c1e61a3c9", "shasum": "" }, "require": { - "php": "^5.3.2 || ^7.0 || ^8.0" + "php": "^7.4 || ^8.0" }, "require-dev": { "phpstan/phpstan": "^1.3", "phpstan/phpstan-strict-rules": "^1.1", - "symfony/phpunit-bridge": "^4.2 || ^5" + "symfony/phpunit-bridge": "^5" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "1.x-dev" + "dev-main": "3.x-dev" } }, "autoload": { @@ -555,7 +422,7 @@ ], "support": { "issues": "https://github.com/composer/pcre/issues", - "source": "https://github.com/composer/pcre/tree/1.0.1" + "source": "https://github.com/composer/pcre/tree/3.1.1" }, "funding": [ { @@ -571,20 +438,20 @@ "type": "tidelift" } ], - "time": "2022-01-21T20:24:37+00:00" + "time": "2023-10-11T07:11:09+00:00" }, { "name": "composer/semver", - "version": "3.2.9", + "version": "3.4.0", "source": { "type": "git", "url": "https://github.com/composer/semver.git", - "reference": "a951f614bd64dcd26137bc9b7b2637ddcfc57649" + "reference": "35e8d0af4486141bc745f23a29cc2091eb624a32" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/semver/zipball/a951f614bd64dcd26137bc9b7b2637ddcfc57649", - "reference": "a951f614bd64dcd26137bc9b7b2637ddcfc57649", + "url": "https://api.github.com/repos/composer/semver/zipball/35e8d0af4486141bc745f23a29cc2091eb624a32", + "reference": "35e8d0af4486141bc745f23a29cc2091eb624a32", "shasum": "" }, "require": { @@ -634,9 +501,9 @@ "versioning" ], "support": { - "irc": "irc://irc.freenode.org/composer", + "irc": "ircs://irc.libera.chat:6697/composer", "issues": "https://github.com/composer/semver/issues", - "source": "https://github.com/composer/semver/tree/3.2.9" + "source": "https://github.com/composer/semver/tree/3.4.0" }, "funding": [ { @@ -652,24 +519,24 @@ "type": "tidelift" } ], - "time": "2022-02-04T13:58:43+00:00" + "time": "2023-08-31T09:50:34+00:00" }, { "name": "composer/xdebug-handler", - "version": "3.0.2", + "version": "3.0.3", "source": { "type": "git", "url": "https://github.com/composer/xdebug-handler.git", - "reference": "b11b961ef6b11e380e81a20b27c8cad54eeefe61" + "reference": "ced299686f41dce890debac69273b47ffe98a40c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/xdebug-handler/zipball/b11b961ef6b11e380e81a20b27c8cad54eeefe61", - "reference": "b11b961ef6b11e380e81a20b27c8cad54eeefe61", + "url": "https://api.github.com/repos/composer/xdebug-handler/zipball/ced299686f41dce890debac69273b47ffe98a40c", + "reference": "ced299686f41dce890debac69273b47ffe98a40c", "shasum": "" }, "require": { - "composer/pcre": "^1", + "composer/pcre": "^1 || ^2 || ^3", "php": "^7.2.5 || ^8.0", "psr/log": "^1 || ^2 || ^3" }, @@ -702,7 +569,7 @@ "support": { "irc": "irc://irc.freenode.org/composer", "issues": "https://github.com/composer/xdebug-handler/issues", - "source": "https://github.com/composer/xdebug-handler/tree/3.0.2" + "source": "https://github.com/composer/xdebug-handler/tree/3.0.3" }, "funding": [ { @@ -718,7 +585,82 @@ "type": "tidelift" } ], - "time": "2022-02-24T20:53:32+00:00" + "time": "2022-02-25T21:32:43+00:00" + }, + { + "name": "dealerdirect/phpcodesniffer-composer-installer", + "version": "v0.7.2", + "source": { + "type": "git", + "url": "https://github.com/Dealerdirect/phpcodesniffer-composer-installer.git", + "reference": "1c968e542d8843d7cd71de3c5c9c3ff3ad71a1db" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Dealerdirect/phpcodesniffer-composer-installer/zipball/1c968e542d8843d7cd71de3c5c9c3ff3ad71a1db", + "reference": "1c968e542d8843d7cd71de3c5c9c3ff3ad71a1db", + "shasum": "" + }, + "require": { + "composer-plugin-api": "^1.0 || ^2.0", + "php": ">=5.3", + "squizlabs/php_codesniffer": "^2.0 || ^3.1.0 || ^4.0" + }, + "require-dev": { + "composer/composer": "*", + "php-parallel-lint/php-parallel-lint": "^1.3.1", + "phpcompatibility/php-compatibility": "^9.0" + }, + "type": "composer-plugin", + "extra": { + "class": "Dealerdirect\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\Plugin" + }, + "autoload": { + "psr-4": { + "Dealerdirect\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Franck Nijhof", + "email": "franck.nijhof@dealerdirect.com", + "homepage": "http://www.frenck.nl", + "role": "Developer / IT Manager" + }, + { + "name": "Contributors", + "homepage": "https://github.com/Dealerdirect/phpcodesniffer-composer-installer/graphs/contributors" + } + ], + "description": "PHP_CodeSniffer Standards Composer Installer Plugin", + "homepage": "http://www.dealerdirect.com", + "keywords": [ + "PHPCodeSniffer", + "PHP_CodeSniffer", + "code quality", + "codesniffer", + "composer", + "installer", + "phpcbf", + "phpcs", + "plugin", + "qa", + "quality", + "standard", + "standards", + "style guide", + "stylecheck", + "tests" + ], + "support": { + "issues": "https://github.com/dealerdirect/phpcodesniffer-composer-installer/issues", + "source": "https://github.com/dealerdirect/phpcodesniffer-composer-installer" + }, + "time": "2022-02-04T12:51:07+00:00" }, { "name": "dnoegel/php-xdg-base-dir", @@ -759,29 +701,30 @@ }, { "name": "doctrine/instantiator", - "version": "1.4.0", + "version": "2.0.0", "source": { "type": "git", "url": "https://github.com/doctrine/instantiator.git", - "reference": "d56bf6102915de5702778fe20f2de3b2fe570b5b" + "reference": "c6222283fa3f4ac679f8b9ced9a4e23f163e80d0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/instantiator/zipball/d56bf6102915de5702778fe20f2de3b2fe570b5b", - "reference": "d56bf6102915de5702778fe20f2de3b2fe570b5b", + "url": "https://api.github.com/repos/doctrine/instantiator/zipball/c6222283fa3f4ac679f8b9ced9a4e23f163e80d0", + "reference": "c6222283fa3f4ac679f8b9ced9a4e23f163e80d0", "shasum": "" }, "require": { - "php": "^7.1 || ^8.0" + "php": "^8.1" }, "require-dev": { - "doctrine/coding-standard": "^8.0", + "doctrine/coding-standard": "^11", "ext-pdo": "*", "ext-phar": "*", - "phpbench/phpbench": "^0.13 || 1.0.0-alpha2", - "phpstan/phpstan": "^0.12", - "phpstan/phpstan-phpunit": "^0.12", - "phpunit/phpunit": "^7.0 || ^8.0 || ^9.0" + "phpbench/phpbench": "^1.2", + "phpstan/phpstan": "^1.9.4", + "phpstan/phpstan-phpunit": "^1.3", + "phpunit/phpunit": "^9.5.27", + "vimeo/psalm": "^5.4" }, "type": "library", "autoload": { @@ -808,7 +751,7 @@ ], "support": { "issues": "https://github.com/doctrine/instantiator/issues", - "source": "https://github.com/doctrine/instantiator/tree/1.4.0" + "source": "https://github.com/doctrine/instantiator/tree/2.0.0" }, "funding": [ { @@ -824,7 +767,7 @@ "type": "tidelift" } ], - "time": "2020-11-10T18:47:58+00:00" + "time": "2022-12-30T00:23:10+00:00" }, { "name": "felixfbecker/advanced-json-rpc", @@ -873,16 +816,16 @@ }, { "name": "felixfbecker/language-server-protocol", - "version": "1.5.1", + "version": "v1.5.2", "source": { "type": "git", "url": "https://github.com/felixfbecker/php-language-server-protocol.git", - "reference": "9d846d1f5cf101deee7a61c8ba7caa0a975cd730" + "reference": "6e82196ffd7c62f7794d778ca52b69feec9f2842" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/felixfbecker/php-language-server-protocol/zipball/9d846d1f5cf101deee7a61c8ba7caa0a975cd730", - "reference": "9d846d1f5cf101deee7a61c8ba7caa0a975cd730", + "url": "https://api.github.com/repos/felixfbecker/php-language-server-protocol/zipball/6e82196ffd7c62f7794d778ca52b69feec9f2842", + "reference": "6e82196ffd7c62f7794d778ca52b69feec9f2842", "shasum": "" }, "require": { @@ -923,37 +866,45 @@ ], "support": { "issues": "https://github.com/felixfbecker/php-language-server-protocol/issues", - "source": "https://github.com/felixfbecker/php-language-server-protocol/tree/1.5.1" + "source": "https://github.com/felixfbecker/php-language-server-protocol/tree/v1.5.2" }, - "time": "2021-02-22T14:02:09+00:00" + "time": "2022-03-02T22:36:06+00:00" }, { "name": "laminas/laminas-coding-standard", - "version": "1.0.0", + "version": "2.5.0", "source": { "type": "git", "url": "https://github.com/laminas/laminas-coding-standard.git", - "reference": "08880ce2fbfe62d471cd3cb766a91da630b32539" + "reference": "c1aaa18a7c860c6932677a3e4ec13161f9fc7d61" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-coding-standard/zipball/08880ce2fbfe62d471cd3cb766a91da630b32539", - "reference": "08880ce2fbfe62d471cd3cb766a91da630b32539", + "url": "https://api.github.com/repos/laminas/laminas-coding-standard/zipball/c1aaa18a7c860c6932677a3e4ec13161f9fc7d61", + "reference": "c1aaa18a7c860c6932677a3e4ec13161f9fc7d61", "shasum": "" }, "require": { - "laminas/laminas-zendframework-bridge": "^1.0", - "squizlabs/php_codesniffer": "^2.7" + "dealerdirect/phpcodesniffer-composer-installer": "^0.7 || ^1.0", + "php": "^7.4 || ^8.0", + "slevomat/coding-standard": "^7.0", + "squizlabs/php_codesniffer": "^3.6", + "webimpress/coding-standard": "^1.2" }, - "replace": { - "zendframework/zend-coding-standard": "self.version" + "conflict": { + "phpstan/phpdoc-parser": ">=1.6.0" + }, + "type": "phpcodesniffer-standard", + "autoload": { + "psr-4": { + "LaminasCodingStandard\\": "src/LaminasCodingStandard/" + } }, - "type": "library", "notification-url": "https://packagist.org/downloads/", "license": [ "BSD-3-Clause" ], - "description": "Laminas coding standard", + "description": "Laminas Coding Standard", "homepage": "https://laminas.dev", "keywords": [ "Coding Standard", @@ -967,29 +918,39 @@ "rss": "https://github.com/laminas/laminas-coding-standard/releases.atom", "source": "https://github.com/laminas/laminas-coding-standard" }, - "time": "2019-12-31T16:28:26+00:00" + "funding": [ + { + "url": "https://funding.communitybridge.org/projects/laminas-project", + "type": "community_bridge" + } + ], + "time": "2023-01-05T15:53:40+00:00" }, { "name": "myclabs/deep-copy", - "version": "1.10.2", + "version": "1.11.1", "source": { "type": "git", "url": "https://github.com/myclabs/DeepCopy.git", - "reference": "776f831124e9c62e1a2c601ecc52e776d8bb7220" + "reference": "7284c22080590fb39f2ffa3e9057f10a4ddd0e0c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/776f831124e9c62e1a2c601ecc52e776d8bb7220", - "reference": "776f831124e9c62e1a2c601ecc52e776d8bb7220", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/7284c22080590fb39f2ffa3e9057f10a4ddd0e0c", + "reference": "7284c22080590fb39f2ffa3e9057f10a4ddd0e0c", "shasum": "" }, "require": { "php": "^7.1 || ^8.0" }, + "conflict": { + "doctrine/collections": "<1.6.8", + "doctrine/common": "<2.13.3 || >=3,<3.2.2" + }, "require-dev": { - "doctrine/collections": "^1.0", - "doctrine/common": "^2.6", - "phpunit/phpunit": "^7.1" + "doctrine/collections": "^1.6.8", + "doctrine/common": "^2.13.3 || ^3.2.2", + "phpunit/phpunit": "^7.5.20 || ^8.5.23 || ^9.5.13" }, "type": "library", "autoload": { @@ -1014,7 +975,7 @@ ], "support": { "issues": "https://github.com/myclabs/DeepCopy/issues", - "source": "https://github.com/myclabs/DeepCopy/tree/1.10.2" + "source": "https://github.com/myclabs/DeepCopy/tree/1.11.1" }, "funding": [ { @@ -1022,20 +983,20 @@ "type": "tidelift" } ], - "time": "2020-11-13T09:40:50+00:00" + "time": "2023-03-08T13:26:56+00:00" }, { "name": "netresearch/jsonmapper", - "version": "v4.0.0", + "version": "v4.4.1", "source": { "type": "git", "url": "https://github.com/cweiske/jsonmapper.git", - "reference": "8bbc021a8edb2e4a7ea2f8ad4fa9ec9dce2fcb8d" + "reference": "132c75c7dd83e45353ebb9c6c9f591952995bbf0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/cweiske/jsonmapper/zipball/8bbc021a8edb2e4a7ea2f8ad4fa9ec9dce2fcb8d", - "reference": "8bbc021a8edb2e4a7ea2f8ad4fa9ec9dce2fcb8d", + "url": "https://api.github.com/repos/cweiske/jsonmapper/zipball/132c75c7dd83e45353ebb9c6c9f591952995bbf0", + "reference": "132c75c7dd83e45353ebb9c6c9f591952995bbf0", "shasum": "" }, "require": { @@ -1046,7 +1007,7 @@ "php": ">=7.1" }, "require-dev": { - "phpunit/phpunit": "~7.5 || ~8.0 || ~9.0", + "phpunit/phpunit": "~7.5 || ~8.0 || ~9.0 || ~10.0", "squizlabs/php_codesniffer": "~3.5" }, "type": "library", @@ -1071,22 +1032,22 @@ "support": { "email": "cweiske@cweiske.de", "issues": "https://github.com/cweiske/jsonmapper/issues", - "source": "https://github.com/cweiske/jsonmapper/tree/v4.0.0" + "source": "https://github.com/cweiske/jsonmapper/tree/v4.4.1" }, - "time": "2020-12-01T19:48:11+00:00" + "time": "2024-01-31T06:18:54+00:00" }, { "name": "nikic/php-parser", - "version": "v4.13.2", + "version": "v4.18.0", "source": { "type": "git", "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "210577fe3cf7badcc5814d99455df46564f3c077" + "reference": "1bcbb2179f97633e98bbbc87044ee2611c7d7999" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/210577fe3cf7badcc5814d99455df46564f3c077", - "reference": "210577fe3cf7badcc5814d99455df46564f3c077", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/1bcbb2179f97633e98bbbc87044ee2611c7d7999", + "reference": "1bcbb2179f97633e98bbbc87044ee2611c7d7999", "shasum": "" }, "require": { @@ -1127,9 +1088,9 @@ ], "support": { "issues": "https://github.com/nikic/PHP-Parser/issues", - "source": "https://github.com/nikic/PHP-Parser/tree/v4.13.2" + "source": "https://github.com/nikic/PHP-Parser/tree/v4.18.0" }, - "time": "2021-11-30T19:35:32+00:00" + "time": "2023-12-10T21:03:43+00:00" }, { "name": "openlss/lib-array2xml", @@ -1407,25 +1368,30 @@ }, { "name": "phpdocumentor/type-resolver", - "version": "1.6.0", + "version": "1.6.2", "source": { "type": "git", "url": "https://github.com/phpDocumentor/TypeResolver.git", - "reference": "93ebd0014cab80c4ea9f5e297ea48672f1b87706" + "reference": "48f445a408c131e38cab1c235aa6d2bb7a0bb20d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/93ebd0014cab80c4ea9f5e297ea48672f1b87706", - "reference": "93ebd0014cab80c4ea9f5e297ea48672f1b87706", + "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/48f445a408c131e38cab1c235aa6d2bb7a0bb20d", + "reference": "48f445a408c131e38cab1c235aa6d2bb7a0bb20d", "shasum": "" }, "require": { - "php": "^7.2 || ^8.0", + "php": "^7.4 || ^8.0", "phpdocumentor/reflection-common": "^2.0" }, "require-dev": { "ext-tokenizer": "*", - "psalm/phar": "^4.8" + "phpstan/extension-installer": "^1.1", + "phpstan/phpstan": "^1.8", + "phpstan/phpstan-phpunit": "^1.1", + "phpunit/phpunit": "^9.5", + "rector/rector": "^0.13.9", + "vimeo/psalm": "^4.25" }, "type": "library", "extra": { @@ -1451,96 +1417,73 @@ "description": "A PSR-5 based resolver of Class names, Types and Structural Element Names", "support": { "issues": "https://github.com/phpDocumentor/TypeResolver/issues", - "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.6.0" + "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.6.2" }, - "time": "2022-01-04T19:58:01+00:00" + "time": "2022-10-14T12:47:21+00:00" }, { - "name": "phpspec/prophecy", - "version": "v1.15.0", + "name": "phpstan/phpdoc-parser", + "version": "1.5.1", "source": { "type": "git", - "url": "https://github.com/phpspec/prophecy.git", - "reference": "bbcd7380b0ebf3961ee21409db7b38bc31d69a13" + "url": "https://github.com/phpstan/phpdoc-parser.git", + "reference": "981cc368a216c988e862a75e526b6076987d1b50" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpspec/prophecy/zipball/bbcd7380b0ebf3961ee21409db7b38bc31d69a13", - "reference": "bbcd7380b0ebf3961ee21409db7b38bc31d69a13", + "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/981cc368a216c988e862a75e526b6076987d1b50", + "reference": "981cc368a216c988e862a75e526b6076987d1b50", "shasum": "" }, "require": { - "doctrine/instantiator": "^1.2", - "php": "^7.2 || ~8.0, <8.2", - "phpdocumentor/reflection-docblock": "^5.2", - "sebastian/comparator": "^3.0 || ^4.0", - "sebastian/recursion-context": "^3.0 || ^4.0" + "php": "^7.2 || ^8.0" }, "require-dev": { - "phpspec/phpspec": "^6.0 || ^7.0", - "phpunit/phpunit": "^8.0 || ^9.0" + "php-parallel-lint/php-parallel-lint": "^1.2", + "phpstan/extension-installer": "^1.0", + "phpstan/phpstan": "^1.5", + "phpstan/phpstan-strict-rules": "^1.0", + "phpunit/phpunit": "^9.5", + "symfony/process": "^5.2" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.x-dev" - } - }, "autoload": { "psr-4": { - "Prophecy\\": "src/Prophecy" + "PHPStan\\PhpDocParser\\": [ + "src/" + ] } }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], - "authors": [ - { - "name": "Konstantin Kudryashov", - "email": "ever.zet@gmail.com", - "homepage": "http://everzet.com" - }, - { - "name": "Marcello Duarte", - "email": "marcello.duarte@gmail.com" - } - ], - "description": "Highly opinionated mocking framework for PHP 5.3+", - "homepage": "https://github.com/phpspec/prophecy", - "keywords": [ - "Double", - "Dummy", - "fake", - "mock", - "spy", - "stub" - ], + "description": "PHPDoc parser with support for nullable, intersection and generic types", "support": { - "issues": "https://github.com/phpspec/prophecy/issues", - "source": "https://github.com/phpspec/prophecy/tree/v1.15.0" + "issues": "https://github.com/phpstan/phpdoc-parser/issues", + "source": "https://github.com/phpstan/phpdoc-parser/tree/1.5.1" }, - "time": "2021-12-08T12:19:24+00:00" + "time": "2022-05-05T11:32:40+00:00" }, { "name": "phpunit/php-code-coverage", - "version": "9.2.13", + "version": "9.2.30", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "deac8540cb7bd40b2b8cfa679b76202834fd04e8" + "reference": "ca2bd87d2f9215904682a9cb9bb37dda98e76089" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/deac8540cb7bd40b2b8cfa679b76202834fd04e8", - "reference": "deac8540cb7bd40b2b8cfa679b76202834fd04e8", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/ca2bd87d2f9215904682a9cb9bb37dda98e76089", + "reference": "ca2bd87d2f9215904682a9cb9bb37dda98e76089", "shasum": "" }, "require": { "ext-dom": "*", "ext-libxml": "*", "ext-xmlwriter": "*", - "nikic/php-parser": "^4.13.0", + "nikic/php-parser": "^4.18 || ^5.0", "php": ">=7.3", "phpunit/php-file-iterator": "^3.0.3", "phpunit/php-text-template": "^2.0.2", @@ -1555,8 +1498,8 @@ "phpunit/phpunit": "^9.3" }, "suggest": { - "ext-pcov": "*", - "ext-xdebug": "*" + "ext-pcov": "PHP extension that provides line coverage", + "ext-xdebug": "PHP extension that provides line coverage as well as branch and path coverage" }, "type": "library", "extra": { @@ -1589,7 +1532,8 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", - "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.13" + "security": "https://github.com/sebastianbergmann/php-code-coverage/security/policy", + "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.30" }, "funding": [ { @@ -1597,7 +1541,7 @@ "type": "github" } ], - "time": "2022-02-23T17:02:38+00:00" + "time": "2023-12-22T06:47:57+00:00" }, { "name": "phpunit/php-file-iterator", @@ -1842,20 +1786,20 @@ }, { "name": "phpunit/phpunit", - "version": "9.5.16", + "version": "9.6.16", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "5ff8c545a50226c569310a35f4fa89d79f1ddfdc" + "reference": "3767b2c56ce02d01e3491046f33466a1ae60a37f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/5ff8c545a50226c569310a35f4fa89d79f1ddfdc", - "reference": "5ff8c545a50226c569310a35f4fa89d79f1ddfdc", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/3767b2c56ce02d01e3491046f33466a1ae60a37f", + "reference": "3767b2c56ce02d01e3491046f33466a1ae60a37f", "shasum": "" }, "require": { - "doctrine/instantiator": "^1.3.1", + "doctrine/instantiator": "^1.3.1 || ^2", "ext-dom": "*", "ext-json": "*", "ext-libxml": "*", @@ -1866,31 +1810,26 @@ "phar-io/manifest": "^2.0.3", "phar-io/version": "^3.0.2", "php": ">=7.3", - "phpspec/prophecy": "^1.12.1", - "phpunit/php-code-coverage": "^9.2.13", + "phpunit/php-code-coverage": "^9.2.28", "phpunit/php-file-iterator": "^3.0.5", "phpunit/php-invoker": "^3.1.1", "phpunit/php-text-template": "^2.0.3", "phpunit/php-timer": "^5.0.2", "sebastian/cli-parser": "^1.0.1", "sebastian/code-unit": "^1.0.6", - "sebastian/comparator": "^4.0.5", + "sebastian/comparator": "^4.0.8", "sebastian/diff": "^4.0.3", "sebastian/environment": "^5.1.3", - "sebastian/exporter": "^4.0.3", + "sebastian/exporter": "^4.0.5", "sebastian/global-state": "^5.0.1", "sebastian/object-enumerator": "^4.0.3", "sebastian/resource-operations": "^3.0.3", - "sebastian/type": "^2.3.4", + "sebastian/type": "^3.2", "sebastian/version": "^3.0.2" }, - "require-dev": { - "ext-pdo": "*", - "phpspec/prophecy-phpunit": "^2.0.1" - }, "suggest": { - "ext-soap": "*", - "ext-xdebug": "*" + "ext-soap": "To be able to generate mocks based on WSDL files", + "ext-xdebug": "PHP extension that provides line coverage as well as branch and path coverage" }, "bin": [ "phpunit" @@ -1898,7 +1837,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "9.5-dev" + "dev-master": "9.6-dev" } }, "autoload": { @@ -1929,7 +1868,8 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", - "source": "https://github.com/sebastianbergmann/phpunit/tree/9.5.16" + "security": "https://github.com/sebastianbergmann/phpunit/security/policy", + "source": "https://github.com/sebastianbergmann/phpunit/tree/9.6.16" }, "funding": [ { @@ -1939,22 +1879,26 @@ { "url": "https://github.com/sebastianbergmann", "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/phpunit/phpunit", + "type": "tidelift" } ], - "time": "2022-02-23T17:10:58+00:00" + "time": "2024-01-19T07:03:14+00:00" }, { "name": "psalm/plugin-phpunit", - "version": "0.15.2", + "version": "0.18.4", "source": { "type": "git", "url": "https://github.com/psalm/psalm-plugin-phpunit.git", - "reference": "31d15bbc0169a3c454e495e03fd8a6ccb663661b" + "reference": "e4ab3096653d9eb6f6d0ea5f4461898d59ae4dbc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/psalm/psalm-plugin-phpunit/zipball/31d15bbc0169a3c454e495e03fd8a6ccb663661b", - "reference": "31d15bbc0169a3c454e495e03fd8a6ccb663661b", + "url": "https://api.github.com/repos/psalm/psalm-plugin-phpunit/zipball/e4ab3096653d9eb6f6d0ea5f4461898d59ae4dbc", + "reference": "e4ab3096653d9eb6f6d0ea5f4461898d59ae4dbc", "shasum": "" }, "require": { @@ -1962,7 +1906,7 @@ "composer/semver": "^1.4 || ^2.0 || ^3.0", "ext-simplexml": "*", "php": "^7.1 || ^8.0", - "vimeo/psalm": "dev-master || dev-4.x || ^4.0" + "vimeo/psalm": "dev-master || dev-4.x || ^4.7.1 || ^5@beta || ^5.0" }, "conflict": { "phpunit/phpunit": "<7.5" @@ -1999,28 +1943,33 @@ "description": "Psalm plugin for PHPUnit", "support": { "issues": "https://github.com/psalm/psalm-plugin-phpunit/issues", - "source": "https://github.com/psalm/psalm-plugin-phpunit/tree/0.15.2" + "source": "https://github.com/psalm/psalm-plugin-phpunit/tree/0.18.4" }, - "time": "2021-05-29T19:11:38+00:00" + "time": "2022-12-03T07:47:07+00:00" }, { "name": "psr/container", - "version": "1.1.1", + "version": "2.0.2", "source": { "type": "git", "url": "https://github.com/php-fig/container.git", - "reference": "8622567409010282b7aeebe4bb841fe98b58dcaf" + "reference": "c71ecc56dfe541dbd90c5360474fbc405f8d5963" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/container/zipball/8622567409010282b7aeebe4bb841fe98b58dcaf", - "reference": "8622567409010282b7aeebe4bb841fe98b58dcaf", + "url": "https://api.github.com/repos/php-fig/container/zipball/c71ecc56dfe541dbd90c5360474fbc405f8d5963", + "reference": "c71ecc56dfe541dbd90c5360474fbc405f8d5963", "shasum": "" }, "require": { - "php": ">=7.2.0" + "php": ">=7.4.0" }, "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, "autoload": { "psr-4": { "Psr\\Container\\": "src/" @@ -2047,36 +1996,36 @@ ], "support": { "issues": "https://github.com/php-fig/container/issues", - "source": "https://github.com/php-fig/container/tree/1.1.1" + "source": "https://github.com/php-fig/container/tree/2.0.2" }, - "time": "2021-03-05T17:36:06+00:00" + "time": "2021-11-05T16:47:00+00:00" }, { "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/", @@ -2097,9 +2046,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", @@ -2270,16 +2219,16 @@ }, { "name": "sebastian/comparator", - "version": "4.0.6", + "version": "4.0.8", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "55f4261989e546dc112258c7a75935a81a7ce382" + "reference": "fa0f136dd2334583309d32b62544682ee972b51a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/55f4261989e546dc112258c7a75935a81a7ce382", - "reference": "55f4261989e546dc112258c7a75935a81a7ce382", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/fa0f136dd2334583309d32b62544682ee972b51a", + "reference": "fa0f136dd2334583309d32b62544682ee972b51a", "shasum": "" }, "require": { @@ -2332,7 +2281,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/comparator/issues", - "source": "https://github.com/sebastianbergmann/comparator/tree/4.0.6" + "source": "https://github.com/sebastianbergmann/comparator/tree/4.0.8" }, "funding": [ { @@ -2340,24 +2289,24 @@ "type": "github" } ], - "time": "2020-10-26T15:49:45+00:00" + "time": "2022-09-14T12:41:17+00:00" }, { "name": "sebastian/complexity", - "version": "2.0.2", + "version": "2.0.3", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/complexity.git", - "reference": "739b35e53379900cc9ac327b2147867b8b6efd88" + "reference": "25f207c40d62b8b7aa32f5ab026c53561964053a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/739b35e53379900cc9ac327b2147867b8b6efd88", - "reference": "739b35e53379900cc9ac327b2147867b8b6efd88", + "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/25f207c40d62b8b7aa32f5ab026c53561964053a", + "reference": "25f207c40d62b8b7aa32f5ab026c53561964053a", "shasum": "" }, "require": { - "nikic/php-parser": "^4.7", + "nikic/php-parser": "^4.18 || ^5.0", "php": ">=7.3" }, "require-dev": { @@ -2389,7 +2338,7 @@ "homepage": "https://github.com/sebastianbergmann/complexity", "support": { "issues": "https://github.com/sebastianbergmann/complexity/issues", - "source": "https://github.com/sebastianbergmann/complexity/tree/2.0.2" + "source": "https://github.com/sebastianbergmann/complexity/tree/2.0.3" }, "funding": [ { @@ -2397,20 +2346,20 @@ "type": "github" } ], - "time": "2020-10-26T15:52:27+00:00" + "time": "2023-12-22T06:19:30+00:00" }, { "name": "sebastian/diff", - "version": "4.0.4", + "version": "4.0.5", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "3461e3fccc7cfdfc2720be910d3bd73c69be590d" + "reference": "74be17022044ebaaecfdf0c5cd504fc9cd5a7131" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/3461e3fccc7cfdfc2720be910d3bd73c69be590d", - "reference": "3461e3fccc7cfdfc2720be910d3bd73c69be590d", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/74be17022044ebaaecfdf0c5cd504fc9cd5a7131", + "reference": "74be17022044ebaaecfdf0c5cd504fc9cd5a7131", "shasum": "" }, "require": { @@ -2455,7 +2404,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/diff/issues", - "source": "https://github.com/sebastianbergmann/diff/tree/4.0.4" + "source": "https://github.com/sebastianbergmann/diff/tree/4.0.5" }, "funding": [ { @@ -2463,20 +2412,20 @@ "type": "github" } ], - "time": "2020-10-26T13:10:38+00:00" + "time": "2023-05-07T05:35:17+00:00" }, { "name": "sebastian/environment", - "version": "5.1.3", + "version": "5.1.5", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "388b6ced16caa751030f6a69e588299fa09200ac" + "reference": "830c43a844f1f8d5b7a1f6d6076b784454d8b7ed" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/388b6ced16caa751030f6a69e588299fa09200ac", - "reference": "388b6ced16caa751030f6a69e588299fa09200ac", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/830c43a844f1f8d5b7a1f6d6076b784454d8b7ed", + "reference": "830c43a844f1f8d5b7a1f6d6076b784454d8b7ed", "shasum": "" }, "require": { @@ -2518,7 +2467,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/environment/issues", - "source": "https://github.com/sebastianbergmann/environment/tree/5.1.3" + "source": "https://github.com/sebastianbergmann/environment/tree/5.1.5" }, "funding": [ { @@ -2526,20 +2475,20 @@ "type": "github" } ], - "time": "2020-09-28T05:52:38+00:00" + "time": "2023-02-03T06:03:51+00:00" }, { "name": "sebastian/exporter", - "version": "4.0.4", + "version": "4.0.5", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "65e8b7db476c5dd267e65eea9cab77584d3cfff9" + "reference": "ac230ed27f0f98f597c8a2b6eb7ac563af5e5b9d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/65e8b7db476c5dd267e65eea9cab77584d3cfff9", - "reference": "65e8b7db476c5dd267e65eea9cab77584d3cfff9", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/ac230ed27f0f98f597c8a2b6eb7ac563af5e5b9d", + "reference": "ac230ed27f0f98f597c8a2b6eb7ac563af5e5b9d", "shasum": "" }, "require": { @@ -2595,7 +2544,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/exporter/issues", - "source": "https://github.com/sebastianbergmann/exporter/tree/4.0.4" + "source": "https://github.com/sebastianbergmann/exporter/tree/4.0.5" }, "funding": [ { @@ -2603,20 +2552,20 @@ "type": "github" } ], - "time": "2021-11-11T14:18:36+00:00" + "time": "2022-09-14T06:03:37+00:00" }, { "name": "sebastian/global-state", - "version": "5.0.5", + "version": "5.0.6", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/global-state.git", - "reference": "0ca8db5a5fc9c8646244e629625ac486fa286bf2" + "reference": "bde739e7565280bda77be70044ac1047bc007e34" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/0ca8db5a5fc9c8646244e629625ac486fa286bf2", - "reference": "0ca8db5a5fc9c8646244e629625ac486fa286bf2", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/bde739e7565280bda77be70044ac1047bc007e34", + "reference": "bde739e7565280bda77be70044ac1047bc007e34", "shasum": "" }, "require": { @@ -2659,7 +2608,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/global-state/issues", - "source": "https://github.com/sebastianbergmann/global-state/tree/5.0.5" + "source": "https://github.com/sebastianbergmann/global-state/tree/5.0.6" }, "funding": [ { @@ -2667,24 +2616,24 @@ "type": "github" } ], - "time": "2022-02-14T08:28:10+00:00" + "time": "2023-08-02T09:26:13+00:00" }, { "name": "sebastian/lines-of-code", - "version": "1.0.3", + "version": "1.0.4", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/lines-of-code.git", - "reference": "c1c2e997aa3146983ed888ad08b15470a2e22ecc" + "reference": "e1e4a170560925c26d424b6a03aed157e7dcc5c5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/c1c2e997aa3146983ed888ad08b15470a2e22ecc", - "reference": "c1c2e997aa3146983ed888ad08b15470a2e22ecc", + "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/e1e4a170560925c26d424b6a03aed157e7dcc5c5", + "reference": "e1e4a170560925c26d424b6a03aed157e7dcc5c5", "shasum": "" }, "require": { - "nikic/php-parser": "^4.6", + "nikic/php-parser": "^4.18 || ^5.0", "php": ">=7.3" }, "require-dev": { @@ -2716,7 +2665,7 @@ "homepage": "https://github.com/sebastianbergmann/lines-of-code", "support": { "issues": "https://github.com/sebastianbergmann/lines-of-code/issues", - "source": "https://github.com/sebastianbergmann/lines-of-code/tree/1.0.3" + "source": "https://github.com/sebastianbergmann/lines-of-code/tree/1.0.4" }, "funding": [ { @@ -2724,7 +2673,7 @@ "type": "github" } ], - "time": "2020-11-28T06:42:11+00:00" + "time": "2023-12-22T06:20:34+00:00" }, { "name": "sebastian/object-enumerator", @@ -2840,16 +2789,16 @@ }, { "name": "sebastian/recursion-context", - "version": "4.0.4", + "version": "4.0.5", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/recursion-context.git", - "reference": "cd9d8cf3c5804de4341c283ed787f099f5506172" + "reference": "e75bd0f07204fec2a0af9b0f3cfe97d05f92efc1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/cd9d8cf3c5804de4341c283ed787f099f5506172", - "reference": "cd9d8cf3c5804de4341c283ed787f099f5506172", + "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/e75bd0f07204fec2a0af9b0f3cfe97d05f92efc1", + "reference": "e75bd0f07204fec2a0af9b0f3cfe97d05f92efc1", "shasum": "" }, "require": { @@ -2888,10 +2837,10 @@ } ], "description": "Provides functionality to recursively process PHP variables", - "homepage": "http://www.github.com/sebastianbergmann/recursion-context", + "homepage": "https://github.com/sebastianbergmann/recursion-context", "support": { "issues": "https://github.com/sebastianbergmann/recursion-context/issues", - "source": "https://github.com/sebastianbergmann/recursion-context/tree/4.0.4" + "source": "https://github.com/sebastianbergmann/recursion-context/tree/4.0.5" }, "funding": [ { @@ -2899,7 +2848,7 @@ "type": "github" } ], - "time": "2020-10-26T13:17:30+00:00" + "time": "2023-02-03T06:07:39+00:00" }, { "name": "sebastian/resource-operations", @@ -2958,28 +2907,28 @@ }, { "name": "sebastian/type", - "version": "2.3.4", + "version": "3.2.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/type.git", - "reference": "b8cd8a1c753c90bc1a0f5372170e3e489136f914" + "reference": "75e2c2a32f5e0b3aef905b9ed0b179b953b3d7c7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/b8cd8a1c753c90bc1a0f5372170e3e489136f914", - "reference": "b8cd8a1c753c90bc1a0f5372170e3e489136f914", + "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/75e2c2a32f5e0b3aef905b9ed0b179b953b3d7c7", + "reference": "75e2c2a32f5e0b3aef905b9ed0b179b953b3d7c7", "shasum": "" }, "require": { "php": ">=7.3" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^9.5" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.3-dev" + "dev-master": "3.2-dev" } }, "autoload": { @@ -3002,7 +2951,7 @@ "homepage": "https://github.com/sebastianbergmann/type", "support": { "issues": "https://github.com/sebastianbergmann/type/issues", - "source": "https://github.com/sebastianbergmann/type/tree/2.3.4" + "source": "https://github.com/sebastianbergmann/type/tree/3.2.1" }, "funding": [ { @@ -3010,7 +2959,7 @@ "type": "github" } ], - "time": "2021-06-15T12:49:02+00:00" + "time": "2023-02-03T06:13:03+00:00" }, { "name": "sebastian/version", @@ -3065,66 +3014,100 @@ ], "time": "2020-09-28T06:39:44+00:00" }, + { + "name": "slevomat/coding-standard", + "version": "7.2.1", + "source": { + "type": "git", + "url": "https://github.com/slevomat/coding-standard.git", + "reference": "aff06ae7a84e4534bf6f821dc982a93a5d477c90" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/slevomat/coding-standard/zipball/aff06ae7a84e4534bf6f821dc982a93a5d477c90", + "reference": "aff06ae7a84e4534bf6f821dc982a93a5d477c90", + "shasum": "" + }, + "require": { + "dealerdirect/phpcodesniffer-composer-installer": "^0.6.2 || ^0.7", + "php": "^7.2 || ^8.0", + "phpstan/phpdoc-parser": "^1.5.1", + "squizlabs/php_codesniffer": "^3.6.2" + }, + "require-dev": { + "phing/phing": "2.17.3", + "php-parallel-lint/php-parallel-lint": "1.3.2", + "phpstan/phpstan": "1.4.10|1.7.1", + "phpstan/phpstan-deprecation-rules": "1.0.0", + "phpstan/phpstan-phpunit": "1.0.0|1.1.1", + "phpstan/phpstan-strict-rules": "1.2.3", + "phpunit/phpunit": "7.5.20|8.5.21|9.5.20" + }, + "type": "phpcodesniffer-standard", + "extra": { + "branch-alias": { + "dev-master": "7.x-dev" + } + }, + "autoload": { + "psr-4": { + "SlevomatCodingStandard\\": "SlevomatCodingStandard" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Slevomat Coding Standard for PHP_CodeSniffer complements Consistence Coding Standard by providing sniffs with additional checks.", + "support": { + "issues": "https://github.com/slevomat/coding-standard/issues", + "source": "https://github.com/slevomat/coding-standard/tree/7.2.1" + }, + "funding": [ + { + "url": "https://github.com/kukulich", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/slevomat/coding-standard", + "type": "tidelift" + } + ], + "time": "2022-05-25T10:58:12+00:00" + }, { "name": "squizlabs/php_codesniffer", - "version": "2.9.2", + "version": "3.8.1", "source": { "type": "git", - "url": "https://github.com/squizlabs/PHP_CodeSniffer.git", - "reference": "2acf168de78487db620ab4bc524135a13cfe6745" + "url": "https://github.com/PHPCSStandards/PHP_CodeSniffer.git", + "reference": "14f5fff1e64118595db5408e946f3a22c75807f7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/2acf168de78487db620ab4bc524135a13cfe6745", - "reference": "2acf168de78487db620ab4bc524135a13cfe6745", + "url": "https://api.github.com/repos/PHPCSStandards/PHP_CodeSniffer/zipball/14f5fff1e64118595db5408e946f3a22c75807f7", + "reference": "14f5fff1e64118595db5408e946f3a22c75807f7", "shasum": "" }, "require": { "ext-simplexml": "*", "ext-tokenizer": "*", "ext-xmlwriter": "*", - "php": ">=5.1.2" + "php": ">=5.4.0" }, "require-dev": { - "phpunit/phpunit": "~4.0" + "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0 || ^8.0 || ^9.3.4" }, "bin": [ - "scripts/phpcs", - "scripts/phpcbf" + "bin/phpcbf", + "bin/phpcs" ], "type": "library", "extra": { "branch-alias": { - "dev-master": "2.x-dev" + "dev-master": "3.x-dev" } }, - "autoload": { - "classmap": [ - "CodeSniffer.php", - "CodeSniffer/CLI.php", - "CodeSniffer/Exception.php", - "CodeSniffer/File.php", - "CodeSniffer/Fixer.php", - "CodeSniffer/Report.php", - "CodeSniffer/Reporting.php", - "CodeSniffer/Sniff.php", - "CodeSniffer/Tokens.php", - "CodeSniffer/Reports/", - "CodeSniffer/Tokenizers/", - "CodeSniffer/DocGenerators/", - "CodeSniffer/Standards/AbstractPatternSniff.php", - "CodeSniffer/Standards/AbstractScopeSniff.php", - "CodeSniffer/Standards/AbstractVariableSniff.php", - "CodeSniffer/Standards/IncorrectPatternException.php", - "CodeSniffer/Standards/Generic/Sniffs/", - "CodeSniffer/Standards/MySource/Sniffs/", - "CodeSniffer/Standards/PEAR/Sniffs/", - "CodeSniffer/Standards/PSR1/Sniffs/", - "CodeSniffer/Standards/PSR2/Sniffs/", - "CodeSniffer/Standards/Squiz/Sniffs/", - "CodeSniffer/Standards/Zend/Sniffs/" - ] - }, "notification-url": "https://packagist.org/downloads/", "license": [ "BSD-3-Clause" @@ -3132,70 +3115,89 @@ "authors": [ { "name": "Greg Sherwood", - "role": "lead" + "role": "Former lead" + }, + { + "name": "Juliette Reinders Folmer", + "role": "Current lead" + }, + { + "name": "Contributors", + "homepage": "https://github.com/PHPCSStandards/PHP_CodeSniffer/graphs/contributors" } ], "description": "PHP_CodeSniffer tokenizes PHP, JavaScript and CSS files and detects violations of a defined set of coding standards.", - "homepage": "http://www.squizlabs.com/php-codesniffer", + "homepage": "https://github.com/PHPCSStandards/PHP_CodeSniffer", "keywords": [ "phpcs", - "standards" + "standards", + "static analysis" ], "support": { - "issues": "https://github.com/squizlabs/PHP_CodeSniffer/issues", - "source": "https://github.com/squizlabs/PHP_CodeSniffer", - "wiki": "https://github.com/squizlabs/PHP_CodeSniffer/wiki" + "issues": "https://github.com/PHPCSStandards/PHP_CodeSniffer/issues", + "security": "https://github.com/PHPCSStandards/PHP_CodeSniffer/security/policy", + "source": "https://github.com/PHPCSStandards/PHP_CodeSniffer", + "wiki": "https://github.com/PHPCSStandards/PHP_CodeSniffer/wiki" }, - "time": "2018-11-07T22:31:41+00:00" + "funding": [ + { + "url": "https://github.com/PHPCSStandards", + "type": "github" + }, + { + "url": "https://github.com/jrfnl", + "type": "github" + }, + { + "url": "https://opencollective.com/php_codesniffer", + "type": "open_collective" + } + ], + "time": "2024-01-11T20:47:48+00:00" }, { "name": "symfony/console", - "version": "v5.4.3", + "version": "v6.4.3", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "a2a86ec353d825c75856c6fd14fac416a7bdb6b8" + "reference": "2aaf83b4de5b9d43b93e4aec6f2f8b676f7c567e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/a2a86ec353d825c75856c6fd14fac416a7bdb6b8", - "reference": "a2a86ec353d825c75856c6fd14fac416a7bdb6b8", + "url": "https://api.github.com/repos/symfony/console/zipball/2aaf83b4de5b9d43b93e4aec6f2f8b676f7c567e", + "reference": "2aaf83b4de5b9d43b93e4aec6f2f8b676f7c567e", "shasum": "" }, "require": { - "php": ">=7.2.5", - "symfony/deprecation-contracts": "^2.1|^3", + "php": ">=8.1", + "symfony/deprecation-contracts": "^2.5|^3", "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/service-contracts": "^2.5|^3", + "symfony/string": "^5.4|^6.0|^7.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" - }, - "suggest": { - "psr/log": "For using the console logger", - "symfony/event-dispatcher": "", - "symfony/lock": "", - "symfony/process": "" + "psr/log": "^1|^2|^3", + "symfony/config": "^5.4|^6.0|^7.0", + "symfony/dependency-injection": "^5.4|^6.0|^7.0", + "symfony/event-dispatcher": "^5.4|^6.0|^7.0", + "symfony/http-foundation": "^6.4|^7.0", + "symfony/http-kernel": "^6.4|^7.0", + "symfony/lock": "^5.4|^6.0|^7.0", + "symfony/messenger": "^5.4|^6.0|^7.0", + "symfony/process": "^5.4|^6.0|^7.0", + "symfony/stopwatch": "^5.4|^6.0|^7.0", + "symfony/var-dumper": "^5.4|^6.0|^7.0" }, "type": "library", "autoload": { @@ -3224,12 +3226,12 @@ "homepage": "https://symfony.com", "keywords": [ "cli", - "command line", + "command-line", "console", "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v5.4.3" + "source": "https://github.com/symfony/console/tree/v6.4.3" }, "funding": [ { @@ -3245,29 +3247,29 @@ "type": "tidelift" } ], - "time": "2022-01-26T16:28:35+00:00" + "time": "2024-01-23T14:51:35+00:00" }, { "name": "symfony/deprecation-contracts", - "version": "v2.5.0", + "version": "v3.4.0", "source": { "type": "git", "url": "https://github.com/symfony/deprecation-contracts.git", - "reference": "6f981ee24cf69ee7ce9736146d1c57c2780598a8" + "reference": "7c3aff79d10325257a001fcf92d991f24fc967cf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/6f981ee24cf69ee7ce9736146d1c57c2780598a8", - "reference": "6f981ee24cf69ee7ce9736146d1c57c2780598a8", + "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/7c3aff79d10325257a001fcf92d991f24fc967cf", + "reference": "7c3aff79d10325257a001fcf92d991f24fc967cf", "shasum": "" }, "require": { - "php": ">=7.1" + "php": ">=8.1" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "2.5-dev" + "dev-main": "3.4-dev" }, "thanks": { "name": "symfony/contracts", @@ -3296,7 +3298,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.0" + "source": "https://github.com/symfony/deprecation-contracts/tree/v3.4.0" }, "funding": [ { @@ -3312,20 +3314,20 @@ "type": "tidelift" } ], - "time": "2021-07-12T14:48:14+00:00" + "time": "2023-05-23T14:45:45+00:00" }, { "name": "symfony/polyfill-ctype", - "version": "v1.24.0", + "version": "v1.28.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "30885182c981ab175d4d034db0f6f469898070ab" + "reference": "ea208ce43cbb04af6867b4fdddb1bdbf84cc28cb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/30885182c981ab175d4d034db0f6f469898070ab", - "reference": "30885182c981ab175d4d034db0f6f469898070ab", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/ea208ce43cbb04af6867b4fdddb1bdbf84cc28cb", + "reference": "ea208ce43cbb04af6867b4fdddb1bdbf84cc28cb", "shasum": "" }, "require": { @@ -3340,7 +3342,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.23-dev" + "dev-main": "1.28-dev" }, "thanks": { "name": "symfony/polyfill", @@ -3378,7 +3380,7 @@ "portable" ], "support": { - "source": "https://github.com/symfony/polyfill-ctype/tree/v1.24.0" + "source": "https://github.com/symfony/polyfill-ctype/tree/v1.28.0" }, "funding": [ { @@ -3394,20 +3396,20 @@ "type": "tidelift" } ], - "time": "2021-10-20T20:35:02+00:00" + "time": "2023-01-26T09:26:14+00:00" }, { "name": "symfony/polyfill-intl-grapheme", - "version": "v1.24.0", + "version": "v1.28.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-grapheme.git", - "reference": "81b86b50cf841a64252b439e738e97f4a34e2783" + "reference": "875e90aeea2777b6f135677f618529449334a612" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/81b86b50cf841a64252b439e738e97f4a34e2783", - "reference": "81b86b50cf841a64252b439e738e97f4a34e2783", + "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/875e90aeea2777b6f135677f618529449334a612", + "reference": "875e90aeea2777b6f135677f618529449334a612", "shasum": "" }, "require": { @@ -3419,7 +3421,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.23-dev" + "dev-main": "1.28-dev" }, "thanks": { "name": "symfony/polyfill", @@ -3459,7 +3461,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.24.0" + "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.28.0" }, "funding": [ { @@ -3475,20 +3477,20 @@ "type": "tidelift" } ], - "time": "2021-11-23T21:10:46+00:00" + "time": "2023-01-26T09:26:14+00:00" }, { "name": "symfony/polyfill-intl-normalizer", - "version": "v1.24.0", + "version": "v1.28.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-normalizer.git", - "reference": "8590a5f561694770bdcd3f9b5c69dde6945028e8" + "reference": "8c4ad05dd0120b6a53c1ca374dca2ad0a1c4ed92" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/8590a5f561694770bdcd3f9b5c69dde6945028e8", - "reference": "8590a5f561694770bdcd3f9b5c69dde6945028e8", + "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/8c4ad05dd0120b6a53c1ca374dca2ad0a1c4ed92", + "reference": "8c4ad05dd0120b6a53c1ca374dca2ad0a1c4ed92", "shasum": "" }, "require": { @@ -3500,7 +3502,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.23-dev" + "dev-main": "1.28-dev" }, "thanks": { "name": "symfony/polyfill", @@ -3543,7 +3545,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.24.0" + "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.28.0" }, "funding": [ { @@ -3559,20 +3561,20 @@ "type": "tidelift" } ], - "time": "2021-02-19T12:13:01+00:00" + "time": "2023-01-26T09:26:14+00:00" }, { "name": "symfony/polyfill-mbstring", - "version": "v1.24.0", + "version": "v1.28.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "0abb51d2f102e00a4eefcf46ba7fec406d245825" + "reference": "42292d99c55abe617799667f454222c54c60e229" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/0abb51d2f102e00a4eefcf46ba7fec406d245825", - "reference": "0abb51d2f102e00a4eefcf46ba7fec406d245825", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/42292d99c55abe617799667f454222c54c60e229", + "reference": "42292d99c55abe617799667f454222c54c60e229", "shasum": "" }, "require": { @@ -3587,7 +3589,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.23-dev" + "dev-main": "1.28-dev" }, "thanks": { "name": "symfony/polyfill", @@ -3626,86 +3628,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.24.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-11-30T18:21:41+00:00" - }, - { - "name": "symfony/polyfill-php73", - "version": "v1.24.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-php73.git", - "reference": "cc5db0e22b3cb4111010e48785a97f670b350ca5" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/cc5db0e22b3cb4111010e48785a97f670b350ca5", - "reference": "cc5db0e22b3cb4111010e48785a97f670b350ca5", - "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": { - "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.24.0" + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.28.0" }, "funding": [ { @@ -3721,20 +3644,20 @@ "type": "tidelift" } ], - "time": "2021-06-05T21:20:04+00:00" + "time": "2023-07-28T09:04:16+00:00" }, { "name": "symfony/polyfill-php80", - "version": "v1.24.0", + "version": "v1.28.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php80.git", - "reference": "57b712b08eddb97c762a8caa32c84e037892d2e9" + "reference": "6caa57379c4aec19c0a12a38b59b26487dcfe4b5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/57b712b08eddb97c762a8caa32c84e037892d2e9", - "reference": "57b712b08eddb97c762a8caa32c84e037892d2e9", + "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/6caa57379c4aec19c0a12a38b59b26487dcfe4b5", + "reference": "6caa57379c4aec19c0a12a38b59b26487dcfe4b5", "shasum": "" }, "require": { @@ -3743,7 +3666,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.23-dev" + "dev-main": "1.28-dev" }, "thanks": { "name": "symfony/polyfill", @@ -3788,7 +3711,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php80/tree/v1.24.0" + "source": "https://github.com/symfony/polyfill-php80/tree/v1.28.0" }, "funding": [ { @@ -3804,37 +3727,33 @@ "type": "tidelift" } ], - "time": "2021-09-13T13:58:33+00:00" + "time": "2023-01-26T09:26:14+00:00" }, { "name": "symfony/service-contracts", - "version": "v2.5.0", + "version": "v3.4.1", "source": { "type": "git", "url": "https://github.com/symfony/service-contracts.git", - "reference": "1ab11b933cd6bc5464b08e81e2c5b07dec58b0fc" + "reference": "fe07cbc8d837f60caf7018068e350cc5163681a0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/service-contracts/zipball/1ab11b933cd6bc5464b08e81e2c5b07dec58b0fc", - "reference": "1ab11b933cd6bc5464b08e81e2c5b07dec58b0fc", + "url": "https://api.github.com/repos/symfony/service-contracts/zipball/fe07cbc8d837f60caf7018068e350cc5163681a0", + "reference": "fe07cbc8d837f60caf7018068e350cc5163681a0", "shasum": "" }, "require": { - "php": ">=7.2.5", - "psr/container": "^1.1", - "symfony/deprecation-contracts": "^2.1" + "php": ">=8.1", + "psr/container": "^1.1|^2.0" }, "conflict": { "ext-psr": "<1.1|>=2" }, - "suggest": { - "symfony/service-implementation": "" - }, "type": "library", "extra": { "branch-alias": { - "dev-main": "2.5-dev" + "dev-main": "3.4-dev" }, "thanks": { "name": "symfony/contracts", @@ -3844,7 +3763,10 @@ "autoload": { "psr-4": { "Symfony\\Contracts\\Service\\": "" - } + }, + "exclude-from-classmap": [ + "/Test/" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -3871,7 +3793,7 @@ "standards" ], "support": { - "source": "https://github.com/symfony/service-contracts/tree/v2.5.0" + "source": "https://github.com/symfony/service-contracts/tree/v3.4.1" }, "funding": [ { @@ -3887,38 +3809,38 @@ "type": "tidelift" } ], - "time": "2021-11-04T16:48:04+00:00" + "time": "2023-12-26T14:02:43+00:00" }, { "name": "symfony/string", - "version": "v5.4.3", + "version": "v6.4.3", "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "92043b7d8383e48104e411bc9434b260dbeb5a10" + "reference": "7a14736fb179876575464e4658fce0c304e8c15b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/92043b7d8383e48104e411bc9434b260dbeb5a10", - "reference": "92043b7d8383e48104e411bc9434b260dbeb5a10", + "url": "https://api.github.com/repos/symfony/string/zipball/7a14736fb179876575464e4658fce0c304e8c15b", + "reference": "7a14736fb179876575464e4658fce0c304e8c15b", "shasum": "" }, "require": { - "php": ">=7.2.5", + "php": ">=8.1", "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.5" }, "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|^7.0", + "symfony/http-client": "^5.4|^6.0|^7.0", + "symfony/intl": "^6.2|^7.0", + "symfony/translation-contracts": "^2.5|^3.0", + "symfony/var-exporter": "^5.4|^6.0|^7.0" }, "type": "library", "autoload": { @@ -3957,7 +3879,7 @@ "utf8" ], "support": { - "source": "https://github.com/symfony/string/tree/v5.4.3" + "source": "https://github.com/symfony/string/tree/v6.4.3" }, "funding": [ { @@ -3973,20 +3895,20 @@ "type": "tidelift" } ], - "time": "2022-01-02T09:53:40+00:00" + "time": "2024-01-25T09:26:29+00:00" }, { "name": "theseer/tokenizer", - "version": "1.2.1", + "version": "1.2.2", "source": { "type": "git", "url": "https://github.com/theseer/tokenizer.git", - "reference": "34a41e998c2183e22995f158c581e7b5e755ab9e" + "reference": "b2ad5003ca10d4ee50a12da31de12a5774ba6b96" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/theseer/tokenizer/zipball/34a41e998c2183e22995f158c581e7b5e755ab9e", - "reference": "34a41e998c2183e22995f158c581e7b5e755ab9e", + "url": "https://api.github.com/repos/theseer/tokenizer/zipball/b2ad5003ca10d4ee50a12da31de12a5774ba6b96", + "reference": "b2ad5003ca10d4ee50a12da31de12a5774ba6b96", "shasum": "" }, "require": { @@ -4015,7 +3937,7 @@ "description": "A small library for converting tokenized PHP source code into XML and potentially other formats", "support": { "issues": "https://github.com/theseer/tokenizer/issues", - "source": "https://github.com/theseer/tokenizer/tree/1.2.1" + "source": "https://github.com/theseer/tokenizer/tree/1.2.2" }, "funding": [ { @@ -4023,20 +3945,20 @@ "type": "github" } ], - "time": "2021-07-28T10:34:58+00:00" + "time": "2023-11-20T00:12:19+00:00" }, { "name": "vimeo/psalm", - "version": "4.21.0", + "version": "4.30.0", "source": { "type": "git", "url": "https://github.com/vimeo/psalm.git", - "reference": "d8bec4c7aaee111a532daec32fb09de5687053d1" + "reference": "d0bc6e25d89f649e4f36a534f330f8bb4643dd69" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/vimeo/psalm/zipball/d8bec4c7aaee111a532daec32fb09de5687053d1", - "reference": "d8bec4c7aaee111a532daec32fb09de5687053d1", + "url": "https://api.github.com/repos/vimeo/psalm/zipball/d0bc6e25d89f649e4f36a534f330f8bb4643dd69", + "reference": "d0bc6e25d89f649e4f36a534f330f8bb4643dd69", "shasum": "" }, "require": { @@ -4061,6 +3983,7 @@ "php": "^7.1|^8", "sebastian/diff": "^3.0 || ^4.0", "symfony/console": "^3.4.17 || ^4.1.6 || ^5.0 || ^6.0", + "symfony/polyfill-php80": "^1.25", "webmozart/path-util": "^2.3" }, "provide": { @@ -4074,6 +3997,7 @@ "phpdocumentor/reflection-docblock": "^5", "phpmyadmin/sql-parser": "5.1.0||dev-master", "phpspec/prophecy": ">=1.9.0", + "phpstan/phpdoc-parser": "1.2.* || 1.6.4", "phpunit/phpunit": "^9.0", "psalm/plugin-phpunit": "^0.16", "slevomat/coding-standard": "^7.0", @@ -4127,27 +4051,82 @@ ], "support": { "issues": "https://github.com/vimeo/psalm/issues", - "source": "https://github.com/vimeo/psalm/tree/4.21.0" + "source": "https://github.com/vimeo/psalm/tree/4.30.0" }, - "time": "2022-02-18T04:34:15+00:00" + "time": "2022-11-06T20:37:08+00:00" + }, + { + "name": "webimpress/coding-standard", + "version": "1.3.2", + "source": { + "type": "git", + "url": "https://github.com/webimpress/coding-standard.git", + "reference": "710f71ac95d36d931e76b47132b599c39abfab11" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/webimpress/coding-standard/zipball/710f71ac95d36d931e76b47132b599c39abfab11", + "reference": "710f71ac95d36d931e76b47132b599c39abfab11", + "shasum": "" + }, + "require": { + "php": "^7.3 || ^8.0", + "squizlabs/php_codesniffer": "^3.7.2" + }, + "require-dev": { + "phpunit/phpunit": "^9.6.15" + }, + "type": "phpcodesniffer-standard", + "extra": { + "dev-master": "1.2.x-dev", + "dev-develop": "1.3.x-dev" + }, + "autoload": { + "psr-4": { + "WebimpressCodingStandard\\": "src/WebimpressCodingStandard/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-2-Clause" + ], + "description": "Webimpress Coding Standard", + "keywords": [ + "Coding Standard", + "PSR-2", + "phpcs", + "psr-12", + "webimpress" + ], + "support": { + "issues": "https://github.com/webimpress/coding-standard/issues", + "source": "https://github.com/webimpress/coding-standard/tree/1.3.2" + }, + "funding": [ + { + "url": "https://github.com/michalbundyra", + "type": "github" + } + ], + "time": "2023-12-18T07:25:41+00:00" }, { "name": "webmozart/assert", - "version": "1.10.0", + "version": "1.11.0", "source": { "type": "git", "url": "https://github.com/webmozarts/assert.git", - "reference": "6964c76c7804814a842473e0c8fd15bab0f18e25" + "reference": "11cb2199493b2f8a3b53e7f19068fc6aac760991" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/webmozarts/assert/zipball/6964c76c7804814a842473e0c8fd15bab0f18e25", - "reference": "6964c76c7804814a842473e0c8fd15bab0f18e25", + "url": "https://api.github.com/repos/webmozarts/assert/zipball/11cb2199493b2f8a3b53e7f19068fc6aac760991", + "reference": "11cb2199493b2f8a3b53e7f19068fc6aac760991", "shasum": "" }, "require": { - "php": "^7.2 || ^8.0", - "symfony/polyfill-ctype": "^1.8" + "ext-ctype": "*", + "php": "^7.2 || ^8.0" }, "conflict": { "phpstan/phpstan": "<0.12.20", @@ -4185,9 +4164,9 @@ ], "support": { "issues": "https://github.com/webmozarts/assert/issues", - "source": "https://github.com/webmozarts/assert/tree/1.10.0" + "source": "https://github.com/webmozarts/assert/tree/1.11.0" }, - "time": "2021-03-09T10:59:23+00:00" + "time": "2022-06-03T18:03:27+00:00" }, { "name": "webmozart/path-util", @@ -4247,11 +4226,11 @@ "prefer-stable": false, "prefer-lowest": false, "platform": { - "php": "~8.0.0 || ~8.1.0 || ~8.2.0" + "php": "~8.1.0 || ~8.2.0 || ~8.3.0" }, "platform-dev": [], "platform-overrides": { - "php": "8.0.99" + "php": "8.1.99" }, - "plugin-api-version": "2.3.0" + "plugin-api-version": "2.6.0" } diff --git a/phpcs.xml b/phpcs.xml index 79556cb6..f8fcacb7 100644 --- a/phpcs.xml +++ b/phpcs.xml @@ -1,6 +1,12 @@ - - + + + + + src @@ -9,4 +15,14 @@ /test/TestAsset/ReflectionTestClass.php + + test/ReflectionTest.php + + + + + src/Client.php + src/Server.php + diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 3ec6becf..cf492d6d 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -1,7 +1,8 @@ diff --git a/psalm-baseline.xml b/psalm-baseline.xml index f0b8be48..07561da2 100644 --- a/psalm-baseline.xml +++ b/psalm-baseline.xml @@ -1,5 +1,5 @@ - + $class @@ -15,7 +15,7 @@ Definition - new $class + new $class() $method @@ -42,13 +42,13 @@ call_user_func_array($function, $params) - new $class + new $class() - \Laminas\Server\Server - \Laminas\Server\Server + Server + Server ! is_string($filename) @@ -62,8 +62,7 @@ - - $method instanceof Method\Definition + null === $name @@ -101,9 +100,6 @@ is_object($class) - - $class - $key @@ -116,15 +112,10 @@ $method $type - - (string) $function - - + ! is_object($object) - $callback instanceof Callback - $prototype instanceof Prototype $prototype @@ -145,10 +136,6 @@ $callback $name - - (string) $methodHelp - (string) $name - @@ -160,12 +147,6 @@ $name - - (bool) $flag - (string) $description - (string) $name - (string) $type - @@ -186,7 +167,7 @@ $value - null|\Laminas\Server\Method\Parameter + null|Parameter getType @@ -194,9 +175,6 @@ $this->parameters[$index] - - (string) $parameter - @@ -212,36 +190,17 @@ ! is_string($namespace) is_string($string) - - $paramDesc - $returnDesc - $sigParams - $sigParamsDepth - - - $param - $returnDesc + $tmp $type array_shift($signature) - isset($this->paramDesc[$key]) ? $this->paramDesc[$key] : null - - $this->sigParams[$level] - - + $name - $param - $paramDesc[] - $paramTypesTmp[] - $paramTypes[] - $returnDesc - $return[] $root $serializable[] $tmp $type - $type $value $value $value @@ -255,8 +214,9 @@ Prototype[] string[] - - isset($this->paramDesc[$key]) ? $this->paramDesc[$key] : null + + $this->paramDesc[$key] ?? null + $returnDesc $class @@ -265,12 +225,10 @@ $this - - getDescription - getDescription - getTypes - getTypes - + + $returnTag + $returnTag + @@ -288,35 +246,19 @@ hasChildren hasChildren - - null - + + $parent + new static($value, $this) - - $param instanceof ReflectionParameter - - - \Laminas\Server\Reflection\ReflectionReturnValue - string - - - getType - - + $this->return - $this->return->getType() - - - $this->return - - $this->return $this->return - + @@ -328,9 +270,6 @@ $namespace - - null - @@ -386,9 +325,6 @@ $position - - (int) $index - @@ -400,11 +336,6 @@ $type - - - $argv - - $this->createMock(Server::class) @@ -480,11 +411,6 @@ $child2grand2great2 - - - '\Laminas\Server\Reflection' - - 1 @@ -495,33 +421,25 @@ var_export($param, 1) - - $var1 - $var1 - $params - - - '\Laminas\Server\Reflection\ReflectionParameter' - - testMethod + + + ReflectionMethodNode + + 'string' 'string' - - false - false - diff --git a/renovate.json b/renovate.json new file mode 100644 index 00000000..060b1d1a --- /dev/null +++ b/renovate.json @@ -0,0 +1,6 @@ +{ + "$schema": "https://docs.renovatebot.com/renovate-schema.json", + "extends": [ + "local>laminas/.github:renovate-config" + ] +} diff --git a/src/AbstractServer.php b/src/AbstractServer.php index 5961e812..2993d0d1 100644 --- a/src/AbstractServer.php +++ b/src/AbstractServer.php @@ -2,34 +2,30 @@ /** * @see https://github.com/laminas/laminas-server for the canonical source repository - * @copyright https://github.com/laminas/laminas-server/blob/master/COPYRIGHT.md - * @license https://github.com/laminas/laminas-server/blob/master/LICENSE.md New BSD License */ namespace Laminas\Server; use ReflectionClass; +use function call_user_func_array; +use function is_object; + /** * Abstract Server implementation */ abstract class AbstractServer implements Server { - /** - * @var bool Flag; whether or not overwriting existing methods is allowed - */ + /** @var bool Flag; whether or not overwriting existing methods is allowed */ protected $overwriteExistingMethods = false; - /** - * @var Definition - */ + /** @var Definition */ protected $table; /** * Constructor * * Setup server description - * */ public function __construct() { @@ -52,7 +48,6 @@ public function getFunctions() /** * Build callback for method signature * - * @param Reflection\AbstractFunction $reflection * @return Method\Callback */ protected function buildCallback(Reflection\AbstractFunction $reflection) @@ -74,7 +69,7 @@ protected function buildCallback(Reflection\AbstractFunction $reflection) * * @deprecated Since 2.7.0; method will be removed in 3.0, use * buildCallback() instead. - * @param Reflection\AbstractFunction $reflection + * * @return Method\Callback */ // @codingStandardsIgnoreStart @@ -87,16 +82,15 @@ protected function _buildCallback(Reflection\AbstractFunction $reflection) /** * Build a method signature * - * @param Reflection\AbstractFunction $reflection * @param null|string|object $class * @return Method\Definition - * @throws Exception\RuntimeException on duplicate entry + * @throws Exception\RuntimeException On duplicate entry. */ final protected function buildSignature(Reflection\AbstractFunction $reflection, $class = null) { - $ns = $reflection->getNamespace(); - $name = $reflection->getName(); - $method = empty($ns) ? $name : $ns . '.' . $name; + $ns = $reflection->getNamespace(); + $name = $reflection->getName(); + $method = empty($ns) ? $name : $ns . '.' . $name; if (! $this->overwriteExistingMethods && $this->table->hasMethod($method)) { throw new Exception\RuntimeException('Duplicate method registered: ' . $method); @@ -136,7 +130,7 @@ final protected function buildSignature(Reflection\AbstractFunction $reflection, * * @deprecated Since 2.7.0; method will be removed in 3.0, use * buildSignature() instead. - * @param Reflection\AbstractFunction $reflection + * * @param null|string|object $class * @return Method\Definition * @throws Exception\RuntimeException on duplicate entry @@ -153,7 +147,7 @@ protected function _buildSignature(Reflection\AbstractFunction $reflection, $cla * * @deprecated Since 2.7.0; method will be renamed to remove underscore * prefix in 3.0. - * @param Method\Definition $invokable + * * @param array $params * @return mixed */ @@ -164,7 +158,7 @@ protected function _dispatch(Method\Definition $invokable, array $params) $callback = $invokable->getCallback(); $type = $callback->getType(); - if ('function' == $type) { + if ('function' === $type) { $function = $callback->getFunction(); return call_user_func_array($function, $params); } @@ -172,7 +166,7 @@ protected function _dispatch(Method\Definition $invokable, array $params) $class = $callback->getClass(); $method = $callback->getMethod(); - if ('static' == $type) { + if ('static' === $type) { return call_user_func_array([$class, $method], $params); } @@ -183,7 +177,7 @@ protected function _dispatch(Method\Definition $invokable, array $params) $reflection = new ReflectionClass($class); $object = $reflection->newInstanceArgs($invokeArgs); } else { - $object = new $class; + $object = new $class(); } } return call_user_func_array([$object, $method], $params); diff --git a/src/Cache.php b/src/Cache.php index 85432568..702198ca 100644 --- a/src/Cache.php +++ b/src/Cache.php @@ -2,22 +2,34 @@ /** * @see https://github.com/laminas/laminas-server for the canonical source repository - * @copyright https://github.com/laminas/laminas-server/blob/master/COPYRIGHT.md - * @license https://github.com/laminas/laminas-server/blob/master/LICENSE.md New BSD License */ namespace Laminas\Server; +use Laminas\Server\Server; use Laminas\Stdlib\ErrorHandler; +use function array_keys; +use function dirname; +use function file_exists; +use function file_get_contents; +use function file_put_contents; +use function in_array; +use function is_readable; +use function is_string; +use function is_writable; +use function serialize; +use function unlink; +use function unserialize; + +use const E_NOTICE; + /** * \Laminas\Server\Cache: cache server definitions */ class Cache { - /** - * @var array Methods to skip when caching server - */ + /** @var array Methods to skip when caching server */ protected static $skipMethods = []; /** @@ -30,7 +42,6 @@ class Cache * on success. * * @param string $filename - * @param \Laminas\Server\Server $server * @return bool */ public static function save($filename, Server $server) @@ -79,7 +90,6 @@ public static function save($filename, Server $server) * * * @param string $filename - * @param \Laminas\Server\Server $server * @return bool */ public static function get($filename, Server $server) diff --git a/src/Client.php b/src/Client.php index d1ff252c..b69fd475 100644 --- a/src/Client.php +++ b/src/Client.php @@ -2,14 +2,13 @@ /** * @see https://github.com/laminas/laminas-server for the canonical source repository - * @copyright https://github.com/laminas/laminas-server/blob/master/COPYRIGHT.md - * @license https://github.com/laminas/laminas-server/blob/master/LICENSE.md New BSD License */ namespace Laminas\Server; /** * Client Interface + * * @deprecated Since 2.9.0; Client is replaced by ClientInterface and will be removed in 3.0. */ interface Client diff --git a/src/ClientInterface.php b/src/ClientInterface.php index 93bae1bf..75a1f43b 100644 --- a/src/ClientInterface.php +++ b/src/ClientInterface.php @@ -2,8 +2,6 @@ /** * @see https://github.com/laminas/laminas-server for the canonical source repository - * @copyright https://github.com/laminas/laminas-server/blob/master/COPYRIGHT.md - * @license https://github.com/laminas/laminas-server/blob/master/LICENSE.md New BSD License */ namespace Laminas\Server; diff --git a/src/Definition.php b/src/Definition.php index 2484e3c2..ac6989d7 100644 --- a/src/Definition.php +++ b/src/Definition.php @@ -2,29 +2,34 @@ /** * @see https://github.com/laminas/laminas-server for the canonical source repository - * @copyright https://github.com/laminas/laminas-server/blob/master/COPYRIGHT.md - * @license https://github.com/laminas/laminas-server/blob/master/LICENSE.md New BSD License */ namespace Laminas\Server; use Countable; use Iterator; +use Laminas\Server\Exception\InvalidArgumentException; use ReturnTypeWillChange; +use function array_key_exists; +use function count; +use function current; +use function is_array; +use function is_numeric; +use function key; +use function next; +use function reset; +use function sprintf; + /** * Server methods metadata */ class Definition implements Countable, Iterator { - /** - * @var array Array of \Laminas\Server\Method\Definition objects - */ + /** @var array Array of \Laminas\Server\Method\Definition objects */ protected $methods = []; - /** - * @var bool Whether or not overwriting existing methods is allowed - */ + /** @var bool Whether or not overwriting existing methods is allowed */ protected $overwriteExistingMethods = false; /** @@ -43,7 +48,7 @@ public function __construct($methods = null) * Set flag indicating whether or not overwriting existing methods is allowed * * @param mixed $flag - * @return \Laminas\Server\Definition + * @return Definition */ public function setOverwriteExistingMethods($flag) { @@ -56,15 +61,15 @@ public function setOverwriteExistingMethods($flag) * * @param array|\Laminas\Server\Method\Definition $method * @param null|string $name - * @return \Laminas\Server\Definition - * @throws \Laminas\Server\Exception\InvalidArgumentException if duplicate or invalid method provided + * @return Definition + * @throws InvalidArgumentException If duplicate or invalid method provided. */ public function addMethod($method, $name = null) { if (is_array($method)) { $method = new Method\Definition($method); } elseif (! $method instanceof Method\Definition) { - throw new Exception\InvalidArgumentException('Invalid method provided'); + throw new InvalidArgumentException('Invalid method provided'); } if (is_numeric($name)) { @@ -76,11 +81,11 @@ public function addMethod($method, $name = null) $name = $method->getName(); } if (null === $name) { - throw new Exception\InvalidArgumentException('No method name provided'); + throw new InvalidArgumentException('No method name provided'); } if (! $this->overwriteExistingMethods && array_key_exists($name, $this->methods)) { - throw new Exception\InvalidArgumentException(sprintf('Method by name of "%s" already exists', $name)); + throw new InvalidArgumentException(sprintf('Method by name of "%s" already exists', $name)); } $this->methods[$name] = $method; return $this; @@ -90,7 +95,7 @@ public function addMethod($method, $name = null) * Add multiple methods * * @param array $methods Array of \Laminas\Server\Method\Definition objects or arrays - * @return \Laminas\Server\Definition + * @return Definition */ public function addMethods(array $methods) { @@ -104,7 +109,7 @@ public function addMethods(array $methods) * Set all methods at once (overwrite) * * @param array $methods Array of \Laminas\Server\Method\Definition objects or arrays - * @return \Laminas\Server\Definition + * @return Definition */ public function setMethods(array $methods) { @@ -152,7 +157,7 @@ public function getMethods() * Remove a method definition * * @param string $method - * @return \Laminas\Server\Definition + * @return Definition */ public function removeMethod($method) { @@ -165,7 +170,7 @@ public function removeMethod($method) /** * Clear all method definitions * - * @return \Laminas\Server\Definition + * @return Definition */ public function clearMethods() { diff --git a/src/Exception/BadMethodCallException.php b/src/Exception/BadMethodCallException.php index 18959d2f..c8f42f70 100644 --- a/src/Exception/BadMethodCallException.php +++ b/src/Exception/BadMethodCallException.php @@ -2,8 +2,6 @@ /** * @see https://github.com/laminas/laminas-server for the canonical source repository - * @copyright https://github.com/laminas/laminas-server/blob/master/COPYRIGHT.md - * @license https://github.com/laminas/laminas-server/blob/master/LICENSE.md New BSD License */ namespace Laminas\Server\Exception; diff --git a/src/Exception/ExceptionInterface.php b/src/Exception/ExceptionInterface.php index de0a26e3..66479616 100644 --- a/src/Exception/ExceptionInterface.php +++ b/src/Exception/ExceptionInterface.php @@ -2,8 +2,6 @@ /** * @see https://github.com/laminas/laminas-server for the canonical source repository - * @copyright https://github.com/laminas/laminas-server/blob/master/COPYRIGHT.md - * @license https://github.com/laminas/laminas-server/blob/master/LICENSE.md New BSD License */ namespace Laminas\Server\Exception; diff --git a/src/Exception/InvalidArgumentException.php b/src/Exception/InvalidArgumentException.php index 1247fa23..b5b6ad75 100644 --- a/src/Exception/InvalidArgumentException.php +++ b/src/Exception/InvalidArgumentException.php @@ -2,8 +2,6 @@ /** * @see https://github.com/laminas/laminas-server for the canonical source repository - * @copyright https://github.com/laminas/laminas-server/blob/master/COPYRIGHT.md - * @license https://github.com/laminas/laminas-server/blob/master/LICENSE.md New BSD License */ namespace Laminas\Server\Exception; diff --git a/src/Exception/RuntimeException.php b/src/Exception/RuntimeException.php index cfd354ab..efd5f226 100644 --- a/src/Exception/RuntimeException.php +++ b/src/Exception/RuntimeException.php @@ -2,8 +2,6 @@ /** * @see https://github.com/laminas/laminas-server for the canonical source repository - * @copyright https://github.com/laminas/laminas-server/blob/master/COPYRIGHT.md - * @license https://github.com/laminas/laminas-server/blob/master/LICENSE.md New BSD License */ namespace Laminas\Server\Exception; diff --git a/src/Method/Callback.php b/src/Method/Callback.php index 06dad2c5..86a22901 100644 --- a/src/Method/Callback.php +++ b/src/Method/Callback.php @@ -2,42 +2,37 @@ /** * @see https://github.com/laminas/laminas-server for the canonical source repository - * @copyright https://github.com/laminas/laminas-server/blob/master/COPYRIGHT.md - * @license https://github.com/laminas/laminas-server/blob/master/LICENSE.md New BSD License */ namespace Laminas\Server\Method; use Laminas\Server; +use function in_array; +use function is_array; +use function is_object; +use function method_exists; +use function sprintf; +use function ucfirst; + /** * Method callback metadata */ class Callback { - /** - * @var string Class name for class method callback - */ + /** @var string Class name for class method callback */ protected $class; - /** - * @var string|callable Function name or callable for function callback - */ + /** @var string|callable Function name or callable for function callback */ protected $function; - /** - * @var string Method name for class method callback - */ + /** @var string Method name for class method callback */ protected $method; - /** - * @var string Callback type - */ + /** @var string Callback type */ protected $type; - /** - * @var array Valid callback types - */ + /** @var array Valid callback types */ protected $types = ['function', 'static', 'instance']; /** @@ -56,7 +51,7 @@ public function __construct($options = null) * Set object state from array of options * * @param array $options - * @return \Laminas\Server\Method\Callback + * @return Callback */ public function setOptions(array $options) { @@ -73,12 +68,12 @@ public function setOptions(array $options) * Set callback class * * @param string $class - * @return \Laminas\Server\Method\Callback + * @return Callback */ public function setClass($class) { if (is_object($class)) { - $class = get_class($class); + $class = $class::class; } $this->class = $class; return $this; @@ -98,7 +93,7 @@ public function getClass() * Set callback function * * @param string|callable $function - * @return \Laminas\Server\Method\Callback + * @return Callback */ public function setFunction($function) { @@ -121,7 +116,7 @@ public function getFunction() * Set callback class method * * @param string $method - * @return \Laminas\Server\Method\Callback + * @return Callback */ public function setMethod($method) { @@ -143,7 +138,7 @@ public function getMethod() * Set callback type * * @param string $type - * @return \Laminas\Server\Method\Callback + * @return Callback * @throws Server\Exception\InvalidArgumentException */ public function setType($type) @@ -176,11 +171,11 @@ public function getType() */ public function toArray() { - $type = $this->getType(); + $type = $this->getType(); $array = [ 'type' => $type, ]; - if ('function' == $type) { + if ('function' === $type) { $array['function'] = $this->getFunction(); } else { $array['class'] = $this->getClass(); diff --git a/src/Method/Definition.php b/src/Method/Definition.php index fa431982..96126889 100644 --- a/src/Method/Definition.php +++ b/src/Method/Definition.php @@ -2,47 +2,41 @@ /** * @see https://github.com/laminas/laminas-server for the canonical source repository - * @copyright https://github.com/laminas/laminas-server/blob/master/COPYRIGHT.md - * @license https://github.com/laminas/laminas-server/blob/master/LICENSE.md New BSD License */ namespace Laminas\Server\Method; use Laminas\Server; +use Laminas\Server\Method\Callback; +use Laminas\Server\Method\Prototype; + +use function is_array; +use function is_object; +use function method_exists; +use function sprintf; +use function ucfirst; /** * Method definition metadata */ class Definition { - /** - * @var \Laminas\Server\Method\Callback - */ + /** @var Callback */ protected $callback; - /** - * @var array - */ + /** @var array */ protected $invokeArguments = []; - /** - * @var string - */ + /** @var string */ protected $methodHelp = ''; - /** - * @var string - */ + /** @var string */ protected $name; - /** - * @var null|object - */ + /** @var null|object */ protected $object; - /** - * @var array Array of \Laminas\Server\Method\Prototype objects - */ + /** @var array Array of \Laminas\Server\Method\Prototype objects */ protected $prototypes = []; /** @@ -61,7 +55,7 @@ public function __construct($options = null) * Set object state from options * * @param array $options - * @return \Laminas\Server\Method\Definition + * @return Definition */ public function setOptions(array $options) { @@ -78,7 +72,7 @@ public function setOptions(array $options) * Set method name * * @param string $name - * @return \Laminas\Server\Method\Definition + * @return Definition */ public function setName($name) { @@ -99,9 +93,9 @@ public function getName() /** * Set method callback * - * @param array|\Laminas\Server\Method\Callback $callback + * @param array|Callback $callback * @throws Server\Exception\InvalidArgumentException - * @return \Laminas\Server\Method\Definition + * @return Definition */ public function setCallback($callback) { @@ -117,7 +111,7 @@ public function setCallback($callback) /** * Get method callback * - * @return \Laminas\Server\Method\Callback + * @return Callback */ public function getCallback() { @@ -127,9 +121,9 @@ public function getCallback() /** * Add prototype to method definition * - * @param array|\Laminas\Server\Method\Prototype $prototype + * @param array|Prototype $prototype * @throws Server\Exception\InvalidArgumentException - * @return \Laminas\Server\Method\Definition + * @return Definition */ public function addPrototype($prototype) { @@ -146,7 +140,7 @@ public function addPrototype($prototype) * Add multiple prototypes at once * * @param array $prototypes Array of \Laminas\Server\Method\Prototype objects or arrays - * @return \Laminas\Server\Method\Definition + * @return Definition */ public function addPrototypes(array $prototypes) { @@ -160,7 +154,7 @@ public function addPrototypes(array $prototypes) * Set all prototypes at once (overwrites) * * @param array $prototypes Array of \Laminas\Server\Method\Prototype objects or arrays - * @return \Laminas\Server\Method\Definition + * @return Definition */ public function setPrototypes(array $prototypes) { @@ -183,7 +177,7 @@ public function getPrototypes() * Set method help * * @param string $methodHelp - * @return \Laminas\Server\Method\Definition + * @return Definition */ public function setMethodHelp($methodHelp) { @@ -206,7 +200,7 @@ public function getMethodHelp() * * @param object $object * @throws Server\Exception\InvalidArgumentException - * @return \Laminas\Server\Method\Definition + * @return Definition */ public function setObject($object) { @@ -234,7 +228,7 @@ public function getObject() * Set invoke arguments * * @param array $invokeArguments - * @return \Laminas\Server\Method\Definition + * @return Definition */ public function setInvokeArguments(array $invokeArguments) { diff --git a/src/Method/Parameter.php b/src/Method/Parameter.php index cfd2125c..3308fd00 100644 --- a/src/Method/Parameter.php +++ b/src/Method/Parameter.php @@ -2,12 +2,14 @@ /** * @see https://github.com/laminas/laminas-server for the canonical source repository - * @copyright https://github.com/laminas/laminas-server/blob/master/COPYRIGHT.md - * @license https://github.com/laminas/laminas-server/blob/master/LICENSE.md New BSD License */ namespace Laminas\Server\Method; +use function is_array; +use function method_exists; +use function ucfirst; + /** * Method parameter metadata */ @@ -64,7 +66,7 @@ public function __construct($options = null) * Set object state from array of options * * @param array $options - * @return \Laminas\Server\Method\Parameter + * @return Parameter */ public function setOptions(array $options) { @@ -81,7 +83,7 @@ public function setOptions(array $options) * Set default value * * @param mixed $defaultValue - * @return \Laminas\Server\Method\Parameter + * @return Parameter */ public function setDefaultValue($defaultValue) { @@ -103,7 +105,7 @@ public function getDefaultValue() * Set description * * @param mixed $description - * @return \Laminas\Server\Method\Parameter + * @return Parameter */ public function setDescription($description) { @@ -125,7 +127,7 @@ public function getDescription() * Set name * * @param mixed $name - * @return \Laminas\Server\Method\Parameter + * @return Parameter */ public function setName($name) { @@ -147,7 +149,7 @@ public function getName() * Set optional flag * * @param mixed $flag - * @return \Laminas\Server\Method\Parameter + * @return Parameter */ public function setOptional($flag) { @@ -169,7 +171,7 @@ public function isOptional() * Set parameter type * * @param mixed $type - * @return \Laminas\Server\Method\Parameter + * @return Parameter */ public function setType($type) { diff --git a/src/Method/Prototype.php b/src/Method/Prototype.php index ac7e7916..d582db48 100644 --- a/src/Method/Prototype.php +++ b/src/Method/Prototype.php @@ -2,30 +2,32 @@ /** * @see https://github.com/laminas/laminas-server for the canonical source repository - * @copyright https://github.com/laminas/laminas-server/blob/master/COPYRIGHT.md - * @license https://github.com/laminas/laminas-server/blob/master/LICENSE.md New BSD License */ namespace Laminas\Server\Method; +use Laminas\Server\Method\Parameter; + +use function array_key_exists; +use function count; +use function is_array; +use function is_numeric; +use function is_string; +use function method_exists; +use function ucfirst; + /** * Method prototype metadata */ class Prototype { - /** - * @var string Return type - */ + /** @var string Return type */ protected $returnType = 'void'; - /** - * @var array Map parameter names to parameter index - */ + /** @var array Map parameter names to parameter index */ protected $parameterNameMap = []; - /** - * @var array Method parameters - */ + /** @var array Method parameters */ protected $parameters = []; /** @@ -44,7 +46,7 @@ public function __construct($options = null) * Set return value * * @param string $returnType - * @return \Laminas\Server\Method\Prototype + * @return Prototype */ public function setReturnType($returnType) { @@ -66,16 +68,16 @@ public function getReturnType() * Add a parameter * * @param string|Parameter $parameter - * @return \Laminas\Server\Method\Prototype + * @return Prototype */ public function addParameter($parameter) { if ($parameter instanceof Parameter) { - $this->parameters[] = $parameter; - $name = $parameter->getName(); + $this->parameters[] = $parameter; + $name = $parameter->getName(); $this->parameterNameMap[$name] = count($this->parameters) - 1; } else { - $parameter = new Parameter([ + $parameter = new Parameter([ 'type' => $parameter, ]); $this->parameters[] = $parameter; @@ -87,7 +89,7 @@ public function addParameter($parameter) * Add parameters * * @param array $parameters - * @return \Laminas\Server\Method\Prototype + * @return Prototype */ public function addParameters(array $parameters) { @@ -101,7 +103,7 @@ public function addParameters(array $parameters) * Set parameters * * @param array $parameters - * @return \Laminas\Server\Method\Prototype + * @return Prototype */ public function setParameters(array $parameters) { @@ -139,12 +141,12 @@ public function getParameterObjects() * Retrieve a single parameter by name or index * * @param string|int $index - * @return null|\Laminas\Server\Method\Parameter + * @return null|Parameter */ public function getParameter($index) { if (! is_string($index) && ! is_numeric($index)) { - return; + return null; } if (array_key_exists($index, $this->parameterNameMap)) { $index = $this->parameterNameMap[$index]; @@ -152,14 +154,14 @@ public function getParameter($index) if (array_key_exists($index, $this->parameters)) { return $this->parameters[$index]; } - return; + return null; } /** * Set object state from array * * @param array $options - * @return \Laminas\Server\Method\Prototype + * @return Prototype */ public function setOptions(array $options) { diff --git a/src/Reflection.php b/src/Reflection.php index 1e26967f..e0b82904 100644 --- a/src/Reflection.php +++ b/src/Reflection.php @@ -2,14 +2,22 @@ /** * @see https://github.com/laminas/laminas-server for the canonical source repository - * @copyright https://github.com/laminas/laminas-server/blob/master/COPYRIGHT.md - * @license https://github.com/laminas/laminas-server/blob/master/LICENSE.md New BSD License */ namespace Laminas\Server; +use Laminas\Server\Reflection\Exception\InvalidArgumentException; use Laminas\Server\Reflection\ReflectionClass; use Laminas\Server\Reflection\ReflectionFunction; +use ReflectionObject; + +use function class_exists; +use function function_exists; +use function in_array; +use function is_array; +use function is_object; +use function is_string; +use function sprintf; /** * Reflection for determining method signatures to use with server classes @@ -30,21 +38,21 @@ class Reflection * @param string $namespace Optional namespace with which to prefix the * method name (used for the signature key). Primarily to avoid collisions, * also for XmlRpc namespacing - * @return \Laminas\Server\Reflection\ReflectionClass - * @throws \Laminas\Server\Reflection\Exception\InvalidArgumentException + * @return ReflectionClass + * @throws InvalidArgumentException */ public static function reflectClass($class, $argv = false, $namespace = '') { if (is_object($class)) { - $reflection = new \ReflectionObject($class); + $reflection = new ReflectionObject($class); } elseif (class_exists($class)) { $reflection = new \ReflectionClass($class); } else { - throw new Reflection\Exception\InvalidArgumentException('Invalid class or object passed to attachClass()'); + throw new InvalidArgumentException('Invalid class or object passed to attachClass()'); } if ($argv && ! is_array($argv)) { - throw new Reflection\Exception\InvalidArgumentException('Invalid argv argument passed to reflectClass'); + throw new InvalidArgumentException('Invalid argv argument passed to reflectClass'); } return new ReflectionClass($reflection, $namespace, $argv); @@ -64,13 +72,13 @@ public static function reflectClass($class, $argv = false, $namespace = '') * @param string $namespace Optional namespace with which to prefix the * function name (used for the signature key). Primarily to avoid * collisions, also for XmlRpc namespacing - * @return \Laminas\Server\Reflection\ReflectionFunction - * @throws \Laminas\Server\Reflection\Exception\InvalidArgumentException + * @return ReflectionFunction + * @throws InvalidArgumentException */ public static function reflectFunction($function, $argv = false, $namespace = '') { if (! is_string($function) || ! function_exists($function)) { - throw new Reflection\Exception\InvalidArgumentException(sprintf( + throw new InvalidArgumentException(sprintf( 'Invalid function "%s" passed to reflectFunction', $function )); @@ -80,7 +88,7 @@ public static function reflectFunction($function, $argv = false, $namespace = '' $argv = in_array($argv, [false, null], true) ? [] : $argv; if (! is_array($argv)) { - throw new Reflection\Exception\InvalidArgumentException('Invalid argv argument passed to reflectFunction'); + throw new InvalidArgumentException('Invalid argv argument passed to reflectFunction'); } return new ReflectionFunction(new \ReflectionFunction($function), $namespace, $argv); diff --git a/src/Reflection/AbstractFunction.php b/src/Reflection/AbstractFunction.php index ba785fad..cfba983c 100644 --- a/src/Reflection/AbstractFunction.php +++ b/src/Reflection/AbstractFunction.php @@ -2,13 +2,14 @@ /** * @see https://github.com/laminas/laminas-server for the canonical source repository - * @copyright https://github.com/laminas/laminas-server/blob/master/COPYRIGHT.md - * @license https://github.com/laminas/laminas-server/blob/master/LICENSE.md New BSD License */ namespace Laminas\Server\Reflection; +use Laminas\Code\Reflection\DocBlock\Tag\ParamTag; +use Laminas\Code\Reflection\DocBlock\Tag\ReturnTag; use Laminas\Code\Reflection\DocBlockReflection; +use Laminas\Server\Reflection\Node; use ReflectionClass as PhpReflectionClass; use ReflectionFunction as PhpReflectionFunction; use ReflectionFunctionAbstract; @@ -16,6 +17,18 @@ use ReflectionNamedType; use ReflectionParameter as PhpReflectionParameter; +use function array_merge; +use function array_shift; +use function array_unshift; +use function call_user_func_array; +use function count; +use function is_array; +use function is_string; +use function method_exists; +use function preg_match; + +use const PHP_VERSION_ID; + /** * Function/Method Reflection * @@ -28,13 +41,12 @@ */ abstract class AbstractFunction { - /** - * @var ReflectionFunctionAbstract - */ + /** @var ReflectionFunctionAbstract */ protected $reflection; /** * Additional arguments to pass to method on invocation + * * @var array */ protected $argv = []; @@ -44,42 +56,49 @@ abstract class AbstractFunction * server class, e.g., to indicate whether or not to instantiate a class). * Associative array; access is as properties via {@link __get()} and * {@link __set()} + * * @var array */ protected $config = []; /** * Declaring class (needed for when serialization occurs) + * * @var string */ protected $class; /** * Function name (needed for serialization) + * * @var string */ protected $name; /** * Function/method description + * * @var string */ protected $description = ''; /** * Namespace with which to prefix function/method name + * * @var string */ protected $namespace; /** * Prototypes + * * @var array */ protected $prototypes = []; /** * Phpdoc comment + * * @var string */ protected $docComment = ''; @@ -90,6 +109,7 @@ abstract class AbstractFunction /** @var string */ protected $returnDesc; + /** @var array */ protected $paramDesc; /** @var array */ @@ -101,7 +121,6 @@ abstract class AbstractFunction /** * Constructor * - * @param ReflectionFunctionAbstract $r * @param null|string $namespace * @param null|array $argv * @throws Exception\InvalidArgumentException @@ -139,7 +158,6 @@ public function __construct(ReflectionFunctionAbstract $r, $namespace = null, $a * each array in {@link $sigParams}, adding every value of the next level * to the current value (unless the current value is null). * - * @param \Laminas\Server\Reflection\Node $parent * @param int $level * @return void */ @@ -187,9 +205,7 @@ protected function buildTree() * @param array $return Array of return types * @param string $returnDesc Return value description * @param array $paramTypes Array of arguments (each an array of types) - * @param array $paramDesc Array of parameter descriptions - * - * @return void + * @param array $paramDesc Array of parameter descriptions */ protected function buildSignatures($return, $returnDesc, $paramTypes, $paramDesc): void { @@ -234,7 +250,7 @@ protected function buildSignatures($return, $returnDesc, $paramTypes, $paramDesc $param = new ReflectionParameter( $params[$key], $type, - (isset($this->paramDesc[$key]) ? $this->paramDesc[$key] : null) + $this->paramDesc[$key] ?? null ); $param->setPosition($key); $tmp[] = $param; @@ -252,7 +268,6 @@ protected function buildSignatures($return, $returnDesc, $paramTypes, $paramDesc * ReflectionFunction and parsing of DocBlock @param and @return values. * * @throws Exception\RuntimeException - * * @return void */ protected function reflect() @@ -265,11 +280,11 @@ protected function reflect() $this->docComment = $function->getDocComment(); } - $scanner = new DocBlockReflection(($this->docComment) ? : '/***/'); - $helpText = $scanner->getLongDescription(); - /* @var \Laminas\Code\Reflection\DocBlock\Tag\ParamTag[] $paramTags */ + $scanner = new DocBlockReflection($this->docComment ? : '/***/'); + $helpText = $scanner->getLongDescription(); + /** @var ParamTag[] $paramTags */ $paramTags = $scanner->getTags('param'); - /* @var \Laminas\Code\Reflection\DocBlock\Tag\ReturnTag $returnTag */ + /** @var ReturnTag $returnTag */ $returnTag = $scanner->getTag('return'); if (empty($helpText)) { @@ -304,7 +319,7 @@ protected function reflect() $paramDesc = []; foreach ($paramTags as $paramTag) { $paramTypesTmp[] = $paramTag->getTypes(); - $paramDesc[] = ($paramTag->getDescription()) ? : ''; + $paramDesc[] = $paramTag->getDescription() ? : ''; } } @@ -316,7 +331,7 @@ protected function reflect() $paramTypesTmp[$i] = ['mixed']; $paramDesc[$i] = ''; } - } elseif ($nParamTypesTmp != $paramCount) { + } elseif ($nParamTypesTmp !== $paramCount) { throw new Exception\RuntimeException( 'Variable number of arguments is not supported for services (except optional parameters). ' . 'Number of function arguments must correspond to actual number of arguments described in a docblock.' @@ -366,7 +381,7 @@ public function __get($key) return $this->config[$key]; } - return; + return null; } /** @@ -468,7 +483,8 @@ public function __sleep() { $serializable = []; foreach ($this as $name => $value) { - if ($value instanceof PhpReflectionFunction + if ( + $value instanceof PhpReflectionFunction || $value instanceof PhpReflectionMethod ) { continue; @@ -491,7 +507,7 @@ public function __sleep() public function __wakeup() { if ($this->reflection instanceof PhpReflectionMethod) { - $class = new PhpReflectionClass($this->class); + $class = new PhpReflectionClass($this->class); $this->reflection = new PhpReflectionMethod($class->newInstance(), $this->name); } else { $this->reflection = new PhpReflectionFunction($this->name); diff --git a/src/Reflection/Exception/BadMethodCallException.php b/src/Reflection/Exception/BadMethodCallException.php index 42ac3466..2bd4086a 100644 --- a/src/Reflection/Exception/BadMethodCallException.php +++ b/src/Reflection/Exception/BadMethodCallException.php @@ -2,8 +2,6 @@ /** * @see https://github.com/laminas/laminas-server for the canonical source repository - * @copyright https://github.com/laminas/laminas-server/blob/master/COPYRIGHT.md - * @license https://github.com/laminas/laminas-server/blob/master/LICENSE.md New BSD License */ namespace Laminas\Server\Reflection\Exception; diff --git a/src/Reflection/Exception/ExceptionInterface.php b/src/Reflection/Exception/ExceptionInterface.php index c8549b71..e7ed74b0 100644 --- a/src/Reflection/Exception/ExceptionInterface.php +++ b/src/Reflection/Exception/ExceptionInterface.php @@ -2,8 +2,6 @@ /** * @see https://github.com/laminas/laminas-server for the canonical source repository - * @copyright https://github.com/laminas/laminas-server/blob/master/COPYRIGHT.md - * @license https://github.com/laminas/laminas-server/blob/master/LICENSE.md New BSD License */ namespace Laminas\Server\Reflection\Exception; diff --git a/src/Reflection/Exception/InvalidArgumentException.php b/src/Reflection/Exception/InvalidArgumentException.php index 52dc1af1..4f786cdd 100644 --- a/src/Reflection/Exception/InvalidArgumentException.php +++ b/src/Reflection/Exception/InvalidArgumentException.php @@ -2,8 +2,6 @@ /** * @see https://github.com/laminas/laminas-server for the canonical source repository - * @copyright https://github.com/laminas/laminas-server/blob/master/COPYRIGHT.md - * @license https://github.com/laminas/laminas-server/blob/master/LICENSE.md New BSD License */ namespace Laminas\Server\Reflection\Exception; diff --git a/src/Reflection/Exception/RuntimeException.php b/src/Reflection/Exception/RuntimeException.php index 6a8b7339..4e10c4ca 100644 --- a/src/Reflection/Exception/RuntimeException.php +++ b/src/Reflection/Exception/RuntimeException.php @@ -2,8 +2,6 @@ /** * @see https://github.com/laminas/laminas-server for the canonical source repository - * @copyright https://github.com/laminas/laminas-server/blob/master/COPYRIGHT.md - * @license https://github.com/laminas/laminas-server/blob/master/LICENSE.md New BSD License */ namespace Laminas\Server\Reflection\Exception; diff --git a/src/Reflection/Node.php b/src/Reflection/Node.php index 22efb662..a347e124 100644 --- a/src/Reflection/Node.php +++ b/src/Reflection/Node.php @@ -2,12 +2,13 @@ /** * @see https://github.com/laminas/laminas-server for the canonical source repository - * @copyright https://github.com/laminas/laminas-server/blob/master/COPYRIGHT.md - * @license https://github.com/laminas/laminas-server/blob/master/LICENSE.md New BSD License */ namespace Laminas\Server\Reflection; +use function array_merge; +use function count; + /** * Node Tree class for Laminas\Server reflection operations */ @@ -15,30 +16,33 @@ class Node { /** * Node value + * * @var mixed */ - protected $value = null; + protected $value; /** * Array of child nodes (if any) + * * @var array */ protected $children = []; /** * Parent node (if any) - * @var \Laminas\Server\Reflection\Node + * + * @var Node */ - protected $parent = null; + protected $parent; /** * Constructor * * @param mixed $value - * @param \Laminas\Server\Reflection\Node $parent Optional - * @return \Laminas\Server\Reflection\Node + * @param Node $parent Optional + * @return Node */ - public function __construct($value, Node $parent = null) + public function __construct($value, ?Node $parent = null) { $this->value = $value; if (null !== $parent) { @@ -51,7 +55,11 @@ public function __construct($value, Node $parent = null) /** * Set parent node * + * //phpcs:disable SlevomatCodingStandard.Namespaces.ReferenceUsedNamesOnly.ReferenceViaFullyQualifiedName + * //phpcs:disable SlevomatCodingStandard.TypeHints.ParameterTypeHint.UselessAnnotation * @param \Laminas\Server\Reflection\Node $node + * //phpcs:enable SlevomatCodingStandard.TypeHints.ParameterTypeHint.UselessAnnotation + * //phpcs:enable SlevomatCodingStandard.Namespaces.ReferenceUsedNamesOnly.ReferenceViaFullyQualifiedName * @param bool $new Whether or not the child node is newly created * and should always be attached * @return void @@ -71,19 +79,16 @@ public function setParent(Node $node, $new = false) * * @param mixed $value * @access public - * @return \Laminas\Server\Reflection\Node New child node + * @return Node New child node */ public function createChild($value) { - $child = new static($value, $this); - - return $child; + return new static($value, $this); } /** * Attach a child node * - * @param \Laminas\Server\Reflection\Node $node * @return void */ public function attachChild(Node $node) @@ -118,7 +123,7 @@ public function hasChildren() /** * Return the parent node * - * @return null|\Laminas\Server\Reflection\Node + * @return null|Node */ public function getParent() { diff --git a/src/Reflection/Prototype.php b/src/Reflection/Prototype.php index 45891d2a..2be3d91e 100644 --- a/src/Reflection/Prototype.php +++ b/src/Reflection/Prototype.php @@ -2,8 +2,6 @@ /** * @see https://github.com/laminas/laminas-server for the canonical source repository - * @copyright https://github.com/laminas/laminas-server/blob/master/COPYRIGHT.md - * @license https://github.com/laminas/laminas-server/blob/master/LICENSE.md New BSD License */ namespace Laminas\Server\Reflection; @@ -18,10 +16,17 @@ class Prototype /** @var ReflectionParameter[] */ protected $params; + /** + * @deprecated This property was previously undeclared therefore it requires public access to maintain BC. + * It will be declared private in the next major version of this component. + * + * @var ReflectionReturnValue + */ + public $return; + /** * Constructor * - * @param ReflectionReturnValue $return * @param ReflectionParameter[] $params * @throws Exception\InvalidArgumentException */ @@ -51,7 +56,7 @@ public function getReturnType() /** * Retrieve the return value object * - * @return \Laminas\Server\Reflection\ReflectionReturnValue + * @return ReflectionReturnValue */ public function getReturnValue() { diff --git a/src/Reflection/ReflectionClass.php b/src/Reflection/ReflectionClass.php index c122690f..f09a3089 100644 --- a/src/Reflection/ReflectionClass.php +++ b/src/Reflection/ReflectionClass.php @@ -2,14 +2,19 @@ /** * @see https://github.com/laminas/laminas-server for the canonical source repository - * @copyright https://github.com/laminas/laminas-server/blob/master/COPYRIGHT.md - * @license https://github.com/laminas/laminas-server/blob/master/LICENSE.md New BSD License */ namespace Laminas\Server\Reflection; use ReflectionClass as PhpReflectionClass; +use function call_user_func_array; +use function is_array; +use function is_string; +use function method_exists; +use function preg_match; +use function str_starts_with; + /** * Class/Object reflection * @@ -21,30 +26,35 @@ class ReflectionClass /** * Optional configuration parameters; accessible via {@link __get} and * {@link __set()} + * * @var array */ protected $config = []; /** * Array of {@link \Laminas\Server\Reflection\Method}s + * * @var array */ protected $methods = []; /** * Namespace + * * @var string */ - protected $namespace = null; + protected $namespace; /** * ReflectionClass object + * * @var PhpReflectionClass */ protected $reflection; /** * Reflection class name (needed for serialization) + * * @var string */ protected $name; @@ -55,21 +65,20 @@ class ReflectionClass * Create array of dispatchable methods, each a * {@link Laminas\Server\Reflection\ReflectionMethod}. Sets reflection object property. * - * @param PhpReflectionClass $reflection * @param string $namespace * @param mixed $argv */ public function __construct(PhpReflectionClass $reflection, $namespace = null, $argv = false) { $this->reflection = $reflection; - $this->name = $reflection->getName(); + $this->name = $reflection->getName(); $this->setNamespace($namespace); $argv = is_array($argv) ? $argv : []; foreach ($reflection->getMethods() as $method) { // Don't aggregate magic methods - if ('__' == substr($method->getName(), 0, 2)) { + if (str_starts_with($method->getName(), '__')) { continue; } @@ -112,7 +121,7 @@ public function __get($key) return $this->config[$key]; } - return; + return null; } /** diff --git a/src/Reflection/ReflectionFunction.php b/src/Reflection/ReflectionFunction.php index 17ec0142..e7f352e2 100644 --- a/src/Reflection/ReflectionFunction.php +++ b/src/Reflection/ReflectionFunction.php @@ -2,8 +2,6 @@ /** * @see https://github.com/laminas/laminas-server for the canonical source repository - * @copyright https://github.com/laminas/laminas-server/blob/master/COPYRIGHT.md - * @license https://github.com/laminas/laminas-server/blob/master/LICENSE.md New BSD License */ namespace Laminas\Server\Reflection; diff --git a/src/Reflection/ReflectionMethod.php b/src/Reflection/ReflectionMethod.php index 46a0ca5c..0575f9b4 100644 --- a/src/Reflection/ReflectionMethod.php +++ b/src/Reflection/ReflectionMethod.php @@ -2,12 +2,18 @@ /** * @see https://github.com/laminas/laminas-server for the canonical source repository - * @copyright https://github.com/laminas/laminas-server/blob/master/COPYRIGHT.md - * @license https://github.com/laminas/laminas-server/blob/master/LICENSE.md New BSD License */ namespace Laminas\Server\Reflection; +use function array_map; +use function array_merge; +use function implode; +use function str_contains; +use function str_replace; + +use const PHP_EOL; + /** * Method Reflection */ @@ -16,16 +22,18 @@ class ReflectionMethod extends AbstractFunction /** * Doc block inherit tag for search */ - const INHERIT_TAG = '{@inheritdoc}'; + public const INHERIT_TAG = '{@inheritdoc}'; /** * Parent class name + * * @var string */ protected $class; /** * Parent class reflection + * * @var ReflectionClass|\ReflectionClass */ protected $classReflection; @@ -33,8 +41,6 @@ class ReflectionMethod extends AbstractFunction /** * Constructor * - * @param ReflectionClass $class - * @param \ReflectionMethod $r * @param string $namespace * @param array $argv */ @@ -57,7 +63,7 @@ public function __construct(ReflectionClass $class, \ReflectionMethod $r, $names // If method call, need to store some info on the class $this->class = $class->getName(); - $this->name = $r->getName(); + $this->name = $r->getName(); // Perform some introspection $this->reflect(); @@ -88,7 +94,7 @@ public function __wakeup() $this->getNamespace(), $this->getInvokeArguments() ); - $this->reflection = new \ReflectionMethod($this->classReflection->getName(), $this->name); + $this->reflection = new \ReflectionMethod($this->classReflection->getName(), $this->name); } /** @@ -99,7 +105,7 @@ public function __wakeup() protected function reflect() { $docComment = $this->reflection->getDocComment(); - if (strpos($docComment, self::INHERIT_TAG) !== false) { + if (str_contains($docComment, self::INHERIT_TAG)) { $this->docComment = $this->fetchRecursiveDocComment(); } @@ -114,7 +120,7 @@ protected function reflect() private function fetchRecursiveDocComment() { $currentMethodName = $this->reflection->getName(); - $docCommentList[] = $this->reflection->getDocComment(); + $docCommentList[] = $this->reflection->getDocComment(); // fetch all doc blocks for method from parent classes $docCommentFetched = $this->fetchRecursiveDocBlockFromParent($this->classReflection, $currentMethodName); @@ -122,7 +128,6 @@ private function fetchRecursiveDocComment() $docCommentList = array_merge($docCommentList, $docCommentFetched); } - // fetch doc blocks from interfaces $interfaceReflectionList = $this->classReflection->getInterfaces(); foreach ($interfaceReflectionList as $interfaceReflection) { @@ -143,9 +148,7 @@ function ($docComment) { $docCommentList ); - $docComment = '/**' . implode(PHP_EOL, $normalizedDocCommentList) . '*/'; - - return $docComment; + return '/**' . implode(PHP_EOL, $normalizedDocCommentList) . '*/'; } /** @@ -153,12 +156,11 @@ function ($docComment) { * * @param \ReflectionClass $reflectionClass * @param string $methodName - * * @return array|void */ private function fetchRecursiveDocBlockFromParent($reflectionClass, $methodName) { - $docComment = []; + $docComment = []; $parentReflectionClass = $reflectionClass->getParentClass(); if (! $parentReflectionClass) { return; @@ -169,8 +171,8 @@ private function fetchRecursiveDocBlockFromParent($reflectionClass, $methodName) } $methodReflection = $parentReflectionClass->getMethod($methodName); - $docCommentLast = $methodReflection->getDocComment(); - $docComment[] = $docCommentLast; + $docCommentLast = $methodReflection->getDocComment(); + $docComment[] = $docCommentLast; if ($this->isInherit($docCommentLast)) { if ($docCommentFetched = $this->fetchRecursiveDocBlockFromParent($parentReflectionClass, $methodName)) { $docComment = array_merge($docComment, $docCommentFetched); @@ -184,13 +186,10 @@ private function fetchRecursiveDocBlockFromParent($reflectionClass, $methodName) * Return true if doc block inherit from parent or interface * * @param string $docComment - * * @return bool */ private function isInherit($docComment) { - $isInherit = strpos($docComment, self::INHERIT_TAG) !== false; - - return $isInherit; + return str_contains($docComment, self::INHERIT_TAG); } } diff --git a/src/Reflection/ReflectionParameter.php b/src/Reflection/ReflectionParameter.php index c45cac66..0e00d718 100644 --- a/src/Reflection/ReflectionParameter.php +++ b/src/Reflection/ReflectionParameter.php @@ -2,12 +2,14 @@ /** * @see https://github.com/laminas/laminas-server for the canonical source repository - * @copyright https://github.com/laminas/laminas-server/blob/master/COPYRIGHT.md - * @license https://github.com/laminas/laminas-server/blob/master/LICENSE.md New BSD License */ namespace Laminas\Server\Reflection; +use function call_user_func_array; +use function is_string; +use function method_exists; + /** * Parameter Reflection * @@ -15,37 +17,40 @@ */ class ReflectionParameter { - /** - * @var \ReflectionParameter - */ + /** @var \ReflectionParameter */ protected $reflection; /** * Parameter position + * * @var int */ protected $position; /** * Parameter type + * * @var string */ protected $type; /** * Parameter description + * * @var string */ protected $description; /** * Parameter name (needed for serialization) + * * @var string */ protected $name; /** * Declaring function name (needed for serialization) + * * @var string */ protected $functionName; @@ -53,7 +58,6 @@ class ReflectionParameter /** * Constructor * - * @param \ReflectionParameter $r * @param string $type Parameter type * @param string $description Parameter description */ @@ -62,7 +66,7 @@ public function __construct(\ReflectionParameter $r, $type = 'mixed', $descripti $this->reflection = $r; // Store parameters needed for (un)serialization - $this->name = $r->getName(); + $this->name = $r->getName(); $this->functionName = $r->getDeclaringClass() ? [$r->getDeclaringClass()->getName(), $r->getDeclaringFunction()->getName()] : $r->getDeclaringFunction()->getName(); diff --git a/src/Reflection/ReflectionReturnValue.php b/src/Reflection/ReflectionReturnValue.php index f29e4a89..23b695ee 100644 --- a/src/Reflection/ReflectionReturnValue.php +++ b/src/Reflection/ReflectionReturnValue.php @@ -2,12 +2,12 @@ /** * @see https://github.com/laminas/laminas-server for the canonical source repository - * @copyright https://github.com/laminas/laminas-server/blob/master/COPYRIGHT.md - * @license https://github.com/laminas/laminas-server/blob/master/LICENSE.md New BSD License */ namespace Laminas\Server\Reflection; +use function is_string; + /** * Return value reflection * @@ -17,12 +17,14 @@ class ReflectionReturnValue { /** * Return value type + * * @var string */ protected $type; /** * Return value description + * * @var string */ protected $description; diff --git a/src/Server.php b/src/Server.php index 38f1e580..355a7557 100644 --- a/src/Server.php +++ b/src/Server.php @@ -2,15 +2,16 @@ /** * @see https://github.com/laminas/laminas-server for the canonical source repository - * @copyright https://github.com/laminas/laminas-server/blob/master/COPYRIGHT.md - * @license https://github.com/laminas/laminas-server/blob/master/LICENSE.md New BSD License */ namespace Laminas\Server; /** * Server Interface + * * @deprecated Since 2.9.0; Server is replaced by ServerInterface and will be removed in 3.0. + * + * @method void addFunction(string $function, string $namespace = '', array $parameters = null) */ interface Server { @@ -20,10 +21,12 @@ interface Server * Namespacing is primarily for xmlrpc, but may be used with other * implementations to prevent naming collisions. * + * Note: this method accepts an additional parameter that contains parameters + * to pass to the callback at dispatch, if provided. This is documented + * in the {@see Server} docblock. + * * @param string $function * @param string $namespace - * @param null|array Optional array of arguments to pass to callback at - * dispatch. * @return void */ public function addFunction($function, $namespace = ''); @@ -38,13 +41,13 @@ public function addFunction($function, $namespace = ''); * Namespacing is primarily for xmlrpc, but could be used for other * implementations as well. * - * @param mixed $class Class name or object instance to examine and attach - * to the server. - * @param string $namespace Optional namespace with which to prepend method - * names in the dispatch table. - * methods in the class will be valid callbacks. - * @param null|array Optional array of arguments to pass to callbacks at - * dispatch. + * @param mixed $class Class name or object instance to examine and attach + * to the server. + * @param string $namespace Optional namespace with which to prepend method + * names in the dispatch table. + * methods in the class will be valid callbacks. + * @param null|array $argv Optional array of arguments to pass to callbacks at + * dispatch. * @return void */ public function setClass($class, $namespace = '', $argv = null); diff --git a/src/ServerInterface.php b/src/ServerInterface.php index 0a22059f..9441c680 100644 --- a/src/ServerInterface.php +++ b/src/ServerInterface.php @@ -2,8 +2,6 @@ /** * @see https://github.com/laminas/laminas-server for the canonical source repository - * @copyright https://github.com/laminas/laminas-server/blob/master/COPYRIGHT.md - * @license https://github.com/laminas/laminas-server/blob/master/LICENSE.md New BSD License */ namespace Laminas\Server; diff --git a/test/CacheTest.php b/test/CacheTest.php index 5b3b4ac9..94100bf7 100644 --- a/test/CacheTest.php +++ b/test/CacheTest.php @@ -2,8 +2,6 @@ /** * @see https://github.com/laminas/laminas-server for the canonical source repository - * @copyright https://github.com/laminas/laminas-server/blob/master/COPYRIGHT.md - * @license https://github.com/laminas/laminas-server/blob/master/LICENSE.md New BSD License */ namespace LaminasTest\Cache; @@ -16,11 +14,15 @@ use PHPUnit\Framework\TestCase; use ReflectionProperty; +use function file_get_contents; +use function sys_get_temp_dir; +use function tempnam; +use function unlink; +use function unserialize; + class CacheTest extends TestCase { - /** - * @var string - */ + /** @var string */ private $cacheFile; public function tearDown(): void @@ -36,7 +38,7 @@ public function resetSkipMethods(array $methods = []): void { $r = new ReflectionProperty(Cache::class, 'skipMethods'); $r->setAccessible(true); - $r->setValue(Cache::class, $methods); + $r->setValue(null, $methods); } public function testCacheCanAcceptAServerReturningAnArrayOfFunctions(): void @@ -46,7 +48,7 @@ public function testCacheCanAcceptAServerReturningAnArrayOfFunctions(): void 'substr' => 'substr', 'strlen' => 'strlen', ]; - $server = $this->createMock(Server::class); + $server = $this->createMock(Server::class); $server->method('getFunctions')->willReturn($functions); $this->cacheFile = tempnam(sys_get_temp_dir(), 'zs'); @@ -93,7 +95,7 @@ public function testCacheSkipsMethodsWhenGivenAnArrayOfFunctions(): void 'substr' => 'substr', 'strlen' => 'strlen', ]; - $server = $this->createMock(Server::class); + $server = $this->createMock(Server::class); $server->method('getFunctions')->willReturn($functions); $this->cacheFile = tempnam(sys_get_temp_dir(), 'zs'); diff --git a/test/DefinitionTest.php b/test/DefinitionTest.php index 6a6268d1..c14b5dbb 100644 --- a/test/DefinitionTest.php +++ b/test/DefinitionTest.php @@ -2,8 +2,6 @@ /** * @see https://github.com/laminas/laminas-server for the canonical source repository - * @copyright https://github.com/laminas/laminas-server/blob/master/COPYRIGHT.md - * @license https://github.com/laminas/laminas-server/blob/master/LICENSE.md New BSD License */ namespace LaminasTest\Server; @@ -12,6 +10,9 @@ use Laminas\Server\Method; use PHPUnit\Framework\TestCase; +use function array_shift; +use function array_values; + /** * Test class for Laminas\Server\Definition * @@ -25,8 +26,6 @@ class DefinitionTest extends TestCase /** * Sets up the fixture, for example, open a network connection. * This method is called before a test is executed. - * - * @return void */ public function setUp(): void { @@ -36,8 +35,6 @@ public function setUp(): void /** * Tears down the fixture, for example, close a network connection. * This method is called after a test is executed. - * - * @return void */ public function tearDown(): void { @@ -113,19 +110,19 @@ public function testDefinitionShouldAllowClearingAllMethods(): void public function testDefinitionShouldSerializeToArray(): void { - $method = [ - 'name' => 'foo.bar', - 'callback' => [ + $method = [ + 'name' => 'foo.bar', + 'callback' => [ 'type' => 'function', 'function' => 'bar', ], - 'prototypes' => [ + 'prototypes' => [ [ 'returnType' => 'string', 'parameters' => ['string'], ], ], - 'methodHelp' => 'Foo Bar!', + 'methodHelp' => 'Foo Bar!', 'invokeArguments' => ['foo'], ]; $definition = new Server\Definition(); @@ -141,24 +138,24 @@ public function testDefinitionShouldSerializeToArray(): void public function testPassingOptionsToConstructorShouldSetObjectState(): void { - $method = [ - 'name' => 'foo.bar', - 'callback' => [ + $method = [ + 'name' => 'foo.bar', + 'callback' => [ 'type' => 'function', 'function' => 'bar', ], - 'prototypes' => [ + 'prototypes' => [ [ 'returnType' => 'string', 'parameters' => ['string'], ], ], - 'methodHelp' => 'Foo Bar!', + 'methodHelp' => 'Foo Bar!', 'invokeArguments' => ['foo'], ]; - $options = [$method]; + $options = [$method]; $definition = new Server\Definition($options); - $test = $definition->toArray(); + $test = $definition->toArray(); $this->assertCount(1, $test); $test = array_shift($test); $this->assertEquals($method['name'], $test['name']); diff --git a/test/Method/CallbackTest.php b/test/Method/CallbackTest.php index fd406729..3035b8f0 100644 --- a/test/Method/CallbackTest.php +++ b/test/Method/CallbackTest.php @@ -2,8 +2,6 @@ /** * @see https://github.com/laminas/laminas-server for the canonical source repository - * @copyright https://github.com/laminas/laminas-server/blob/master/COPYRIGHT.md - * @license https://github.com/laminas/laminas-server/blob/master/LICENSE.md New BSD License */ namespace LaminasTest\Server\Method; @@ -19,16 +17,12 @@ */ class CallbackTest extends TestCase { - /** - * @var Method\Callback - */ + /** @var Method\Callback */ private $callback; /** * Sets up the fixture, for example, open a network connection. * This method is called before a test is executed. - * - * @return void */ public function setUp(): void { @@ -115,13 +109,13 @@ public function testCallbackShouldSerializeToArray(): void public function testConstructorShouldSetStateFromOptions(): void { - $options = [ + $options = [ 'type' => 'static', 'class' => 'Foo', 'method' => 'bar', ]; $callback = new Method\Callback($options); - $test = $callback->toArray(); + $test = $callback->toArray(); $this->assertSame($options, $test); } diff --git a/test/Method/DefinitionTest.php b/test/Method/DefinitionTest.php index 41c77269..a217d25f 100644 --- a/test/Method/DefinitionTest.php +++ b/test/Method/DefinitionTest.php @@ -2,15 +2,13 @@ /** * @see https://github.com/laminas/laminas-server for the canonical source repository - * @copyright https://github.com/laminas/laminas-server/blob/master/COPYRIGHT.md - * @license https://github.com/laminas/laminas-server/blob/master/LICENSE.md New BSD License */ namespace LaminasTest\Server\Method; -use Laminas\Server\Exception\InvalidArgumentException; use Laminas\Server\Method; use PHPUnit\Framework\TestCase; +use stdClass; /** * Test class for \Laminas\Server\Method\Definition @@ -25,8 +23,6 @@ class DefinitionTest extends TestCase /** * Sets up the fixture, for example, open a network connection. * This method is called before a test is executed. - * - * @return void */ public function setUp(): void { @@ -36,8 +32,6 @@ public function setUp(): void /** * Tears down the fixture, for example, close a network connection. * This method is called after a test is executed. - * - * @return void */ public function tearDown(): void { @@ -99,7 +93,7 @@ public function testObjectShouldBeNullByDefault(): void public function testObjectShouldBeMutable(): void { $this->assertNull($this->definition->getObject()); - $object = new \stdClass; + $object = new stdClass(); $this->definition->setObject($object); $this->assertEquals($object, $this->definition->getObject()); } @@ -113,7 +107,7 @@ public function testInvokeArgumentsShouldBeEmptyArrayByDefault(): void public function testInvokeArgumentsShouldBeMutable(): void { $this->testInvokeArgumentsShouldBeEmptyArrayByDefault(); - $args = ['foo', ['bar', 'baz'], new \stdClass]; + $args = ['foo', ['bar', 'baz'], new stdClass()]; $this->definition->setInvokeArguments($args); $this->assertSame($args, $this->definition->getInvokeArguments()); } @@ -127,12 +121,12 @@ public function testPrototypesShouldBeEmptyArrayByDefault(): void public function testDefinitionShouldAllowAddingSinglePrototypes(): void { $this->testPrototypesShouldBeEmptyArrayByDefault(); - $prototype1 = new Method\Prototype; + $prototype1 = new Method\Prototype(); $this->definition->addPrototype($prototype1); $test = $this->definition->getPrototypes(); $this->assertSame($prototype1, $test[0]); - $prototype2 = new Method\Prototype; + $prototype2 = new Method\Prototype(); $this->definition->addPrototype($prototype2); $test = $this->definition->getPrototypes(); $this->assertSame($prototype1, $test[0]); @@ -141,8 +135,8 @@ public function testDefinitionShouldAllowAddingSinglePrototypes(): void public function testDefinitionShouldAllowAddingMultiplePrototypes(): void { - $prototype1 = new Method\Prototype; - $prototype2 = new Method\Prototype; + $prototype1 = new Method\Prototype(); + $prototype2 = new Method\Prototype(); $prototypes = [$prototype1, $prototype2]; $this->definition->addPrototypes($prototypes); $this->assertSame($prototypes, $this->definition->getPrototypes()); @@ -152,8 +146,8 @@ public function testSetPrototypesShouldOverwriteExistingPrototypes(): void { $this->testDefinitionShouldAllowAddingMultiplePrototypes(); - $prototype1 = new Method\Prototype; - $prototype2 = new Method\Prototype; + $prototype1 = new Method\Prototype(); + $prototype2 = new Method\Prototype(); $prototypes = [$prototype1, $prototype2]; $this->assertNotSame($prototypes, $this->definition->getPrototypes()); $this->definition->setPrototypes($prototypes); @@ -166,7 +160,7 @@ public function testDefintionShouldSerializeToArray(): void $callback = ['function' => 'foo', 'type' => 'function']; $prototypes = [['returnType' => 'struct', 'parameters' => ['string', 'array']]]; $methodHelp = 'foo bar'; - $object = new \stdClass; + $object = new stdClass(); $invokeArgs = ['foo', ['bar', 'baz']]; $this->definition->setName($name) ->setCallback($callback) @@ -185,16 +179,16 @@ public function testDefintionShouldSerializeToArray(): void public function testPassingOptionsToConstructorShouldSetObjectState(): void { - $options = [ + $options = [ 'name' => 'foo.bar', 'callback' => ['function' => 'foo', 'type' => 'function'], 'prototypes' => [['returnType' => 'struct', 'parameters' => ['string', 'array']]], 'methodHelp' => 'foo bar', - 'object' => new \stdClass, + 'object' => new stdClass(), 'invokeArguments' => ['foo', ['bar', 'baz']], ]; $definition = new Method\Definition($options); - $test = $definition->toArray(); + $test = $definition->toArray(); $this->assertEquals($options['name'], $test['name']); $this->assertEquals($options['callback'], $test['callback']); $this->assertEquals($options['prototypes'], $test['prototypes']); diff --git a/test/Method/ParameterTest.php b/test/Method/ParameterTest.php index dbf093e0..164ef611 100644 --- a/test/Method/ParameterTest.php +++ b/test/Method/ParameterTest.php @@ -2,8 +2,6 @@ /** * @see https://github.com/laminas/laminas-server for the canonical source repository - * @copyright https://github.com/laminas/laminas-server/blob/master/COPYRIGHT.md - * @license https://github.com/laminas/laminas-server/blob/master/LICENSE.md New BSD License */ namespace LaminasTest\Server\Method; @@ -24,8 +22,6 @@ class ParameterTest extends TestCase /** * Sets up the fixture, for example, open a network connection. * This method is called before a test is executed. - * - * @return void */ public function setUp(): void { @@ -35,8 +31,6 @@ public function setUp(): void /** * Tears down the fixture, for example, close a network connection. * This method is called after a test is executed. - * - * @return void */ public function tearDown(): void { @@ -142,26 +136,39 @@ public function testParameterShouldSerializeToArray(): void $optional = true; $defaultValue = 'bar'; $description = 'Foo bar!'; - $parameter = compact('type', 'name', 'optional', 'defaultValue', 'description'); - $this->parameter->setType($type) - ->setName($name) - ->setOptional($optional) - ->setDefaultValue($defaultValue) - ->setDescription($description); - $test = $this->parameter->toArray(); - $this->assertEquals($parameter, $test); + + $this->assertEquals( + [ + 'type' => $type, + 'name' => $name, + 'optional' => $optional, + 'defaultValue' => $defaultValue, + 'description' => $description, + ], + $this->parameter + ->setType($type) + ->setName($name) + ->setOptional($optional) + ->setDefaultValue($defaultValue) + ->setDescription($description) + ->toArray() + ); } public function testConstructorShouldSetObjectStateFromPassedOptions(): void { - $type = 'string'; - $name = 'foo'; - $optional = true; - $defaultValue = 'bar'; - $description = 'Foo bar!'; - $options = compact('type', 'name', 'optional', 'defaultValue', 'description'); - $parameter = new Method\Parameter($options); - $test = $parameter->toArray(); - $this->assertEquals($options, $test); + $options = [ + 'type' => 'string', + 'name' => 'foo', + 'optional' => true, + 'defaultValue' => 'bar', + 'description' => 'Foo bar!', + ]; + + $this->assertEquals( + $options, + (new Method\Parameter($options)) + ->toArray() + ); } } diff --git a/test/Method/PrototypeTest.php b/test/Method/PrototypeTest.php index 21d44b7d..93089d71 100644 --- a/test/Method/PrototypeTest.php +++ b/test/Method/PrototypeTest.php @@ -2,8 +2,6 @@ /** * @see https://github.com/laminas/laminas-server for the canonical source repository - * @copyright https://github.com/laminas/laminas-server/blob/master/COPYRIGHT.md - * @license https://github.com/laminas/laminas-server/blob/master/LICENSE.md New BSD License */ namespace LaminasTest\Server\Method; @@ -25,8 +23,6 @@ class PrototypeTest extends TestCase /** * Sets up the fixture, for example, open a network connection. * This method is called before a test is executed. - * - * @return void */ public function setUp(): void { @@ -36,8 +32,6 @@ public function setUp(): void /** * Tears down the fixture, for example, close a network connection. * This method is called after a test is executed. - * - * @return void */ public function tearDown(): void { @@ -151,7 +145,7 @@ public function testPrototypeShouldSerializeToArray(): void public function testConstructorShouldSetObjectStateFromOptions(): void { - $options = [ + $options = [ 'returnType' => 'string', 'parameters' => [ 'bool', @@ -160,7 +154,7 @@ public function testConstructorShouldSetObjectStateFromOptions(): void ], ]; $prototype = new Method\Prototype($options); - $test = $prototype->toArray(); + $test = $prototype->toArray(); $this->assertSame($options, $test); } } diff --git a/test/Reflection/NodeTest.php b/test/Reflection/NodeTest.php index 330bd2a5..3567f5c8 100644 --- a/test/Reflection/NodeTest.php +++ b/test/Reflection/NodeTest.php @@ -2,8 +2,6 @@ /** * @see https://github.com/laminas/laminas-server for the canonical source repository - * @copyright https://github.com/laminas/laminas-server/blob/master/COPYRIGHT.md - * @license https://github.com/laminas/laminas-server/blob/master/LICENSE.md New BSD License */ namespace LaminasTest\Server\Reflection; @@ -11,6 +9,8 @@ use Laminas\Server\Reflection\Node; use PHPUnit\Framework\TestCase; +use function var_export; + /** * Test case for \Laminas\Server\Node * @@ -20,8 +20,6 @@ class NodeTest extends TestCase { /** * __construct() test - * - * @return void */ public function testConstructor(): void { @@ -43,8 +41,6 @@ public function testConstructor(): void /** * setParent() test - * - * @return void */ public function testSetParent(): void { @@ -58,13 +54,11 @@ public function testSetParent(): void /** * createChild() test - * - * @return void */ public function testCreateChild(): void { $parent = new Node('string'); - $child = $parent->createChild('array'); + $child = $parent->createChild('array'); $this->assertEquals($parent, $child->getParent()); $children = $parent->getChildren(); @@ -73,8 +67,6 @@ public function testCreateChild(): void /** * attachChild() test - * - * @return void */ public function testAttachChild(): void { @@ -89,16 +81,14 @@ public function testAttachChild(): void /** * getChildren() test - * - * @return void */ public function testGetChildren(): void { $parent = new Node('string'); - $child = $parent->createChild('array'); + $child = $parent->createChild('array'); $children = $parent->getChildren(); - $types = []; + $types = []; foreach ($children as $c) { $types[] = $c->getValue(); } @@ -108,8 +98,6 @@ public function testGetChildren(): void /** * hasChildren() test - * - * @return void */ public function testHasChildren(): void { @@ -122,13 +110,11 @@ public function testHasChildren(): void /** * getParent() test - * - * @return void */ public function testGetParent(): void { $parent = new Node('string'); - $child = $parent->createChild('array'); + $child = $parent->createChild('array'); $this->assertNull($parent->getParent()); $this->assertEquals($parent, $child->getParent()); @@ -136,8 +122,6 @@ public function testGetParent(): void /** * getValue() test - * - * @return void */ public function testGetValue(): void { @@ -147,8 +131,6 @@ public function testGetValue(): void /** * setValue() test - * - * @return void */ public function testSetValue(): void { @@ -160,22 +142,20 @@ public function testSetValue(): void /** * getEndPoints() test - * - * @return void */ public function testGetEndPoints(): void { - $root = new Node('root'); - $child1 = $root->createChild('child1'); - $child2 = $root->createChild('child2'); - $child1grand1 = $child1->createChild(null); - $child1grand2 = $child1->createChild('child1grand2'); - $child2grand1 = $child2->createChild('child2grand1'); - $child2grand2 = $child2->createChild('child2grand2'); + $root = new Node('root'); + $child1 = $root->createChild('child1'); + $child2 = $root->createChild('child2'); + $child1grand1 = $child1->createChild(null); + $child1grand2 = $child1->createChild('child1grand2'); + $child2grand1 = $child2->createChild('child2grand1'); + $child2grand2 = $child2->createChild('child2grand2'); $child2grand2great1 = $child2grand2->createChild(null); $child2grand2great2 = $child2grand2->createChild('child2grand2great2'); - $endPoints = $root->getEndPoints(); + $endPoints = $root->getEndPoints(); $endPointsArray = []; foreach ($endPoints as $endPoint) { $endPointsArray[] = $endPoint->getValue(); @@ -186,7 +166,7 @@ public function testGetEndPoints(): void 'child1grand2', 'child2grand1', 'child2grand2', - 'child2grand2great2' + 'child2grand2great2', ]; $this->assertEquals( diff --git a/test/Reflection/PrototypeTest.php b/test/Reflection/PrototypeTest.php index 25ff2df0..f95e5113 100644 --- a/test/Reflection/PrototypeTest.php +++ b/test/Reflection/PrototypeTest.php @@ -2,17 +2,16 @@ /** * @see https://github.com/laminas/laminas-server for the canonical source repository - * @copyright https://github.com/laminas/laminas-server/blob/master/COPYRIGHT.md - * @license https://github.com/laminas/laminas-server/blob/master/LICENSE.md New BSD License */ namespace LaminasTest\Server\Reflection; use Laminas\Server\Reflection; -use Laminas\Server\Reflection\Exception\InvalidArgumentException; +use Laminas\Server\Reflection\Prototype; use Laminas\Server\Reflection\ReflectionReturnValue; use PHPUnit\Framework\TestCase; use ReflectionClass; +use ReflectionParameter; /** * Test case for \Laminas\Server\Reflection\Prototype @@ -21,14 +20,12 @@ */ class PrototypeTest extends TestCase { - /** - * @var \Laminas\Server\Reflection\Prototype - */ + /** @var Prototype */ protected $r; /** * @var array - * @psalm-var array + * @psalm-var array */ protected $parametersRaw; @@ -43,9 +40,9 @@ class PrototypeTest extends TestCase */ public function setUp(): void { - $class = new ReflectionClass('\Laminas\Server\Reflection'); - $method = $class->getMethod('reflectClass'); - $parameters = $method->getParameters(); + $class = new ReflectionClass(Reflection::class); + $method = $class->getMethod('reflectClass'); + $parameters = $method->getParameters(); $this->parametersRaw = $parameters; $fParameters = []; @@ -77,8 +74,6 @@ public function tearDown(): void * - params: Optional; * * Returns: void - * - * @return void */ public function testConstructWorks(): void { @@ -91,8 +86,6 @@ public function testConstructWorks(): void * Call as method call * * Returns: string - * - * @return void */ public function testGetReturnType(): void { @@ -105,8 +98,6 @@ public function testGetReturnType(): void * Call as method call * * Returns: \Laminas\Server\Reflection\ReflectionReturnValue - * - * @return void */ public function testGetReturnValue(): void { @@ -119,8 +110,6 @@ public function testGetReturnValue(): void * Call as method call * * Returns: array - * - * @return void */ public function testGetParameters(): void { diff --git a/test/Reflection/ReflectionClassTest.php b/test/Reflection/ReflectionClassTest.php index 61e7aff9..7bf378b9 100644 --- a/test/Reflection/ReflectionClassTest.php +++ b/test/Reflection/ReflectionClassTest.php @@ -2,8 +2,6 @@ /** * @see https://github.com/laminas/laminas-server for the canonical source repository - * @copyright https://github.com/laminas/laminas-server/blob/master/COPYRIGHT.md - * @license https://github.com/laminas/laminas-server/blob/master/LICENSE.md New BSD License */ namespace LaminasTest\Server\Reflection; @@ -13,6 +11,11 @@ use Laminas\Server\Reflection\ReflectionMethod; use PHPUnit\Framework\TestCase; +use function assert; +use function count; +use function serialize; +use function unserialize; + /** * Test case for \Laminas\Server\Reflection\ClassReflection * @@ -31,8 +34,6 @@ class ReflectionClassTest extends TestCase * - argv: Optional; has default; * * Returns: void - * - * @return void */ public function testConstructor(): void { @@ -58,24 +59,20 @@ public function testConstructor(): void * - args: * * Returns: mixed - * - * @return void */ public function testMethodOverloading(): void { $r = new Reflection\ReflectionClass(new \ReflectionClass(Reflection::class)); $this->assertIsString($r->getName()); - $this->assertEquals('Laminas\Server\Reflection', $r->getName()); + $this->assertEquals(Reflection::class, $r->getName()); } /** * test __get/set - * - * @return void */ public function testGetSet(): void { - $r = new Reflection\ReflectionClass(new \ReflectionClass(Reflection::class)); + $r = new Reflection\ReflectionClass(new \ReflectionClass(Reflection::class)); $r->system = true; $this->assertTrue($r->system); } @@ -86,8 +83,6 @@ public function testGetSet(): void * Call as method call * * Returns: array - * - * @return void */ public function testGetMethods(): void { @@ -101,8 +96,6 @@ public function testGetMethods(): void /** * namespace test - * - * @return void */ public function testGetNamespace(): void { @@ -118,8 +111,6 @@ public function testGetNamespace(): void * Call as method call * * Returns: void - * - * @return void */ public function testClassWakeup(): void { diff --git a/test/Reflection/ReflectionFunctionTest.php b/test/Reflection/ReflectionFunctionTest.php index 8ff65314..0cfdc647 100644 --- a/test/Reflection/ReflectionFunctionTest.php +++ b/test/Reflection/ReflectionFunctionTest.php @@ -2,8 +2,6 @@ /** * @see https://github.com/laminas/laminas-server for the canonical source repository - * @copyright https://github.com/laminas/laminas-server/blob/master/COPYRIGHT.md - * @license https://github.com/laminas/laminas-server/blob/master/LICENSE.md New BSD License */ namespace LaminasTest\Server\Reflection; @@ -12,6 +10,11 @@ use PHPUnit\Framework\TestCase; use ReflectionFunction; +use function in_array; +use function serialize; +use function unserialize; +use function var_export; + /** * @group Laminas_Server */ @@ -20,14 +23,14 @@ class ReflectionFunctionTest extends TestCase public function testConstructor(): void { $function = new ReflectionFunction('LaminasTest\Server\Reflection\TestAsset\function1'); - $r = new Reflection\ReflectionFunction($function); - $params = $r->getParameters(); + $r = new Reflection\ReflectionFunction($function); + $params = $r->getParameters(); $r = new Reflection\ReflectionFunction($function, 'namespace'); $this->assertEquals('namespace', $r->getNamespace()); $argv = ['string1', 'string2']; - $r = new Reflection\ReflectionFunction($function, 'namespace', $argv); + $r = new Reflection\ReflectionFunction($function, 'namespace', $argv); $this->assertIsArray($r->getInvokeArguments()); $this->assertEquals($argv, $r->getInvokeArguments()); @@ -38,17 +41,16 @@ public function testConstructor(): void public function testPropertyOverloading(): void { $function = new ReflectionFunction('LaminasTest\Server\Reflection\TestAsset\function1'); - $r = new Reflection\ReflectionFunction($function); + $r = new Reflection\ReflectionFunction($function); $r->system = true; $this->assertTrue($r->system); } - public function testNamespace(): void { $function = new ReflectionFunction('LaminasTest\Server\Reflection\TestAsset\function1'); - $r = new Reflection\ReflectionFunction($function, 'namespace'); + $r = new Reflection\ReflectionFunction($function, 'namespace'); $this->assertEquals('namespace', $r->getNamespace()); $r->setNamespace('framework'); $this->assertEquals('framework', $r->getNamespace()); @@ -57,7 +59,7 @@ public function testNamespace(): void public function testDescription(): void { $function = new ReflectionFunction('LaminasTest\Server\Reflection\TestAsset\function1'); - $r = new Reflection\ReflectionFunction($function); + $r = new Reflection\ReflectionFunction($function); $this->assertStringContainsString('function for reflection', $r->getDescription()); $r->setDescription('Testing setting descriptions'); $this->assertEquals('Testing setting descriptions', $r->getDescription()); @@ -66,7 +68,7 @@ public function testDescription(): void public function testGetPrototypes(): void { $function = new ReflectionFunction('LaminasTest\Server\Reflection\TestAsset\function1'); - $r = new Reflection\ReflectionFunction($function); + $r = new Reflection\ReflectionFunction($function); $prototypes = $r->getPrototypes(); $this->assertCount(8, $prototypes); @@ -79,7 +81,7 @@ public function testGetPrototypes(): void public function testGetPrototypes2(): void { $function = new ReflectionFunction('LaminasTest\Server\Reflection\TestAsset\function2'); - $r = new Reflection\ReflectionFunction($function); + $r = new Reflection\ReflectionFunction($function); $prototypes = $r->getPrototypes(); $this->assertNotEmpty($prototypes); @@ -90,16 +92,15 @@ public function testGetPrototypes2(): void } } - public function testGetInvokeArguments(): void { $function = new ReflectionFunction('LaminasTest\Server\Reflection\TestAsset\function1'); - $r = new Reflection\ReflectionFunction($function); - $args = $r->getInvokeArguments(); + $r = new Reflection\ReflectionFunction($function); + $args = $r->getInvokeArguments(); $this->assertCount(0, $args); $argv = ['string1', 'string2']; - $r = new Reflection\ReflectionFunction($function, null, $argv); + $r = new Reflection\ReflectionFunction($function, null, $argv); $args = $r->getInvokeArguments(); $this->assertEquals($argv, $args); } @@ -107,9 +108,9 @@ public function testGetInvokeArguments(): void public function testClassWakeup(): void { $function = new ReflectionFunction('LaminasTest\Server\Reflection\TestAsset\function1'); - $r = new Reflection\ReflectionFunction($function); - $s = serialize($r); - $u = unserialize($s); + $r = new Reflection\ReflectionFunction($function); + $s = serialize($r); + $u = unserialize($s); $this->assertInstanceOf(\Laminas\Server\Reflection\ReflectionFunction::class, $u); $this->assertEquals('', $u->getNamespace()); } @@ -117,13 +118,13 @@ public function testClassWakeup(): void public function testMultipleWhitespaceBetweenDoctagsAndTypes(): void { $function = new ReflectionFunction('LaminasTest\Server\Reflection\TestAsset\function3'); - $r = new Reflection\ReflectionFunction($function); + $r = new Reflection\ReflectionFunction($function); $prototypes = $r->getPrototypes(); $this->assertNotEmpty($prototypes); $this->assertCount(1, $prototypes); - $proto = $prototypes[0]; + $proto = $prototypes[0]; $params = $proto->getParameters(); $this->assertCount(1, $params); $this->assertEquals('string', $params[0]->getType()); @@ -131,18 +132,16 @@ public function testMultipleWhitespaceBetweenDoctagsAndTypes(): void /** * @group Laminas-6996 - * - * @return void */ public function testParameterReflectionShouldReturnTypeAndVarnameAndDescription(): void { $function = new ReflectionFunction('LaminasTest\Server\Reflection\TestAsset\function1'); - $r = new Reflection\ReflectionFunction($function); + $r = new Reflection\ReflectionFunction($function); $prototypes = $r->getPrototypes(); $prototype = $prototypes[0]; - $params = $prototype->getParameters(); - $param = $params[0]; + $params = $prototype->getParameters(); + $param = $params[0]; $this->assertStringContainsString('Some description', $param->getDescription(), var_export($param, 1)); } } diff --git a/test/Reflection/ReflectionMethodTest.php b/test/Reflection/ReflectionMethodTest.php index 0f3db012..e835cb1a 100644 --- a/test/Reflection/ReflectionMethodTest.php +++ b/test/Reflection/ReflectionMethodTest.php @@ -2,8 +2,6 @@ /** * @see https://github.com/laminas/laminas-server for the canonical source repository - * @copyright https://github.com/laminas/laminas-server/blob/master/COPYRIGHT.md - * @license https://github.com/laminas/laminas-server/blob/master/LICENSE.md New BSD License */ namespace LaminasTest\Server\Reflection; @@ -12,6 +10,10 @@ use Laminas\Server\Reflection\Node; use PHPUnit\Framework\TestCase; use ReflectionClass; +use ReflectionMethod; + +use function serialize; +use function unserialize; class ReflectionMethodTest extends TestCase { @@ -21,7 +23,7 @@ class ReflectionMethodTest extends TestCase /** @var Reflection\ReflectionClass */ protected $class; - /** @var \ReflectionMethod */ + /** @var ReflectionMethod */ protected $method; protected function setUp(): void @@ -43,8 +45,6 @@ protected function setUp(): void * - argv: Optional; has default; * * Returns: void - * - * @return void */ public function testConstructor(): void { @@ -61,8 +61,6 @@ public function testConstructor(): void * Call as method call * * Returns: \Laminas\Server\Reflection\ReflectionClass - * - * @return void */ public function testGetDeclaringClass(): void { @@ -80,8 +78,6 @@ public function testGetDeclaringClass(): void * Call as method call * * Returns: void - * - * @return void */ public function testClassWakeup(): void { @@ -96,20 +92,18 @@ public function testClassWakeup(): void /** * Test fetch method doc block from interface - * - * @return void */ public function testMethodDocBlockFromInterface(): void { - $reflectionClass = new ReflectionClass(TestAsset\ReflectionMethodTestInstance::class); + $reflectionClass = new ReflectionClass(TestAsset\ReflectionMethodTestInstance::class); $reflectionMethod = $reflectionClass->getMethod('testMethod'); $laminasReflectionMethod = new Reflection\ReflectionMethod( new Reflection\ReflectionClass($reflectionClass), $reflectionMethod ); - list($prototype) = $laminasReflectionMethod->getPrototypes(); - list($first, $second) = $prototype->getParameters(); + [$prototype] = $laminasReflectionMethod->getPrototypes(); + [$first, $second] = $prototype->getParameters(); self::assertEquals('ReflectionMethodTest', $first->getType()); self::assertEquals('array', $second->getType()); @@ -117,20 +111,18 @@ public function testMethodDocBlockFromInterface(): void /** * Test fetch method doc block from parent class - * - * @return void */ public function testMethodDocBlockFromParent(): void { - $reflectionClass = new ReflectionClass(TestAsset\ReflectionMethodNode::class); + $reflectionClass = new ReflectionClass(TestAsset\ReflectionMethodNode::class); $reflectionMethod = $reflectionClass->getMethod('setParent'); $laminasReflectionMethod = new Reflection\ReflectionMethod( new Reflection\ReflectionClass($reflectionClass), $reflectionMethod ); - $prototypes = $laminasReflectionMethod->getPrototypes(); - list($first, $second) = $prototypes[1]->getParameters(); + $prototypes = $laminasReflectionMethod->getPrototypes(); + [$first, $second] = $prototypes[1]->getParameters(); self::assertEquals('\\' . Node::class, $first->getType()); self::assertEquals('bool', $second->getType()); diff --git a/test/Reflection/ReflectionParameterTest.php b/test/Reflection/ReflectionParameterTest.php index 2ff03bc8..4c5d08d7 100644 --- a/test/Reflection/ReflectionParameterTest.php +++ b/test/Reflection/ReflectionParameterTest.php @@ -2,16 +2,14 @@ /** * @see https://github.com/laminas/laminas-server for the canonical source repository - * @copyright https://github.com/laminas/laminas-server/blob/master/COPYRIGHT.md - * @license https://github.com/laminas/laminas-server/blob/master/LICENSE.md New BSD License */ namespace LaminasTest\Server\Reflection; use Laminas\Server\Reflection; -use Laminas\Server\Reflection\ReflectionParameter; use PHPUnit\Framework\TestCase; use ReflectionMethod; +use ReflectionParameter; /** * Test case for \Laminas\Server\Reflection\ReflectionParameter @@ -20,9 +18,9 @@ */ class ReflectionParameterTest extends TestCase { - protected function getParameter(): \ReflectionParameter + protected function getParameter(): ReflectionParameter { - $method = new ReflectionMethod('\Laminas\Server\Reflection\ReflectionParameter', 'setType'); + $method = new ReflectionMethod(\Laminas\Server\Reflection\ReflectionParameter::class, 'setType'); $parameters = $method->getParameters(); return $parameters[0]; } @@ -38,8 +36,6 @@ protected function getParameter(): \ReflectionParameter * - description: Optional; has default; * * Returns: void - * - * @return void */ public function testConstructor(): void { @@ -59,8 +55,6 @@ public function testConstructor(): void * - args: * * Returns: mixed - * - * @return void */ public function testMethodOverloading(): void { @@ -73,8 +67,6 @@ public function testMethodOverloading(): void /** * get/setType() test - * - * @return void */ public function testGetSetType(): void { @@ -87,8 +79,6 @@ public function testGetSetType(): void /** * get/setDescription() test - * - * @return void */ public function testGetDescription(): void { @@ -101,8 +91,6 @@ public function testGetDescription(): void /** * get/setPosition() test - * - * @return void */ public function testSetPosition(): void { diff --git a/test/Reflection/ReflectionReturnValueTest.php b/test/Reflection/ReflectionReturnValueTest.php index de45fd24..d92e8500 100644 --- a/test/Reflection/ReflectionReturnValueTest.php +++ b/test/Reflection/ReflectionReturnValueTest.php @@ -2,20 +2,19 @@ /** * @see https://github.com/laminas/laminas-server for the canonical source repository - * @copyright https://github.com/laminas/laminas-server/blob/master/COPYRIGHT.md - * @license https://github.com/laminas/laminas-server/blob/master/LICENSE.md New BSD License */ namespace LaminasTest\Server\Reflection; use Laminas\Server\Reflection; +use PHPUnit\Framework\TestCase; /** * Test case for \Laminas\Server\Reflection\ReflectionReturnValue * * @group Laminas_Server */ -class ReflectionReturnValueTest extends \PHPUnit\Framework\TestCase +class ReflectionReturnValueTest extends TestCase { /** * __construct() test @@ -27,8 +26,6 @@ class ReflectionReturnValueTest extends \PHPUnit\Framework\TestCase * - description: Optional; has default; * * Returns: void - * - * @return void */ public function testConstructor(): void { @@ -42,8 +39,6 @@ public function testConstructor(): void * Call as method call * * Returns: string - * - * @return void */ public function testGetType(): void { @@ -63,8 +58,6 @@ public function testGetType(): void * - type: * * Returns: void - * - * @return void */ public function testSetType(): void { @@ -80,8 +73,6 @@ public function testSetType(): void * Call as method call * * Returns: string - * - * @return void */ public function testGetDescription(): void { @@ -101,8 +92,6 @@ public function testGetDescription(): void * - description: * * Returns: void - * - * @return void */ public function testSetDescription(): void { diff --git a/test/Reflection/TestAsset/ReflectionMethodInterface.php b/test/Reflection/TestAsset/ReflectionMethodInterface.php index a827c458..52828aa3 100644 --- a/test/Reflection/TestAsset/ReflectionMethodInterface.php +++ b/test/Reflection/TestAsset/ReflectionMethodInterface.php @@ -2,8 +2,6 @@ /** * @see https://github.com/laminas/laminas-server for the canonical source repository - * @copyright https://github.com/laminas/laminas-server/blob/master/COPYRIGHT.md - * @license https://github.com/laminas/laminas-server/blob/master/LICENSE.md New BSD License */ namespace LaminasTest\Server\Reflection\TestAsset; diff --git a/test/Reflection/TestAsset/ReflectionMethodNode.php b/test/Reflection/TestAsset/ReflectionMethodNode.php index ef27b4ef..45d761d0 100644 --- a/test/Reflection/TestAsset/ReflectionMethodNode.php +++ b/test/Reflection/TestAsset/ReflectionMethodNode.php @@ -2,8 +2,6 @@ /** * @see https://github.com/laminas/laminas-server for the canonical source repository - * @copyright https://github.com/laminas/laminas-server/blob/master/COPYRIGHT.md - * @license https://github.com/laminas/laminas-server/blob/master/LICENSE.md New BSD License */ namespace LaminasTest\Server\Reflection\TestAsset; diff --git a/test/Reflection/TestAsset/ReflectionMethodTestInstance.php b/test/Reflection/TestAsset/ReflectionMethodTestInstance.php index fb79a544..433fa08b 100644 --- a/test/Reflection/TestAsset/ReflectionMethodTestInstance.php +++ b/test/Reflection/TestAsset/ReflectionMethodTestInstance.php @@ -2,8 +2,6 @@ /** * @see https://github.com/laminas/laminas-server for the canonical source repository - * @copyright https://github.com/laminas/laminas-server/blob/master/COPYRIGHT.md - * @license https://github.com/laminas/laminas-server/blob/master/LICENSE.md New BSD License */ namespace LaminasTest\Server\Reflection\TestAsset; diff --git a/test/Reflection/TestAsset/functions.php b/test/Reflection/TestAsset/functions.php index 25c59810..94edd805 100644 --- a/test/Reflection/TestAsset/functions.php +++ b/test/Reflection/TestAsset/functions.php @@ -2,6 +2,8 @@ namespace LaminasTest\Server\Reflection\TestAsset; +use function is_array; + /** * Test function for reflection unit tests * @@ -23,8 +25,6 @@ function function1($var1, $var2, $var3 = null): ?array /** * Test function for reflection unit tests; test what happens when no return * value or params specified in docblock. - * - * @return void */ function function2(): void { diff --git a/test/ReflectionTest.php b/test/ReflectionTest.php index 1a8656fe..ce428174 100644 --- a/test/ReflectionTest.php +++ b/test/ReflectionTest.php @@ -2,8 +2,6 @@ /** * @see https://github.com/laminas/laminas-server for the canonical source repository - * @copyright https://github.com/laminas/laminas-server/blob/master/COPYRIGHT.md - * @license https://github.com/laminas/laminas-server/blob/master/LICENSE.md New BSD License */ namespace LaminasTest\Server; @@ -20,8 +18,6 @@ class ReflectionTest extends TestCase { /** * reflectClass() test - * - * @return void */ public function testReflectClass(): void { @@ -46,8 +42,6 @@ public function testReflectClassThrowsExceptionOnInvalidParameter(): void /** * reflectClass() test; test namespaces - * - * @return void */ public function testReflectClass2(): void { @@ -57,8 +51,6 @@ public function testReflectClass2(): void /** * reflectFunction() test - * - * @return void */ public function testReflectFunction(): void { @@ -83,8 +75,6 @@ public function testReflectFunctionThrowsExceptionOnInvalidParam(): void /** * reflectFunction() test; test namespaces - * - * @return void */ public function testReflectFunction2(): void { diff --git a/test/TestAsset/ReflectionTestClass.php b/test/TestAsset/ReflectionTestClass.php index 2f86650d..8088623d 100644 --- a/test/TestAsset/ReflectionTestClass.php +++ b/test/TestAsset/ReflectionTestClass.php @@ -2,8 +2,6 @@ /** * @see https://github.com/laminas/laminas-server for the canonical source repository - * @copyright https://github.com/laminas/laminas-server/blob/master/COPYRIGHT.md - * @license https://github.com/laminas/laminas-server/blob/master/LICENSE.md New BSD License */ namespace LaminasTest\Server\TestAsset; @@ -29,8 +27,6 @@ public function __construct($arg = null) * * @param string $arg1 * @param array $arg2 - * - * @return void */ public function one($arg1, $arg2 = null): void { @@ -43,8 +39,6 @@ public function one($arg1, $arg2 = null): void * * @param string $arg1 * @param array $arg2 - * - * @return void */ protected function _one($arg1, $arg2 = null): void { @@ -56,8 +50,6 @@ protected function _one($arg1, $arg2 = null): void * * @param string $arg1 * @param string $arg2 - * - * @return void */ public static function two($arg1, $arg2): void { diff --git a/test/TestAsset/reflectionTestFunction.php b/test/TestAsset/reflectionTestFunction.php index 95150e94..ae03d9e9 100644 --- a/test/TestAsset/reflectionTestFunction.php +++ b/test/TestAsset/reflectionTestFunction.php @@ -2,8 +2,6 @@ /** * @see https://github.com/laminas/laminas-server for the canonical source repository - * @copyright https://github.com/laminas/laminas-server/blob/master/COPYRIGHT.md - * @license https://github.com/laminas/laminas-server/blob/master/LICENSE.md New BSD License */ namespace LaminasTest\Server\TestAsset; @@ -17,8 +15,6 @@ * @param string|array $arg2 * @param string $arg3 Optional argument * @param string|struct|false $arg4 Optional argument - * - * @return void */ function reflectionTestFunction($arg1, $arg2, $arg3 = 'string', $arg4 = 'array'): void {