2019-05-03 23:18:28 +03:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
$finder = PhpCsFixer\Finder::create()
|
|
|
|
|
->exclude('cache')
|
|
|
|
|
->in(__DIR__)
|
|
|
|
|
;
|
|
|
|
|
|
2024-10-07 17:15:05 +01:00
|
|
|
return (new PhpCsFixer\Config())
|
2019-05-03 23:18:28 +03:00
|
|
|
->setRules([
|
|
|
|
|
'binary_operator_spaces' => ['default' => 'align'],
|
|
|
|
|
'phpdoc_align' => true,
|
|
|
|
|
'array_indentation' => true,
|
|
|
|
|
'blank_line_before_statement' => ['statements' => [
|
2024-10-07 17:15:05 +01:00
|
|
|
'break', 'case', 'continue', 'default', 'exit', 'for', 'foreach', 'if']
|
2019-05-03 23:18:28 +03:00
|
|
|
],
|
|
|
|
|
'braces' => ['position_after_control_structures' => 'next'],
|
|
|
|
|
'cast_spaces' => true,
|
|
|
|
|
'concat_space' => ['spacing' => 'one'],
|
|
|
|
|
'elseif' => true,
|
|
|
|
|
'encoding' => true,
|
|
|
|
|
'full_opening_tag' => true,
|
|
|
|
|
'include' => true,
|
|
|
|
|
'indentation_type' => true,
|
|
|
|
|
'array_syntax' => ['syntax' => 'short'],
|
2024-10-07 17:15:05 +01:00
|
|
|
'constant_case' => ['case' => 'lower'],
|
2019-05-03 23:18:28 +03:00
|
|
|
'method_chaining_indentation' => true,
|
|
|
|
|
'method_argument_space' => true,
|
|
|
|
|
'no_closing_tag' => true,
|
|
|
|
|
'no_singleline_whitespace_before_semicolons' => true,
|
|
|
|
|
'no_useless_return' => true,
|
|
|
|
|
'no_whitespace_in_blank_line' => true,
|
|
|
|
|
'not_operator_with_successor_space' => true,
|
|
|
|
|
'single_blank_line_at_eof' => true,
|
|
|
|
|
'class_definition' => ['single_line' => true],
|
|
|
|
|
'single_quote' => true,
|
|
|
|
|
'trim_array_spaces' => true,
|
|
|
|
|
'visibility_required' => true,
|
|
|
|
|
'native_function_casing' => true,
|
|
|
|
|
'no_empty_comment' => true,
|
2019-05-05 20:12:32 +03:00
|
|
|
'single_line_comment_style' => true,
|
|
|
|
|
'phpdoc_add_missing_param_annotation' => true,
|
|
|
|
|
'no_spaces_after_function_name' => true,
|
|
|
|
|
'no_spaces_around_offset' => true,
|
|
|
|
|
'no_spaces_inside_parenthesis' => true,
|
2019-05-03 23:18:28 +03:00
|
|
|
])
|
|
|
|
|
->setFinder($finder)
|
|
|
|
|
->setIndent(" ")
|
|
|
|
|
;
|