diff --git a/composer.json b/composer.json index 765530408b6b08c2e8b4bf97450c4f73dea1539e..f6d81098bf245c78f4e8c1fa2cd1e5760a3c679b 100644 --- a/composer.json +++ b/composer.json @@ -7,7 +7,8 @@ "phpstan/extension-installer": "^1.3", "szepeviktor/phpstan-wordpress": "^1.3", "phpstan/phpstan-deprecation-rules": "^1.1", - "php-stubs/woocommerce-stubs": "^8.3" + "php-stubs/woocommerce-stubs": "^8.3", + "phpstan/phpstan-strict-rules": "^1.5" }, "license": "MIT", "authors": [ diff --git a/composer.lock b/composer.lock index 1be671acadbed1055f2b72bb7ce9b701995dee12..e00466229122193a0ffd096f6da581a268717459 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": "077a88c1fff60bd9ee2a9ae27e90c362", + "content-hash": "9caa86a611b9593bb0ac0476daa27456", "packages": [ { "name": "php-stubs/woocommerce-stubs", @@ -251,6 +251,55 @@ }, "time": "2023-08-05T09:02:04+00:00" }, + { + "name": "phpstan/phpstan-strict-rules", + "version": "1.5.2", + "source": { + "type": "git", + "url": "https://github.com/phpstan/phpstan-strict-rules.git", + "reference": "7a50e9662ee9f3942e4aaaf3d603653f60282542" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpstan/phpstan-strict-rules/zipball/7a50e9662ee9f3942e4aaaf3d603653f60282542", + "reference": "7a50e9662ee9f3942e4aaaf3d603653f60282542", + "shasum": "" + }, + "require": { + "php": "^7.2 || ^8.0", + "phpstan/phpstan": "^1.10.34" + }, + "require-dev": { + "nikic/php-parser": "^4.13.0", + "php-parallel-lint/php-parallel-lint": "^1.2", + "phpstan/phpstan-deprecation-rules": "^1.1", + "phpstan/phpstan-phpunit": "^1.0", + "phpunit/phpunit": "^9.5" + }, + "type": "phpstan-extension", + "extra": { + "phpstan": { + "includes": [ + "rules.neon" + ] + } + }, + "autoload": { + "psr-4": { + "PHPStan\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "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.2" + }, + "time": "2023-10-30T14:35:06+00:00" + }, { "name": "symfony/polyfill-php73", "version": "v1.28.0", diff --git a/rules.neon b/rules.neon index a6b464ef2385783503796939f05c8b44fe0cd8e1..a3de31613f53f738b60dfe80958efa579054686f 100644 --- a/rules.neon +++ b/rules.neon @@ -4,3 +4,5 @@ parameters: - src bootstrapFiles: - ../../php-stubs/woocommerce-stubs/woocommerce-stubs.php + strictRules: + requireParentConstructorCall: false