• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

PHPCSStandards / PHPCSExtra
100%

Build:
DEFAULT BRANCH: develop
Repo Added 18 Feb 2020 10:16AM UTC
Files 65
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

LAST BUILD ON BRANCH develop
branch: SELECT
CHANGE BRANCH
x
  • No branch selected
  • dependabot/github_actions/action-runners-007b9456e6
  • dependabot/github_actions/action-runners-22a3d24a16
  • dependabot/github_actions/action-runners-2507bcfa80
  • dependabot/github_actions/action-runners-442ff2787f
  • dependabot/github_actions/action-runners-56107b52f1
  • dependabot/github_actions/action-runners-636cd4b091
  • dependabot/github_actions/action-runners-6f6fc6dc02
  • dependabot/github_actions/action-runners-73dc52d6a4
  • dependabot/github_actions/action-runners-7dd87c42ac
  • dependabot/github_actions/action-runners-7dee44a0ec
  • dependabot/github_actions/action-runners-823d5f4d9a
  • dependabot/github_actions/action-runners-881f74c13b
  • dependabot/github_actions/action-runners-8a065f2206
  • dependabot/github_actions/action-runners-9c94c1d802
  • dependabot/github_actions/action-runners-a5aed26e2f
  • dependabot/github_actions/action-runners-b9fcfca8c8
  • dependabot/github_actions/action-runners-c4b2a15d30
  • dependabot/github_actions/action-runners-dd086cf38d
  • dependabot/github_actions/action-runners-e6ee9d7de3
  • dependabot/github_actions/actions/checkout-5
  • dependabot/github_actions/actions/checkout-6.0.0
  • dependabot/github_actions/actions/checkout-7.0.0
  • dependabot/github_actions/phpcsstandards/xmllint-validate-2.0.0
  • develop
  • enum-case-name
  • enum-colon-spacing
  • enum-protected-member
  • feature/386-new-universal-attributes-bracketspacing-sniff
  • feature/387-new-universal-disallow-attribute-parentheses-sniff
  • feature/387-new-universal-require-attribute-parentheses-sniff
  • feature/391-universal-commaspacing-update-for-commas-in-attributes
  • feature/397-new-universal-attributes-trailingcomma-sniff
  • feature/400-universal-commaspacing-bug-fix
  • feature/add-code-coverage-checking
  • feature/alphabeticimplementsextends-fix-error-message
  • feature/changelog-1.3.0
  • feature/changelog-1.3.1
  • feature/changelog-1.4.0
  • feature/changelog-1.4.1
  • feature/changelog-1.4.2
  • feature/changelog-1.5.0
  • feature/changelog-1.5.1
  • feature/changelog-fix-typo
  • feature/composer-bump-parallel-lint
  • feature/composer-normalize
  • feature/composer-raise-minimum-phpcs
  • feature/composer-raise-phpcs-version
  • feature/composer-up-minimum-phpcsutils-1.0.12
  • feature/composer-update-minimum-versions
  • feature/composer-update-phpcs-dependencies
  • feature/constructordestructorreturn-minor-test-improvement
  • feature/dependabot-every-two-weeks
  • feature/dependabot-fix-config
  • feature/dependabot-remove-composer
  • feature/devcs-compatible
  • feature/doc-fixes
  • feature/forbid-fqn-true-false-null
  • feature/ghactions-add-markdown-lint
  • feature/ghactions-add-merge-conflict-workflow
  • feature/ghactions-add-pinact-job
  • feature/ghactions-change-xmllint-validation
  • feature/ghactions-coverage-fix-ini-setting
  • feature/ghactions-do-not-persist-credentials
  • feature/ghactions-improve-test-workflows
  • feature/ghactions-jobs-should-have-name
  • feature/ghactions-lint-ref-nightly
  • feature/ghactions-minor-tweak
  • feature/ghactions-minor-tweaks
  • feature/ghactions-move-linting-to-own-job
  • feature/ghactions-pin-action-runners
  • feature/ghactions-pin-reusable-workflows
  • feature/ghactions-set-minimal-permissions
  • feature/ghactions-setup-php-fail-fast
  • feature/ghactions-show-startup-errors
  • feature/ghactions-update-for-php-8.5-release
  • feature/ghactions-update-for-php-8.6-release
  • feature/gitattributes-minor-tweak
  • feature/markdownlint-add-extra-name
  • feature/move-to-gh-actions
  • feature/new-universal-disallowexitdieparentheses-sniff
  • feature/new-universal-firstclasscallablespacing-sniff
  • feature/new-universal-requireexitdieparentheses-sniff
  • feature/phpcs-4.x-compatibility
  • feature/release-checklist-update
  • feature/remark-config-update
  • feature/remark-ignore-coveralls
  • feature/test-bootstrap-minor-simplification
  • feature/universal-alphabeticextendsimplements-add-extra-tests
  • feature/universal-commaspacing-bug-fix-phpcsutils-1.1.0
  • feature/universal-commaspacing-remove-stray-test-case-file
  • feature/universal-constants-modifierkeywordorder-use-utils-constants-getproperties
  • feature/universal-disallow-required-anonclassparentheses-add-extra-tests
  • feature/universal-disallowmixedgroupuse-bugfix
  • feature/universal-disallowuse-only-catch-what-should-be-caught
  • feature/universal-duplicatearraykey-add-extra-tests
  • feature/universal-modifierkeywordorder-add-extra-tests
  • feature/universal-nodoublenegative-use-collections-ternaryoperators
  • feature/universal-nofqntruefalsenull-fix-for-phpcs-3.13.3-4.0
  • feature/universal-nofqntruefalsenull-fix-phpstan-issue
  • feature/universal-nouselessalias-sniffs-minor-improvement
  • feature/universal-precisionalignment-cleanup
  • feature/universal-precisionalignment-tweak-the-tests
  • feature/universal-staticinfinalclass-add-extra-test
  • feature/universal-typeoperatorspacing-support-dnf-types
  • feature/update-phpcs-xsd-schema-url
  • feature/upstream-branch-rename
  • feature/use-phpcsutils-1.1.0
  • fn-keyword-spacing
  • group-use-trailing-comma
  • master
  • match-trailing-comma
  • named-argument-spacing
  • remove-unused-message-variable
  • stable

