PHPackages                             litus/php-cs-fixer - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. litus/php-cs-fixer

AbandonedArchivedLibrary[Utility &amp; Helpers](/categories/utility)

litus/php-cs-fixer
==================

0205PHP

Since Mar 2Pushed 8y ago6 watchersCompare

[ Source](https://github.com/LitusProject/PHP-CS-Fixer)[ Packagist](https://packagist.org/packages/litus/php-cs-fixer)[ RSS](/packages/litus-php-cs-fixer/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Litus PHP CodeStyle
===================

[](#litus-php-codestyle)

This project contains a custom fixer for [php-cs-fixer](https://github.com/fabpot/PHP-CS-Fixer). If a php file doesn't contain a license header, it is added. If the license header in the php file is different than the supplied file, the php file is updated.

Usage
-----

[](#usage)

Add the following to `composer.json`:

```
{
    ...
    "require": {
        "litus/php-cs": "dev-master"
    },
    "repositories": [
        {
            "type": "vcs",
            "url": "https://github.com/LitusProject/PhpCodeStyle"
        }
    ],
    ...
}
```

Create a `.license_header` file (or pick any filename you want) and put the license header in this file.
**Note**: Add an unformatted version of the license header!

Create a `.php_cs` file:

```
