Forráskód Böngészése

Merge pull request #222 from keradus/travis-CS

add php-cs-fixer to travis tasks
Justin Hileman 11 éve
szülő
commit
6859d82e8e
3 módosított fájl, 10 hozzáadás és 2 törlés
  1. 1 1
      .php_cs
  2. 8 0
      .travis.yml
  3. 1 1
      src/Mustache/Context.php

+ 1 - 1
.php_cs

@@ -1,6 +1,6 @@
 <?php
 
 $config = new Symfony\CS\Config\Config();
-$config->getFinder()->exclude('bin');
+$config->getFinder()->in(__DIR__)->exclude('bin');
 
 return $config;

+ 8 - 0
.travis.yml

@@ -1,4 +1,12 @@
 language: php
+
+before_script:
+  - curl http://cs.sensiolabs.org/get/php-cs-fixer.phar -o php-cs-fixer.phar
+
+script:
+  - phpunit
+  - if [[ `php -r "echo version_compare(PHP_VERSION, '5.3.6', '>=');"` ]]; then php php-cs-fixer.phar --dry-run -v fix .; fi
+
 php:
   - 5.2
   - 5.3

+ 1 - 1
src/Mustache/Context.php

@@ -42,7 +42,7 @@ class Mustache_Context
     /**
      * Push a new Context frame onto the block context stack.
      *
-     * @param  mixed $value Object or array to use for block context
+     * @param mixed $value Object or array to use for block context
      */
     public function pushBlockContext($value)
     {