Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
False positive on PHP 8.0 attribute style comment (#644)
* False positive on PHP 8.0 attribute style comment Inserting a space character after "#" single-line comment start is causing disruption for comments that represent a PHP forward compatible PHP 8.0 attribute comment. Code not tokenized as PHP 8.0+ have this as a single line comment (T_COMMENT) and as the notation has been designed forward compatible, a comment fixer introducing the space is much likely a false positive: #[\ReturnTypeWillChange] # [\ReturnTypeWillChange] Change is to *not* insert the space when "[" <U005B> LEFT SQUARE BRACKET follows "#" <U0023> NUMBER SIGN for the CommentSurroundedBySpacesFixer[1]. [1]: \PhpCsFixerCustomFixers\Fixer\CommentSurroundedBySpacesFixer * Update README.md Co-authored-by: Kuba Werłos <werlos@gmail.com>
- Loading branch information
1 parent
a2cfe31
commit 541984e
Showing
3 changed files
with
11 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters