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

PHPCSStandards / PHP_CodeSniffer / 9851378995 / 2
78%
master: 79%

Build:
Build:
LAST BUILD BRANCH: catch-per-3.0
DEFAULT BRANCH: master
Ran 09 Jul 2024 05:20AM 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

09 Jul 2024 05:14AM UTC coverage: 72.328% (+0.007%) from 72.321%
9851378995.2

push

github

jrfnl
Generic/DisallowSpaceIndent: flag heredoc/nowdoc closer using space indent

This is the same fix for the `Generic.WhiteSpace.DisallowSpaceIndent` sniff as was previously made in squizlabs/PHP_CodeSniffer 3640 and 533 for the sister-sniff `Generic.WhiteSpace.DisallowTabIndent`.

---

Since PHP 7.3, heredoc/nowdoc closers may be indented.
This indent can use either tabs or spaces and the indent is included in the `T_END_HEREDOC`/`T_END_NOWDOC` token contents as received from the PHP native tokenizer.

However, these tokens were not included in the tokens to look at for the `Generic.WhiteSpace.DisallowSpaceIndent` sniff, which could lead to false negatives.

Fixed now, includes tests.

And along the same lines as per 533:
* The error for space indentation of heredoc/nowdoc closers is not auto-fixable to prevent the fixer creating parse errors as the indentation of the _contents_ of the heredoc/nowdoc has to be the same as for the closer.
* The error for space indentation of heredoc/nowdoc closers has its own error code to allow for selectively ignoring the indentation of heredoc/nowdoc closers.

17494 of 24187 relevant lines covered (72.33%)

23.87 hits per line

Source Files on job php-8.1-custom-ini-true - 9851378995.2
  • Tree
  • List 260
  • Changed 1
  • Source Changed 1
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 9851378995
  • 1ee950ac on github
  • Prev Job for on 4.0 (#9851335454.2)
  • Next Job for on 4.0 (#9923701714.1)
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