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

FriendsOfPHP / PHP-CS-Fixer / 2568
84%
master: 93%

Build:
Build:
LAST BUILD BRANCH: phpdocAlignFixer
DEFAULT BRANCH: master
Ran 10 Feb 2015 08:57PM UTC
Jobs 5
Files 97
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

pending completion
2568

push

travis-ci

keradus
feature #1002 Add HeaderCommentFixer (ajgarlag)

This PR was squashed before being merged into the 1.5 branch (closes #1002).

Discussion
----------

Add HeaderCommentFixer

In most projects, every php file has a header comment with information about copyright and license. This PR introduces a new fixer to add, rewrite or remove this header comment in order to standarize it. This is a particular fixer, because it needs a configuration parameter, the header text, that varies with the project.

I made a first implementation where a new method `getHeader` was added to `ConfigInterface`, so the fixer implementing the `ConfigAwareInterface` could read the header text, but this new method was BC break.

In my second implementation, the header is statically set into the `HeaderCommentFixer` class so it can be set from the config file without any BC break. If you think there is a better way to accomplish this, ping me.

The fixer only modifies files with `php` extension starting with a `T_OPEN_TAG` token. It will add a header comment, or rewrite the existing one to update the header text. If the header text is empty, it will remove the header comment.

This PR adds the fixer to the `.php_cs` config file for this project. Another PR #1003 has been opened to update the header comments in this project after running this new fixer.

Commits
-------

04c8137 Add HeaderCommentFixer

3083 of 3790 relevant lines covered (81.35%)

189.37 hits per line

Jobs
ID Job ID Ran Files Coverage
1 2568.1 10 Feb 2015 08:55PM UTC 0
79.75
Travis Job 2568.1
2 2568.2 10 Feb 2015 08:55PM UTC 0
80.0
Travis Job 2568.2
3 2568.3 10 Feb 2015 08:56PM UTC 0
80.11
Travis Job 2568.3
4 2568.4 10 Feb 2015 08:56PM UTC 0
80.11
Travis Job 2568.4
5 2568.5 10 Feb 2015 08:56PM UTC 0
72.97
Travis Job 2568.5
Source Files on build 2568
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #2568
  • 05601164 on github
  • Prev Build on 1.5 (#2567)
  • Next Build on 1.5 (#2574)
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