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

PHPCSStandards / PHP_CodeSniffer / 9851378995
78%
master: 79%

Build:
Build:
LAST BUILD BRANCH: feature/fixer-conflict/PSR12.Functions.ReturnTypeDeclaration
DEFAULT BRANCH: master
Ran 09 Jul 2024 05:18AM 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

09 Jul 2024 05:14AM UTC coverage: 73.753% (+0.007%) from 73.746%
9851378995

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.

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

17958 of 24349 relevant lines covered (73.75%)

70.94 hits per line

Jobs
ID Job ID Ran Files Coverage
1 php-8.3-custom-ini-false - 9851378995.1 09 Jul 2024 05:18AM UTC 260
72.3
GitHub Action Run
2 php-8.1-custom-ini-true - 9851378995.2 09 Jul 2024 05:18AM UTC 260
72.33
GitHub Action Run
3 php-7.2-custom-ini-false - 9851378995.3 09 Jul 2024 05:19AM UTC 260
69.68
GitHub Action Run
Source Files on build 9851378995
  • Tree
  • List 260
  • Changed 1
  • Source Changed 1
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #9851378995
  • 1ee950ac on github
  • Prev Build on 4.0 (#9851335454)
  • Next Build on 4.0 (#9923701714)
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

© 2025 Coveralls, Inc