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

PHPCSStandards / PHP_CodeSniffer / 9851335454
78%
master: 79%

Build:
Build:
LAST BUILD BRANCH: feature/fixer-conflict/PSR12.Functions.ReturnTypeDeclaration
DEFAULT BRANCH: master
Ran 09 Jul 2024 05:13AM 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:09AM UTC coverage: 73.746% (+0.003%) from 73.743%
9851335454

push

github

jrfnl
Generic/DisallowTabIndent: do not auto-fix heredoc/nowdoc closer indent

Follow up on squizlabs/PHP_CodeSniffer 3640, which added the `T_END_HEREDOC` and `T_END_NOWDOC` tokens to the list of tokens to examine and was included in the 3.7.2 release.

When a flexible heredoc/nowdoc is used, the indentation type of the heredoc/nowdoc content and the indentation type of the heredoc/nowdoc closer must be consistent, so auto-fixing the indentation of the closer, without also changing the indentation of the contents (from tabs to spaces) would cause a parse error.
See: https://3v4l.org/7OF3M

I do believe indentation tabs should still be flagged, but the auto-fixer should be disabled.

To allow people to disregard tab indentation for heredoc/nowdoc closers completely, the error now also has a more specific error code - ` TabsUsedHeredocCloser` -, which allows for excluding it in a ruleset.

While the change in the error code _could_ be considered a breaking change, the fact that the potential for a parse error hasn't been reported as a bug so far, leads me to believe this is not a frequently encountered situation, so the impact of the higher specificity for the error code should be minimal.

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

17952 of 24343 relevant lines covered (73.75%)

70.95 hits per line

Jobs
ID Job ID Ran Files Coverage
1 php-7.2-custom-ini-false - 9851335454.1 09 Jul 2024 05:14AM UTC 260
69.69
GitHub Action Run
2 php-8.1-custom-ini-true - 9851335454.2 09 Jul 2024 05:13AM UTC 260
72.32
GitHub Action Run
3 php-8.3-custom-ini-false - 9851335454.3 09 Jul 2024 05:13AM UTC 260
72.29
GitHub Action Run
Source Files on build 9851335454
  • 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 #9851335454
  • 199d0497 on github
  • Prev Build on 4.0 (#9800052374)
  • Next Build on 4.0 (#9851378995)
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