From 761538e06523b665c984bbb9a6afe919d07ff322 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dariusz=20Rumi=C5=84ski?= Date: Sun, 17 Aug 2014 00:48:05 +0200 Subject: [PATCH 1/2] add php-cs-fixer into travis tasks --- .php_cs | 2 +- .travis.yml | 8 ++++++++ src/Mustache/Context.php | 2 +- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/.php_cs b/.php_cs index f34252f..0965a1b 100644 --- a/.php_cs +++ b/.php_cs @@ -1,6 +1,6 @@ getFinder()->exclude('bin'); +$config->getFinder()->in(__DIR__)->exclude('bin'); return $config; diff --git a/.travis.yml b/.travis.yml index e73c8b0..7342d2e 100644 --- a/.travis.yml +++ b/.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 + - php php-cs-fixer.phar --dry-run -v fix . + php: - 5.2 - 5.3 diff --git a/src/Mustache/Context.php b/src/Mustache/Context.php index 7d1dc90..0115ff0 100644 --- a/src/Mustache/Context.php +++ b/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) { From 320bab9e7c1d4b1bc7f8ccea8e06d8475742eb6b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dariusz=20Rumi=C5=84ski?= Date: Sun, 17 Aug 2014 01:54:21 +0200 Subject: [PATCH 2/2] ignore php-cs-fixer on php5.2 --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 7342d2e..e8b83bc 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,7 +5,7 @@ before_script: script: - phpunit - - php php-cs-fixer.phar --dry-run -v fix . + - 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