Last active
February 19, 2018 22:23
-
-
Save mamyn0va/670619bae3f34c48cb4840511c06eb87 to your computer and use it in GitHub Desktop.
Configuration file for PHP Coding Standards Fixer
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 | |
$finder = PhpCsFixer\Finder::create() | |
->exclude('vendor') | |
->exclude('output') | |
->exclude('releases') | |
->in(__DIR__) | |
; | |
return PhpCsFixer\Config::create() | |
->setRiskyAllowed(true) | |
->setRules([ | |
'@PSR2' => true, | |
'declare_strict_types' => true, | |
'align_multiline_comment' => ['comment_type' => 'phpdocs_only'], | |
'binary_operator_spaces' => true, | |
'blank_line_after_opening_tag' => true, | |
'cast_spaces' => true, | |
'class_attributes_separation' => true, | |
'compact_nullable_typehint' => true, | |
'concat_space' => ['spacing' => 'one'], | |
'declare_equal_normalize' => ['space' => 'single'], | |
'function_typehint_space' => true, | |
'no_blank_lines_after_class_opening' => true, | |
'no_blank_lines_after_phpdoc' => true, | |
'no_extra_consecutive_blank_lines' => true, | |
'no_mixed_echo_print' => true, | |
'no_php4_constructor' => 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, | |
'object_operator_without_whitespace' => true, | |
'ordered_class_elements' => true, | |
'ordered_imports' => true, | |
'phpdoc_align' => true, | |
'phpdoc_indent' => true, | |
'yoda_style' => true, | |
'protected_to_private' => true, | |
'return_type_declaration' => true, | |
'self_accessor' => true, | |
'single_blank_line_before_namespace' => true, | |
'single_quote' => true, | |
'ternary_operator_spaces' => true, | |
'ternary_to_null_coalescing' => true, | |
'whitespace_after_comma_in_array' => true, | |
'array_syntax' => ['syntax' => 'short'], | |
]) | |
->setFinder($finder) | |
; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment