Skip to content

Commit f7cf6cc

Browse files
committed
Add php-cs-fixer check
1 parent 7599783 commit f7cf6cc

File tree

4 files changed

+36
-4
lines changed

4 files changed

+36
-4
lines changed

.github/workflows/code-cov.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,5 +31,3 @@ jobs:
3131

3232
- name: "Run coverage"
3333
run: "composer coverage"
34-
35-

.github/workflows/style-check.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: "Style Check"
2+
3+
on:
4+
- push
5+
- pull_request
6+
7+
env:
8+
COMPOSER_FLAGS: "--ansi --no-interaction --no-progress --prefer-dist"
9+
10+
jobs:
11+
tests:
12+
name: "Style Check"
13+
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- name: "Checkout"
18+
uses: "actions/checkout@v2"
19+
20+
- name: "Install PHP"
21+
uses: "shivammathur/setup-php@v2"
22+
with:
23+
coverage: "none"
24+
extensions: "intl, zip"
25+
ini-values: "memory_limit=-1, phar.readonly=0, error_reporting=E_ALL, display_errors=On"
26+
php-version: "7.4"
27+
tools: composer
28+
29+
- name: "Update dependencies"
30+
run: "composer update ${{ env.COMPOSER_FLAGS }}"
31+
32+
- name: "Run style-check"
33+
run: "composer style-check"

.php_cs.dist

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ $config
2323
'pre_increment' => false,
2424
'increment_style' => false,
2525
'simplified_null_return' => false,
26-
'trailing_comma_in_multiline_array' => false,
26+
'single_line_throw' => false,
27+
'trailing_comma_in_multiline' => false,
2728
'yoda_style' => false,
2829
'phpdoc_types_order' => array('null_adjustment' => 'none', 'sort_algorithm' => 'none'),
2930
'no_superfluous_phpdoc_tags' => false,

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
"icecave/parity": "1.0.0"
3333
},
3434
"require-dev": {
35-
"friendsofphp/php-cs-fixer": "~2.2.20||~2.15.1",
35+
"friendsofphp/php-cs-fixer": "~2.2.20 || ^2.15.1",
3636
"json-schema/json-schema-test-suite": "1.2.0",
3737
"phpunit/phpunit": "^4.8.35"
3838
},

0 commit comments

Comments
 (0)