Last active
July 12, 2018 08:18
-
-
Save jenky/fe61d02084bf146a1dc34a0687f8cb46 to your computer and use it in GitHub Desktop.
Laravel PHP-CS-Fixer 2 config
This file contains hidden or 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('bootstrap/cache') | |
->exclude('storage') | |
->exclude('vendor') | |
->in(__DIR__) | |
->name('*.php') | |
->notName('*.blade.php') | |
->ignoreDotFiles(true) | |
->ignoreVCS(true) | |
; | |
return PhpCsFixer\Config::create() | |
->setCacheFile(__DIR__.'/.php_cs.cache') | |
->setRules(array( | |
'@PSR2' => true, | |
'blank_line_after_opening_tag' => true, | |
'function_typehint_space' => true, | |
'no_blank_lines_after_class_opening' => true, | |
'no_blank_lines_after_phpdoc' => true, | |
'no_unused_imports' => true, | |
'not_operator_with_successor_space' => true, | |
'ordered_imports' => true, | |
'phpdoc_order' => true, | |
'phpdoc_scalar' => true, | |
'phpdoc_single_line_var_spacing' => true, | |
'phpdoc_summary' => true, | |
'short_scalar_cast' => true, | |
'single_blank_line_before_namespace' => true, | |
'ternary_operator_spaces' => true, | |
)) | |
->setFinder($finder) | |
; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I got this error message on PHP CS Fixer 2.8.2 Round Numbers.
[LogicException]
You must call one of in() or append() methods before iterating over a Finder.