Skip to content

Conversation

@jaymcp
Copy link
Contributor

@jaymcp jaymcp commented Sep 29, 2025

Description

Adds Sniffs to:

  • disallow dirname( __FILE__ ) calls (use __DIR__ instead).
  • disallow dirname( dirname( ... ) ) calls (use dirname( ..., n ) instead, where n is the number of directories to traverse.
  • disallow mixing integer and string keys for array items.
  • disallow mixing keyed and unkeyed array items.
  • enforce alphabetical sorting of extends and implements names.

Also updates a couple of Sniff exclusions to exclude full Sniffs, rather than specific error codes.

Types of changes (if applicable):

  • 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 not work as expected).

Checklist (if applicable):

  • All checks pass when running `composer run all-checks.

@jaymcp jaymcp merged commit 06e6830 into main Sep 29, 2025
6 checks passed
@jaymcp jaymcp deleted the feat/additional-sniffs branch September 29, 2025 13:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants