From e6bac9d44bc1ef48dfeaac70bd785c8db00bc5a7 Mon Sep 17 00:00:00 2001 From: ErickSkrauch Date: Fri, 21 Jul 2023 05:37:25 +0200 Subject: [PATCH] Adjust comment_to_phpdoc fixer to exclude PHPStan error supression tags --- CHANGELOG.md | 2 ++ src/Rules.php | 10 +++++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 226fbaa..96e5b6f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,8 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). ## [Unreleased] +### Changed +- `comment_to_phpdoc` no longer fixes PHPStan error suppression and the `todo` tag. ## [1.0.0] - 2023-05-17 ### Added diff --git a/src/Rules.php b/src/Rules.php index f4b7bef..70f1620 100644 --- a/src/Rules.php +++ b/src/Rules.php @@ -83,7 +83,15 @@ final class Rules { 'visibility_required' => true, // Comment - 'comment_to_phpdoc' => true, + 'comment_to_phpdoc' => [ + 'ignored_tags' => [ + 'todo', + // https://phpstan.org/user-guide/ignoring-errors + 'phpstan-ignore', + 'phpstan-ignore-line', + 'phpstan-ignore-next-line', + ], + ], 'multiline_comment_opening_closing' => true, 'no_empty_comment' => true, 'single_line_comment_spacing' => true,