Last active
September 7, 2020 04:30
-
-
Save mattias-persson/1be2f0537eab4ca5fb0ca0e788ec5a3d to your computer and use it in GitHub Desktop.
StyleCI Laravel Preset config for PhpCsFixer
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([ | |
'psr0' => false, | |
'@PSR2' => true, | |
'array_syntax' => ['syntax' => 'short'], | |
'phpdoc_indent' => true, | |
'cast_spaces' => ['space' => 'single'], | |
'binary_operator_spaces' => [], | |
'unary_operator_spaces' => [], | |
'phpdoc_scalar' => ['types' => ['boolean', 'callback', 'double', 'integer', 'real', 'str']], | |
'standardize_not_equals' => true, | |
'no_unused_imports' => true, | |
'whitespace_after_comma_in_array' => true, | |
'blank_line_after_namespace' => true, | |
'blank_line_after_opening_tag' => true, | |
'blank_line_before_return' => true, | |
'no_multiline_whitespace_around_double_arrow' => true, | |
'no_multiline_whitespace_before_semicolons' => true, | |
'no_singleline_whitespace_before_semicolons' => true, | |
'no_trailing_whitespace_in_comment' => true, | |
'no_whitespace_in_blank_line' => true, | |
'no_whitespace_before_comma_in_array' => true, | |
'no_trailing_comma_in_singleline_array' => true, | |
'trailing_comma_in_multiline_array' => true, | |
'ordered_imports' => [ | |
'sort_algorithm' => 'alpha', | |
], | |
]); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment