From 239b3678ae4d3547ea712ff00ccda1f5c780e203 Mon Sep 17 00:00:00 2001 From: Ryan Rushton Date: Thu, 19 Mar 2015 23:11:44 -0700 Subject: [PATCH] add php-cs-fixer to travis enable test 1 and 2. test 3 does not seem to pass --- .travis.yml | 4 +++- .../simple-jsbeautifyrc/php/expected/test.php | 15 ++++++++++----- .../simple-jsbeautifyrc/php/expected/test2.php | 7 ++++--- .../php/original/{_test.php => test.php} | 0 .../php/original/{_test2.php => test2.php} | 0 5 files changed, 17 insertions(+), 9 deletions(-) rename examples/simple-jsbeautifyrc/php/original/{_test.php => test.php} (100%) rename examples/simple-jsbeautifyrc/php/original/{_test2.php => test2.php} (100%) diff --git a/.travis.yml b/.travis.yml index aba5001..eaa69bb 100644 --- a/.travis.yml +++ b/.travis.yml @@ -31,6 +31,8 @@ before_install: # Java, C, C++, C#, Objective-C, D, Pawn, Vala - brew install uncrustify # PHP -# - pear install PHP_Beautifier-beta + - wget http://get.sensiolabs.org/php-cs-fixer.phar + - mv php-cs-fixer.phar /usr/local/bin/php-cs-fixer + - chmod a+x /usr/local/bin/php-cs-fixer # CoffeeScript - npm install coffee-formatter diff --git a/examples/simple-jsbeautifyrc/php/expected/test.php b/examples/simple-jsbeautifyrc/php/expected/test.php index 169ac02..b4c1278 100644 --- a/examples/simple-jsbeautifyrc/php/expected/test.php +++ b/examples/simple-jsbeautifyrc/php/expected/test.php @@ -1,25 +1,30 @@ query(""); $num = $q->num_rows; echo ''; -if ($num > 0) { +if ($num>0) { echo ''; } else { echo ''; } echo ''; + // new messages $q = $mysqli->query(""); $num = $q->num_rows; echo ''; -if ($num > 0) { +if ($num>0) { echo ''; } else { echo ''; } echo ''; -?> diff --git a/examples/simple-jsbeautifyrc/php/expected/test2.php b/examples/simple-jsbeautifyrc/php/expected/test2.php index 2352b32..7390542 100644 --- a/examples/simple-jsbeautifyrc/php/expected/test2.php +++ b/examples/simple-jsbeautifyrc/php/expected/test2.php @@ -1,5 +1,6 @@