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

PHPCSStandards / PHP_CodeSniffer / 10205858446 / 3
78%
master: 79%

Build:
Build:
LAST BUILD BRANCH: fix/missing-static-token
DEFAULT BRANCH: master
Ran 01 Aug 2024 09:19PM UTC
Files 260
Run time 19s
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

01 Aug 2024 09:12PM UTC coverage: 72.391% (+0.02%) from 72.372%
10205858446.3

push

github

jrfnl
Squiz/OperatorBracket: prevent PHP notices during live coding

During live coding (or in the case of parse errors), the "end of the expression" cannot always be correctly determined. In such a case, the sniff should stay silent.

This wasn't always handled correctly so far and could lead to the following PHP notices:
```
Undefined array key "parenthesis_closer" in path/to/phpcs/src/Standards/Squiz/Sniffs/Formatting/OperatorBracketSniff.php on line 357
Undefined array key "bracket_closer" in path/to/phpcs/src/Standards/Squiz/Sniffs/Formatting/OperatorBracketSniff.php on line 362
```

This commit fixes these by adding some extra defensive coding and bowing out when an unclosed bracket set is encountered.

Includes tests.

17515 of 24195 relevant lines covered (72.39%)

23.8 hits per line

Source Files on job php-8.3-custom-ini-false - 10205858446.3
  • Tree
  • List 0
  • Changed 1
  • Source Changed 1
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 10205858446
  • 4f19ee58 on github
  • Prev Job for on 4.0 (#10205403704.3)
  • Next Job for on 4.0 (#10206368215.3)
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