Last active
May 1, 2019 02:47
-
-
Save rydurham/76b5e1ac20380ae80d7524f04b70ad50 to your computer and use it in GitHub Desktop.
Laravel PHP CS config
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 = Symfony\Component\Finder\Finder::create() | |
->exclude('vendor') | |
->exclude('bootstrap') | |
->exclude('storage') | |
->in(__DIR__) | |
->name('*.php') | |
->notName('*.blade.php'); | |
return PhpCsFixer\Config::create() | |
->setRules([ | |
'@PSR2' => true, | |
'array_syntax' => ['syntax' => 'short'], | |
'ordered_imports' => ['sortAlgorithm' => 'length'], | |
'no_unused_imports' => true, | |
'linebreak_after_opening_tag' => true, | |
'not_operator_with_successor_space' => true, | |
'phpdoc_order' => true, | |
'phpdoc_single_line_var_spacing' => true, | |
'phpdoc_align' => ['align' => 'left'] | |
]) | |
->setFinder($finder); |
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
https://murze.be/tools-to-automatically-format-php-javascript-and-css-files |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment