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

PHPCSStandards / PHP_CodeSniffer / 8616918426
78%
master: 79%

Build:
Build:
LAST BUILD BRANCH: 4.x
DEFAULT BRANCH: master
Ran 09 Apr 2024 01:55PM UTC
Jobs 3
Files 259
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

09 Apr 2024 01:52PM UTC coverage: 72.364% (+0.006%) from 72.358%
8616918426

push

github

jrfnl
Squiz/ClosingDeclarationCommentSniff: prevent non-problematic bug

This commit fixes a non-problematic bug on line 96. The code `if
(rtrim($tokens[$next]['content']) === $comment)` was not taking into
account that `$next` can be false. To fix it, a `$next !== false` check
was added to the if condition.

This problem did not cause any issues because when `$next` is `false`, the
code would check the content of the first token
(`$tokens[0]['content']`) and this token can only be the PHP open tag or
inline HTML. The code would only produce false positives if the content
of the first token would be `// end ...` which is unlikely and would be
invalid HTML.

A test was added exercising the code path where `$next` is `false`.

And another tests which actually hits the bug and safeguards against potential regressions for the
non-problematic bug fix.

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

17363 of 23994 relevant lines covered (72.36%)

55.29 hits per line

Jobs
ID Job ID Ran Files Coverage
1 php-8.3-custom-ini-false - 8616918426.1 09 Apr 2024 01:55PM UTC 259
70.84
GitHub Action Run
2 php-8.1-custom-ini-true - 8616918426.2 09 Apr 2024 01:55PM UTC 259
70.86
GitHub Action Run
3 php-7.2-custom-ini-false - 8616918426.3 09 Apr 2024 01:56PM UTC 259
68.54
GitHub Action Run
Source Files on build 8616918426
  • Tree
  • List 259
  • Changed 1
  • Source Changed 1
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #8616918426
  • e6e24591 on github
  • Prev Build on 4.0 (#8616469842)
  • Next Build on 4.0 (#8633930918)
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