Simplifies using many of php's built-in filesystem functions
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

49 lines
1.8 KiB

<?php
return (new PhpCsFixer\Config())
->setRules([
'@PSR12' => true,
'array_indentation' => true,
'array_syntax' => [ 'syntax' => 'short' ],
'blank_line_after_namespace' => false,
'blank_line_after_opening_tag' => false,
'blank_lines_before_namespace' => false,
'braces' => [
'allow_single_line_closure' => true,
'position_after_functions_and_oop_constructs' => 'same'
],
'braces_position' => [
'classes_opening_brace' => 'same_line',
'functions_opening_brace' => 'same_line'
],
'class_attributes_separation' => [ 'elements' => [ 'method' => 'one' ] ],
'combine_consecutive_unsets' => true,
'concat_space' => ['spacing' => 'one'],
'declare_equal_normalize' => true,
'function_typehint_space' => true,
'general_phpdoc_annotation_remove' => [],
'include' => true,
'lowercase_cast' => true,
'multiline_whitespace_before_semicolons' => false,
'no_blank_lines_before_namespace' => true,
'no_extra_blank_lines' => [
'tokens' => [
'curly_brace_block',
'extra',
'throw',
'use'
]
],
'no_multiline_whitespace_around_double_arrow' => true,
'no_spaces_around_offset' => true,
'no_whitespace_before_comma_in_array' => true,
'no_whitespace_in_blank_line' => true,
'object_operator_without_whitespace' => true,
'single_quote' => true,
'space_after_semicolon' => true,
'ternary_operator_spaces' => true,
'trim_array_spaces' => true,
'unary_operator_spaces' => true,
'whitespace_after_comma_in_array' => true,
])
->setLineEnding("\n")
;