diff --git a/.php_cs b/.php_cs index bb24e85177..f944e9f615 100644 --- a/.php_cs +++ b/.php_cs @@ -1,16 +1,16 @@ notPath('appengine/wordpress/src/files/flexible/wp-config.php') - ->notPath('appengine/wordpress/src/files/standard/wp-config.php') - ->in(__DIR__); +$finder = Symfony\CS\Finder\DefaultFinder::create() + ->in(__DIR__) +; -return PhpCsFixer\Config::create() - ->setRules(array( - '@PSR2' => true, - 'concat_with_spaces' => true, - 'no_unused_imports' => true, - 'no_trailing_whitespace' => true, - 'no_tab_indentation' => true, - )) - ->finder($finder); +return Symfony\CS\Config\Config::create() + ->level(Symfony\CS\FixerInterface::PSR2_LEVEL) + ->fixers([ + 'concat_with_spaces', + 'unused_use', + 'trailing_spaces', + 'indentation' + ]) + ->finder($finder) +; diff --git a/testing/run_test_suite.sh b/testing/run_test_suite.sh index c4b0c04806..c1873a037e 100755 --- a/testing/run_test_suite.sh +++ b/testing/run_test_suite.sh @@ -17,7 +17,7 @@ set -ex # run php-cs-fixer if [ "${RUN_CS_FIXER}" = "true" ]; then - ${HOME}/php-cs-fixer fix --dry-run --diff --config=.php_cs + ${HOME}/php-cs-fixer fix --dry-run --diff fi # loop through all directories containing "phpunit.xml" and run them