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

PHPCSStandards / PHP_CodeSniffer / 13318052725
78%
master: 79%

Build:
Build:
LAST BUILD BRANCH: feature/fixer-conflict/PSR12.Functions.ReturnTypeDeclaration
DEFAULT BRANCH: master
Ran 13 Feb 2025 10:11PM UTC
Jobs 8
Files 262
Run time 106min
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: 77.207%. Remained the same
13318052725

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.

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

19104 of 24744 relevant lines covered (77.21%)

76.21 hits per line

Jobs
ID Job ID Ran Files Coverage
1 cbf-os-ubuntu-latest-ubuntu-latest-php-8.4-custom-ini-false - 13318052725.1 13 Feb 2025 10:16PM UTC 262
1.89
GitHub Action Run
2 cbf-os-ubuntu-latest-ubuntu-latest-php-8.1-custom-ini-true - 13318052725.2 13 Feb 2025 10:16PM UTC 262
1.9
GitHub Action Run
3 cbf-os-ubuntu-latest-ubuntu-latest-php-7.2-custom-ini-false - 13318052725.3 13 Feb 2025 10:18PM UTC 262
0.81
GitHub Action Run
4 os-ubuntu-latest-php-7.2-custom-ini-false - 13318052725.4 13 Feb 2025 10:18PM UTC 262
73.53
GitHub Action Run
5 os-ubuntu-latest-php-8.1-custom-ini-true - 13318052725.5 13 Feb 2025 10:16PM UTC 262
75.72
GitHub Action Run
6 os-ubuntu-latest-php-8.4-custom-ini-false - 13318052725.6 13 Feb 2025 10:16PM UTC 262
75.7
GitHub Action Run
7 os-windows-latest-php-8.4-custom-ini-false - 13318052725.7 13 Feb 2025 10:12PM UTC 262
2.59
GitHub Action Run
8 os-windows-latest-php-7.2-custom-ini-false - 13318052725.8 13 Feb 2025 10:11PM UTC 262
2.07
GitHub Action Run
Source Files on build 13318052725
  • Tree
  • List 262
  • Changed 2
  • Source Changed 1
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #13318052725
  • cb4dfb76 on github
  • Prev Build on 4.0 (#13275809437)
  • Next Build on 4.0 (#13319516920)
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

© 2025 Coveralls, Inc