From 6310c4a6794ea835cc518552677acd480141fcdc Mon Sep 17 00:00:00 2001 From: Zing Date: Tue, 25 Jan 2022 19:25:52 +0800 Subject: [PATCH] Generate ruleset for friendsofphp/php-cs-fixer 3.5.0 (#126) * Add ECS set for PHP * Generate ruleset for friendsofphp/php-cs-fixer 3.5.0 --- composer.json | 2 +- config/set/php-cs-fixer-custom.php | 1 + config/set/php-cs-fixer/php-cs-fixer.php | 1 + config/set/php-cs-fixer/php80-migration-risky.php | 1 + 4 files changed, 4 insertions(+), 1 deletion(-) diff --git a/composer.json b/composer.json index b1d6b27..4790f15 100644 --- a/composer.json +++ b/composer.json @@ -20,7 +20,7 @@ "php": "^7.2 || ^8.0", "rector/rector": "^0.12", "slevomat/coding-standard": "^7.0", - "symplify/easy-coding-standard": "^10.0" + "symplify/easy-coding-standard": "^10.0.16" }, "require-dev": { "phpunit/phpunit": "^7.0 || ^8.0 || ^9.0", diff --git a/config/set/php-cs-fixer-custom.php b/config/set/php-cs-fixer-custom.php index a837aa9..1614f69 100644 --- a/config/set/php-cs-fixer-custom.php +++ b/config/set/php-cs-fixer-custom.php @@ -291,6 +291,7 @@ 'goto', 'include', 'include_once', + 'phpdoc', 'require', 'require_once', 'return', diff --git a/config/set/php-cs-fixer/php-cs-fixer.php b/config/set/php-cs-fixer/php-cs-fixer.php index 5aaeac1..08e504f 100644 --- a/config/set/php-cs-fixer/php-cs-fixer.php +++ b/config/set/php-cs-fixer/php-cs-fixer.php @@ -257,6 +257,7 @@ 'goto', 'include', 'include_once', + 'phpdoc', 'require', 'require_once', 'return', diff --git a/config/set/php-cs-fixer/php80-migration-risky.php b/config/set/php-cs-fixer/php80-migration-risky.php index 2c410c3..51adad4 100644 --- a/config/set/php-cs-fixer/php80-migration-risky.php +++ b/config/set/php-cs-fixer/php80-migration-risky.php @@ -19,6 +19,7 @@ $services->set(\PhpCsFixer\Fixer\Alias\PowToExponentiationFixer::class); $services->set(\PhpCsFixer\Fixer\FunctionNotation\VoidReturnFixer::class); $services->set(\PhpCsFixer\Fixer\Strict\DeclareStrictTypesFixer::class); + $services->set(\PhpCsFixer\Fixer\LanguageConstruct\GetClassToClassKeywordFixer::class); $services->set(\PhpCsFixer\Fixer\FunctionNotation\UseArrowFunctionsFixer::class); $services->set(\PhpCsFixer\Fixer\Basic\NonPrintableCharacterFixer::class); $services->set(\PhpCsFixer\Fixer\Alias\RandomApiMigrationFixer::class)