Update PHP-CS-Fixer configuration for 3.0

This commit is contained in:
Giuseppe Criscione 2021-05-11 23:01:25 +02:00
parent a3588749b7
commit f7ffd96c13
2 changed files with 5 additions and 3 deletions

2
.gitignore vendored
View File

@ -1,5 +1,5 @@
.DS_Store
.php_cs.cache
.php-cs-fixer.cache
php_error.log

View File

@ -5,7 +5,9 @@ namespace PhpCsFixer;
$finder = Finder::create()
->in('formwork/src');
return Config::create()
$config = new Config();
return $config
->setRules([
'@PSR1' => true,
'@PSR2' => true,
@ -34,7 +36,7 @@ return Config::create()
'no_unused_imports' => true,
'no_useless_else' => true,
'nullable_type_declaration_for_default_null_value' => ['use_nullable_type_declaration' => false],
'ordered_class_elements' => ['use_trait', 'constant_public', 'constant_protected', 'constant_private', 'property_public', 'property_protected', 'property_private', 'construct', 'method_public', 'method_protected', 'method_private', 'destruct', 'magic'],
'ordered_class_elements' => ['order' => ['use_trait', 'constant_public', 'constant_protected', 'constant_private', 'property_public', 'property_protected', 'property_private', 'construct', 'method_public', 'method_protected', 'method_private', 'destruct', 'magic']],
'phpdoc_align' => true,
'phpdoc_annotation_without_dot' => true,
'phpdoc_indent' => true,