diff --git a/.gitignore b/.gitignore index b95b2968..3b0c39ad 100644 --- a/.gitignore +++ b/.gitignore @@ -10,6 +10,9 @@ server.lock *.txt *.properties +# php-cs-fixer +/.php_cs.cache +/.php-cs-fixer.cache ############ ## Windows diff --git a/.php-cs-fixer.php b/.php-cs-fixer.php new file mode 100644 index 00000000..307fb27e --- /dev/null +++ b/.php-cs-fixer.php @@ -0,0 +1,39 @@ +in(__DIR__ . '/src'); + +return (new PhpCsFixer\Config) + ->setRules([ + 'array_indentation' => true, + 'array_syntax' => [ + 'syntax' => 'short' + ], + 'binary_operator_spaces' => [ + 'default' => 'single_space' + ], + 'blank_line_after_namespace' => true, + 'blank_line_after_opening_tag' => true, + 'cast_spaces' => [ + 'space' => 'single' + ], + 'concat_space' => [ + 'spacing' => 'one' + ], + 'elseif' => true, + 'indentation_type' => true, + 'no_closing_tag' => true, + 'no_empty_phpdoc' => true, + 'no_extra_blank_lines' => true, + 'no_superfluous_phpdoc_tags' => [ + 'allow_mixed' => true, + ], + 'no_trailing_whitespace' => true, + 'no_trailing_whitespace_in_comment' => true, + 'no_whitespace_in_blank_line' => true, + 'unary_operator_spaces' => true + ]) + ->setFinder($finder) + ->setIndent("\t") + ->setLineEnding("\n") + ->setParallelConfig(PhpCsFixer\Runner\Parallel\ParallelConfigFactory::detect()); \ No newline at end of file