06 Nov 2026 06:21PM UTC coverage: 99.82% (+0.002%) from 99.818%
42270030978

push

github

web-flow
New `Universal.Enums.CaseName` sniff (#452)

This sniff verifies that enum case names are declared using PascalCase, as required by [PER Coding Style 2.0](https://github.com/php-fig/per-coding-style/blob/2.0.0/spec.md#9-enumerations) ("Enum case declarations MUST use PascalCase capitalization").

The sniff reports two separate errors:

- `NotPascalCase`: the name doesn't start with an uppercase letter or contains characters other than letters and digits (for example, `diamondsRed` or `Diamonds_Red`).
- `HasConsecutiveCaps`: the name contains consecutive uppercase letters. For example, `JsonValue` is accepted while `JSONValue` is not.

Projects that want to allow consecutive uppercase letters can exclude the `HasConsecutiveCaps` error code:

```xml
<rule ref="Universal.Enums.CaseName">
    <exclude name="Universal.Enums.CaseName.HasConsecutiveCaps"/>
</rule>
```

As discussed in php-fig/per-coding-style 161, PER-CS 2.0 accepts consecutive uppercase letters while PER-CS 3.0 doesn't. The separate error-code approach lets this sniff be configured to support both.


### Known limitations

The sniff relies on `PHP_CodeSniffer\Util\Common::isCamelCaps()`, which only recognizes ASCII letters. As a result, enum case names containing non-ASCII characters (for example, `case Café;`) are flagged as not being in PascalCase, even though I believe they should be accepted. This is a pre-existing limitation of `isCamelCaps()` that is shared by all the naming-convention sniffs that depend on it. I searched, and I believe this was not reported before. As discussed in this PR, the sniff can switch to PHPCSUtils utility methods for naming conventions once those are available.

Fixes 444.

25 of 25 new or added lines in 1 file covered. (100.0%)

3873 of 3880 relevant lines covered (99.82%)

3.51 hits per line

Relevant lines Covered
Build:
Build:
3880 RELEVANT LINES 3873 COVERED LINES
3.51 HITS PER LINE
Source Files on develop
  • Tree
  • List 65
  • Changed 0
  • Source Changed 0
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line

Recent builds

Builds Branch Commit Type Ran Committer Via Coverage
42270030978 develop New `Universal.Enums.CaseName` sniff (#452) This sniff verifies that enum case names are declared using PascalCase, as required by [PER Coding Style 2.0](https://github.com/php-fig/per-coding-style/blob/2.0.0/spec.md#9-enumerations) ("Enum case d... push 06 Nov 2026 06:22PM UTC web-flow github
99.82
42125638562 develop GH Actions: Bump the action-runners group with 6 updates (#480) Bumps the action-runners group with 6 updates: | Package | From | To | | --- | --- | --- | | [phpcsstandards/xmllint-validate](https://github.com/phpcsstandards/xmllint-validate) | ... push 05 Nov 2026 11:00PM UTC web-flow github
99.82
42119558858 dependabot/github_actions/action-runners-dd086cf38d Merge 184a8f764 into 6890bf304 Pull #480 05 Nov 2026 10:39PM UTC web-flow github
99.82
41851065780 enum-case-name Merge c96fe47da into 6890bf304 Pull #452 04 Nov 2026 02:49PM UTC web-flow github
99.82
41671010766 develop New `Universal.Enums.NoProtectedMembers` sniff (#454) * Universal/NoProtectedMembers: new sniff to require private over protected enum members Add the `Universal.Enums.NoProtectedMembers` sniff which requires non-public enum members (methods and... push 03 Nov 2026 04:08PM UTC web-flow github
99.82
41669484580 enum-protected-member Merge 3d3c9baa3 into 8af9ebff3 Pull #454 03 Nov 2026 04:01PM UTC web-flow github
99.82
41668307362 enum-protected-member Merge 2603fae99 into 8af9ebff3 Pull #454 03 Nov 2026 03:54PM UTC web-flow github
99.82
41667501293 enum-protected-member Merge 84122f765 into 8af9ebff3 Pull #454 03 Nov 2026 03:50PM UTC web-flow github
99.82
41663802450 enum-case-name Merge a059176c8 into 8af9ebff3 Pull #452 03 Nov 2026 03:29PM UTC web-flow github
99.82
41663307303 enum-case-name Merge 54dd7e4df into 8af9ebff3 Pull #452 03 Nov 2026 03:25PM UTC web-flow github
99.82
See All Builds (789)
  • Repo on GitHub
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc