diff --git a/.github/workflows/code_quality.yaml b/.github/workflows/code_quality.yaml index bb45e97..ff857d9 100644 --- a/.github/workflows/code_quality.yaml +++ b/.github/workflows/code_quality.yaml @@ -15,6 +15,9 @@ jobs: strategy: matrix: + php: + - 8.2 + - 8.3 actions: - name: 'Composer Normalize' @@ -40,14 +43,14 @@ jobs: name: 'PHPUnit' run: composer phpunit - name: ${{ matrix.actions.name }} + name: ${{ matrix.actions.name }} (PHP ${{ matrix.php }}) steps: - uses: actions/checkout@v4 - uses: shivammathur/setup-php@v2 with: - php-version: 8.3 + php-version: ${{ matrix.php }} coverage: none - uses: ramsey/composer-install@v2 diff --git a/composer.json b/composer.json index 0e974e2..3544fbc 100644 --- a/composer.json +++ b/composer.json @@ -45,6 +45,11 @@ "post-update-cmd": [ "@composer normalize" ], + "code-quality": [ + "@rector", + "@phpstan", + "@pint" + ], "phpstan": "vendor/bin/phpstan analyse --ansi", "phpunit": "vendor/bin/phpunit tests", "pint": "vendor/bin/pint", diff --git a/composer.lock b/composer.lock index 3ff6b7d..fa414cc 100644 --- a/composer.lock +++ b/composer.lock @@ -8,16 +8,16 @@ "packages": [ { "name": "phpstan/phpstan", - "version": "1.10.67", + "version": "1.11.8", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan.git", - "reference": "16ddbe776f10da6a95ebd25de7c1dbed397dc493" + "reference": "6adbd118e6c0515dd2f36b06cde1d6da40f1b8ec" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/16ddbe776f10da6a95ebd25de7c1dbed397dc493", - "reference": "16ddbe776f10da6a95ebd25de7c1dbed397dc493", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/6adbd118e6c0515dd2f36b06cde1d6da40f1b8ec", + "reference": "6adbd118e6c0515dd2f36b06cde1d6da40f1b8ec", "shasum": "" }, "require": { @@ -62,25 +62,25 @@ "type": "github" } ], - "time": "2024-04-16T07:22:02+00:00" + "time": "2024-07-24T07:01:22+00:00" }, { "name": "rector/rector", - "version": "1.0.4", + "version": "1.2.2", "source": { "type": "git", "url": "https://github.com/rectorphp/rector.git", - "reference": "6e04d0eb087aef707fa0c5686d33d6ff61f4a555" + "reference": "044e6364017882d1e346da8690eeabc154da5495" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/rectorphp/rector/zipball/6e04d0eb087aef707fa0c5686d33d6ff61f4a555", - "reference": "6e04d0eb087aef707fa0c5686d33d6ff61f4a555", + "url": "https://api.github.com/repos/rectorphp/rector/zipball/044e6364017882d1e346da8690eeabc154da5495", + "reference": "044e6364017882d1e346da8690eeabc154da5495", "shasum": "" }, "require": { "php": "^7.2|^8.0", - "phpstan/phpstan": "^1.10.57" + "phpstan/phpstan": "^1.11" }, "conflict": { "rector/rector-doctrine": "*", @@ -113,7 +113,7 @@ ], "support": { "issues": "https://github.com/rectorphp/rector/issues", - "source": "https://github.com/rectorphp/rector/tree/1.0.4" + "source": "https://github.com/rectorphp/rector/tree/1.2.2" }, "funding": [ { @@ -121,7 +121,7 @@ "type": "github" } ], - "time": "2024-04-05T09:01:07+00:00" + "time": "2024-07-25T07:44:34+00:00" }, { "name": "webmozart/assert", @@ -185,16 +185,16 @@ "packages-dev": [ { "name": "ergebnis/composer-normalize", - "version": "2.42.0", + "version": "2.43.0", "source": { "type": "git", "url": "https://github.com/ergebnis/composer-normalize.git", - "reference": "02cf2b69ad2a74c6f11a8c3f5f054b8f949df910" + "reference": "4b46330c84bb8f43fac79f5c5a05162fc7c80d75" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/ergebnis/composer-normalize/zipball/02cf2b69ad2a74c6f11a8c3f5f054b8f949df910", - "reference": "02cf2b69ad2a74c6f11a8c3f5f054b8f949df910", + "url": "https://api.github.com/repos/ergebnis/composer-normalize/zipball/4b46330c84bb8f43fac79f5c5a05162fc7c80d75", + "reference": "4b46330c84bb8f43fac79f5c5a05162fc7c80d75", "shasum": "" }, "require": { @@ -208,17 +208,17 @@ "php": "~7.4.0 || ~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0" }, "require-dev": { - "composer/composer": "^2.6.6", + "composer/composer": "^2.7.7", "ergebnis/license": "^2.4.0", - "ergebnis/php-cs-fixer-config": "^6.20.0", - "ergebnis/phpunit-slow-test-detector": "^2.9.0", + "ergebnis/php-cs-fixer-config": "^6.30.1", + "ergebnis/phpunit-slow-test-detector": "^2.14.0", "fakerphp/faker": "^1.23.1", "infection/infection": "~0.26.6", - "phpunit/phpunit": "^9.6.16", - "psalm/plugin-phpunit": "~0.18.4", - "rector/rector": "~0.19.2", - "symfony/filesystem": "^5.4.25", - "vimeo/psalm": "^5.20.0" + "phpunit/phpunit": "^9.6.19", + "psalm/plugin-phpunit": "~0.19.0", + "rector/rector": "^1.1.0", + "symfony/filesystem": "^5.4.40", + "vimeo/psalm": "^5.24.0" }, "type": "composer-plugin", "extra": { @@ -258,7 +258,7 @@ "security": "https://github.com/ergebnis/composer-normalize/blob/main/.github/SECURITY.md", "source": "https://github.com/ergebnis/composer-normalize" }, - "time": "2024-01-30T11:54:02+00:00" + "time": "2024-06-16T13:22:18+00:00" }, { "name": "ergebnis/json", @@ -594,20 +594,20 @@ }, { "name": "justinrainbow/json-schema", - "version": "v5.2.13", + "version": "5.3.0", "source": { "type": "git", - "url": "https://github.com/justinrainbow/json-schema.git", - "reference": "fbbe7e5d79f618997bc3332a6f49246036c45793" + "url": "https://github.com/jsonrainbow/json-schema.git", + "reference": "feb2ca6dd1cebdaf1ed60a4c8de2e53ce11c4fd8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/justinrainbow/json-schema/zipball/fbbe7e5d79f618997bc3332a6f49246036c45793", - "reference": "fbbe7e5d79f618997bc3332a6f49246036c45793", + "url": "https://api.github.com/repos/jsonrainbow/json-schema/zipball/feb2ca6dd1cebdaf1ed60a4c8de2e53ce11c4fd8", + "reference": "feb2ca6dd1cebdaf1ed60a4c8de2e53ce11c4fd8", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": ">=7.1" }, "require-dev": { "friendsofphp/php-cs-fixer": "~2.2.20||~2.15.1", @@ -618,11 +618,6 @@ "bin/validate-json" ], "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.0.x-dev" - } - }, "autoload": { "psr-4": { "JsonSchema\\": "src/JsonSchema/" @@ -657,23 +652,23 @@ "schema" ], "support": { - "issues": "https://github.com/justinrainbow/json-schema/issues", - "source": "https://github.com/justinrainbow/json-schema/tree/v5.2.13" + "issues": "https://github.com/jsonrainbow/json-schema/issues", + "source": "https://github.com/jsonrainbow/json-schema/tree/5.3.0" }, - "time": "2023-09-26T02:20:38+00:00" + "time": "2024-07-06T21:00:26+00:00" }, { "name": "laravel/pint", - "version": "v1.15.2", + "version": "v1.17.0", "source": { "type": "git", "url": "https://github.com/laravel/pint.git", - "reference": "2c9f8004899815f3f0ee3cb28ef7281e2b589134" + "reference": "4dba80c1de4b81dc4c4fb10ea6f4781495eb29f5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/pint/zipball/2c9f8004899815f3f0ee3cb28ef7281e2b589134", - "reference": "2c9f8004899815f3f0ee3cb28ef7281e2b589134", + "url": "https://api.github.com/repos/laravel/pint/zipball/4dba80c1de4b81dc4c4fb10ea6f4781495eb29f5", + "reference": "4dba80c1de4b81dc4c4fb10ea6f4781495eb29f5", "shasum": "" }, "require": { @@ -684,13 +679,13 @@ "php": "^8.1.0" }, "require-dev": { - "friendsofphp/php-cs-fixer": "^3.54.0", - "illuminate/view": "^10.48.8", - "larastan/larastan": "^2.9.5", - "laravel-zero/framework": "^10.3.0", - "mockery/mockery": "^1.6.11", + "friendsofphp/php-cs-fixer": "^3.59.3", + "illuminate/view": "^10.48.12", + "larastan/larastan": "^2.9.7", + "laravel-zero/framework": "^10.4.0", + "mockery/mockery": "^1.6.12", "nunomaduro/termwind": "^1.15.1", - "pestphp/pest": "^2.34.7" + "pestphp/pest": "^2.34.8" }, "bin": [ "builds/pint" @@ -726,7 +721,7 @@ "issues": "https://github.com/laravel/pint/issues", "source": "https://github.com/laravel/pint" }, - "time": "2024-04-23T15:42:34+00:00" + "time": "2024-07-23T16:40:20+00:00" }, { "name": "localheinz/diff", @@ -790,16 +785,16 @@ }, { "name": "myclabs/deep-copy", - "version": "1.11.1", + "version": "1.12.0", "source": { "type": "git", "url": "https://github.com/myclabs/DeepCopy.git", - "reference": "7284c22080590fb39f2ffa3e9057f10a4ddd0e0c" + "reference": "3a6b9a42cd8f8771bd4295d13e1423fa7f3d942c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/7284c22080590fb39f2ffa3e9057f10a4ddd0e0c", - "reference": "7284c22080590fb39f2ffa3e9057f10a4ddd0e0c", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/3a6b9a42cd8f8771bd4295d13e1423fa7f3d942c", + "reference": "3a6b9a42cd8f8771bd4295d13e1423fa7f3d942c", "shasum": "" }, "require": { @@ -807,11 +802,12 @@ }, "conflict": { "doctrine/collections": "<1.6.8", - "doctrine/common": "<2.13.3 || >=3,<3.2.2" + "doctrine/common": "<2.13.3 || >=3 <3.2.2" }, "require-dev": { "doctrine/collections": "^1.6.8", "doctrine/common": "^2.13.3 || ^3.2.2", + "phpspec/prophecy": "^1.10", "phpunit/phpunit": "^7.5.20 || ^8.5.23 || ^9.5.13" }, "type": "library", @@ -837,7 +833,7 @@ ], "support": { "issues": "https://github.com/myclabs/DeepCopy/issues", - "source": "https://github.com/myclabs/DeepCopy/tree/1.11.1" + "source": "https://github.com/myclabs/DeepCopy/tree/1.12.0" }, "funding": [ { @@ -845,20 +841,20 @@ "type": "tidelift" } ], - "time": "2023-03-08T13:26:56+00:00" + "time": "2024-06-12T14:39:25+00:00" }, { "name": "nikic/php-parser", - "version": "v5.0.2", + "version": "v5.1.0", "source": { "type": "git", "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "139676794dc1e9231bf7bcd123cfc0c99182cb13" + "reference": "683130c2ff8c2739f4822ff7ac5c873ec529abd1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/139676794dc1e9231bf7bcd123cfc0c99182cb13", - "reference": "139676794dc1e9231bf7bcd123cfc0c99182cb13", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/683130c2ff8c2739f4822ff7ac5c873ec529abd1", + "reference": "683130c2ff8c2739f4822ff7ac5c873ec529abd1", "shasum": "" }, "require": { @@ -869,7 +865,7 @@ }, "require-dev": { "ircmaxell/php-yacc": "^0.0.7", - "phpunit/phpunit": "^7.0 || ^8.0 || ^9.0" + "phpunit/phpunit": "^9.0" }, "bin": [ "bin/php-parse" @@ -901,9 +897,9 @@ ], "support": { "issues": "https://github.com/nikic/PHP-Parser/issues", - "source": "https://github.com/nikic/PHP-Parser/tree/v5.0.2" + "source": "https://github.com/nikic/PHP-Parser/tree/v5.1.0" }, - "time": "2024-03-05T20:51:40+00:00" + "time": "2024-07-01T20:03:41+00:00" }, { "name": "phar-io/manifest", @@ -1025,16 +1021,16 @@ }, { "name": "phpstan/extension-installer", - "version": "1.3.1", + "version": "1.4.1", "source": { "type": "git", "url": "https://github.com/phpstan/extension-installer.git", - "reference": "f45734bfb9984c6c56c4486b71230355f066a58a" + "reference": "f6b87faf9fc7978eab2f7919a8760bc9f58f9203" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/extension-installer/zipball/f45734bfb9984c6c56c4486b71230355f066a58a", - "reference": "f45734bfb9984c6c56c4486b71230355f066a58a", + "url": "https://api.github.com/repos/phpstan/extension-installer/zipball/f6b87faf9fc7978eab2f7919a8760bc9f58f9203", + "reference": "f6b87faf9fc7978eab2f7919a8760bc9f58f9203", "shasum": "" }, "require": { @@ -1063,27 +1059,27 @@ "description": "Composer plugin for automatic installation of PHPStan extensions", "support": { "issues": "https://github.com/phpstan/extension-installer/issues", - "source": "https://github.com/phpstan/extension-installer/tree/1.3.1" + "source": "https://github.com/phpstan/extension-installer/tree/1.4.1" }, - "time": "2023-05-24T08:59:17+00:00" + "time": "2024-06-10T08:20:49+00:00" }, { "name": "phpstan/phpstan-strict-rules", - "version": "1.5.5", + "version": "1.6.0", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan-strict-rules.git", - "reference": "2e193a07651a6f4be3baa44ddb21d822681f5918" + "reference": "363f921dd8441777d4fc137deb99beb486c77df1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan-strict-rules/zipball/2e193a07651a6f4be3baa44ddb21d822681f5918", - "reference": "2e193a07651a6f4be3baa44ddb21d822681f5918", + "url": "https://api.github.com/repos/phpstan/phpstan-strict-rules/zipball/363f921dd8441777d4fc137deb99beb486c77df1", + "reference": "363f921dd8441777d4fc137deb99beb486c77df1", "shasum": "" }, "require": { "php": "^7.2 || ^8.0", - "phpstan/phpstan": "^1.10.60" + "phpstan/phpstan": "^1.11" }, "require-dev": { "nikic/php-parser": "^4.13.0", @@ -1112,22 +1108,22 @@ "description": "Extra strict and opinionated rules for PHPStan", "support": { "issues": "https://github.com/phpstan/phpstan-strict-rules/issues", - "source": "https://github.com/phpstan/phpstan-strict-rules/tree/1.5.5" + "source": "https://github.com/phpstan/phpstan-strict-rules/tree/1.6.0" }, - "time": "2024-04-19T15:12:26+00:00" + "time": "2024-04-20T06:37:51+00:00" }, { "name": "phpstan/phpstan-webmozart-assert", - "version": "1.2.6", + "version": "1.2.7", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan-webmozart-assert.git", - "reference": "c1739d090e44b82b41b8e32f429fa68ddc28072a" + "reference": "923bd58cc1c8d2bf8e78a8fbca4b224805237dc2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan-webmozart-assert/zipball/c1739d090e44b82b41b8e32f429fa68ddc28072a", - "reference": "c1739d090e44b82b41b8e32f429fa68ddc28072a", + "url": "https://api.github.com/repos/phpstan/phpstan-webmozart-assert/zipball/923bd58cc1c8d2bf8e78a8fbca4b224805237dc2", + "reference": "923bd58cc1c8d2bf8e78a8fbca4b224805237dc2", "shasum": "" }, "require": { @@ -1163,22 +1159,22 @@ "description": "PHPStan webmozart/assert extension", "support": { "issues": "https://github.com/phpstan/phpstan-webmozart-assert/issues", - "source": "https://github.com/phpstan/phpstan-webmozart-assert/tree/1.2.6" + "source": "https://github.com/phpstan/phpstan-webmozart-assert/tree/1.2.7" }, - "time": "2024-03-30T14:14:20+00:00" + "time": "2024-07-05T08:05:21+00:00" }, { "name": "phpunit/php-code-coverage", - "version": "10.1.14", + "version": "10.1.15", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "e3f51450ebffe8e0efdf7346ae966a656f7d5e5b" + "reference": "5da8b1728acd1e6ffdf2ff32ffbdfd04307f26ae" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/e3f51450ebffe8e0efdf7346ae966a656f7d5e5b", - "reference": "e3f51450ebffe8e0efdf7346ae966a656f7d5e5b", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/5da8b1728acd1e6ffdf2ff32ffbdfd04307f26ae", + "reference": "5da8b1728acd1e6ffdf2ff32ffbdfd04307f26ae", "shasum": "" }, "require": { @@ -1235,7 +1231,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", "security": "https://github.com/sebastianbergmann/php-code-coverage/security/policy", - "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/10.1.14" + "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/10.1.15" }, "funding": [ { @@ -1243,7 +1239,7 @@ "type": "github" } ], - "time": "2024-03-12T15:33:41+00:00" + "time": "2024-06-29T08:25:15+00:00" }, { "name": "phpunit/php-file-iterator", @@ -1490,16 +1486,16 @@ }, { "name": "phpunit/phpunit", - "version": "10.5.20", + "version": "10.5.28", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "547d314dc24ec1e177720d45c6263fb226cc2ae3" + "reference": "ff7fb85cdf88131b83e721fb2a327b664dbed275" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/547d314dc24ec1e177720d45c6263fb226cc2ae3", - "reference": "547d314dc24ec1e177720d45c6263fb226cc2ae3", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/ff7fb85cdf88131b83e721fb2a327b664dbed275", + "reference": "ff7fb85cdf88131b83e721fb2a327b664dbed275", "shasum": "" }, "require": { @@ -1509,26 +1505,26 @@ "ext-mbstring": "*", "ext-xml": "*", "ext-xmlwriter": "*", - "myclabs/deep-copy": "^1.10.1", - "phar-io/manifest": "^2.0.3", - "phar-io/version": "^3.0.2", + "myclabs/deep-copy": "^1.12.0", + "phar-io/manifest": "^2.0.4", + "phar-io/version": "^3.2.1", "php": ">=8.1", - "phpunit/php-code-coverage": "^10.1.5", - "phpunit/php-file-iterator": "^4.0", - "phpunit/php-invoker": "^4.0", - "phpunit/php-text-template": "^3.0", - "phpunit/php-timer": "^6.0", - "sebastian/cli-parser": "^2.0", - "sebastian/code-unit": "^2.0", - "sebastian/comparator": "^5.0", - "sebastian/diff": "^5.0", - "sebastian/environment": "^6.0", - "sebastian/exporter": "^5.1", - "sebastian/global-state": "^6.0.1", - "sebastian/object-enumerator": "^5.0", - "sebastian/recursion-context": "^5.0", - "sebastian/type": "^4.0", - "sebastian/version": "^4.0" + "phpunit/php-code-coverage": "^10.1.15", + "phpunit/php-file-iterator": "^4.1.0", + "phpunit/php-invoker": "^4.0.0", + "phpunit/php-text-template": "^3.0.1", + "phpunit/php-timer": "^6.0.0", + "sebastian/cli-parser": "^2.0.1", + "sebastian/code-unit": "^2.0.0", + "sebastian/comparator": "^5.0.1", + "sebastian/diff": "^5.1.1", + "sebastian/environment": "^6.1.0", + "sebastian/exporter": "^5.1.2", + "sebastian/global-state": "^6.0.2", + "sebastian/object-enumerator": "^5.0.0", + "sebastian/recursion-context": "^5.0.0", + "sebastian/type": "^4.0.0", + "sebastian/version": "^4.0.1" }, "suggest": { "ext-soap": "To be able to generate mocks based on WSDL files" @@ -1571,7 +1567,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", "security": "https://github.com/sebastianbergmann/phpunit/security/policy", - "source": "https://github.com/sebastianbergmann/phpunit/tree/10.5.20" + "source": "https://github.com/sebastianbergmann/phpunit/tree/10.5.28" }, "funding": [ { @@ -1587,7 +1583,7 @@ "type": "tidelift" } ], - "time": "2024-04-24T06:32:35+00:00" + "time": "2024-07-18T14:54:16+00:00" }, { "name": "sebastian/cli-parser", diff --git a/pint.json b/pint.json index ac8539e..1ca227b 100644 --- a/pint.json +++ b/pint.json @@ -18,6 +18,7 @@ }, "blank_line_before_statement": { "statements": [ + "case", "continue", "declare", "default", @@ -38,7 +39,12 @@ ] }, "cast_spaces": true, - "class_attributes_separation": true, + "class_attributes_separation": { + "elements": { + "const": "only_if_meta", + "property": "only_if_meta" + } + }, "class_definition": { "multi_line_extends_each_single_line": true, "single_item_single_line": true, @@ -87,15 +93,19 @@ "method_chaining_indentation": true, "modernize_strpos": true, "modernize_types_casting": true, + "multiline_comment_opening_closing": true, + "multiline_string_to_heredoc": true, "multiline_whitespace_before_semicolons": true, "native_function_casing": true, "native_type_declaration_casing": true, "new_with_parentheses": { - "anonymous_class": false, "named_class": false }, "no_alias_functions": true, "no_alias_language_construct_call": true, + "no_alternative_syntax": { + "fix_non_monolithic_code": false + }, "no_binary_string": true, "no_blank_lines_after_phpdoc": true, "no_empty_comment": true, @@ -129,6 +139,7 @@ "no_spaces_around_offset": true, "no_superfluous_elseif": true, "no_trailing_comma_in_singleline": true, + "no_trailing_whitespace_in_string": true, "no_unneeded_braces": true, "no_unneeded_control_parentheses": true, "no_unneeded_import_alias": true, @@ -147,12 +158,18 @@ "nullable_type_declaration_for_default_null_value": true, "object_operator_without_whitespace": true, "octal_notation": true, - "operator_linebreak": true, + "operator_linebreak": { + "only_booleans": true, + "position": "end" + }, + "ordered_attributes": true, "ordered_interfaces": true, "ordered_traits": true, "ordered_types": true, + "php_unit_attributes": true, "php_unit_construct": true, "php_unit_data_provider_name": true, + "php_unit_data_provider_return_type": true, "php_unit_data_provider_static": true, "php_unit_dedicate_assert": true, "php_unit_dedicate_assert_internal_type": true, @@ -164,11 +181,15 @@ "php_unit_mock": true, "php_unit_mock_short_will_return": true, "php_unit_namespaced": true, + "php_unit_no_expectation_annotation": true, "php_unit_set_up_tear_down_visibility": true, + "php_unit_strict": true, "php_unit_test_annotation": true, "php_unit_test_case_static_method_calls": true, "phpdoc_add_missing_param_annotation": true, "phpdoc_align": true, + "phpdoc_annotation_without_dot": true, + "phpdoc_array_type": true, "phpdoc_indent": true, "phpdoc_inline_tag_normalizer": true, "phpdoc_line_span": true, @@ -212,9 +233,12 @@ "single_quote": true, "single_space_around_construct": true, "space_after_semicolon": true, + "standardize_increment": true, "standardize_not_equals": true, + "static_lambda": true, "strict_comparison": true, "strict_param": true, + "string_implicit_backslashes": true, "string_length_to_empty": true, "string_line_ending": true, "switch_continue_to_break": true, @@ -230,6 +254,7 @@ "whitespace_after_comma_in_array": { "ensure_single_space": true }, + "yield_from_array_to_yields": true, "yoda_style": { "equal": false, "identical": false, diff --git a/src/Rules/MethodCall/ParameterAdderRector.php b/src/Rules/MethodCall/ParameterAdderRector.php index a96f140..d4478fb 100644 --- a/src/Rules/MethodCall/ParameterAdderRector.php +++ b/src/Rules/MethodCall/ParameterAdderRector.php @@ -21,8 +21,7 @@ final class ParameterAdderRector extends AbstractRector implements ConfigurableR * @var array */ private array $configuration = []; - - private bool $hasChanged = false; + private bool $hasChanged = false; public function getNodeTypes(): array { diff --git a/src/Set/WordPressLevelSetList.php b/src/Set/WordPressLevelSetList.php index 48955ea..b0afbba 100644 --- a/src/Set/WordPressLevelSetList.php +++ b/src/Set/WordPressLevelSetList.php @@ -7,100 +7,52 @@ final class WordPressLevelSetList implements SetListInterface { public const UP_TO_WP_0_71 = __DIR__ . '/../../config/sets/level/up-to-wp-0.71.php'; - - public const UP_TO_WP_1_0 = __DIR__ . '/../../config/sets/level/up-to-wp-1.0.php'; - - public const UP_TO_WP_1_2 = __DIR__ . '/../../config/sets/level/up-to-wp-1.2.php'; - - public const UP_TO_WP_1_5 = __DIR__ . '/../../config/sets/level/up-to-wp-1.5.php'; - - public const UP_TO_WP_2_0 = __DIR__ . '/../../config/sets/level/up-to-wp-2.0.php'; - - public const UP_TO_WP_2_1 = __DIR__ . '/../../config/sets/level/up-to-wp-2.1.php'; - - public const UP_TO_WP_2_2 = __DIR__ . '/../../config/sets/level/up-to-wp-2.2.php'; - - public const UP_TO_WP_2_3 = __DIR__ . '/../../config/sets/level/up-to-wp-2.3.php'; - - public const UP_TO_WP_2_5 = __DIR__ . '/../../config/sets/level/up-to-wp-2.5.php'; - - public const UP_TO_WP_2_6 = __DIR__ . '/../../config/sets/level/up-to-wp-2.6.php'; - - public const UP_TO_WP_2_7 = __DIR__ . '/../../config/sets/level/up-to-wp-2.7.php'; - - public const UP_TO_WP_2_8 = __DIR__ . '/../../config/sets/level/up-to-wp-2.8.php'; - - public const UP_TO_WP_2_9 = __DIR__ . '/../../config/sets/level/up-to-wp-2.9.php'; - - public const UP_TO_WP_3_0 = __DIR__ . '/../../config/sets/level/up-to-wp-3.0.php'; - - public const UP_TO_WP_3_1 = __DIR__ . '/../../config/sets/level/up-to-wp-3.1.php'; - - public const UP_TO_WP_3_2 = __DIR__ . '/../../config/sets/level/up-to-wp-3.2.php'; - - public const UP_TO_WP_3_3 = __DIR__ . '/../../config/sets/level/up-to-wp-3.3.php'; - - public const UP_TO_WP_3_4 = __DIR__ . '/../../config/sets/level/up-to-wp-3.4.php'; - - public const UP_TO_WP_3_5 = __DIR__ . '/../../config/sets/level/up-to-wp-3.5.php'; - - public const UP_TO_WP_3_6 = __DIR__ . '/../../config/sets/level/up-to-wp-3.6.php'; - - public const UP_TO_WP_3_7 = __DIR__ . '/../../config/sets/level/up-to-wp-3.7.php'; - - public const UP_TO_WP_3_8 = __DIR__ . '/../../config/sets/level/up-to-wp-3.8.php'; - - public const UP_TO_WP_3_9 = __DIR__ . '/../../config/sets/level/up-to-wp-3.9.php'; - - public const UP_TO_WP_4_0 = __DIR__ . '/../../config/sets/level/up-to-wp-4.0.php'; - - public const UP_TO_WP_4_1 = __DIR__ . '/../../config/sets/level/up-to-wp-4.1.php'; - - public const UP_TO_WP_4_2 = __DIR__ . '/../../config/sets/level/up-to-wp-4.2.php'; - - public const UP_TO_WP_4_3 = __DIR__ . '/../../config/sets/level/up-to-wp-4.3.php'; - - public const UP_TO_WP_4_4 = __DIR__ . '/../../config/sets/level/up-to-wp-4.4.php'; - - public const UP_TO_WP_4_5 = __DIR__ . '/../../config/sets/level/up-to-wp-4.5.php'; - - public const UP_TO_WP_4_6 = __DIR__ . '/../../config/sets/level/up-to-wp-4.6.php'; - - public const UP_TO_WP_4_7 = __DIR__ . '/../../config/sets/level/up-to-wp-4.7.php'; - - public const UP_TO_WP_4_8 = __DIR__ . '/../../config/sets/level/up-to-wp-4.8.php'; - - public const UP_TO_WP_4_9 = __DIR__ . '/../../config/sets/level/up-to-wp-4.9.php'; - - public const UP_TO_WP_5_0 = __DIR__ . '/../../config/sets/level/up-to-wp-5.0.php'; - - public const UP_TO_WP_5_1 = __DIR__ . '/../../config/sets/level/up-to-wp-5.1.php'; - - public const UP_TO_WP_5_2 = __DIR__ . '/../../config/sets/level/up-to-wp-5.2.php'; - - public const UP_TO_WP_5_3 = __DIR__ . '/../../config/sets/level/up-to-wp-5.3.php'; - - public const UP_TO_WP_5_4 = __DIR__ . '/../../config/sets/level/up-to-wp-5.4.php'; - - public const UP_TO_WP_5_5 = __DIR__ . '/../../config/sets/level/up-to-wp-5.5.php'; - - public const UP_TO_WP_5_6 = __DIR__ . '/../../config/sets/level/up-to-wp-5.6.php'; - - public const UP_TO_WP_5_7 = __DIR__ . '/../../config/sets/level/up-to-wp-5.7.php'; - - public const UP_TO_WP_5_8 = __DIR__ . '/../../config/sets/level/up-to-wp-5.8.php'; - - public const UP_TO_WP_5_9 = __DIR__ . '/../../config/sets/level/up-to-wp-5.9.php'; - - public const UP_TO_WP_6_0 = __DIR__ . '/../../config/sets/level/up-to-wp-6.0.php'; - - public const UP_TO_WP_6_1 = __DIR__ . '/../../config/sets/level/up-to-wp-6.1.php'; - - public const UP_TO_WP_6_2 = __DIR__ . '/../../config/sets/level/up-to-wp-6.2.php'; - - public const UP_TO_WP_6_3 = __DIR__ . '/../../config/sets/level/up-to-wp-6.3.php'; - - public const UP_TO_WP_6_4 = __DIR__ . '/../../config/sets/level/up-to-wp-6.4.php'; - - public const UP_TO_WP_6_5 = __DIR__ . '/../../config/sets/level/up-to-wp-6.5.php'; + public const UP_TO_WP_1_0 = __DIR__ . '/../../config/sets/level/up-to-wp-1.0.php'; + public const UP_TO_WP_1_2 = __DIR__ . '/../../config/sets/level/up-to-wp-1.2.php'; + public const UP_TO_WP_1_5 = __DIR__ . '/../../config/sets/level/up-to-wp-1.5.php'; + public const UP_TO_WP_2_0 = __DIR__ . '/../../config/sets/level/up-to-wp-2.0.php'; + public const UP_TO_WP_2_1 = __DIR__ . '/../../config/sets/level/up-to-wp-2.1.php'; + public const UP_TO_WP_2_2 = __DIR__ . '/../../config/sets/level/up-to-wp-2.2.php'; + public const UP_TO_WP_2_3 = __DIR__ . '/../../config/sets/level/up-to-wp-2.3.php'; + public const UP_TO_WP_2_5 = __DIR__ . '/../../config/sets/level/up-to-wp-2.5.php'; + public const UP_TO_WP_2_6 = __DIR__ . '/../../config/sets/level/up-to-wp-2.6.php'; + public const UP_TO_WP_2_7 = __DIR__ . '/../../config/sets/level/up-to-wp-2.7.php'; + public const UP_TO_WP_2_8 = __DIR__ . '/../../config/sets/level/up-to-wp-2.8.php'; + public const UP_TO_WP_2_9 = __DIR__ . '/../../config/sets/level/up-to-wp-2.9.php'; + public const UP_TO_WP_3_0 = __DIR__ . '/../../config/sets/level/up-to-wp-3.0.php'; + public const UP_TO_WP_3_1 = __DIR__ . '/../../config/sets/level/up-to-wp-3.1.php'; + public const UP_TO_WP_3_2 = __DIR__ . '/../../config/sets/level/up-to-wp-3.2.php'; + public const UP_TO_WP_3_3 = __DIR__ . '/../../config/sets/level/up-to-wp-3.3.php'; + public const UP_TO_WP_3_4 = __DIR__ . '/../../config/sets/level/up-to-wp-3.4.php'; + public const UP_TO_WP_3_5 = __DIR__ . '/../../config/sets/level/up-to-wp-3.5.php'; + public const UP_TO_WP_3_6 = __DIR__ . '/../../config/sets/level/up-to-wp-3.6.php'; + public const UP_TO_WP_3_7 = __DIR__ . '/../../config/sets/level/up-to-wp-3.7.php'; + public const UP_TO_WP_3_8 = __DIR__ . '/../../config/sets/level/up-to-wp-3.8.php'; + public const UP_TO_WP_3_9 = __DIR__ . '/../../config/sets/level/up-to-wp-3.9.php'; + public const UP_TO_WP_4_0 = __DIR__ . '/../../config/sets/level/up-to-wp-4.0.php'; + public const UP_TO_WP_4_1 = __DIR__ . '/../../config/sets/level/up-to-wp-4.1.php'; + public const UP_TO_WP_4_2 = __DIR__ . '/../../config/sets/level/up-to-wp-4.2.php'; + public const UP_TO_WP_4_3 = __DIR__ . '/../../config/sets/level/up-to-wp-4.3.php'; + public const UP_TO_WP_4_4 = __DIR__ . '/../../config/sets/level/up-to-wp-4.4.php'; + public const UP_TO_WP_4_5 = __DIR__ . '/../../config/sets/level/up-to-wp-4.5.php'; + public const UP_TO_WP_4_6 = __DIR__ . '/../../config/sets/level/up-to-wp-4.6.php'; + public const UP_TO_WP_4_7 = __DIR__ . '/../../config/sets/level/up-to-wp-4.7.php'; + public const UP_TO_WP_4_8 = __DIR__ . '/../../config/sets/level/up-to-wp-4.8.php'; + public const UP_TO_WP_4_9 = __DIR__ . '/../../config/sets/level/up-to-wp-4.9.php'; + public const UP_TO_WP_5_0 = __DIR__ . '/../../config/sets/level/up-to-wp-5.0.php'; + public const UP_TO_WP_5_1 = __DIR__ . '/../../config/sets/level/up-to-wp-5.1.php'; + public const UP_TO_WP_5_2 = __DIR__ . '/../../config/sets/level/up-to-wp-5.2.php'; + public const UP_TO_WP_5_3 = __DIR__ . '/../../config/sets/level/up-to-wp-5.3.php'; + public const UP_TO_WP_5_4 = __DIR__ . '/../../config/sets/level/up-to-wp-5.4.php'; + public const UP_TO_WP_5_5 = __DIR__ . '/../../config/sets/level/up-to-wp-5.5.php'; + public const UP_TO_WP_5_6 = __DIR__ . '/../../config/sets/level/up-to-wp-5.6.php'; + public const UP_TO_WP_5_7 = __DIR__ . '/../../config/sets/level/up-to-wp-5.7.php'; + public const UP_TO_WP_5_8 = __DIR__ . '/../../config/sets/level/up-to-wp-5.8.php'; + public const UP_TO_WP_5_9 = __DIR__ . '/../../config/sets/level/up-to-wp-5.9.php'; + public const UP_TO_WP_6_0 = __DIR__ . '/../../config/sets/level/up-to-wp-6.0.php'; + public const UP_TO_WP_6_1 = __DIR__ . '/../../config/sets/level/up-to-wp-6.1.php'; + public const UP_TO_WP_6_2 = __DIR__ . '/../../config/sets/level/up-to-wp-6.2.php'; + public const UP_TO_WP_6_3 = __DIR__ . '/../../config/sets/level/up-to-wp-6.3.php'; + public const UP_TO_WP_6_4 = __DIR__ . '/../../config/sets/level/up-to-wp-6.4.php'; + public const UP_TO_WP_6_5 = __DIR__ . '/../../config/sets/level/up-to-wp-6.5.php'; } diff --git a/src/Set/WordPressSetList.php b/src/Set/WordPressSetList.php index 19c0e56..1bc48ea 100644 --- a/src/Set/WordPressSetList.php +++ b/src/Set/WordPressSetList.php @@ -7,100 +7,52 @@ final class WordPressSetList implements SetListInterface { public const WP_0_71 = __DIR__ . '/../../config/sets/wp-0.71.php'; - - public const WP_1_0 = __DIR__ . '/../../config/sets/wp-1.0.php'; - - public const WP_1_2 = __DIR__ . '/../../config/sets/wp-1.2.php'; - - public const WP_1_5 = __DIR__ . '/../../config/sets/wp-1.5.php'; - - public const WP_2_0 = __DIR__ . '/../../config/sets/wp-2.0.php'; - - public const WP_2_1 = __DIR__ . '/../../config/sets/wp-2.1.php'; - - public const WP_2_2 = __DIR__ . '/../../config/sets/wp-2.2.php'; - - public const WP_2_3 = __DIR__ . '/../../config/sets/wp-2.3.php'; - - public const WP_2_5 = __DIR__ . '/../../config/sets/wp-2.5.php'; - - public const WP_2_6 = __DIR__ . '/../../config/sets/wp-2.6.php'; - - public const WP_2_7 = __DIR__ . '/../../config/sets/wp-2.7.php'; - - public const WP_2_8 = __DIR__ . '/../../config/sets/wp-2.8.php'; - - public const WP_2_9 = __DIR__ . '/../../config/sets/wp-2.9.php'; - - public const WP_3_0 = __DIR__ . '/../../config/sets/wp-3.0.php'; - - public const WP_3_1 = __DIR__ . '/../../config/sets/wp-3.1.php'; - - public const WP_3_2 = __DIR__ . '/../../config/sets/wp-3.2.php'; - - public const WP_3_3 = __DIR__ . '/../../config/sets/wp-3.3.php'; - - public const WP_3_4 = __DIR__ . '/../../config/sets/wp-3.4.php'; - - public const WP_3_5 = __DIR__ . '/../../config/sets/wp-3.5.php'; - - public const WP_3_6 = __DIR__ . '/../../config/sets/wp-3.6.php'; - - public const WP_3_7 = __DIR__ . '/../../config/sets/wp-3.7.php'; - - public const WP_3_8 = __DIR__ . '/../../config/sets/wp-3.8.php'; - - public const WP_3_9 = __DIR__ . '/../../config/sets/wp-3.9.php'; - - public const WP_4_0 = __DIR__ . '/../../config/sets/wp-4.0.php'; - - public const WP_4_1 = __DIR__ . '/../../config/sets/wp-4.1.php'; - - public const WP_4_2 = __DIR__ . '/../../config/sets/wp-4.2.php'; - - public const WP_4_3 = __DIR__ . '/../../config/sets/wp-4.3.php'; - - public const WP_4_4 = __DIR__ . '/../../config/sets/wp-4.4.php'; - - public const WP_4_5 = __DIR__ . '/../../config/sets/wp-4.5.php'; - - public const WP_4_6 = __DIR__ . '/../../config/sets/wp-4.6.php'; - - public const WP_4_7 = __DIR__ . '/../../config/sets/wp-4.7.php'; - - public const WP_4_8 = __DIR__ . '/../../config/sets/wp-4.8.php'; - - public const WP_4_9 = __DIR__ . '/../../config/sets/wp-4.9.php'; - - public const WP_5_0 = __DIR__ . '/../../config/sets/wp-5.0.php'; - - public const WP_5_1 = __DIR__ . '/../../config/sets/wp-5.1.php'; - - public const WP_5_2 = __DIR__ . '/../../config/sets/wp-5.2.php'; - - public const WP_5_3 = __DIR__ . '/../../config/sets/wp-5.3.php'; - - public const WP_5_4 = __DIR__ . '/../../config/sets/wp-5.4.php'; - - public const WP_5_5 = __DIR__ . '/../../config/sets/wp-5.5.php'; - - public const WP_5_6 = __DIR__ . '/../../config/sets/wp-5.6.php'; - - public const WP_5_7 = __DIR__ . '/../../config/sets/wp-5.7.php'; - - public const WP_5_8 = __DIR__ . '/../../config/sets/wp-5.8.php'; - - public const WP_5_9 = __DIR__ . '/../../config/sets/wp-5.9.php'; - - public const WP_6_0 = __DIR__ . '/../../config/sets/wp-6.0.php'; - - public const WP_6_1 = __DIR__ . '/../../config/sets/wp-6.1.php'; - - public const WP_6_2 = __DIR__ . '/../../config/sets/wp-6.2.php'; - - public const WP_6_3 = __DIR__ . '/../../config/sets/wp-6.3.php'; - - public const WP_6_4 = __DIR__ . '/../../config/sets/wp-6.4.php'; - - public const WP_6_5 = __DIR__ . '/../../config/sets/wp-6.5.php'; + public const WP_1_0 = __DIR__ . '/../../config/sets/wp-1.0.php'; + public const WP_1_2 = __DIR__ . '/../../config/sets/wp-1.2.php'; + public const WP_1_5 = __DIR__ . '/../../config/sets/wp-1.5.php'; + public const WP_2_0 = __DIR__ . '/../../config/sets/wp-2.0.php'; + public const WP_2_1 = __DIR__ . '/../../config/sets/wp-2.1.php'; + public const WP_2_2 = __DIR__ . '/../../config/sets/wp-2.2.php'; + public const WP_2_3 = __DIR__ . '/../../config/sets/wp-2.3.php'; + public const WP_2_5 = __DIR__ . '/../../config/sets/wp-2.5.php'; + public const WP_2_6 = __DIR__ . '/../../config/sets/wp-2.6.php'; + public const WP_2_7 = __DIR__ . '/../../config/sets/wp-2.7.php'; + public const WP_2_8 = __DIR__ . '/../../config/sets/wp-2.8.php'; + public const WP_2_9 = __DIR__ . '/../../config/sets/wp-2.9.php'; + public const WP_3_0 = __DIR__ . '/../../config/sets/wp-3.0.php'; + public const WP_3_1 = __DIR__ . '/../../config/sets/wp-3.1.php'; + public const WP_3_2 = __DIR__ . '/../../config/sets/wp-3.2.php'; + public const WP_3_3 = __DIR__ . '/../../config/sets/wp-3.3.php'; + public const WP_3_4 = __DIR__ . '/../../config/sets/wp-3.4.php'; + public const WP_3_5 = __DIR__ . '/../../config/sets/wp-3.5.php'; + public const WP_3_6 = __DIR__ . '/../../config/sets/wp-3.6.php'; + public const WP_3_7 = __DIR__ . '/../../config/sets/wp-3.7.php'; + public const WP_3_8 = __DIR__ . '/../../config/sets/wp-3.8.php'; + public const WP_3_9 = __DIR__ . '/../../config/sets/wp-3.9.php'; + public const WP_4_0 = __DIR__ . '/../../config/sets/wp-4.0.php'; + public const WP_4_1 = __DIR__ . '/../../config/sets/wp-4.1.php'; + public const WP_4_2 = __DIR__ . '/../../config/sets/wp-4.2.php'; + public const WP_4_3 = __DIR__ . '/../../config/sets/wp-4.3.php'; + public const WP_4_4 = __DIR__ . '/../../config/sets/wp-4.4.php'; + public const WP_4_5 = __DIR__ . '/../../config/sets/wp-4.5.php'; + public const WP_4_6 = __DIR__ . '/../../config/sets/wp-4.6.php'; + public const WP_4_7 = __DIR__ . '/../../config/sets/wp-4.7.php'; + public const WP_4_8 = __DIR__ . '/../../config/sets/wp-4.8.php'; + public const WP_4_9 = __DIR__ . '/../../config/sets/wp-4.9.php'; + public const WP_5_0 = __DIR__ . '/../../config/sets/wp-5.0.php'; + public const WP_5_1 = __DIR__ . '/../../config/sets/wp-5.1.php'; + public const WP_5_2 = __DIR__ . '/../../config/sets/wp-5.2.php'; + public const WP_5_3 = __DIR__ . '/../../config/sets/wp-5.3.php'; + public const WP_5_4 = __DIR__ . '/../../config/sets/wp-5.4.php'; + public const WP_5_5 = __DIR__ . '/../../config/sets/wp-5.5.php'; + public const WP_5_6 = __DIR__ . '/../../config/sets/wp-5.6.php'; + public const WP_5_7 = __DIR__ . '/../../config/sets/wp-5.7.php'; + public const WP_5_8 = __DIR__ . '/../../config/sets/wp-5.8.php'; + public const WP_5_9 = __DIR__ . '/../../config/sets/wp-5.9.php'; + public const WP_6_0 = __DIR__ . '/../../config/sets/wp-6.0.php'; + public const WP_6_1 = __DIR__ . '/../../config/sets/wp-6.1.php'; + public const WP_6_2 = __DIR__ . '/../../config/sets/wp-6.2.php'; + public const WP_6_3 = __DIR__ . '/../../config/sets/wp-6.3.php'; + public const WP_6_4 = __DIR__ . '/../../config/sets/wp-6.4.php'; + public const WP_6_5 = __DIR__ . '/../../config/sets/wp-6.5.php'; }