feat: add pint and php-cs-fixer global configs
This commit is contained in:
parent
3b5e6dc1be
commit
53ce553bbf
2 changed files with 40 additions and 0 deletions
25
.config/php-cs-fixer/php-cs-fixer.php
Normal file
25
.config/php-cs-fixer/php-cs-fixer.php
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
$rules = [
|
||||||
|
'@PSR12' => true,
|
||||||
|
'braces_position' => [
|
||||||
|
'anonymous_classes_opening_brace' => 'same_line',
|
||||||
|
'anonymous_functions_opening_brace' => 'same_line',
|
||||||
|
'classes_opening_brace' => 'same_line',
|
||||||
|
'control_structures_opening_brace' => 'same_line',
|
||||||
|
'functions_opening_brace' => 'same_line',
|
||||||
|
],
|
||||||
|
'no_leading_import_slash' => false,
|
||||||
|
'not_operator_with_space' => false,
|
||||||
|
'not_operator_with_successor_space' => false,
|
||||||
|
];
|
||||||
|
|
||||||
|
$finder = (new PhpCsFixer\Finder())
|
||||||
|
->in(__DIR__);
|
||||||
|
|
||||||
|
return (new PhpCsFixer\Config())
|
||||||
|
->setRules($rules)
|
||||||
|
->setFinder($finder)
|
||||||
|
->setIndent(' ')
|
||||||
|
->setLineEnding("\n")
|
||||||
|
->setRiskyAllowed(true);
|
15
.config/pint/pint.json
Normal file
15
.config/pint/pint.json
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
{
|
||||||
|
"preset": "laravel",
|
||||||
|
"rules": {
|
||||||
|
"braces_position": {
|
||||||
|
"anonymous_classes_opening_brace": "same_line",
|
||||||
|
"anonymous_functions_opening_brace": "same_line",
|
||||||
|
"classes_opening_brace": "same_line",
|
||||||
|
"control_structures_opening_brace": "same_line",
|
||||||
|
"functions_opening_brace": "same_line"
|
||||||
|
},
|
||||||
|
"no_leading_import_slash": false,
|
||||||
|
"not_operator_with_space": false,
|
||||||
|
"not_operator_with_successor_space": false
|
||||||
|
}
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue