Commit 255d2db8 authored by Guillaume Perréal's avatar Guillaume Perréal
Browse files

Added a README.md.

Showing with 54 additions and 0 deletions
+54 -0
README.md 0 → 100644
# irstea/php-cs-fixer-config
Configuration pour [PHP-CS-Fixer](https://cs.symfony.com/).
### Installation
```shell
composer require --dev irstea/php-cs-fixer-config
```
### Configuration
La configuration se fait dans un fichier `.php_cs.dist` comme avec PHP-CS-Fixer, mais en utilisant la classe `Irstea\CS\Config`.
Exemple :
```php
<?php
$finder = PhpCsFixer\Finder::create()
->exclude('vendor')
->exclude('var')
->files()
->name('*.php')
->in('.');
return Irstea\CS\Config::create()
->setIndent(' ')
->setLineEnding("\n")
->setFinder($finder);
```
Pour plus de détails, cf. https://cs.symfony.com/#usage
Un modèle d'en-tête (cf. règle `header_comment`) peut être défini dans un fichier `.docheader`. Les tags `%package%` et `%yearRange%` sont remplacés automatiquement à partir des informations du dépôt git et de `composer.json`.
Exemple :
```
This file is part of "%package%".
(c) %yearRange% Irstea <dsi.poleis@irstea.fr>
For the full copyright and license information, please view the LICENSE
file that was distributed with this source code.
```
### Usage
```shell
vendor/bin/php-cs-fixer fix
```
cf. https://cs.symfony.com/#usage
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment