Skip to content

Commit 12937a2

Browse files
Merge pull request #6 from vojtech-dobes/code-style
Code style
2 parents 8ced9eb + 24ef61d commit 12937a2

13 files changed

+375
-39
lines changed

.github/workflows/checks.yml

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,33 @@ name: checks
33
on:
44
- push
55

6+
env:
7+
COMPOSER_NO_INTERACTION: "1"
8+
69
jobs:
10+
format:
11+
name: Code style
12+
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- uses: actions/checkout@v4
17+
18+
- uses: shivammathur/setup-php@v2
19+
with:
20+
php-version: '8.4'
21+
coverage: none
22+
23+
- run: composer install --ansi --no-progress --prefer-dist
24+
25+
- name: Run PHP_Codesniffer
26+
run: vendor/bin/phpcs
27+
728
static_analysis:
829
name: Static analysis
930

1031
runs-on: ubuntu-latest
1132

12-
env:
13-
COMPOSER_NO_INTERACTION: "1"
14-
1533
steps:
1634
- uses: actions/checkout@v4
1735

@@ -50,9 +68,6 @@ jobs:
5068

5169
runs-on: ${{ matrix.os }}
5270

53-
env:
54-
COMPOSER_NO_INTERACTION: "1"
55-
5671
steps:
5772
- uses: actions/checkout@v4
5873

composer.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@
1717
}
1818
},
1919
"config": {
20+
"allow-plugins": {
21+
"dealerdirect/phpcodesniffer-composer-installer": false
22+
},
2023
"sort-packages": true
2124
},
2225
"keywords": [
@@ -42,6 +45,7 @@
4245
"phpunit/phpunit": "^12.1",
4346
"spaze/phpstan-disallowed-calls": "^4.5.0",
4447
"tracy/tracy": "^2.10.9",
48+
"vojtech-dobes/php-codestyle": "~0.2.0",
4549
"vojtech-dobes/php-grammar-processing": "dev-master@dev",
4650
"vojtech-dobes/php-graphql-server": "dev-master@dev"
4751
},

0 commit comments

Comments
 (0)