PHP_CodeSniffer icon indicating copy to clipboard operation
PHP_CodeSniffer copied to clipboard

Add autofix support for Squiz.Operators.ValidLogicalOperatorsSniff

Open Koopzington opened this issue 1 year ago • 0 comments

Description

Here's my slightly belated retarget of https://github.com/squizlabs/PHP_CodeSniffer/pull/1370 The changes enable autofixing for cases where code behaviour won't change by replacing and with && as well as or with ||.

Suggested changelog entry

Added

  • The following sniff(s) have received autofix support:
    • Squiz.Operators.ValidLogicalOperatorsSniff

Types of changes

  • [ ] Bug fix (non-breaking change which fixes an issue)
  • [ ] New feature (non-breaking change which adds functionality)
  • [x] 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.
  • [ ] 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).
  • [x] 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.

Koopzington avatar Sep 17 '24 06:09 Koopzington