dev-master
9999999-dev
GPL-3.0-or-later
The Requires
Wallogit.com
2017 © Pedro Peláez
This project contains a custom fixer for 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., (*1)
Add the following to composer.json:, (*2)
{
...
"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!, (*3)
Create a .php_cs file:, (*4)
<?php
$finder = Symfony\CS\Finder\DefaultFinder::create()
->in(__DIR__);
return Litus\CodeStyle\Config\Config::create()
->setLicense(__DIR__ . '/.license_header') // or the filename you chose
->finder($finder);
We conform to the PSR-2 and PSR-4 coding styles with the following exceptions:, (*5)
use statement per file instead of one statement per declaration
GPL-3.0-or-later