Skip to content

Commit 36f0523

Browse files
Merge pull request #8 from dereuromark/master
PHPStan level 6 green
2 parents 786817e + 971f357 commit 36f0523

21 files changed

+918
-1828
lines changed

.github/workflows/ci.yml

Lines changed: 73 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -1,73 +1,73 @@
1-
name: CI
2-
3-
on: [push, pull_request]
4-
5-
jobs:
6-
testsuite:
7-
name: Unittests
8-
runs-on: ubuntu-20.04
9-
strategy:
10-
fail-fast: false
11-
matrix:
12-
php-version: ['7.4', '8.2']
13-
14-
steps:
15-
- uses: actions/checkout@v2
16-
17-
- name: Setup PHP
18-
uses: shivammathur/setup-php@v2
19-
with:
20-
php-version: '7.4'
21-
extensions: mbstring, json, fileinfo
22-
tools: pecl
23-
coverage: pcov
24-
25-
- name: Composer install
26-
run: |
27-
if [[ ${{ matrix.prefer-lowest == 'prefer-lowest' }} ]]; then
28-
composer update --prefer-lowest --prefer-stable
29-
else
30-
composer install
31-
fi
32-
33-
- name: Phive install
34-
run: php config/composer_phive.php
35-
36-
- name: Run PHPUnit
37-
run: |
38-
if [[ ${{ matrix.php-version }} == '7.4' ]]; then
39-
bin/phpunit --coverage-clover=coverage.xml
40-
else
41-
bin/phpunit
42-
fi
43-
44-
- name: Code Coverage Report
45-
if: success() && matrix.php-version == '7.4'
46-
uses: codecov/codecov-action@v1
47-
48-
cs-stan:
49-
name: Coding Standard & Static Analysis
50-
runs-on: ubuntu-20.04
51-
52-
steps:
53-
- uses: actions/checkout@v2
54-
55-
- name: Setup PHP
56-
uses: shivammathur/setup-php@v2
57-
with:
58-
php-version: '7.4'
59-
extensions: mbstring, json, fileinfo
60-
coverage: none
61-
tools: pecl
62-
63-
- name: Composer install
64-
run: composer update --prefer-lowest --prefer-stable
65-
66-
- name: Phive install
67-
run: php config/composer_phive.php
68-
69-
- name: Run phpstan
70-
run: bin/phpstan -V && bin/phpstan analyse src -l 5 --error-format=github
71-
72-
- name: Run phpcs
73-
run: bin/phpcs --version && bin/phpcs --report=checkstyle --standard=phpcs.xml src/ tests/
1+
name: CI
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
testsuite:
7+
name: Unittests
8+
runs-on: ubuntu-20.04
9+
strategy:
10+
fail-fast: false
11+
matrix:
12+
php-version: ['7.4', '8.2']
13+
14+
steps:
15+
- uses: actions/checkout@v2
16+
17+
- name: Setup PHP
18+
uses: shivammathur/setup-php@v2
19+
with:
20+
php-version: '7.4'
21+
extensions: mbstring, json, fileinfo
22+
tools: pecl
23+
coverage: pcov
24+
25+
- name: Composer install
26+
run: |
27+
if [[ ${{ matrix.prefer-lowest == 'prefer-lowest' }} ]]; then
28+
composer update --prefer-lowest --prefer-stable
29+
else
30+
composer install
31+
fi
32+
33+
- name: Phive install
34+
run: php config/composer_phive.php
35+
36+
- name: Run PHPUnit
37+
run: |
38+
if [[ ${{ matrix.php-version }} == '7.4' ]]; then
39+
bin/phpunit --coverage-clover=coverage.xml
40+
else
41+
bin/phpunit
42+
fi
43+
44+
- name: Code Coverage Report
45+
if: success() && matrix.php-version == '7.4'
46+
uses: codecov/codecov-action@v1
47+
48+
cs-stan:
49+
name: Coding Standard & Static Analysis
50+
runs-on: ubuntu-20.04
51+
52+
steps:
53+
- uses: actions/checkout@v2
54+
55+
- name: Setup PHP
56+
uses: shivammathur/setup-php@v2
57+
with:
58+
php-version: '7.4'
59+
extensions: mbstring, json, fileinfo
60+
coverage: none
61+
tools: pecl
62+
63+
- name: Composer install
64+
run: composer update --prefer-lowest --prefer-stable
65+
66+
- name: Phive install
67+
run: php config/composer_phive.php
68+
69+
- name: Run phpstan
70+
run: bin/phpstan --error-format=github
71+
72+
- name: Run phpcs
73+
run: bin/phpcs --report=checkstyle

.gitignore

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
/.idea
2-
/.phpunit.result.cache
3-
/tmp
4-
/logs
5-
/vendor/
6-
/bin
7-
coverage.xml
8-
phive*.phar
9-
/composer.lock
1+
.idea/
2+
.phpunit.result.cache
3+
tmp/
4+
logs/
5+
vendor/
6+
bin/
7+
coverage.xml
8+
phive*.phar
9+
composer.lock

phive.xml renamed to .phive/phars.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@
2727
<phar url="https://some.tld/tool.phar" />
2828
<phar url="someone/somerepo" />
2929
-->
30-
<phar name="phpunit" version="^9.5" installed="9.5.21" location="./bin/phpunit" copy="true"/>
31-
<phar name="phpstan" version="^1.8.10" installed="1.8.10" location="./bin/phpstan" copy="true"/>
32-
<phar name="phpcs" version="^3.5.3" installed="3.5.3" location="./bin/phpcs" copy="true"/>
33-
<phar name="phpcbf" version="^3.5.3" installed="3.5.4" location="./bin/phpcbf" copy="true"/>
30+
<phar name="phpunit" version="^9.5" installed="9.5.26" location="./bin/phpunit" copy="true"/>
31+
<phar name="phpstan" version="^1.8.10" installed="1.9.2" location="./bin/phpstan" copy="true"/>
32+
<phar name="phpcs" version="^3.5.3" installed="3.7.1" location="./bin/phpcs" copy="true"/>
33+
<phar name="phpcbf" version="^3.5.3" installed="3.7.1" location="./bin/phpcbf" copy="true"/>
3434
<phar name="grumphp" version="^0.19.1" installed="0.19.1" location="./bin/grumphp" copy="true"/>
3535
</phive>

0 commit comments

Comments
 (0)