Skip to content

Commit 0f11c35

Browse files
committed
wip
1 parent 88ff00b commit 0f11c35

File tree

3 files changed

+27
-23
lines changed

3 files changed

+27
-23
lines changed

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

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,21 @@ name: Check & fix styling
33
on: [push]
44

55
jobs:
6-
php-cs-fixer:
7-
runs-on: ubuntu-latest
6+
php-cs-fixer:
7+
runs-on: ubuntu-latest
88

9-
steps:
10-
- name: Checkout code
11-
uses: actions/checkout@v2
12-
with:
13-
ref: ${{ github.head_ref }}
9+
steps:
10+
- name: Checkout code
11+
uses: actions/checkout@v2
12+
with:
13+
ref: ${{ github.head_ref }}
1414

15-
- name: Run PHP CS Fixer
16-
uses: docker://oskarstark/php-cs-fixer-ga
17-
with:
18-
args: --config=.php_cs.dist --allow-risky=yes
15+
- name: Run PHP CS Fixer
16+
uses: docker://oskarstark/php-cs-fixer-ga
17+
with:
18+
args: --config=.php_cs.dist.php --allow-risky=yes
1919

20-
- name: Commit changes
21-
uses: stefanzweifel/git-auto-commit-action@v4
22-
with:
23-
commit_message: Fix styling
20+
- name: Commit changes
21+
uses: stefanzweifel/git-auto-commit-action@v4
22+
with:
23+
commit_message: Fix styling

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@ composer.lock
33
docs
44
vendor
55
.php_cs.cache
6+
.php-cs-fixer.cache
Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
<?php
22

33
$finder = Symfony\Component\Finder\Finder::create()
4-
->notPath('bootstrap/*')
5-
->notPath('storage/*')
6-
->notPath('resources/view/mail/*')
74
->in([
85
__DIR__ . '/src',
96
__DIR__ . '/tests',
@@ -13,14 +10,14 @@
1310
->ignoreDotFiles(true)
1411
->ignoreVCS(true);
1512

16-
return PhpCsFixer\Config::create()
13+
return (new PhpCsFixer\Config())
1714
->setRules([
18-
'@PSR2' => true,
15+
'@PSR12' => true,
1916
'array_syntax' => ['syntax' => 'short'],
20-
'ordered_imports' => ['sortAlgorithm' => 'alpha'],
17+
'ordered_imports' => ['sort_algorithm' => 'alpha'],
2118
'no_unused_imports' => true,
2219
'not_operator_with_successor_space' => true,
23-
'trailing_comma_in_multiline_array' => true,
20+
'trailing_comma_in_multiline' => true,
2421
'phpdoc_scalar' => true,
2522
'unary_operator_spaces' => true,
2623
'binary_operator_spaces' => true,
@@ -29,9 +26,15 @@
2926
],
3027
'phpdoc_single_line_var_spacing' => true,
3128
'phpdoc_var_without_name' => true,
29+
'class_attributes_separation' => [
30+
'elements' => [
31+
'method' => 'one',
32+
],
33+
],
3234
'method_argument_space' => [
3335
'on_multiline' => 'ensure_fully_multiline',
3436
'keep_multiple_spaces_after_comma' => true,
35-
]
37+
],
38+
'single_trait_insert_per_statement' => true,
3639
])
3740
->setFinder($finder);

0 commit comments

Comments
 (0)