From cb91aed6d63ec1a12ade9d56c4b703ac3cfaa233 Mon Sep 17 00:00:00 2001 From: smiley Date: Sat, 2 Nov 2024 21:37:00 +0100 Subject: [PATCH] :octocat: fix broken phpcs config --- composer.json | 15 +- phpcs.xml.dist | 358 ++++++++++++++++++++++++++++-------------- src/Example.php | 2 +- tests/ExampleTest.php | 2 +- 4 files changed, 256 insertions(+), 121 deletions(-) diff --git a/composer.json b/composer.json index 0d90509..d28fbee 100644 --- a/composer.json +++ b/composer.json @@ -34,10 +34,11 @@ "php": "^8.1" }, "require-dev": { - "phpunit/phpunit": "^10.5", "phpmd/phpmd": "^2.15", - "phpstan/phpstan": "^1.11", + "phpstan/phpstan": "^1.12", "phpstan/phpstan-deprecation-rules": "^1.2", + "phpunit/phpunit": "^10.5", + "slevomat/coding-standard": "^8.15", "squizlabs/php_codesniffer": "^3.10" }, "suggest": { @@ -54,12 +55,16 @@ }, "scripts": { "phpcs": "@php vendor/bin/phpcs", - "phpunit": "@php vendor/bin/phpunit", - "phpstan": "@php vendor/bin/phpstan" + "phpstan": "@php vendor/bin/phpstan", + "phpstan-baseline": "@php vendor/bin/phpstan --generate-baseline", + "phpunit": "@php vendor/bin/phpunit" }, "config": { "lock": false, "sort-packages": true, - "platform-check": true + "platform-check": true, + "allow-plugins": { + "dealerdirect/phpcodesniffer-composer-installer": true + } } } diff --git a/phpcs.xml.dist b/phpcs.xml.dist index 75125bf..5cac3ff 100644 --- a/phpcs.xml.dist +++ b/phpcs.xml.dist @@ -1,43 +1,231 @@ - - chillerlan rules for phpcs + php-qrcode rules for phpcs examples src tests + + + + + + + error + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + examples + src/Storage/SessionStorage.php + tests/Storage/SessionStorageTest.php + + + + + + + + + + + + + + + examples + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + examples + - - - - - - - - - - - - - - - - - - - - + + examples + benchmark + + + @@ -46,10 +234,17 @@ - + + examples + + + + + + @@ -65,127 +260,62 @@ - + - + - + - + + + + + - - - - - - - - - - - - + - + - - - - - - - - - - - - - - error - - - - error - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - examples - - - - examples + + + + - - examples + + + + - - examples + + + + - - examples + + + + diff --git a/src/Example.php b/src/Example.php index a7fdf20..bd54386 100644 --- a/src/Example.php +++ b/src/Example.php @@ -12,7 +12,7 @@ namespace chillerlan\LibraryTemplate; /** - * + * An example class */ class Example{ diff --git a/tests/ExampleTest.php b/tests/ExampleTest.php index 900fae9..76921b8 100644 --- a/tests/ExampleTest.php +++ b/tests/ExampleTest.php @@ -15,7 +15,7 @@ use PHPUnit\Framework\TestCase; /** - * + * An example unit test */ class ExampleTest extends TestCase{