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

PHPCSStandards / PHP_CodeSniffer / 13848627330 / 8
78%
master: 79%

Build:
Build:
LAST BUILD BRANCH: catch-per-3.0
DEFAULT BRANCH: master
Ran 14 Mar 2025 02:38AM UTC
Files 263
Run time 6s
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: 2.619% (-0.001%) from 2.62%
13848627330.8

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.

647 of 24702 relevant lines covered (2.62%)

0.28 hits per line

Source Files on job os-windows-latest-php-8.4-custom-ini-false - 13848627330.8
  • Tree
  • List 263
  • Changed 1
  • Source Changed 1
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 13848627330
  • 77e34ca9 on github
  • Prev Job for on 4.0 (#13847720834.6)
  • Next Job for on 4.0 (#13849197161.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