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

PHPCSStandards / PHP_CodeSniffer / 13848627330
78%
master: 79%

Build:
Build:
LAST BUILD BRANCH: catch-per-3.0
DEFAULT BRANCH: master
Ran 14 Mar 2025 02:30AM UTC
Jobs 8
Files 263
Run time 1min
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

14 Mar 2025 02:29AM UTC coverage: 77.518% (+0.004%) from 77.514%
13848627330

push

github

jrfnl
Squiz/ClassDeclaration: allow for function attributes

The `Squiz.Classes.ClassDeclaration` sniff checks the number of blank lines _after_ a class closing brace to be exactly one blank line.

To prevent conflicts with other sniffs checking blank lines before function declarations, it bows out when the next thing after the class declaration is a function declaration and defers to the function declaration sniff to handle the "blank lines before function" check.
See squizlabs/PHP_CodeSniffer 2033 for historic context.

However, the above "bowing out" breaks when a function after a class has PHP 8.0+ attributes attached to it and the sniff would still the `NewlinesAfterCloseBrace` error.

Fixed now.

Includes tests.

Note: the new "errors" caused by the new tests are for the `MultipleClasses` code, which is unrelated to this fix and valid.

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

1 existing line in 1 file now uncovered.

19295 of 24891 relevant lines covered (77.52%)

76.75 hits per line

Uncovered Existing Lines

Lines Coverage ∆ File
1
98.06
-0.88% src/Standards/Squiz/Sniffs/Classes/ClassDeclarationSniff.php
Jobs
ID Job ID Ran Files Coverage
1 os-ubuntu-latest-php-8.1-custom-ini-true - 13848627330.1 14 Mar 2025 02:33AM UTC 263
76.03
GitHub Action Run
2 cbf-os-ubuntu-latest-ubuntu-latest-php-8.4-custom-ini-false - 13848627330.2 14 Mar 2025 02:33AM UTC 263
1.89
GitHub Action Run
3 os-ubuntu-latest-php-7.2-custom-ini-false - 13848627330.3 14 Mar 2025 02:35AM UTC 263
73.85
GitHub Action Run
4 cbf-os-ubuntu-latest-ubuntu-latest-php-8.1-custom-ini-true - 13848627330.4 14 Mar 2025 02:33AM UTC 263
1.89
GitHub Action Run
5 os-windows-latest-php-7.2-custom-ini-false - 13848627330.5 14 Mar 2025 02:30AM UTC 263
2.08
GitHub Action Run
6 cbf-os-ubuntu-latest-ubuntu-latest-php-7.2-custom-ini-false - 13848627330.6 14 Mar 2025 02:35AM UTC 263
0.81
GitHub Action Run
7 os-ubuntu-latest-php-8.4-custom-ini-false - 13848627330.7 14 Mar 2025 02:33AM UTC 263
76.01
GitHub Action Run
8 os-windows-latest-php-8.4-custom-ini-false - 13848627330.8 14 Mar 2025 02:30AM UTC 263
2.62
GitHub Action Run
Source Files on build 13848627330
  • Tree
  • List 263
  • Changed 1
  • Source Changed 1
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #13848627330
  • 77e34ca9 on github
  • Prev Build on 4.0 (#13847720834)
  • Next Build on 4.0 (#13849197161)
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