Skip to content

Commit a23b32b

Browse files
author
palPalani
committed
Updated php-cs-fixer config
1 parent ca10c48 commit a23b32b

File tree

3 files changed

+11
-14
lines changed

3 files changed

+11
-14
lines changed

.github/workflows/php-cs-fixer.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
- name: Run PHP CS Fixer
1616
uses: docker://oskarstark/php-cs-fixer-ga
1717
with:
18-
args: --config=.php_cs.dist --allow-risky=yes
18+
args: --config=.php-cs-fixer.dist.php --allow-risky=yes
1919

2020
- name: Commit changes
2121
uses: stefanzweifel/git-auto-commit-action@v4

.gitignore

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
.idea
2-
.php_cs
3-
.php_cs.cache
2+
.php-cs-fixer.cache
43
.phpunit.result.cache
54
build
65
composer.lock
Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,41 @@
11
<?php
22

33
$finder = Symfony\Component\Finder\Finder::create()
4-
->notPath('bootstrap/*')
5-
->notPath('storage/*')
6-
->notPath('resources/view/mail/*')
4+
->notPath('docs/*')
5+
->notPath('vendor')
76
->in([
8-
__DIR__ . '/src',
9-
__DIR__ . '/tests',
7+
__DIR__.'/src',
8+
__DIR__.'/tests',
109
])
1110
->name('*.php')
12-
->notName('*.blade.php')
1311
->ignoreDotFiles(true)
1412
->ignoreVCS(true);
1513

16-
return PhpCsFixer\Config::create()
14+
return (new PhpCsFixer\Config())
1715
->setRules([
1816
'@PSR2' => true,
1917
'array_syntax' => ['syntax' => 'short'],
20-
'ordered_imports' => ['sortAlgorithm' => 'alpha'],
18+
'ordered_imports' => ['sort_algorithm' => 'alpha'],
2119
'no_unused_imports' => true,
2220
'not_operator_with_successor_space' => true,
23-
'trailing_comma_in_multiline_array' => true,
21+
'trailing_comma_in_multiline' => true,
2422
'phpdoc_scalar' => true,
2523
'unary_operator_spaces' => true,
2624
'binary_operator_spaces' => true,
25+
'logical_operators' => true,
2726
'blank_line_before_statement' => [
2827
'statements' => ['break', 'continue', 'declare', 'return', 'throw', 'try'],
2928
],
3029
'phpdoc_single_line_var_spacing' => true,
3130
'phpdoc_var_without_name' => true,
3231
'class_attributes_separation' => [
3332
'elements' => [
34-
'method',
33+
'method' => 'one'
3534
],
3635
],
3736
'method_argument_space' => [
3837
'on_multiline' => 'ensure_fully_multiline',
3938
'keep_multiple_spaces_after_comma' => true,
4039
],
41-
'single_trait_insert_per_statement' => true,
4240
])
4341
->setFinder($finder);

0 commit comments

Comments
 (0)