Skip to content

Commit e6bac9d

Browse files
committed
Adjust comment_to_phpdoc fixer to exclude PHPStan error supression tags
1 parent 7c4ed0f commit e6bac9d

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

CHANGELOG.md

+2
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
55
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
66

77
## [Unreleased]
8+
### Changed
9+
- `comment_to_phpdoc` no longer fixes PHPStan error suppression and the `todo` tag.
810

911
## [1.0.0] - 2023-05-17
1012
### Added

src/Rules.php

+9-1
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,15 @@ public static function create(array $overwrittenRules = []): array {
8383
'visibility_required' => true,
8484

8585
// Comment
86-
'comment_to_phpdoc' => true,
86+
'comment_to_phpdoc' => [
87+
'ignored_tags' => [
88+
'todo',
89+
// https://phpstan.org/user-guide/ignoring-errors
90+
'phpstan-ignore',
91+
'phpstan-ignore-line',
92+
'phpstan-ignore-next-line',
93+
],
94+
],
8795
'multiline_comment_opening_closing' => true,
8896
'no_empty_comment' => true,
8997
'single_line_comment_spacing' => true,

0 commit comments

Comments
 (0)