WordPress-Coding-Standards/WordPress-Core
jrfnl a22878f477
Core: add sniffs to check the formatting of ::class class resolution
> 1. There should be no space between `::class` and the preceding class name it applies to.
> 2. There should be no space between the double colon and the `class` keyword.
> 3. The `class` keyword should be in lowercase.

The first two rules are covered via the new `WordPress.WhiteSpace.ObjectOperatorSpacing` sniff.
The last rule via a new sniff from PHPCSExtra.

Refs:
* https://make.wordpress.org/core/2020/03/20/updating-the-coding-standards-for-modern-php/ - `::class` constant section
* https://developer.wordpress.org/coding-standards/wordpress-coding-standards/php/#magic-constants
* WordPress/wpcs-docs 113
* WordPress/WordPress-Coding-Standards 1115
* WordPress/WordPress-Coding-Standards 1116
* WordPress/WordPress-Coding-Standards 2095
* PHPCSStandards/PHPCSExtra 72
2022-12-08 14:21:16 +01:00
..
ruleset.xml Core: add sniffs to check the formatting of ::class class resolution 2022-12-08 14:21:16 +01:00