PHP_CodeSniffer icon indicating copy to clipboard operation
PHP_CodeSniffer copied to clipboard

[Doc] Cover all errors of PEAR ClassDeclaration

Open braindawg opened this issue 10 months ago • 0 comments

Description

While reviewing PR #844 for the Squiz version of this sniff, @jrfnl discovered that the PEAR sniff's documentation did not cover all error conditions.

This adds code examples for all missing errors that should be caught by this sniff:

  • OpenBraceWrongLine
  • OpenBraceNotAlone
  • SpaceBeforeBrace

Once approved & merged, we need to update the PSR2\Classes\ClassDeclaration documentation to include these cases, as well, since that sniff inherits this sniff but the docs do not currently cover the PEAR cases.

Suggested changelog entry

Add documentation to cover all errors caught by the PEAR.Classes.ClassDeclaration sniff.

Related issues/external references

Requested in PR #844

Types of changes

  • [ ] Bug fix (non-breaking change which fixes an issue)
  • [ ] New feature (non-breaking change which adds functionality)
  • [ ] Breaking change (fix or feature that would cause existing functionality to change)
    • [ ] This change is only breaking for integrators, not for external standards or end-users.
  • [x] Documentation improvement

PR checklist

  • [x] I have checked there is no other PR open for the same change.
  • [x] I have read the Contribution Guidelines.
  • [x] I grant the project the right to include and distribute the code under the BSD-3-Clause license (and I have the right to grant these rights).
  • [ ] I have added tests to cover my changes.
  • [x] I have verified that the code complies with the projects coding standards.
  • [ ] [Required for new sniffs] I have added XML documentation for the sniff.

braindawg avatar Mar 06 '25 03:03 braindawg