File tree Expand file tree Collapse file tree 3 files changed +55
-1
lines changed Expand file tree Collapse file tree 3 files changed +55
-1
lines changed Original file line number Diff line number Diff line change
1
+ name : Check & fix styling
2
+
3
+ on : [push]
4
+
5
+ jobs :
6
+ style :
7
+ runs-on : ubuntu-latest
8
+
9
+ steps :
10
+ - name : Checkout code
11
+ uses : actions/checkout@v1
12
+
13
+ - name : Fix style
14
+ uses : docker://oskarstark/php-cs-fixer-ga
15
+ with :
16
+ args : --config=.php_cs --allow-risky=yes
17
+
18
+ - name : Extract branch name
19
+ shell : bash
20
+ run : echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})"
21
+ id : extract_branch
22
+
23
+ - name : Commit changes
24
+ uses :
stefanzweifel/[email protected]
25
+ with :
26
+ commit_message : Fix styling
27
+ branch : ${{ steps.extract_branch.outputs.branch }}
28
+ env :
29
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ $ finder = Symfony \Component \Finder \Finder::create ()
4
+ ->notPath ('spark ' )
5
+ ->notPath ('bootstrap ' )
6
+ ->notPath ('storage ' )
7
+ ->notPath ('vendor ' )
8
+ ->in (__DIR__ )
9
+ ->name ('*.php ' )
10
+ ->name ('_ide_helper ' )
11
+ ->notName ('*.blade.php ' )
12
+ ->ignoreDotFiles (true )
13
+ ->ignoreVCS (true );
14
+
15
+
16
+ return PhpCsFixer \Config::create ()
17
+ ->setRules ([
18
+ '@PSR2 ' => true ,
19
+ 'array_syntax ' => ['syntax ' => 'short ' ],
20
+ 'ordered_imports ' => ['sortAlgorithm ' => 'alpha ' ],
21
+ 'no_unused_imports ' => true ,
22
+ ])
23
+ ->setFinder ($ finder );
Original file line number Diff line number Diff line change @@ -146,7 +146,9 @@ public function getJsHelperName(): string
146
146
return $ this ->jsHelperName ;
147
147
}
148
148
149
- public function setJsHelperName (string $ jsHelperName ): self
149
+ public function setJsHelperName
150
+ (string $ jsHelperName )
151
+ : self
150
152
{
151
153
$ this ->jsHelperName = $ jsHelperName ;
152
154
You can’t perform that action at this time.
0 commit comments