From ca6906beda46b5045e8274083e4c7ca80ddd98ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Machulda?= Date: Thu, 23 May 2024 14:39:51 +0200 Subject: [PATCH] Fix: Skip part of OperatorSpacingSniff because its incorrect behavior in `declare(strict_types=1);` --- ecs.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ecs.php b/ecs.php index 5d49511..eff9a6f 100644 --- a/ecs.php +++ b/ecs.php @@ -486,6 +486,11 @@ // We allow empty catch statements (but they must have comment - see EmptyCatchCommentSniff) EmptyStatementSniff::class . '.DetectedCatch' => null, + // Skip because of its attempts to add spaces in declare(strict_types=1); starting with ECS 12.2.0 + // @TODO: In future ECS versions try whether its is still broken or this skip could be removed + OperatorSpacingSniff::class . '.NoSpaceAfter' => null, + OperatorSpacingSniff::class . '.NoSpaceBefore' => null, + // Skip unwanted rules from DocCommentSniff DocCommentSniff::class . '.ContentAfterOpen' => null, DocCommentSniff::class . '.ContentBeforeClose' => null,