diff --git a/composer.json b/composer.json index dc8b6a3..9157123 100644 --- a/composer.json +++ b/composer.json @@ -31,7 +31,8 @@ "friendsofphp/php-cs-fixer": "^3.16", "phpstan/phpstan": "^1.10", "rector/rector": "^1.0", - "symfony/finder": "^5.4" + "symfony/finder": "^5.4", + "phpstan/phpstan-strict-rules": "^1.5" }, "autoload": { "psr-4": { diff --git a/composer.lock b/composer.lock index 430b42d..20211a9 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": "d4d41a03a213cbbfadc482a12285b9e3", + "content-hash": "5fbea03cea42981c9095d287f95a4f18", "packages": [ { "name": "doctrine/deprecations", @@ -1089,6 +1089,55 @@ ], "time": "2024-02-20T13:59:13+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": "phpunit/php-code-coverage", "version": "9.2.26", diff --git a/phpstan.neon b/phpstan.neon index 166988e..12eae68 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -1,3 +1,6 @@ +includes: + - vendor/phpstan/phpstan-strict-rules/rules.neon + parameters: level: max paths: diff --git a/tests/zugferd2/Tests/Legacy/TradeAccountingAccountTest.php b/tests/zugferd2/Tests/Legacy/TradeAccountingAccountTest.php index 03dc554..f8fe5c2 100644 --- a/tests/zugferd2/Tests/Legacy/TradeAccountingAccountTest.php +++ b/tests/zugferd2/Tests/Legacy/TradeAccountingAccountTest.php @@ -108,7 +108,7 @@ public function testTradeAccountingAccount(): void XML; - $this->assertEquals( + self::assertEquals( // Removes white-space preg_replace('/\s/', '', $xml), preg_replace('/\s/', '', Builder::create()->transform($invoice))