Skip to content

Commit

Permalink
Updated .php-cs-fixer.php file
Browse files Browse the repository at this point in the history
  • Loading branch information
TheCartpenter committed Dec 24, 2023
1 parent 91caaf4 commit 7112906
Showing 1 changed file with 37 additions and 39 deletions.
76 changes: 37 additions & 39 deletions .php-cs-fixer.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,44 +5,42 @@
* you can change this configuration by importing this file.
*/

$finder = Symfony\Component\Finder\Finder::create()->in([
__DIR__ . '/upload/'
])->name('*.php')->ignoreDotFiles(true)->exclude([
__DIR__ . '/upload/system/storage/vendor/'
]);

$config = new PhpCsFixer\Config();

return $config->setRiskyAllowed(true)->setIndent("\t")->setRules([
'@PSR12' => true,
'array_syntax' => true,
'assign_null_coalescing_to_coalesce_equal' => true,
'binary_operator_spaces' => [
'default' => 'single_space',
'operators' => [
'=' => 'at_least_single_space',
'=>' => 'at_least_single_space'
]
],
'blank_line_after_namespace' => false,
'blank_line_after_opening_tag' => false,
'blank_lines_before_namespace' => false,
'braces_position' => [
'classes_opening_brace' => 'same_line',
'functions_opening_brace' => 'same_line'
],
'control_structure_continuation_position' => ['position' => 'same_line'],
'combine_nested_dirname' => true,
'function_declaration' => ['closure_function_spacing' => 'none'],
'heredoc_indentation' => true,
'implode_call' => true,
'list_syntax' => true,
'no_alias_functions' => true,
'no_blank_lines_after_phpdoc' => true,
'no_whitespace_before_comma_in_array' => true,
'non_printable_character' => true,
'normalize_index_brace' => true,
'pow_to_exponentiation' => true,
'use_arrow_functions' => true,
'void_return' => true,
])->setFinder($finder);
return $config
->setRiskyAllowed(true)
->setIndent("\t")
->setRules([
'@PSR12' => true,
'array_syntax' => true,
'assign_null_coalescing_to_coalesce_equal' => true,
'binary_operator_spaces' => ['default' => 'single_space','operators' => ['=' => 'at_least_single_space','=>' => 'align_single_space_minimal']],
'blank_line_after_namespace' => false,
'blank_line_after_opening_tag' => false,
'blank_lines_before_namespace' => false,
'braces_position' => ['classes_opening_brace' => 'same_line','functions_opening_brace' => 'same_line'],
'combine_nested_dirname' => true,
'function_declaration' => ['closure_function_spacing' => 'none'],
'heredoc_indentation' => true,
'implode_call' => true,
'list_syntax' => true,
'no_alias_functions' => true,
'no_blank_lines_after_phpdoc' => true,
'no_whitespace_before_comma_in_array' => true,
'non_printable_character' => true,
'normalize_index_brace' => true,
'pow_to_exponentiation' => true,
'random_api_migration' => true,
'use_arrow_functions' => true,
'void_return' => true,
])
->setFinder(PhpCsFixer\Finder::create()
->in(__DIR__ . '/upload/')
->exclude([
__DIR__ . '/upload/system/storage/vendor/',
])
// ->append([
// 'file-to-include',
// ])
)
;

0 comments on commit 7112906

Please sign in to comment.