diff --git a/.php_cs.dist b/.php-cs-fixer.dist.php similarity index 81% rename from .php_cs.dist rename to .php-cs-fixer.dist.php index cdfcf71..822b24c 100644 --- a/.php_cs.dist +++ b/.php-cs-fixer.dist.php @@ -7,14 +7,13 @@ use PhpCsFixer\Finder; $finder = Finder::create() - ->name('.php_cs.dist') // Fix this file as well ->in(__DIR__); $overrides = [ 'declare_strict_types' => true, ]; -return Config::create() +return (new Config()) ->setFinder($finder) ->setRiskyAllowed(true) ->setRules(Rules::getForPhp71($overrides)); diff --git a/README.md b/README.md index fb35a49..22a6980 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,7 @@ $config->setRules(Rules::getForPhp73()); ### New to PHP-CS-Fixer -Place a file named `.php_cs.dist` that has following content in your project's root directory. +Place a file named `.php-cs-fixer.dist.php` that has the following content in your project's root directory. ```php name('.php_cs.dist') // Fix this file as well ->in(__DIR__); -return Config::create() +return (new Config()) ->setFinder($finder) ->setRiskyAllowed(true) // use specific rules for your php version e.g.: getForPhp71, getForPhp72, getForPhp73 diff --git a/src/PhpCsFixer/Rules.php b/src/PhpCsFixer/Rules.php index 7879037..d8569d7 100644 --- a/src/PhpCsFixer/Rules.php +++ b/src/PhpCsFixer/Rules.php @@ -79,9 +79,6 @@ private static function getBaseRules(): array 'increment_style' => [ 'style' => 'post', ], - 'is_null' => [ - 'use_yoda_style' => false, - ], 'list_syntax' => [ 'syntax' => 'short', ],