File tree Expand file tree Collapse file tree 5 files changed +57
-2
lines changed Expand file tree Collapse file tree 5 files changed +57
-2
lines changed File renamed without changes.
Original file line number Diff line number Diff line change
1
+ # https://help.github.com/en/categories/automating-your-workflow-with-github-actions
2
+
3
+ name : " Check Coding Standard"
4
+
5
+ on :
6
+ pull_request :
7
+ push :
8
+ branches :
9
+ - " [0-9]+.[0-9]+.x"
10
+
11
+ jobs :
12
+ static-analysis-coding-standard :
13
+ name : " Static Analysis by patchlevel/coding-standard"
14
+
15
+ runs-on : ${{ matrix.operating-system }}
16
+
17
+ strategy :
18
+ matrix :
19
+ dependencies :
20
+ - " highest"
21
+ php-version :
22
+ - " 8.1"
23
+ operating-system :
24
+ - " ubuntu-latest"
25
+
26
+ steps :
27
+ - name : " Checkout"
28
+ uses : " actions/checkout@v2"
29
+
30
+ - name : " Install PHP"
31
+ uses : " shivammathur/setup-php@v2"
32
+ with :
33
+ coverage : " pcov"
34
+ php-version : " ${{ matrix.php-version }}"
35
+ ini-values : memory_limit=-1
36
+ extensions : pdo_sqlite
37
+
38
+ - uses : " ramsey/composer-install@v2"
39
+ with :
40
+ dependency-versions : ${{ matrix.dependencies }}
41
+
42
+ - name : " Coding Standard"
43
+ run : " vendor/bin/phpcs tests/fixed"
Original file line number Diff line number Diff line change 33
33
"squizlabs/php_codesniffer" : " ^3.6.0"
34
34
},
35
35
"config" : {
36
- "sort-packages" : true
36
+ "sort-packages" : true ,
37
+ "allow-plugins" : {
38
+ "dealerdirect/phpcodesniffer-composer-installer" : true
39
+ }
37
40
}
38
41
}
Original file line number Diff line number Diff line change 14
14
<arg value =" p" />
15
15
<file >src</file >
16
16
17
- <rule ref =" Patchlevel " />
17
+ <rule ref =" PatchlevelCodingStandard " />
18
18
</ruleset >
Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ enum Suit: string
4
+ {
5
+ case Hearts = 'H ' ;
6
+ case Diamonds = 'D ' ;
7
+ case Clubs = 'C ' ;
8
+ case Spades = 'S ' ;
9
+ }
You can’t perform that action at this time.
0 commit comments