formwork/.php-cs-fixer.php

55 lines
2.2 KiB
PHP
Raw Normal View History

2018-07-13 00:50:42 +02:00
<?php
namespace PhpCsFixer;
$finder = Finder::create()
2021-01-06 18:40:15 +01:00
->in('formwork/src');
2018-07-13 00:50:42 +02:00
$config = new Config();
return $config
2019-12-03 13:01:47 +01:00
->setRules([
2021-07-07 17:57:04 +02:00
'@PSR12' => true,
2019-12-03 13:01:47 +01:00
'array_syntax' => ['syntax' => 'short'],
'binary_operator_spaces' => ['default' => 'single_space', 'operators' => ['=>' => 'align']],
'cast_spaces' => ['space' => 'single'],
2018-09-15 14:19:29 +02:00
'class_attributes_separation' => true,
2019-12-03 13:01:47 +01:00
'concat_space' => ['spacing' => 'one'],
2018-07-13 00:50:42 +02:00
'escape_implicit_backslashes' => true,
'include' => true,
'native_function_casing' => true,
'new_with_braces' => true,
'no_empty_comment' => true,
'no_empty_phpdoc' => true,
'no_empty_statement' => true,
'no_extra_blank_lines' => true,
'no_leading_import_slash' => true,
'no_null_property_initialization' => true,
'no_superfluous_elseif' => true,
2019-12-15 13:08:34 +01:00
'no_superfluous_phpdoc_tags' => true,
2018-07-13 00:50:42 +02:00
'no_trailing_comma_in_list_call' => true,
'no_trailing_comma_in_singleline_array' => true,
'no_trailing_whitespace_in_comment' => true,
'no_unneeded_control_parentheses' => true,
'no_unneeded_curly_braces' => true,
2018-07-15 17:57:14 +02:00
'no_unused_imports' => true,
2018-07-13 00:50:42 +02:00
'no_useless_else' => true,
2020-11-03 18:46:49 +01:00
'nullable_type_declaration_for_default_null_value' => ['use_nullable_type_declaration' => false],
'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']],
2018-10-18 14:48:19 +02:00
'phpdoc_align' => true,
'phpdoc_annotation_without_dot' => true,
'phpdoc_indent' => true,
'phpdoc_no_empty_return' => true,
'phpdoc_no_useless_inheritdoc' => true,
'phpdoc_order' => true,
'phpdoc_return_self_reference' => true,
'phpdoc_scalar' => true,
'phpdoc_separation' => true,
2019-02-16 01:06:24 +01:00
'phpdoc_trim_consecutive_blank_line_separation' => true,
2018-10-18 14:48:19 +02:00
'phpdoc_trim' => true,
2019-12-03 13:01:47 +01:00
'phpdoc_types_order' => ['null_adjustment' => 'always_last'],
2018-10-18 14:48:19 +02:00
'phpdoc_var_without_name' => true,
2018-07-13 00:50:42 +02:00
'single_quote' => true
2019-12-03 13:01:47 +01:00
])
2018-07-13 00:50:42 +02:00
->setFinder($finder);