Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
50 lines (47 sloc) 1.8 KB
<?php
$finder = PhpCsFixer\Finder::create()
->in(__DIR__ . '/src')
->in(__DIR__ . '/tests');
return PhpCsFixer\Config::create()
->setRules([
'@PSR1' => true,
'@PSR2' => true,
'array_syntax' => ['syntax' => 'short'],
'blank_line_before_statement' => true,
'braces' => [
'position_after_functions_and_oop_constructs' => 'same',
],
'explicit_string_variable' => true,
'function_typehint_space' => true,
'list_syntax' => ['syntax' => 'short'],
'magic_constant_casing' => true,
'native_function_casing' => true,
'no_extra_blank_lines' => true,
'no_leading_import_slash' => true,
'no_mixed_echo_print' => ['use' => 'echo'],
'no_multiline_whitespace_around_double_arrow' => true,
'no_multiline_whitespace_before_semicolons' => true,
'no_singleline_whitespace_before_semicolons' => true,
'no_spaces_around_offset' => true,
'no_trailing_comma_in_singleline_array' => true,
'no_unneeded_control_parentheses' => true,
'no_unneeded_curly_braces' => true,
'no_unset_cast' => true,
'no_unused_imports' => true,
'no_useless_else' => true,
'no_useless_return' => true,
'no_whitespace_before_comma_in_array' => true,
'no_whitespace_in_blank_line' => true,
'ordered_imports' => true,
'short_scalar_cast' => true,
'simplified_null_return' => true,
'single_quote' => true,
'ternary_operator_spaces' => true,
'ternary_to_null_coalescing' => true,
'trailing_comma_in_multiline_array' => true,
'unary_operator_spaces' => true,
'whitespace_after_comma_in_array' => true,
])
->setFinder($finder)
->setIndent("\t")
->setLineEnding("\n");
You can’t perform that action at this time.