From e958485a197d5b2abf83e48e0efd321215c8fef3 Mon Sep 17 00:00:00 2001 From: Vasek Purchart Date: Wed, 19 Dec 2018 16:28:59 +0100 Subject: [PATCH 1/8] exclude function spacing that has separate code for last line --- Consistence/ruleset.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/Consistence/ruleset.xml b/Consistence/ruleset.xml index fa9e83a..b9efc13 100644 --- a/Consistence/ruleset.xml +++ b/Consistence/ruleset.xml @@ -243,6 +243,7 @@ + From a070b18ca16c20e7c37b597d1910a1bb0475d0dd Mon Sep 17 00:00:00 2001 From: Vasek Purchart Date: Thu, 20 Dec 2018 10:34:33 +0100 Subject: [PATCH 2/8] PHP_CodeSniffer 3.4 --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 2b8ddf2..2451a4c 100644 --- a/composer.json +++ b/composer.json @@ -12,7 +12,7 @@ ], "require": { "php": "~7.1", - "squizlabs/php_codesniffer": "~3.3.1", + "squizlabs/php_codesniffer": "~3.4.0", "slevomat/coding-standard": "~4.7" }, "require-dev": { From 2b13703dce46951eb1fb6260d35c7edba0c2d509 Mon Sep 17 00:00:00 2001 From: Vasek Purchart Date: Thu, 14 Feb 2019 16:41:28 +0100 Subject: [PATCH 3/8] Slevomat Coding Standard 5.x --- Consistence/ruleset.xml | 3 ++- composer.json | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Consistence/ruleset.xml b/Consistence/ruleset.xml index b9efc13..9f4adc0 100644 --- a/Consistence/ruleset.xml +++ b/Consistence/ruleset.xml @@ -78,6 +78,7 @@ + @@ -94,6 +95,7 @@ + @@ -148,7 +150,6 @@ - diff --git a/composer.json b/composer.json index 2451a4c..aa75367 100644 --- a/composer.json +++ b/composer.json @@ -13,7 +13,7 @@ "require": { "php": "~7.1", "squizlabs/php_codesniffer": "~3.4.0", - "slevomat/coding-standard": "~4.7" + "slevomat/coding-standard": "~5.0" }, "require-dev": { "jakub-onderka/php-console-highlighter": "0.4", From 094bf7b1470caa28a1da9d70ca016fd8adf343d3 Mon Sep 17 00:00:00 2001 From: Jan Langer Date: Wed, 6 Nov 2019 16:17:51 +0100 Subject: [PATCH 4/8] PHP_CodeSniffer 3.5 --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index aa75367..04a2291 100644 --- a/composer.json +++ b/composer.json @@ -12,7 +12,7 @@ ], "require": { "php": "~7.1", - "squizlabs/php_codesniffer": "~3.4.0", + "squizlabs/php_codesniffer": "~3.5.0", "slevomat/coding-standard": "~5.0" }, "require-dev": { From 8fc0507fe629c9a626983978cb8011e576217725 Mon Sep 17 00:00:00 2001 From: Vasek Purchart Date: Thu, 14 Nov 2019 07:50:17 +0100 Subject: [PATCH 5/8] check spacing before assignments --- Consistence/ruleset.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/Consistence/ruleset.xml b/Consistence/ruleset.xml index 9f4adc0..ac3bcdc 100644 --- a/Consistence/ruleset.xml +++ b/Consistence/ruleset.xml @@ -259,6 +259,7 @@ + From 13d967825e821a31bda69fdb76328c8571698d07 Mon Sep 17 00:00:00 2001 From: Vasek Purchart Date: Tue, 17 Dec 2019 19:29:06 +0100 Subject: [PATCH 6/8] Slevomat Coding Standard 6.x --- .../Exceptions/ExceptionDeclarationSniff.php | 2 +- .../ValidVariableNameSniff.php | 6 ++--- Consistence/ruleset.xml | 26 +++++++++++++++++-- build/cs-ruleset.xml | 7 ++++- composer.json | 2 +- 5 files changed, 35 insertions(+), 8 deletions(-) diff --git a/Consistence/Sniffs/Exceptions/ExceptionDeclarationSniff.php b/Consistence/Sniffs/Exceptions/ExceptionDeclarationSniff.php index 4a7ab38..befffd6 100644 --- a/Consistence/Sniffs/Exceptions/ExceptionDeclarationSniff.php +++ b/Consistence/Sniffs/Exceptions/ExceptionDeclarationSniff.php @@ -32,7 +32,7 @@ public function register(): array } /** - * @phpcsSuppress SlevomatCodingStandard.TypeHints.TypeHintDeclaration.MissingParameterTypeHint + * @phpcsSuppress SlevomatCodingStandard.TypeHints.ParameterTypeHint.MissingNativeTypeHint * * @param \PHP_CodeSniffer\Files\File $phpcsFile * @param int $classPointer diff --git a/Consistence/Sniffs/NamingConventions/ValidVariableNameSniff.php b/Consistence/Sniffs/NamingConventions/ValidVariableNameSniff.php index 6ae0d78..6fd7863 100644 --- a/Consistence/Sniffs/NamingConventions/ValidVariableNameSniff.php +++ b/Consistence/Sniffs/NamingConventions/ValidVariableNameSniff.php @@ -26,7 +26,7 @@ class ValidVariableNameSniff extends \PHP_CodeSniffer\Sniffs\AbstractVariableSni ]; /** - * @phpcsSuppress SlevomatCodingStandard.TypeHints.TypeHintDeclaration.MissingParameterTypeHint + * @phpcsSuppress SlevomatCodingStandard.TypeHints.ParameterTypeHint.MissingNativeTypeHint * * @param \PHP_CodeSniffer\Files\File $file * @param int $stackPointer position of the double quoted string @@ -53,7 +53,7 @@ protected function processVariable(PhpCsFile $file, $stackPointer): void } /** - * @phpcsSuppress SlevomatCodingStandard.TypeHints.TypeHintDeclaration.MissingParameterTypeHint + * @phpcsSuppress SlevomatCodingStandard.TypeHints.ParameterTypeHint.MissingNativeTypeHint * @codeCoverageIgnore * * @param \PHP_CodeSniffer\Files\File $file @@ -65,7 +65,7 @@ protected function processMemberVar(PhpCsFile $file, $stackPointer): void } /** - * @phpcsSuppress SlevomatCodingStandard.TypeHints.TypeHintDeclaration.MissingParameterTypeHint + * @phpcsSuppress SlevomatCodingStandard.TypeHints.ParameterTypeHint.MissingNativeTypeHint * @codeCoverageIgnore * * @param \PHP_CodeSniffer\Files\File $file diff --git a/Consistence/ruleset.xml b/Consistence/ruleset.xml index ac3bcdc..1933a3b 100644 --- a/Consistence/ruleset.xml +++ b/Consistence/ruleset.xml @@ -83,6 +83,13 @@ + + + + + + + @@ -140,9 +147,24 @@ - + + + + + + + + + + + + + + + + + - diff --git a/build/cs-ruleset.xml b/build/cs-ruleset.xml index e33e79d..1df4a2e 100644 --- a/build/cs-ruleset.xml +++ b/build/cs-ruleset.xml @@ -9,7 +9,12 @@ "/> - + + + + + + diff --git a/composer.json b/composer.json index 04a2291..1b27866 100644 --- a/composer.json +++ b/composer.json @@ -13,7 +13,7 @@ "require": { "php": "~7.1", "squizlabs/php_codesniffer": "~3.5.0", - "slevomat/coding-standard": "~5.0" + "slevomat/coding-standard": "~6.0.0" }, "require-dev": { "jakub-onderka/php-console-highlighter": "0.4", From 4598b0b30c8135a52b0c351b75cd0cc7c9f9ff87 Mon Sep 17 00:00:00 2001 From: Vasek Purchart Date: Thu, 16 Apr 2020 19:29:06 +0200 Subject: [PATCH 7/8] disable errors with false positives in Squiz.Arrays.ArrayDeclaration --- Consistence/ruleset.xml | 2 ++ composer.json | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Consistence/ruleset.xml b/Consistence/ruleset.xml index 1933a3b..eda4ed1 100644 --- a/Consistence/ruleset.xml +++ b/Consistence/ruleset.xml @@ -181,11 +181,13 @@ + + diff --git a/composer.json b/composer.json index 1b27866..098d27a 100644 --- a/composer.json +++ b/composer.json @@ -12,7 +12,7 @@ ], "require": { "php": "~7.1", - "squizlabs/php_codesniffer": "~3.5.0", + "squizlabs/php_codesniffer": "~3.5.5", "slevomat/coding-standard": "~6.0.0" }, "require-dev": { From 45581b19bfb47728c99ac292f089ef27e7eaa555 Mon Sep 17 00:00:00 2001 From: Simon Hansen Date: Wed, 19 Feb 2020 19:08:40 +0100 Subject: [PATCH 8/8] fix Slevomat Coding Standard dependency to support minor versions --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 098d27a..91defc3 100644 --- a/composer.json +++ b/composer.json @@ -13,7 +13,7 @@ "require": { "php": "~7.1", "squizlabs/php_codesniffer": "~3.5.5", - "slevomat/coding-standard": "~6.0.0" + "slevomat/coding-standard": "~6.0" }, "require-dev": { "jakub-onderka/php-console-highlighter": "0.4",