PHPCSStandards / PHP_CodeSniffer

PHP_CodeSniffer tokenizes PHP files and detects violations of a defined set of coding standards.
BSD 3-Clause "New" or "Revised" License
880 stars 54 forks source link

:sparkles: New `Generic.WhiteSpace.HereNowdocIdentifierSpacing` sniff #586

Open jrfnl opened 1 month ago

jrfnl commented 1 month ago

Description

New Generic.WhiteSpace.HereNowdocIdentifierSpacing sniff which forbids whitespace between the <<< and the identifier string in heredoc/nowdoc start tokens.

Includes fixer. Includes tests. Includes XML docs.

Suggested changelog entry

New Generic.WhiteSpace.HereNowdocIdentifierSpacing sniff which forbids whitespace between the <<< and the identifier string in heredoc/nowdoc start tokens.

Related issues/external references

585

Types of changes

jrfnl commented 1 month ago

@rikvdh :point_up: Might also be something to suggest to PER ? Don't think this is covered in the PER standard yet.