Created
May 11, 2017 09:05
-
-
Save dragol7/854a825a8066ec889bfeb43141d136eb to your computer and use it in GitHub Desktop.
.php_cs.dist file example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
return PhpCsFixer\Config::create() | |
->setRules([ | |
'array_syntax' => ['syntax' => 'short'], | |
'binary_operator_spaces' => ['align_double_arrow' => true, 'align_equals' => true], | |
'blank_line_after_namespace' => true, | |
'braces' => true, | |
'class_definition' => true, | |
'elseif' => true, | |
'encoding' => true, | |
'full_opening_tag' => true, | |
'function_declaration' => true, | |
'indentation_type' => true, | |
'line_ending' => true, | |
'lowercase_constants' => true, | |
'lowercase_keywords' => true, | |
'method_argument_space' => true, | |
'method_separation' => true, | |
'no_closing_tag' => true, | |
'no_empty_comment' => true, | |
'no_empty_phpdoc' => true, | |
'no_extra_consecutive_blank_lines' => true, | |
'no_spaces_inside_parenthesis' => true, | |
'no_trailing_whitespace' => true, | |
'no_trailing_whitespace_in_comment' => true, | |
'ordered_class_elements' => ['order' => ['use_trait', 'constant_public', 'constant_protected', 'constant_private', 'property_public', 'property_protected', 'property_private', 'construct', 'destruct', 'magic', 'phpunit', 'method_public', 'method_protected', 'method_private']], | |
'ordered_imports' => ['sortAlgorithm' => 'length'], | |
'phpdoc_add_missing_param_annotation' => ['only_untyped' => true], | |
'phpdoc_align' => true, | |
'single_blank_line_at_eof' => true, | |
'single_class_element_per_statement' => true, | |
'single_import_per_statement' => true, | |
'single_line_after_imports' => true, | |
'single_quote' => true, | |
'visibility_required' => true, | |
'no_unused_imports' => true, | |
]) | |
->setFinder( | |
PhpCsFixer\Finder::create() | |
->exclude('tests/Fixtures') | |
->in(__DIR__) | |
) | |
; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment