Classes/NewFinalClassConstants: rename the sniff and other small updates by jrfnl · Pull Request #1496 · PHPCompatibility/PHPCompatibility
added 4 commits
April 18, 2023 05:53As `final` constants can now (also) be used in traits and enums, I propose to remove the `Class` from the sniff name. The sniff will still be in the `Classes` category. As this is a new sniff in PHPCompatibility 10.0.0, this is not a BC-break. Includes a small tweak to the error message to also remove the `class` keyword from the message.
Throw the error on the `final` keyword instead of the `const` keyword. This will more clearly indicate the issue when people use the PHPCS `code` view.
wimg approved these changes Apr 20, 2023
wimg
deleted the
feature/classes-new-final-constants-update
branch
jrfnl
mentioned this pull request
This file contains hidden or 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