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

PHPCSStandards / PHP_CodeSniffer / 10206368215
78%
master: 79%

Build:
Build:
LAST BUILD BRANCH: PSR2-WrongOpenercase-with-colon-and-bracket-is-unclear
DEFAULT BRANCH: master
Ran 01 Aug 2024 10:02PM 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

01 Aug 2024 09:57PM UTC coverage: 74.672%. Remained the same
10206368215

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.

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

17987 of 24088 relevant lines covered (74.67%)

71.9 hits per line

Jobs
ID Job ID Ran Files Coverage
1 php-8.3-custom-ini-false - 10206368215.1 01 Aug 2024 10:02PM UTC 260
72.39
GitHub Action Run
2 php-8.1-custom-ini-true - 10206368215.2 01 Aug 2024 10:02PM UTC 260
72.42
GitHub Action Run
3 php-7.2-custom-ini-false - 10206368215.3 01 Aug 2024 10:03PM UTC 260
70.57
GitHub Action Run
Source Files on build 10206368215
  • Tree
  • List 260
  • Changed 1
  • Source Changed 0
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #10206368215
  • a3ffe7cd on github
  • Prev Build on 4.0 (#10205858446)
  • Next Build on 4.0 (#10240520713)
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