PHP_CodeSniffer
PHP_CodeSniffer copied to clipboard
Standards: introduce `prepareInstalledStandardsForDisplay()` method
Description
This commit introduces a new Standards::prepareInstalledStandardsForDisplay() method. This new method only prepares the "list" into displayable phrases. It doesn't include output formatting with new lines, that's up to the actual display.
This new method allows for getting rid of some output buffering calls in select places.
Includes improving the readability of the "coding standard is not installed" error.
Includes deprecating the Standards::printInstalledStandards() method, which is now no longer used by PHPCS itself.
Suggested changelog entry
Deprecated:
-
Standards::printInstalledStandards(). Useecho Standards::prepareInstalledStandardsForDisplay()instead.
Additional context
This is the readability improvement I mention above: