diff --git a/.gitignore b/.gitignore index a7ce067c40..bc06e7e6b9 100755 --- a/.gitignore +++ b/.gitignore @@ -58,7 +58,6 @@ web/assets/* ###< symfony/framework-bundle ### ###> friendsofphp/php-cs-fixer ### -.php_cs .php_cs.cache ###< friendsofphp/php-cs-fixer ### diff --git a/.php_cs b/.php_cs new file mode 100644 index 0000000000..af6b4ea2b1 --- /dev/null +++ b/.php_cs @@ -0,0 +1,3 @@ + true, + '@Symfony:risky' => true, + 'array_syntax' => [ + 'syntax' => 'short', + ], + 'header_comment' => [ + 'header' => $header, + ], + 'no_extra_consecutive_blank_lines' => true, + 'no_php4_constructor' => true, + 'no_useless_else' => true, + 'no_useless_return' => true, + 'ordered_class_elements' => true, + 'ordered_imports' => true, + 'phpdoc_order' => true, + '@PHP56Migration' => true, + '@PHP56Migration:risky' => true, + '@PHPUnit57Migration:risky' => true, + // To be tested before insertion: +// 'strict_comparison' => true, +// 'strict_param' => true, +// 'php_unit_strict' => true, +]; + +$finder = PhpCsFixer\Finder::create() + ->exclude('app') + ->exclude('documentation') + ->exclude('vendor') + ->exclude('tests') + ->exclude('web') + ->in(__DIR__) +; + +return PhpCsFixer\Config::create() + ->setRules([ + '@PSR2' => true, + //'strict_param' => true, + 'array_syntax' => ['syntax' => 'short'], + ]) + ->setFinder($finder) +; \ No newline at end of file diff --git a/.travis.yml b/.travis.yml index 6fd30d20cd..64a5589d22 100755 --- a/.travis.yml +++ b/.travis.yml @@ -26,7 +26,7 @@ php: env: global: - VHOST_URL=localhost - - CHAMILO_VERSION=1.11.x + - CHAMILO_VERSION=master before_install: #- sudo apt-get update