From 24d4fd5c35ffb85bccfce4bc729e80fdd06d76bd Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Guillaume=20Perr=C3=A9al?= <guillaume.perreal@irstea.fr>
Date: Fri, 24 Jan 2020 10:56:25 +0100
Subject: [PATCH] =?UTF-8?q?Applique=20la=20config=20=C3=A0=20son=20propre?=
 =?UTF-8?q?=20code=20et=20v=C3=A9rifie=20en=20CI.?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 .php_cs.dist  | 14 ++++++++++++++
 composer.json |  3 +++
 2 files changed, 17 insertions(+)
 create mode 100644 .php_cs.dist

diff --git a/.php_cs.dist b/.php_cs.dist
new file mode 100644
index 0000000..c65535f
--- /dev/null
+++ b/.php_cs.dist
@@ -0,0 +1,14 @@
+<?php declare(strict_types = 1);
+
+$finder = PhpCsFixer\Finder::create()
+    ->exclude('vendor')
+    ->files()
+    ->name('*.php')
+    ->name('.php_cs.dist')
+    ->in('.');
+
+return Irstea\CS\Config::create()
+    ->setRiskyAllowed(true)
+    ->setIndent('    ')
+    ->setLineEnding("\n")
+    ->setFinder($finder);
diff --git a/composer.json b/composer.json
index fa5317f..d50a3fa 100644
--- a/composer.json
+++ b/composer.json
@@ -44,5 +44,8 @@
     "exclude": [
       ".?*"
     ]
+  },
+  "scripts": {
+    "test": "vendor/bin/php-cs-fixer fix --dry-run --verbose"
   }
 }
-- 
GitLab