Skip to content

Commit

Permalink
Core: add sniff to check magic constants are in uppercase
Browse files Browse the repository at this point in the history
> 1. The PHP native `__...__` magic constants should be in uppercase when used.

Refs:
* https://make.wordpress.org/core/2020/03/20/updating-the-coding-standards-for-modern-php/ - Magic Constants section
* PHPCSStandards/PHPCSExtra 64
  • Loading branch information
jrfnl committed Aug 12, 2022
1 parent 2759030 commit 05ab66c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions WordPress-Core/ruleset.xml
Original file line number Diff line number Diff line change
Expand Up @@ -581,6 +581,9 @@
<type>warning</type>
</rule>

<!-- Covers rule: The PHP native __...__ magic constants should be in uppercase when used. -->
<rule ref="Universal.Constants.UppercaseMagicConstants"/>




Expand Down

0 comments on commit 05ab66c

Please sign in to comment.