Skip to content

feat: add EnumCaseNameSniff - #30

Merged
majoskorec merged 4 commits into
masterfrom
enum-case
Sep 22, 2026
Merged

majoskorec merged 4 commits into
masterfrom
enum-case

Conversation

@majoskorec

Copy link
Copy Markdown
Contributor

No description provided.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🔵 Needs a closer look

Unresolved moderate issues affect underscore validation and functional test correctness.

Review effort: Lite
Findings: None

What changed in this PR

Adds a PHPCS sniff enforcing strict PascalCase enum case names, with tests, ruleset registration, and changelog documentation.

Changes:

  • Implements EnumCaseNameSniff.
  • Adds enum fixtures and functional coverage.
  • Enables the sniff in the PHP 8.4 ruleset.
  • Documents the feature.
File Summary
tests/​Functional/​EnumCaseNameTest.php Functional tests; moderate issues with expected exit code and incomplete line coverage assertions.
tests/​Functional/​EnumCaseName/​Enums.php Provides valid and invalid enum cases.
src/​PixelFederationCodingStandard/​Sniffs/​Classes/​EnumCaseNameSniff.php Implements enum case validation; moderate issue allowing underscores.
phpcs.ruleset.84.xml Enables the sniff.
CHANGELOG.md Documents the new sniff.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread phpcs.ruleset.84.xml Outdated
@majoskorec
majoskorec merged commit 08dd6e9 into master Sep 22, 2026
2 checks passed
@majoskorec
majoskorec deleted the enum-case branch September 22, 2026 11:47
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.

3 participants