diff --git a/.github/settings.yml b/.github/settings.yml index bbf498a2..3cb325b1 100644 --- a/.github/settings.yml +++ b/.github/settings.yml @@ -14,11 +14,14 @@ branches: required_approving_review_count: 1 required_status_checks: checks: - - context: "Code Coverage (8.0, locked)" - - context: "Coding Standards (8.0, locked)" - - context: "Dependency Analysis (8.0, locked)" - - context: "Security Analysis (8.0, locked)" - - context: "Static Code Analysis (8.0, locked)" + - context: "Code Coverage (7.4, locked)" + - context: "Coding Standards (7.4, locked)" + - context: "Dependency Analysis (7.4, locked)" + - context: "Security Analysis (7.4, locked)" + - context: "Static Code Analysis (7.4, locked)" + - context: "Tests (7.4, highest)" + - context: "Tests (7.4, locked)" + - context: "Tests (7.4, lowest)" - context: "Tests (8.0, highest)" - context: "Tests (8.0, locked)" - context: "Tests (8.0, lowest)" diff --git a/.github/workflows/integrate.yaml b/.github/workflows/integrate.yaml index e48ca864..c7f36ff4 100644 --- a/.github/workflows/integrate.yaml +++ b/.github/workflows/integrate.yaml @@ -19,7 +19,7 @@ jobs: strategy: matrix: php-version: - - "8.0" + - "7.4" dependencies: - "locked" @@ -80,7 +80,7 @@ jobs: strategy: matrix: php-version: - - "8.0" + - "7.4" dependencies: - "locked" @@ -152,7 +152,7 @@ jobs: strategy: matrix: php-version: - - "8.0" + - "7.4" dependencies: - "locked" @@ -208,7 +208,7 @@ jobs: strategy: matrix: php-version: - - "8.0" + - "7.4" dependencies: - "locked" @@ -258,7 +258,7 @@ jobs: strategy: matrix: php-version: - - "8.0" + - "7.4" dependencies: - "locked" @@ -309,6 +309,7 @@ jobs: fail-fast: false matrix: php-version: + - "7.4" - "8.0" - "8.1" - "8.2" diff --git a/.github/workflows/renew.yaml b/.github/workflows/renew.yaml index d413321d..247a4557 100644 --- a/.github/workflows/renew.yaml +++ b/.github/workflows/renew.yaml @@ -17,7 +17,7 @@ jobs: strategy: matrix: php-version: - - "8.0" + - "7.4" dependencies: - "locked" diff --git a/.php-cs-fixer.fixture.php b/.php-cs-fixer.fixture.php index e5ef80e1..392a71ab 100644 --- a/.php-cs-fixer.fixture.php +++ b/.php-cs-fixer.fixture.php @@ -13,7 +13,7 @@ use Ergebnis\PhpCsFixer; -$ruleSet = PhpCsFixer\Config\RuleSet\Php80::create() +$ruleSet = PhpCsFixer\Config\RuleSet\Php74::create() ->withHeader('') ->withRules(PhpCsFixer\Config\Rules::fromArray([ 'constant_case' => false, @@ -33,8 +33,20 @@ $config = PhpCsFixer\Config\Factory::fromRuleSet($ruleSet); $config->getFinder() - ->in(__DIR__ . '/test/Fixture') - ->notPath('Classes/PHPUnit/Framework/TestCaseWithSuffixRule/Success/ImplicitlyAbstractTestCase.php'); + ->in(__DIR__ . '/test/Fixture/') + ->notPath([ + 'Classes/PHPUnit/Framework/TestCaseWithSuffixRule/Success/ImplicitlyAbstractTestCase.php', + 'Closures/NoNullableReturnTypeDeclarationRule/Failure/closure-with-nullable-union-type-return-type-declaration.php', + 'Closures/NoParameterWithNullableTypeDeclarationRule/Failure/closure-with-parameter-with-nullable-union-type-declaration.php', + 'Functions/NoNullableReturnTypeDeclarationRule/Failure/function-with-nullable-union-return-type-declaration.php', + 'Functions/NoParameterWithNullableTypeDeclarationRule/Failure/function-with-parameter-with-nullable-union-type-declaration.php', + 'Methods/NoNullableReturnTypeDeclarationRule/Failure/MethodInAnonymousClassWithNullableUnionReturnTypeDeclaration.php', + 'Methods/NoNullableReturnTypeDeclarationRule/Failure/MethodInClassWithNullableUnionReturnTypeDeclaration.php', + 'Methods/NoNullableReturnTypeDeclarationRule/Failure/MethodInInterfaceWithNullableUnionReturnTypeDeclaration.php', + 'Methods/NoParameterWithNullableTypeDeclarationRule/Failure/method-in-anonymous-class-with-parameter-with-nullable-union-type-declaration.php', + 'Methods/NoParameterWithNullableTypeDeclarationRule/Failure/MethodInClassWithParameterWithNullableUnionTypeDeclaration.php', + 'Methods/NoParameterWithNullableTypeDeclarationRule/Failure/MethodInInterfaceWithParameterWithNullableUnionTypeDeclaration.php', + ]); $config->setCacheFile(__DIR__ . '/.build/php-cs-fixer/.php_cs.fixture.cache'); diff --git a/.php-cs-fixer.php b/.php-cs-fixer.php index 408281b2..ea14ad1a 100644 --- a/.php-cs-fixer.php +++ b/.php-cs-fixer.php @@ -26,7 +26,7 @@ $license->save(); -$ruleSet = PhpCsFixer\Config\RuleSet\Php80::create()->withHeader($license->header()); +$ruleSet = PhpCsFixer\Config\RuleSet\Php74::create()->withHeader($license->header()); $config = PhpCsFixer\Config\Factory::fromRuleSet($ruleSet); diff --git a/CHANGELOG.md b/CHANGELOG.md index e85bef61..9aad43e0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ For a full diff see [`2.4.0...main`][2.4.0...main]. - Added rule error identifiers ([#875]), by [@localheinz] - Added support for PHP 8.0 ([#877]), by [@localheinz] +- Added support for PHP 7.4 ([#880]), by [@localheinz] ### Changed @@ -535,6 +536,7 @@ For a full diff see [`362c7ea...0.1.0`][362c7ea...0.1.0]. [#875]: https://github.com/ergebnis/phpstan-rules/pull/875 [#877]: https://github.com/ergebnis/phpstan-rules/pull/877 [#878]: https://github.com/ergebnis/phpstan-rules/pull/878 +[#880]: https://github.com/ergebnis/phpstan-rules/pull/880 [@enumag]: https://github.com/enumag [@ergebnis]: https://github.com/ergebnis diff --git a/composer.json b/composer.json index 9e492431..ae7afdce 100644 --- a/composer.json +++ b/composer.json @@ -21,7 +21,7 @@ "security": "https://github.com/ergebnis/phpstan-rules/blob/main/.github/SECURITY.md" }, "require": { - "php": "~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0", + "php": "~7.4.0 || ~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0", "ext-mbstring": "*", "phpstan/phpstan": "^1.10.21" }, @@ -58,7 +58,7 @@ "abandoned": "report" }, "platform": { - "php": "8.0.30" + "php": "7.4.33" }, "preferred-install": "dist", "sort-packages": true diff --git a/composer.lock b/composer.lock index ca41f356..b5d983a7 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "2bde2c53ee3cbdad719a32fee22ec116", + "content-hash": "3a5b5d491d8b92aeebdaefc6d6f38f07", "packages": [ { "name": "phpstan/phpstan", @@ -2538,27 +2538,94 @@ }, "time": "2024-02-06T01:19:44+00:00" }, + { + "name": "nette/finder", + "version": "v2.6.0", + "source": { + "type": "git", + "url": "https://github.com/nette/finder.git", + "reference": "991aefb42860abeab8e003970c3809a9d83cb932" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/nette/finder/zipball/991aefb42860abeab8e003970c3809a9d83cb932", + "reference": "991aefb42860abeab8e003970c3809a9d83cb932", + "shasum": "" + }, + "require": { + "nette/utils": "^2.4 || ^3.0", + "php": ">=7.1" + }, + "conflict": { + "nette/nette": "<2.2" + }, + "require-dev": { + "nette/tester": "^2.0", + "phpstan/phpstan": "^0.12", + "tracy/tracy": "^2.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.6-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause", + "GPL-2.0-only", + "GPL-3.0-only" + ], + "authors": [ + { + "name": "David Grudl", + "homepage": "https://davidgrudl.com" + }, + { + "name": "Nette Community", + "homepage": "https://nette.org/contributors" + } + ], + "description": "🔍 Nette Finder: find files and directories with an intuitive API.", + "homepage": "https://nette.org", + "keywords": [ + "filesystem", + "glob", + "iterator", + "nette" + ], + "support": { + "issues": "https://github.com/nette/finder/issues", + "source": "https://github.com/nette/finder/tree/v2.6.0" + }, + "time": "2022-10-13T01:31:15+00:00" + }, { "name": "nette/neon", - "version": "v3.4.4", + "version": "v3.3.4", "source": { "type": "git", "url": "https://github.com/nette/neon.git", - "reference": "3411aa86b104e2d5b7e760da4600865ead963c3c" + "reference": "bb88bf3a54dd21bf4dbddb5cd525d7b0c61b7cda" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nette/neon/zipball/3411aa86b104e2d5b7e760da4600865ead963c3c", - "reference": "3411aa86b104e2d5b7e760da4600865ead963c3c", + "url": "https://api.github.com/repos/nette/neon/zipball/bb88bf3a54dd21bf4dbddb5cd525d7b0c61b7cda", + "reference": "bb88bf3a54dd21bf4dbddb5cd525d7b0c61b7cda", "shasum": "" }, "require": { "ext-json": "*", - "php": "8.0 - 8.4" + "php": "7.1 - 8.4" }, "require-dev": { - "nette/tester": "^2.4", - "phpstan/phpstan": "^1.0", + "nette/tester": "^2.0", + "phpstan/phpstan": "^0.12", "tracy/tracy": "^2.7" }, "bin": [ @@ -2567,7 +2634,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "3.4-dev" + "dev-master": "3.3-dev" } }, "autoload": { @@ -2602,42 +2669,41 @@ ], "support": { "issues": "https://github.com/nette/neon/issues", - "source": "https://github.com/nette/neon/tree/v3.4.4" + "source": "https://github.com/nette/neon/tree/v3.3.4" }, - "time": "2024-10-04T22:00:08+00:00" + "time": "2024-10-04T22:17:24+00:00" }, { "name": "nette/php-generator", - "version": "v4.1.7", + "version": "v3.6.9", "source": { "type": "git", "url": "https://github.com/nette/php-generator.git", - "reference": "d201c9bc217e0969d1b678d286be49302972fb56" + "reference": "d31782f7bd2ae84ad06f863391ec3fb77ca4d0a6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nette/php-generator/zipball/d201c9bc217e0969d1b678d286be49302972fb56", - "reference": "d201c9bc217e0969d1b678d286be49302972fb56", + "url": "https://api.github.com/repos/nette/php-generator/zipball/d31782f7bd2ae84ad06f863391ec3fb77ca4d0a6", + "reference": "d31782f7bd2ae84ad06f863391ec3fb77ca4d0a6", "shasum": "" }, "require": { - "nette/utils": "^3.2.9 || ^4.0", - "php": "8.0 - 8.4" + "nette/utils": "^3.1.2", + "php": ">=7.2 <8.3" }, "require-dev": { - "jetbrains/phpstorm-attributes": "dev-master", "nette/tester": "^2.4", - "nikic/php-parser": "^4.18 || ^5.0", - "phpstan/phpstan": "^1.0", + "nikic/php-parser": "^4.13", + "phpstan/phpstan": "^0.12", "tracy/tracy": "^2.8" }, "suggest": { - "nikic/php-parser": "to use ClassType::from(withBodies: true) & ClassType::fromCode()" + "nikic/php-parser": "to use ClassType::withBodiesFrom() & GlobalFunction::withBodyFrom()" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.1-dev" + "dev-master": "3.6-dev" } }, "autoload": { @@ -2661,7 +2727,7 @@ "homepage": "https://nette.org/contributors" } ], - "description": "🐘 Nette PHP Generator: generates neat PHP code for you. Supports new PHP 8.4 features.", + "description": "🐘 Nette PHP Generator: generates neat PHP code for you. Supports new PHP 8.1 features.", "homepage": "https://nette.org", "keywords": [ "code", @@ -2671,38 +2737,39 @@ ], "support": { "issues": "https://github.com/nette/php-generator/issues", - "source": "https://github.com/nette/php-generator/tree/v4.1.7" + "source": "https://github.com/nette/php-generator/tree/v3.6.9" }, - "time": "2024-11-29T01:41:18+00:00" + "time": "2022-10-04T11:49:47+00:00" }, { "name": "nette/robot-loader", - "version": "v4.0.3", + "version": "v3.4.2", "source": { "type": "git", "url": "https://github.com/nette/robot-loader.git", - "reference": "45d67753fb4865bb718e9a6c9be69cc9470137b7" + "reference": "970c8f82be98ec54180c88a468cd2b057855d993" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nette/robot-loader/zipball/45d67753fb4865bb718e9a6c9be69cc9470137b7", - "reference": "45d67753fb4865bb718e9a6c9be69cc9470137b7", + "url": "https://api.github.com/repos/nette/robot-loader/zipball/970c8f82be98ec54180c88a468cd2b057855d993", + "reference": "970c8f82be98ec54180c88a468cd2b057855d993", "shasum": "" }, "require": { "ext-tokenizer": "*", - "nette/utils": "^4.0", - "php": "8.0 - 8.4" + "nette/finder": "^2.5 || ^3.0", + "nette/utils": "^3.0", + "php": ">=7.1" }, "require-dev": { - "nette/tester": "^2.4", - "phpstan/phpstan": "^1.0", - "tracy/tracy": "^2.9" + "nette/tester": "^2.0", + "phpstan/phpstan": "^0.12", + "tracy/tracy": "^2.3" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.0-dev" + "dev-master": "3.4-dev" } }, "autoload": { @@ -2737,9 +2804,9 @@ ], "support": { "issues": "https://github.com/nette/robot-loader/issues", - "source": "https://github.com/nette/robot-loader/tree/v4.0.3" + "source": "https://github.com/nette/robot-loader/tree/v3.4.2" }, - "time": "2024-06-18T20:26:39+00:00" + "time": "2022-12-14T15:41:06+00:00" }, { "name": "nette/schema", @@ -2805,30 +2872,29 @@ }, { "name": "nette/utils", - "version": "v4.0.5", + "version": "v3.2.10", "source": { "type": "git", "url": "https://github.com/nette/utils.git", - "reference": "736c567e257dbe0fcf6ce81b4d6dbe05c6899f96" + "reference": "a4175c62652f2300c8017fb7e640f9ccb11648d2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nette/utils/zipball/736c567e257dbe0fcf6ce81b4d6dbe05c6899f96", - "reference": "736c567e257dbe0fcf6ce81b4d6dbe05c6899f96", + "url": "https://api.github.com/repos/nette/utils/zipball/a4175c62652f2300c8017fb7e640f9ccb11648d2", + "reference": "a4175c62652f2300c8017fb7e640f9ccb11648d2", "shasum": "" }, "require": { - "php": "8.0 - 8.4" + "php": ">=7.2 <8.4" }, "conflict": { - "nette/finder": "<3", - "nette/schema": "<1.2.2" + "nette/di": "<3.0.6" }, "require-dev": { "jetbrains/phpstorm-attributes": "dev-master", - "nette/tester": "^2.5", + "nette/tester": "~2.0", "phpstan/phpstan": "^1.0", - "tracy/tracy": "^2.9" + "tracy/tracy": "^2.3" }, "suggest": { "ext-gd": "to use Image", @@ -2836,12 +2902,13 @@ "ext-intl": "to use Strings::webalize(), toAscii(), normalize() and compare()", "ext-json": "to use Nette\\Utils\\Json", "ext-mbstring": "to use Strings::lower() etc...", - "ext-tokenizer": "to use Nette\\Utils\\Reflection::getUseStatements()" + "ext-tokenizer": "to use Nette\\Utils\\Reflection::getUseStatements()", + "ext-xml": "to use Strings::length() etc. when mbstring is not available" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.0-dev" + "dev-master": "3.2-dev" } }, "autoload": { @@ -2885,9 +2952,9 @@ ], "support": { "issues": "https://github.com/nette/utils/issues", - "source": "https://github.com/nette/utils/tree/v4.0.5" + "source": "https://github.com/nette/utils/tree/v3.2.10" }, - "time": "2024-08-07T15:39:19+00:00" + "time": "2023-07-30T15:38:18+00:00" }, { "name": "nikic/php-parser", @@ -3583,20 +3650,20 @@ }, { "name": "psr/cache", - "version": "3.0.0", + "version": "1.0.1", "source": { "type": "git", "url": "https://github.com/php-fig/cache.git", - "reference": "aa5030cfa5405eccfdcb1083ce040c2cb8d253bf" + "reference": "d11b50ad223250cf17b86e38383413f5a6764bf8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/cache/zipball/aa5030cfa5405eccfdcb1083ce040c2cb8d253bf", - "reference": "aa5030cfa5405eccfdcb1083ce040c2cb8d253bf", + "url": "https://api.github.com/repos/php-fig/cache/zipball/d11b50ad223250cf17b86e38383413f5a6764bf8", + "reference": "d11b50ad223250cf17b86e38383413f5a6764bf8", "shasum": "" }, "require": { - "php": ">=8.0.0" + "php": ">=5.3.0" }, "type": "library", "extra": { @@ -3616,7 +3683,7 @@ "authors": [ { "name": "PHP-FIG", - "homepage": "https://www.php-fig.org/" + "homepage": "http://www.php-fig.org/" } ], "description": "Common interface for caching libraries", @@ -3626,9 +3693,9 @@ "psr-6" ], "support": { - "source": "https://github.com/php-fig/cache/tree/3.0.0" + "source": "https://github.com/php-fig/cache/tree/master" }, - "time": "2021-02-03T23:26:27+00:00" + "time": "2016-08-06T20:24:11+00:00" }, { "name": "psr/container", @@ -3735,30 +3802,30 @@ }, { "name": "psr/log", - "version": "3.0.2", + "version": "1.1.4", "source": { "type": "git", "url": "https://github.com/php-fig/log.git", - "reference": "f16e1d5863e37f8d8c2a01719f5b34baa2b714d3" + "reference": "d49695b909c3b7628b6289db5479a1c204601f11" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/log/zipball/f16e1d5863e37f8d8c2a01719f5b34baa2b714d3", - "reference": "f16e1d5863e37f8d8c2a01719f5b34baa2b714d3", + "url": "https://api.github.com/repos/php-fig/log/zipball/d49695b909c3b7628b6289db5479a1c204601f11", + "reference": "d49695b909c3b7628b6289db5479a1c204601f11", "shasum": "" }, "require": { - "php": ">=8.0.0" + "php": ">=5.3.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.x-dev" + "dev-master": "1.1.x-dev" } }, "autoload": { "psr-4": { - "Psr\\Log\\": "src" + "Psr\\Log\\": "Psr/Log/" } }, "notification-url": "https://packagist.org/downloads/", @@ -3779,9 +3846,9 @@ "psr-3" ], "support": { - "source": "https://github.com/php-fig/log/tree/3.0.2" + "source": "https://github.com/php-fig/log/tree/1.1.4" }, - "time": "2024-09-11T13:17:53+00:00" + "time": "2021-05-03T11:20:27+00:00" }, { "name": "react/cache", @@ -5278,42 +5345,46 @@ }, { "name": "symfony/console", - "version": "v6.0.19", + "version": "v5.4.47", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "c3ebc83d031b71c39da318ca8b7a07ecc67507ed" + "reference": "c4ba980ca61a9eb18ee6bcc73f28e475852bb1ed" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/c3ebc83d031b71c39da318ca8b7a07ecc67507ed", - "reference": "c3ebc83d031b71c39da318ca8b7a07ecc67507ed", + "url": "https://api.github.com/repos/symfony/console/zipball/c4ba980ca61a9eb18ee6bcc73f28e475852bb1ed", + "reference": "c4ba980ca61a9eb18ee6bcc73f28e475852bb1ed", "shasum": "" }, "require": { - "php": ">=8.0.2", + "php": ">=7.2.5", + "symfony/deprecation-contracts": "^2.1|^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.4|^6.0" + "symfony/string": "^5.1|^6.0" }, "conflict": { - "symfony/dependency-injection": "<5.4", - "symfony/dotenv": "<5.4", - "symfony/event-dispatcher": "<5.4", - "symfony/lock": "<5.4", - "symfony/process": "<5.4" + "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" }, "provide": { - "psr/log-implementation": "1.0|2.0|3.0" + "psr/log-implementation": "1.0|2.0" }, "require-dev": { - "psr/log": "^1|^2|^3", - "symfony/config": "^5.4|^6.0", - "symfony/dependency-injection": "^5.4|^6.0", - "symfony/event-dispatcher": "^5.4|^6.0", - "symfony/lock": "^5.4|^6.0", - "symfony/process": "^5.4|^6.0", - "symfony/var-dumper": "^5.4|^6.0" + "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", @@ -5348,12 +5419,12 @@ "homepage": "https://symfony.com", "keywords": [ "cli", - "command line", + "command-line", "console", "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v6.0.19" + "source": "https://github.com/symfony/console/tree/v5.4.47" }, "funding": [ { @@ -5369,29 +5440,29 @@ "type": "tidelift" } ], - "time": "2023-01-01T08:36:10+00:00" + "time": "2024-11-06T11:30:55+00:00" }, { "name": "symfony/deprecation-contracts", - "version": "v3.0.2", + "version": "v2.5.4", "source": { "type": "git", "url": "https://github.com/symfony/deprecation-contracts.git", - "reference": "26954b3d62a6c5fd0ea8a2a00c0353a14978d05c" + "reference": "605389f2a7e5625f273b53960dc46aeaf9c62918" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/26954b3d62a6c5fd0ea8a2a00c0353a14978d05c", - "reference": "26954b3d62a6c5fd0ea8a2a00c0353a14978d05c", + "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/605389f2a7e5625f273b53960dc46aeaf9c62918", + "reference": "605389f2a7e5625f273b53960dc46aeaf9c62918", "shasum": "" }, "require": { - "php": ">=8.0.2" + "php": ">=7.1" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "3.0-dev" + "dev-main": "2.5-dev" }, "thanks": { "name": "symfony/contracts", @@ -5420,7 +5491,7 @@ "description": "A generic function and convention to trigger deprecation notices", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/deprecation-contracts/tree/v3.0.2" + "source": "https://github.com/symfony/deprecation-contracts/tree/v2.5.4" }, "funding": [ { @@ -5436,42 +5507,44 @@ "type": "tidelift" } ], - "time": "2022-01-02T09:55:41+00:00" + "time": "2024-09-25T14:11:13+00:00" }, { "name": "symfony/event-dispatcher", - "version": "v6.0.19", + "version": "v5.4.45", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher.git", - "reference": "2eaf8e63bc5b8cefabd4a800157f0d0c094f677a" + "reference": "72982eb416f61003e9bb6e91f8b3213600dcf9e9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/2eaf8e63bc5b8cefabd4a800157f0d0c094f677a", - "reference": "2eaf8e63bc5b8cefabd4a800157f0d0c094f677a", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/72982eb416f61003e9bb6e91f8b3213600dcf9e9", + "reference": "72982eb416f61003e9bb6e91f8b3213600dcf9e9", "shasum": "" }, "require": { - "php": ">=8.0.2", - "symfony/event-dispatcher-contracts": "^2|^3" + "php": ">=7.2.5", + "symfony/deprecation-contracts": "^2.1|^3", + "symfony/event-dispatcher-contracts": "^2|^3", + "symfony/polyfill-php80": "^1.16" }, "conflict": { - "symfony/dependency-injection": "<5.4" + "symfony/dependency-injection": "<4.4" }, "provide": { "psr/event-dispatcher-implementation": "1.0", - "symfony/event-dispatcher-implementation": "2.0|3.0" + "symfony/event-dispatcher-implementation": "2.0" }, "require-dev": { "psr/log": "^1|^2|^3", - "symfony/config": "^5.4|^6.0", - "symfony/dependency-injection": "^5.4|^6.0", - "symfony/error-handler": "^5.4|^6.0", - "symfony/expression-language": "^5.4|^6.0", - "symfony/http-foundation": "^5.4|^6.0", + "symfony/config": "^4.4|^5.0|^6.0", + "symfony/dependency-injection": "^4.4|^5.0|^6.0", + "symfony/error-handler": "^4.4|^5.0|^6.0", + "symfony/expression-language": "^4.4|^5.0|^6.0", + "symfony/http-foundation": "^4.4|^5.0|^6.0", "symfony/service-contracts": "^1.1|^2|^3", - "symfony/stopwatch": "^5.4|^6.0" + "symfony/stopwatch": "^4.4|^5.0|^6.0" }, "suggest": { "symfony/dependency-injection": "", @@ -5503,7 +5576,7 @@ "description": "Provides tools that allow your application components to communicate with each other by dispatching events and listening to them", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/event-dispatcher/tree/v6.0.19" + "source": "https://github.com/symfony/event-dispatcher/tree/v5.4.45" }, "funding": [ { @@ -5519,24 +5592,24 @@ "type": "tidelift" } ], - "time": "2023-01-01T08:36:10+00:00" + "time": "2024-09-25T14:11:13+00:00" }, { "name": "symfony/event-dispatcher-contracts", - "version": "v3.0.2", + "version": "v2.5.4", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher-contracts.git", - "reference": "7bc61cc2db649b4637d331240c5346dcc7708051" + "reference": "e0fe3d79b516eb75126ac6fa4cbf19b79b08c99f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/7bc61cc2db649b4637d331240c5346dcc7708051", - "reference": "7bc61cc2db649b4637d331240c5346dcc7708051", + "url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/e0fe3d79b516eb75126ac6fa4cbf19b79b08c99f", + "reference": "e0fe3d79b516eb75126ac6fa4cbf19b79b08c99f", "shasum": "" }, "require": { - "php": ">=8.0.2", + "php": ">=7.2.5", "psr/event-dispatcher": "^1" }, "suggest": { @@ -5545,7 +5618,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "3.0-dev" + "dev-main": "2.5-dev" }, "thanks": { "name": "symfony/contracts", @@ -5582,7 +5655,7 @@ "standards" ], "support": { - "source": "https://github.com/symfony/event-dispatcher-contracts/tree/v3.0.2" + "source": "https://github.com/symfony/event-dispatcher-contracts/tree/v2.5.4" }, "funding": [ { @@ -5598,26 +5671,30 @@ "type": "tidelift" } ], - "time": "2022-01-02T09:55:41+00:00" + "time": "2024-09-25T14:11:13+00:00" }, { "name": "symfony/filesystem", - "version": "v6.0.19", + "version": "v5.4.45", "source": { "type": "git", "url": "https://github.com/symfony/filesystem.git", - "reference": "3d49eec03fda1f0fc19b7349fbbe55ebc1004214" + "reference": "57c8294ed37d4a055b77057827c67f9558c95c54" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/filesystem/zipball/3d49eec03fda1f0fc19b7349fbbe55ebc1004214", - "reference": "3d49eec03fda1f0fc19b7349fbbe55ebc1004214", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/57c8294ed37d4a055b77057827c67f9558c95c54", + "reference": "57c8294ed37d4a055b77057827c67f9558c95c54", "shasum": "" }, "require": { - "php": ">=8.0.2", + "php": ">=7.2.5", "symfony/polyfill-ctype": "~1.8", - "symfony/polyfill-mbstring": "~1.8" + "symfony/polyfill-mbstring": "~1.8", + "symfony/polyfill-php80": "^1.16" + }, + "require-dev": { + "symfony/process": "^5.4|^6.4" }, "type": "library", "autoload": { @@ -5645,7 +5722,7 @@ "description": "Provides basic utilities for the filesystem", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/filesystem/tree/v6.0.19" + "source": "https://github.com/symfony/filesystem/tree/v5.4.45" }, "funding": [ { @@ -5661,24 +5738,26 @@ "type": "tidelift" } ], - "time": "2023-01-20T17:44:14+00:00" + "time": "2024-10-22T13:05:35+00:00" }, { "name": "symfony/finder", - "version": "v6.0.19", + "version": "v5.4.45", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", - "reference": "5cc9cac6586fc0c28cd173780ca696e419fefa11" + "reference": "63741784cd7b9967975eec610b256eed3ede022b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/5cc9cac6586fc0c28cd173780ca696e419fefa11", - "reference": "5cc9cac6586fc0c28cd173780ca696e419fefa11", + "url": "https://api.github.com/repos/symfony/finder/zipball/63741784cd7b9967975eec610b256eed3ede022b", + "reference": "63741784cd7b9967975eec610b256eed3ede022b", "shasum": "" }, "require": { - "php": ">=8.0.2" + "php": ">=7.2.5", + "symfony/deprecation-contracts": "^2.1|^3", + "symfony/polyfill-php80": "^1.16" }, "type": "library", "autoload": { @@ -5706,7 +5785,7 @@ "description": "Finds files and directories via an intuitive fluent interface", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/finder/tree/v6.0.19" + "source": "https://github.com/symfony/finder/tree/v5.4.45" }, "funding": [ { @@ -5722,25 +5801,27 @@ "type": "tidelift" } ], - "time": "2023-01-20T17:44:14+00:00" + "time": "2024-09-28T13:32:08+00:00" }, { "name": "symfony/options-resolver", - "version": "v6.0.19", + "version": "v5.4.45", "source": { "type": "git", "url": "https://github.com/symfony/options-resolver.git", - "reference": "6a180d1c45e0d9797470ca9eb46215692de00fa3" + "reference": "74e5b6f0db3e8589e6cfd5efb317a1fc2bb52fb6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/options-resolver/zipball/6a180d1c45e0d9797470ca9eb46215692de00fa3", - "reference": "6a180d1c45e0d9797470ca9eb46215692de00fa3", + "url": "https://api.github.com/repos/symfony/options-resolver/zipball/74e5b6f0db3e8589e6cfd5efb317a1fc2bb52fb6", + "reference": "74e5b6f0db3e8589e6cfd5efb317a1fc2bb52fb6", "shasum": "" }, "require": { - "php": ">=8.0.2", - "symfony/deprecation-contracts": "^2.1|^3" + "php": ">=7.2.5", + "symfony/deprecation-contracts": "^2.1|^3", + "symfony/polyfill-php73": "~1.0", + "symfony/polyfill-php80": "^1.16" }, "type": "library", "autoload": { @@ -5773,7 +5854,7 @@ "options" ], "support": { - "source": "https://github.com/symfony/options-resolver/tree/v6.0.19" + "source": "https://github.com/symfony/options-resolver/tree/v5.4.45" }, "funding": [ { @@ -5789,7 +5870,7 @@ "type": "tidelift" } ], - "time": "2023-01-01T08:36:10+00:00" + "time": "2024-09-25T14:11:13+00:00" }, { "name": "symfony/polyfill-ctype", @@ -6174,6 +6255,82 @@ ], "time": "2024-09-09T11:45:10+00:00" }, + { + "name": "symfony/polyfill-php73", + "version": "v1.31.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php73.git", + "reference": "0f68c03565dcaaf25a890667542e8bd75fe7e5bb" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/0f68c03565dcaaf25a890667542e8bd75fe7e5bb", + "reference": "0f68c03565dcaaf25a890667542e8bd75fe7e5bb", + "shasum": "" + }, + "require": { + "php": ">=7.2" + }, + "type": "library", + "extra": { + "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.31.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": "2024-09-09T11:45:10+00:00" + }, { "name": "symfony/polyfill-php80", "version": "v1.31.0", @@ -6394,36 +6551,29 @@ }, { "name": "symfony/service-contracts", - "version": "v3.0.2", + "version": "v1.1.2", "source": { "type": "git", "url": "https://github.com/symfony/service-contracts.git", - "reference": "d78d39c1599bd1188b8e26bb341da52c3c6d8a66" + "reference": "191afdcb5804db960d26d8566b7e9a2843cab3a0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/service-contracts/zipball/d78d39c1599bd1188b8e26bb341da52c3c6d8a66", - "reference": "d78d39c1599bd1188b8e26bb341da52c3c6d8a66", + "url": "https://api.github.com/repos/symfony/service-contracts/zipball/191afdcb5804db960d26d8566b7e9a2843cab3a0", + "reference": "191afdcb5804db960d26d8566b7e9a2843cab3a0", "shasum": "" }, "require": { - "php": ">=8.0.2", - "psr/container": "^2.0" - }, - "conflict": { - "ext-psr": "<1.1|>=2" + "php": "^7.1.3" }, "suggest": { + "psr/container": "", "symfony/service-implementation": "" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "3.0-dev" - }, - "thanks": { - "name": "symfony/contracts", - "url": "https://github.com/symfony/contracts" + "dev-master": "1.1-dev" } }, "autoload": { @@ -6456,40 +6606,26 @@ "standards" ], "support": { - "source": "https://github.com/symfony/service-contracts/tree/v3.0.2" + "source": "https://github.com/symfony/service-contracts/tree/v1.1.2" }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2022-05-30T19:17:58+00:00" + "time": "2019-05-28T07:50:59+00:00" }, { "name": "symfony/stopwatch", - "version": "v6.0.19", + "version": "v5.4.45", "source": { "type": "git", "url": "https://github.com/symfony/stopwatch.git", - "reference": "011e781839dd1d2eb8119f65ac516a530f60226d" + "reference": "fb2c199cf302eb207f8c23e7ee174c1c31a5c004" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/stopwatch/zipball/011e781839dd1d2eb8119f65ac516a530f60226d", - "reference": "011e781839dd1d2eb8119f65ac516a530f60226d", + "url": "https://api.github.com/repos/symfony/stopwatch/zipball/fb2c199cf302eb207f8c23e7ee174c1c31a5c004", + "reference": "fb2c199cf302eb207f8c23e7ee174c1c31a5c004", "shasum": "" }, "require": { - "php": ">=8.0.2", + "php": ">=7.2.5", "symfony/service-contracts": "^1|^2|^3" }, "type": "library", @@ -6518,7 +6654,7 @@ "description": "Provides a way to profile code", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/stopwatch/tree/v6.0.19" + "source": "https://github.com/symfony/stopwatch/tree/v5.4.45" }, "funding": [ { @@ -6534,37 +6670,38 @@ "type": "tidelift" } ], - "time": "2023-01-01T08:36:10+00:00" + "time": "2024-09-25T14:11:13+00:00" }, { "name": "symfony/string", - "version": "v6.0.19", + "version": "v5.4.47", "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "d9e72497367c23e08bf94176d2be45b00a9d232a" + "reference": "136ca7d72f72b599f2631aca474a4f8e26719799" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/d9e72497367c23e08bf94176d2be45b00a9d232a", - "reference": "d9e72497367c23e08bf94176d2be45b00a9d232a", + "url": "https://api.github.com/repos/symfony/string/zipball/136ca7d72f72b599f2631aca474a4f8e26719799", + "reference": "136ca7d72f72b599f2631aca474a4f8e26719799", "shasum": "" }, "require": { - "php": ">=8.0.2", + "php": ">=7.2.5", "symfony/polyfill-ctype": "~1.8", "symfony/polyfill-intl-grapheme": "~1.0", "symfony/polyfill-intl-normalizer": "~1.0", - "symfony/polyfill-mbstring": "~1.0" + "symfony/polyfill-mbstring": "~1.0", + "symfony/polyfill-php80": "~1.15" }, "conflict": { - "symfony/translation-contracts": "<2.0" + "symfony/translation-contracts": ">=3.0" }, "require-dev": { - "symfony/error-handler": "^5.4|^6.0", - "symfony/http-client": "^5.4|^6.0", - "symfony/translation-contracts": "^2.0|^3.0", - "symfony/var-exporter": "^5.4|^6.0" + "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" }, "type": "library", "autoload": { @@ -6603,7 +6740,7 @@ "utf8" ], "support": { - "source": "https://github.com/symfony/string/tree/v6.0.19" + "source": "https://github.com/symfony/string/tree/v5.4.47" }, "funding": [ { @@ -6619,7 +6756,7 @@ "type": "tidelift" } ], - "time": "2023-01-01T08:36:10+00:00" + "time": "2024-11-10T20:33:58+00:00" }, { "name": "theseer/tokenizer", @@ -6678,12 +6815,12 @@ "prefer-stable": false, "prefer-lowest": false, "platform": { - "php": "~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0", + "php": "~7.4.0 || ~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0", "ext-mbstring": "*" }, "platform-dev": {}, "platform-overrides": { - "php": "8.0.30" + "php": "7.4.33" }, "plugin-api-version": "2.6.0" } diff --git a/src/Classes/FinalRule.php b/src/Classes/FinalRule.php index ffb36560..1121f47d 100644 --- a/src/Classes/FinalRule.php +++ b/src/Classes/FinalRule.php @@ -53,7 +53,7 @@ final class FinalRule implements Rules\Rule */ public function __construct( bool $allowAbstractClasses, - array $classesNotRequiredToBeAbstractOrFinal, + array $classesNotRequiredToBeAbstractOrFinal ) { $this->allowAbstractClasses = $allowAbstractClasses; $this->classesNotRequiredToBeAbstractOrFinal = \array_map(static function (string $classNotRequiredToBeAbstractOrFinal): string { @@ -72,13 +72,13 @@ public function getNodeType(): string public function processNode( Node $node, - Analyser\Scope $scope, + Analyser\Scope $scope ): array { if (!$node instanceof Node\Stmt\Class_) { throw new ShouldNotHappenException(\sprintf( 'Expected node to be instance of "%s", but got instance of "%s" instead.', Node\Stmt\Class_::class, - $node::class, + \get_class($node), )); } diff --git a/src/Classes/NoExtendsRule.php b/src/Classes/NoExtendsRule.php index e3ba88a0..bbc3acb7 100644 --- a/src/Classes/NoExtendsRule.php +++ b/src/Classes/NoExtendsRule.php @@ -57,13 +57,13 @@ public function getNodeType(): string public function processNode( Node $node, - Analyser\Scope $scope, + Analyser\Scope $scope ): array { if (!$node instanceof Node\Stmt\Class_) { throw new ShouldNotHappenException(\sprintf( 'Expected node to be instance of "%s", but got instance of "%s" instead.', Node\Stmt\Class_::class, - $node::class, + \get_class($node), )); } diff --git a/src/Classes/PHPUnit/Framework/TestCaseWithSuffixRule.php b/src/Classes/PHPUnit/Framework/TestCaseWithSuffixRule.php index 7bea2820..e0b7b4ba 100644 --- a/src/Classes/PHPUnit/Framework/TestCaseWithSuffixRule.php +++ b/src/Classes/PHPUnit/Framework/TestCaseWithSuffixRule.php @@ -45,13 +45,13 @@ public function getNodeType(): string public function processNode( Node $node, - Analyser\Scope $scope, + Analyser\Scope $scope ): array { if (!$node instanceof Node\Stmt\Class_) { throw new ShouldNotHappenException(\sprintf( 'Expected node to be instance of "%s", but got instance of "%s" instead.', Node\Stmt\Class_::class, - $node::class, + \get_class($node), )); } diff --git a/src/Closures/NoNullableReturnTypeDeclarationRule.php b/src/Closures/NoNullableReturnTypeDeclarationRule.php index f277ee78..c07d646c 100644 --- a/src/Closures/NoNullableReturnTypeDeclarationRule.php +++ b/src/Closures/NoNullableReturnTypeDeclarationRule.php @@ -31,13 +31,13 @@ public function getNodeType(): string public function processNode( Node $node, - Analyser\Scope $scope, + Analyser\Scope $scope ): array { if (!$node instanceof Node\Expr\Closure) { throw new ShouldNotHappenException(\sprintf( 'Expected node to be instance of "%s", but got instance of "%s" instead.', Node\Expr\Closure::class, - $node::class, + \get_class($node), )); } diff --git a/src/Closures/NoParameterWithNullDefaultValueRule.php b/src/Closures/NoParameterWithNullDefaultValueRule.php index 219f057d..31a72ec9 100644 --- a/src/Closures/NoParameterWithNullDefaultValueRule.php +++ b/src/Closures/NoParameterWithNullDefaultValueRule.php @@ -31,13 +31,13 @@ public function getNodeType(): string public function processNode( Node $node, - Analyser\Scope $scope, + Analyser\Scope $scope ): array { if (!$node instanceof Node\Expr\Closure) { throw new ShouldNotHappenException(\sprintf( 'Expected node to be instance of "%s", but got instance of "%s" instead.', Node\Expr\Closure::class, - $node::class, + \get_class($node), )); } diff --git a/src/Closures/NoParameterWithNullableTypeDeclarationRule.php b/src/Closures/NoParameterWithNullableTypeDeclarationRule.php index 9aec52e3..3250d189 100644 --- a/src/Closures/NoParameterWithNullableTypeDeclarationRule.php +++ b/src/Closures/NoParameterWithNullableTypeDeclarationRule.php @@ -31,13 +31,13 @@ public function getNodeType(): string public function processNode( Node $node, - Analyser\Scope $scope, + Analyser\Scope $scope ): array { if (!$node instanceof Node\Expr\Closure) { throw new ShouldNotHappenException(\sprintf( 'Expected node to be instance of "%s", but got instance of "%s" instead.', Node\Expr\Closure::class, - $node::class, + \get_class($node), )); } diff --git a/src/ErrorIdentifier.php b/src/ErrorIdentifier.php index 70488ed0..0c0adbe6 100644 --- a/src/ErrorIdentifier.php +++ b/src/ErrorIdentifier.php @@ -18,8 +18,11 @@ */ final class ErrorIdentifier { - private function __construct(private string $value) + private string $value; + + private function __construct(string $value) { + $this->value = $value; } public static function declareStrictTypes(): self diff --git a/src/Expressions/NoCompactRule.php b/src/Expressions/NoCompactRule.php index 56ff2d6b..f1fe4b7a 100644 --- a/src/Expressions/NoCompactRule.php +++ b/src/Expressions/NoCompactRule.php @@ -31,13 +31,13 @@ public function getNodeType(): string public function processNode( Node $node, - Analyser\Scope $scope, + Analyser\Scope $scope ): array { if (!$node instanceof Node\Expr\FuncCall) { throw new ShouldNotHappenException(\sprintf( 'Expected node to be instance of "%s", but got instance of "%s" instead.', Node\Expr\FuncCall::class, - $node::class, + \get_class($node), )); } diff --git a/src/Expressions/NoErrorSuppressionRule.php b/src/Expressions/NoErrorSuppressionRule.php index 6bb607a3..26f97c86 100644 --- a/src/Expressions/NoErrorSuppressionRule.php +++ b/src/Expressions/NoErrorSuppressionRule.php @@ -30,7 +30,7 @@ public function getNodeType(): string public function processNode( Node $node, - Analyser\Scope $scope, + Analyser\Scope $scope ): array { $ruleErrorBuilder = Rules\RuleErrorBuilder::message('Error suppression via "@" should not be used.'); diff --git a/src/Expressions/NoEvalRule.php b/src/Expressions/NoEvalRule.php index 2280c08c..341d4454 100644 --- a/src/Expressions/NoEvalRule.php +++ b/src/Expressions/NoEvalRule.php @@ -30,7 +30,7 @@ public function getNodeType(): string public function processNode( Node $node, - Analyser\Scope $scope, + Analyser\Scope $scope ): array { $ruleErrorBuilder = Rules\RuleErrorBuilder::message('Language construct eval() should not be used.'); diff --git a/src/Expressions/NoIssetRule.php b/src/Expressions/NoIssetRule.php index 03708980..08c1dcf6 100644 --- a/src/Expressions/NoIssetRule.php +++ b/src/Expressions/NoIssetRule.php @@ -30,7 +30,7 @@ public function getNodeType(): string public function processNode( Node $node, - Analyser\Scope $scope, + Analyser\Scope $scope ): array { $ruleErrorBuilder = Rules\RuleErrorBuilder::message('Language construct isset() should not be used.'); diff --git a/src/Files/DeclareStrictTypesRule.php b/src/Files/DeclareStrictTypesRule.php index 4e3c207d..04a283bc 100644 --- a/src/Files/DeclareStrictTypesRule.php +++ b/src/Files/DeclareStrictTypesRule.php @@ -32,13 +32,13 @@ public function getNodeType(): string public function processNode( Node $node, - Analyser\Scope $scope, + Analyser\Scope $scope ): array { if (!$node instanceof FileNode) { throw new ShouldNotHappenException(\sprintf( 'Expected node to be instance of "%s", but got instance of "%s" instead.', FileNode::class, - $node::class, + \get_class($node), )); } diff --git a/src/Functions/NoNullableReturnTypeDeclarationRule.php b/src/Functions/NoNullableReturnTypeDeclarationRule.php index f0962382..683bd9d9 100644 --- a/src/Functions/NoNullableReturnTypeDeclarationRule.php +++ b/src/Functions/NoNullableReturnTypeDeclarationRule.php @@ -31,13 +31,13 @@ public function getNodeType(): string public function processNode( Node $node, - Analyser\Scope $scope, + Analyser\Scope $scope ): array { if (!$node instanceof Node\Stmt\Function_) { throw new ShouldNotHappenException(\sprintf( 'Expected node to be instance of "%s", but got instance of "%s" instead.', Node\Stmt\Function_::class, - $node::class, + \get_class($node), )); } diff --git a/src/Functions/NoParameterWithNullDefaultValueRule.php b/src/Functions/NoParameterWithNullDefaultValueRule.php index 726efcb8..76b6ffd4 100644 --- a/src/Functions/NoParameterWithNullDefaultValueRule.php +++ b/src/Functions/NoParameterWithNullDefaultValueRule.php @@ -31,13 +31,13 @@ public function getNodeType(): string public function processNode( Node $node, - Analyser\Scope $scope, + Analyser\Scope $scope ): array { if (!$node instanceof Node\Stmt\Function_) { throw new ShouldNotHappenException(\sprintf( 'Expected node to be instance of "%s", but got instance of "%s" instead.', Node\Stmt\Function_::class, - $node::class, + \get_class($node), )); } diff --git a/src/Functions/NoParameterWithNullableTypeDeclarationRule.php b/src/Functions/NoParameterWithNullableTypeDeclarationRule.php index 112bcbf4..b70c7adb 100644 --- a/src/Functions/NoParameterWithNullableTypeDeclarationRule.php +++ b/src/Functions/NoParameterWithNullableTypeDeclarationRule.php @@ -31,13 +31,13 @@ public function getNodeType(): string public function processNode( Node $node, - Analyser\Scope $scope, + Analyser\Scope $scope ): array { if (!$node instanceof Node\Stmt\Function_) { throw new ShouldNotHappenException(\sprintf( 'Expected node to be instance of "%s", but got instance of "%s" instead.', Node\Stmt\Function_::class, - $node::class, + \get_class($node), )); } diff --git a/src/Methods/FinalInAbstractClassRule.php b/src/Methods/FinalInAbstractClassRule.php index 5e9bfb9d..7e191c73 100644 --- a/src/Methods/FinalInAbstractClassRule.php +++ b/src/Methods/FinalInAbstractClassRule.php @@ -32,13 +32,13 @@ public function getNodeType(): string public function processNode( Node $node, - Analyser\Scope $scope, + Analyser\Scope $scope ): array { if (!$node instanceof Node\Stmt\ClassMethod) { throw new ShouldNotHappenException(\sprintf( 'Expected node to be instance of "%s", but got instance of "%s" instead.', Node\Stmt\ClassMethod::class, - $node::class, + \get_class($node), )); } diff --git a/src/Methods/NoConstructorParameterWithDefaultValueRule.php b/src/Methods/NoConstructorParameterWithDefaultValueRule.php index e1991c3f..01df671e 100644 --- a/src/Methods/NoConstructorParameterWithDefaultValueRule.php +++ b/src/Methods/NoConstructorParameterWithDefaultValueRule.php @@ -32,13 +32,13 @@ public function getNodeType(): string public function processNode( Node $node, - Analyser\Scope $scope, + Analyser\Scope $scope ): array { if (!$node instanceof Node\Stmt\ClassMethod) { throw new ShouldNotHappenException(\sprintf( 'Expected node to be instance of "%s", but got instance of "%s" instead.', Node\Stmt\ClassMethod::class, - $node::class, + \get_class($node), )); } diff --git a/src/Methods/NoNullableReturnTypeDeclarationRule.php b/src/Methods/NoNullableReturnTypeDeclarationRule.php index 5bcd8613..d6ef9a82 100644 --- a/src/Methods/NoNullableReturnTypeDeclarationRule.php +++ b/src/Methods/NoNullableReturnTypeDeclarationRule.php @@ -32,13 +32,13 @@ public function getNodeType(): string public function processNode( Node $node, - Analyser\Scope $scope, + Analyser\Scope $scope ): array { if (!$node instanceof Node\Stmt\ClassMethod) { throw new ShouldNotHappenException(\sprintf( 'Expected node to be instance of "%s", but got instance of "%s" instead.', Node\Stmt\ClassMethod::class, - $node::class, + \get_class($node), )); } diff --git a/src/Methods/NoParameterWithContainerTypeDeclarationRule.php b/src/Methods/NoParameterWithContainerTypeDeclarationRule.php index ca979828..3d2a3be1 100644 --- a/src/Methods/NoParameterWithContainerTypeDeclarationRule.php +++ b/src/Methods/NoParameterWithContainerTypeDeclarationRule.php @@ -44,7 +44,7 @@ final class NoParameterWithContainerTypeDeclarationRule implements Rules\Rule public function __construct( Reflection\ReflectionProvider $reflectionProvider, array $interfacesImplementedByContainers, - array $methodsAllowedToUseContainerTypeDeclarations, + array $methodsAllowedToUseContainerTypeDeclarations ) { $this->reflectionProvider = $reflectionProvider; $this->interfacesImplementedByContainers = \array_filter( @@ -65,13 +65,13 @@ public function getNodeType(): string public function processNode( Node $node, - Analyser\Scope $scope, + Analyser\Scope $scope ): array { if (!$node instanceof Node\Stmt\ClassMethod) { throw new ShouldNotHappenException(\sprintf( 'Expected node to be instance of "%s", but got instance of "%s" instead.', Node\Stmt\ClassMethod::class, - $node::class, + \get_class($node), )); } @@ -158,7 +158,7 @@ private static function createError( Reflection\ClassReflection $classReflection, string $methodName, string $parameterName, - Reflection\ClassReflection $classUsedInTypeDeclaration, + Reflection\ClassReflection $classUsedInTypeDeclaration ): Rules\RuleError { if ($classReflection->isAnonymous()) { $ruleErrorBuilder = Rules\RuleErrorBuilder::message(\sprintf( diff --git a/src/Methods/NoParameterWithNullDefaultValueRule.php b/src/Methods/NoParameterWithNullDefaultValueRule.php index a407db1b..dd4c0305 100644 --- a/src/Methods/NoParameterWithNullDefaultValueRule.php +++ b/src/Methods/NoParameterWithNullDefaultValueRule.php @@ -32,13 +32,13 @@ public function getNodeType(): string public function processNode( Node $node, - Analyser\Scope $scope, + Analyser\Scope $scope ): array { if (!$node instanceof Node\Stmt\ClassMethod) { throw new ShouldNotHappenException(\sprintf( 'Expected node to be instance of "%s", but got instance of "%s" instead.', Node\Stmt\ClassMethod::class, - $node::class, + \get_class($node), )); } diff --git a/src/Methods/NoParameterWithNullableTypeDeclarationRule.php b/src/Methods/NoParameterWithNullableTypeDeclarationRule.php index 3c5467df..c31ceed2 100644 --- a/src/Methods/NoParameterWithNullableTypeDeclarationRule.php +++ b/src/Methods/NoParameterWithNullableTypeDeclarationRule.php @@ -32,13 +32,13 @@ public function getNodeType(): string public function processNode( Node $node, - Analyser\Scope $scope, + Analyser\Scope $scope ): array { if (!$node instanceof Node\Stmt\ClassMethod) { throw new ShouldNotHappenException(\sprintf( 'Expected node to be instance of "%s", but got instance of "%s" instead.', Node\Stmt\ClassMethod::class, - $node::class, + \get_class($node), )); } diff --git a/src/Methods/PrivateInFinalClassRule.php b/src/Methods/PrivateInFinalClassRule.php index 249cc9fb..1a478131 100644 --- a/src/Methods/PrivateInFinalClassRule.php +++ b/src/Methods/PrivateInFinalClassRule.php @@ -32,13 +32,13 @@ public function getNodeType(): string public function processNode( Node $node, - Analyser\Scope $scope, + Analyser\Scope $scope ): array { if (!$node instanceof Node\Stmt\ClassMethod) { throw new ShouldNotHappenException(\sprintf( 'Expected node to be instance of "%s", but got instance of "%s" instead.', Node\Stmt\ClassMethod::class, - $node::class, + \get_class($node), )); } diff --git a/src/Statements/NoSwitchRule.php b/src/Statements/NoSwitchRule.php index 6394e312..962f6590 100644 --- a/src/Statements/NoSwitchRule.php +++ b/src/Statements/NoSwitchRule.php @@ -30,7 +30,7 @@ public function getNodeType(): string public function processNode( Node $node, - Analyser\Scope $scope, + Analyser\Scope $scope ): array { $ruleErrorBuilder = Rules\RuleErrorBuilder::message('Control structures using switch should not be used.');