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

PHPCSStandards / PHP_CodeSniffer / 10434102989 / 1
78%
master: 79%

Build:
Build:
LAST BUILD BRANCH: should-process-hidden-file-test
DEFAULT BRANCH: master
Ran 17 Aug 2024 05:50PM UTC
Files 260
Run time 5s
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

17 Aug 2024 05:44PM UTC coverage: 69.8% (-0.005%) from 69.805%
10434102989.1

push

github

jrfnl
Generic/LowerCaseKeyword: remove some redundant code

The `Tokens::$contextSensitiveKeywords` token array was introduced in PHPCS 3.7.0 via PR squizlabs/PHP_CodeSniffer 3484.

PR squizlabs/PHP_CodeSniffer 3574 build onto that by removing the bulk of the target tokens from the `register()` method for the Generic/LowerCaseKeyword sniff in favour of using the predefined `Tokens::$contextSensitiveKeywords` token array.

The `T_EMPTY`, `T_EVAL`, `T_ISSET` and `T_UNSET` tokens were initially missing from the `Tokens::$contextSensitiveKeywords` array.
This was fixed in PHPCS 3.7.1 via PRs squizlabs/PHP_CodeSniffer 3608 and  squizlabs/PHP_CodeSniffer 3610.

This means those tokens no longer need to be explicitly added as targets for the Generic/LowerCaseKeyword sniff as they are now (and have been since PHPCS 3.7.1) inherited via the `Tokens::$contextSensitiveKeywords` token array.

This commit removes the redundancy, but also adds tests to safeguard that those keywords will still be checked by the sniff.

16960 of 24298 relevant lines covered (69.8%)

23.78 hits per line

Source Files on job php-7.2-custom-ini-false - 10434102989.1
  • Tree
  • List 0
  • Changed 1
  • Source Changed 1
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 10434102989
  • 7d9f2113 on github
  • Prev Job for on 4.0 (#10433887681.3)
  • Next Job for on 4.0 (#10668027371.2)
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