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

PHPCSStandards / PHP_CodeSniffer / 13318052725 / 6
78%
master: 79%

Build:
Build:
LAST BUILD BRANCH: fix/interface-indentation
DEFAULT BRANCH: master
Ran 13 Feb 2025 10:19PM UTC
Files 262
Run time 95min
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

13 Feb 2025 10:10PM UTC coverage: 75.702%. Remained the same
13318052725.6

push

github

jrfnl
Squiz/ValidClassName: bug fix - improve comment handling

Noticed while working on something else.

If there would be a comment between the OO keyword and the declared name, the sniff could throw false positives with unhelpful error messages, like:
```
193 | ERROR | Class name "/*comment*/" is not in PascalCase format (Squiz.Classes.ValidClassName.NotCamelCaps)
 194 | ERROR | Trait name "//comment" is not in PascalCase format (Squiz.Classes.ValidClassName.NotCamelCaps)
 196 | ERROR | Interface name "// phpcs:ignore Stnd.Cat.SniffName -- just testing" is not in PascalCase format
     |       | (Squiz.Classes.ValidClassName.NotCamelCaps)
 199 | ERROR | Class name "CommentsShouldBeIgnoredValid/*comment*/" is not in PascalCase format (Squiz.Classes.ValidClassName.NotCamelCaps)
 200 | ERROR | Interface name "annotations_should_be_ignored_InvalidName" is not in PascalCase format (Squiz.Classes.ValidClassName.NotCamelCaps)
```

Fixed now by:
1. Ignoring any comments between the OO keyword and the name.
2. Not including comments directly following a name in the name to be evaluated.

Includes tests.

Includes minor error message precision fix - the error will now be thrown on the name which is being flagged as invalid, not on the OO keyword.

18594 of 24562 relevant lines covered (75.7%)

25.39 hits per line

Source Files on job os-ubuntu-latest-php-8.4-custom-ini-false - 13318052725.6
  • Tree
  • List 262
  • Changed 1
  • Source Changed 1
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 13318052725
  • cb4dfb76 on github
  • Prev Job for on 4.0 (#13275809437.4)
  • Next Job for on 4.0 (#13319516920.7)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc