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

PHPCSStandards / PHP_CodeSniffer / 10434102989
78%
master: 79%

Build:
Build:
LAST BUILD BRANCH: PSR2-WrongOpenercase-with-colon-and-bracket-is-unclear
DEFAULT BRANCH: master
Ran 17 Aug 2024 05:48PM UTC
Jobs 3
Files 260
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

17 Aug 2024 05:44PM UTC coverage: 73.85% (-0.004%) from 73.854%
10434102989

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.

17989 of 24359 relevant lines covered (73.85%)

71.17 hits per line

Jobs
ID Job ID Ran Files Coverage
1 php-7.2-custom-ini-false - 10434102989.1 17 Aug 2024 05:50PM UTC 0
69.8
GitHub Action Run
2 php-8.1-custom-ini-true - 10434102989.2 17 Aug 2024 05:48PM UTC 0
72.43
GitHub Action Run
3 php-8.3-custom-ini-false - 10434102989.3 17 Aug 2024 05:49PM UTC 0
72.39
GitHub Action Run
Source Files on build 10434102989
Detailed source file information is not available for this build.
  • Back to Repo
  • Github Actions Build #10434102989
  • 7d9f2113 on github
  • Prev Build on 4.0 (#10433887681)
  • Next Build on 4.0 (#10668027371)
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