diff --git a/.php_cs b/.php-cs-fixer.php similarity index 85% rename from .php_cs rename to .php-cs-fixer.php index 0a4acb7..70664aa 100644 --- a/.php_cs +++ b/.php-cs-fixer.php @@ -9,11 +9,11 @@ ->name('*.php') ->notName('*.blade.php'); -return PhpCsFixer\Config::create() +return (new PhpCsFixer\Config()) ->setRules([ '@PSR2' => true, 'array_syntax' => ['syntax' => 'short'], - 'ordered_imports' => ['sortAlgorithm' => 'alpha'], + 'ordered_imports' => ['sort_algorithm' => 'alpha'], 'no_unused_imports' => true, 'blank_line_after_opening_tag' => true, 'align_multiline_comment' => ['comment_type' => 'phpdocs_like'], @@ -22,4 +22,4 @@ 'phpdoc_align' => ['align' => 'left'], 'no_leading_import_slash' => true, ]) - ->setFinder($finder); \ No newline at end of file + ->setFinder($finder); diff --git a/composer.json b/composer.json index e6b2188..eaa0cab 100644 --- a/composer.json +++ b/composer.json @@ -19,7 +19,7 @@ "require": { "php": ">=7.0", "symfony/console": "^3.2 || ^4.0 || ^5.0 || ^6.0", - "friendsofphp/php-cs-fixer": "^2.14", + "friendsofphp/php-cs-fixer": "^3", "brainmaestro/composer-git-hooks": "^2.6", "symfony/filesystem": "^3.2 || ^4.0 || ^5.0 || ^6.0" },