Bläddra i källkod

Add .php_cs configuration file for php-cs-fixer.

Daniele Alessandri 9 år sedan
förälder
incheckning
808693bfbd
2 ändrade filer med 35 tillägg och 0 borttagningar
  1. 1 0
      .gitignore
  2. 34 0
      .php_cs

+ 1 - 0
.gitignore

@@ -1,6 +1,7 @@
 *.tgz
 *.phar
 .php-version
+.php_cs.cache
 phpunit.xml
 package.xml
 composer.lock

+ 34 - 0
.php_cs

@@ -0,0 +1,34 @@
+<?php
+
+$PREDIS_HEADER = <<<EOS
+This file is part of the Predis package.
+
+(c) Daniele Alessandri <suppakilla@gmail.com>
+
+For the full copyright and license information, please view the LICENSE
+file that was distributed with this source code.
+EOS;
+
+Symfony\CS\Fixer\Contrib\HeaderCommentFixer::setHeader($PREDIS_HEADER);
+
+return Symfony\CS\Config\Config::create()
+    ->setUsingCache(true)
+    ->level(Symfony\CS\FixerInterface::SYMFONY_LEVEL)
+    ->fixers(array(
+        // Symfony
+        '-unalign_equals',
+        '-unalign_double_arrow',
+
+        // Contribs
+        'header_comment',
+        'ordered_use',
+        'phpdoc_order',
+        'long_array_syntax',
+    ))
+    ->finder(
+        Symfony\CS\Finder\DefaultFinder::create()
+            ->in(__DIR__.'/bin')
+            ->in(__DIR__.'/src')
+            ->in(__DIR__.'/tests')
+            ->in(__DIR__.'/examples')
+    );