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

FriendsOfPHP / PHP-CS-Fixer / 20650
89%
master: 93%

Build:
Build:
LAST BUILD BRANCH: phpdocAlignFixer
DEFAULT BRANCH: master
Ran 10 Apr 2020 05:04PM UTC
Jobs 1
Files 386
Run time 57s
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

pending completion
20650

push

travis-ci

keradus
bug #4870 HeaderCommentFixer - do not remove class docs (gharlan)

This PR was merged into the 2.15 branch.

Discussion
----------

HeaderCommentFixer - do not remove class docs

This PR tries to fix #4067.

It is difficult to find the correct/best behavior.

My proposal follows these rules:

1) A comment is a class doc comment, if it is a `T_DOC_COMMENT` (not a `T_COMMENT`) and if there is no blank line between the comment and the class/interface/trait/function:

```php
/**
 * this is a class doc comment
 * header comment will be added above
 */
class Foo {}

/**
 * this is NOT a class doc comment (blank line)
 * will be replaced by header comment
 */

class Foo {}

/*
 * this is NOT a class doc comment (no T_DOC_COMMENT)
 * will be replaced by header comment
 */
class Foo {}
```

2) If configuration for `separate` is `top` or `none`, the behavior does not change with this pr, because it is not possible then to make the decision by the blank line after the comment.

3) If `separate` is `both`/`bottom` and `comment_type` is `PHPDoc` and the comment looks like a class doc comment (see 1.), but the content is the same as the expected header, then it is considered as the header comment, and only the missing blank line is added.

Commits
-------

fac6996c4 HeaderCommentFixer - do not remove class docs

13348 of 16272 relevant lines covered (82.03%)

34.99 hits per line

Jobs
ID Job ID Ran Files Coverage
7 20650.7 (DEFAULT_COMPOSER_FLAGS="--optimize-autoloader --no-interaction --no-progress" COMPOSER_FLAGS="") 10 Apr 2020 05:03PM UTC 0
82.03
Travis Job 20650.7
Source Files on build 20650
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #20650
  • 0945975f on github
  • Prev Build on 2.15 (#20647)
  • Next Build on 2.15 (#20653)
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