File tree Expand file tree Collapse file tree 7 files changed +90
-2
lines changed Expand file tree Collapse file tree 7 files changed +90
-2
lines changed Original file line number Diff line number Diff line change 4
4
/.phive /
5
5
/Doxyfile export-ignore
6
6
/phpcs.xml export-ignore
7
+ /phpstan-baseline.neon export-ignore
8
+ /phpstan.neon.dist export-ignore
7
9
/phpunit.xml export-ignore
8
10
/tests export-ignore
Original file line number Diff line number Diff line change 78
78
if : " ${{ matrix.coverage != 'none' && env.CODACY_PROJECT_TOKEN != '' }}"
79
79
run : |
80
80
./vendor/bin/codacycoverage clover build/coverage/xml
81
+
82
+ phpstan :
83
+ name : PHPStan
84
+
85
+ runs-on : ubuntu-20.04
86
+
87
+ needs : [ php-lint ]
88
+
89
+ steps :
90
+ - name : Checkout
91
+ uses : actions/checkout@v2
92
+
93
+ - name : Install PHP
94
+ uses : shivammathur/setup-php@v2
95
+ with :
96
+ php-version : 7.4
97
+ tools : " composer:v2, phive"
98
+ coverage : none
99
+
100
+ - name : Cache dependencies installed with composer
101
+ uses : actions/cache@v1
102
+ with :
103
+ path : ~/.cache/composer
104
+ key : php${{ matrix.php-version }}-composer-${{ hashFiles('**/composer.json') }}
105
+ restore-keys : |
106
+ php${{ matrix.php-version }}-composer-
107
+
108
+ - name : Install Composer dependencies
109
+ run : |
110
+ composer update --with-dependencies --no-progress;
111
+ composer show;
112
+
113
+ - name : Install development tools
114
+ run : |
115
+ echo y | phive --no-progress update phpstan;
116
+
117
+ - name : Run PHPStan
118
+ run : " composer ci:php:stan"
Original file line number Diff line number Diff line change 1
1
/.phive /*
2
2
/.php_cs.cache
3
3
/composer.lock
4
+ /phpstan.neon
4
5
/vendor /
5
6
! /.phive /phars.xml
Original file line number Diff line number Diff line change 2
2
<phive xmlns =" https://phar.io/phive" >
3
3
<phar name =" phpcbf" version =" ^3.6.0" location =" ./.phive/phpcbf.phar" copy =" false" installed =" 3.6.0" />
4
4
<phar name =" phpcs" version =" ^3.6.0" location =" ./.phive/phpcs.phar" copy =" false" installed =" 3.6.0" />
5
+ <phar name =" phpstan" version =" ^0.12.88" installed =" 0.12.88" location =" ./.phive/phpstan.phar" copy =" false" />
5
6
</phive >
Original file line number Diff line number Diff line change 23
23
" @ci:static"
24
24
],
25
25
"ci:php:sniff" : " @php ./.phive/phpcs.phar lib tests" ,
26
+ "ci:php:stan" : " @php ./.phive/phpstan.phar" ,
26
27
"ci:static" : [
27
- " @ci:php:sniff"
28
+ " @ci:php:sniff" ,
29
+ " @ci:php:stan"
28
30
],
29
31
"fix:php" : [
30
32
" @fix:php:sniff"
31
33
],
32
- "fix:php:sniff" : " @php ./.phive/phpcbf.phar lib tests"
34
+ "fix:php:sniff" : " @php ./.phive/phpcbf.phar lib tests" ,
35
+ "phpstan:baseline" : " @php ./.phive/phpstan.phar --generate-baseline"
33
36
}
34
37
}
Original file line number Diff line number Diff line change
1
+ parameters :
2
+ ignoreErrors :
3
+ -
4
+ message : " #^Class Sabberworm\\\\ CSS\\\\ Parsing\\\\ ParserState constructor invoked with 1 parameter, 2\\ -3 required\\ .$#"
5
+ count : 1
6
+ path : lib/Sabberworm/CSS/CSSList/CSSList.php
7
+
8
+ -
9
+ message : " #^Access to an undefined property Sabberworm\\\\ CSS\\\\ Parsing\\\\ ParserState\\ :\\ :\\ $oParserHelper\\ .$#"
10
+ count : 1
11
+ path : lib/Sabberworm/CSS/Parsing/ParserState.php
12
+
13
+ -
14
+ message : " #^Access to an undefined property Sabberworm\\\\ CSS\\\\ Property\\\\ Charset\\ :\\ :\\ $aComments\\ .$#"
15
+ count : 5
16
+ path : lib/Sabberworm/CSS/Property/Charset.php
17
+
18
+ -
19
+ message : " #^Class PHPUnit\\\\ Framework\\\\ TestCase referenced with incorrect case\\ : PHPunit\\\\ Framework\\\\ TestCase\\ .$#"
20
+ count : 1
21
+ path : tests/Sabberworm/CSS/OutputFormatTest.php
22
+
23
+ -
24
+ message : " #^Class PHPUnit\\\\ Framework\\\\ TestCase referenced with incorrect case\\ : PHPunit\\\\ Framework\\\\ TestCase\\ .$#"
25
+ count : 1
26
+ path : tests/Sabberworm/CSS/ParserTest.php
27
+
Original file line number Diff line number Diff line change
1
+ includes:
2
+ - phpstan-baseline.neon
3
+
4
+ parameters:
5
+ parallel:
6
+ # Don't be overly greedy on machines with more CPU's to be a good neighbor especially on CI
7
+ maximumNumberOfProcesses: 5
8
+
9
+ level: 0
10
+
11
+ scanDirectories:
12
+ - %currentWorkingDirectory%/lib/
13
+ - %currentWorkingDirectory%/tests/
14
+ paths:
15
+ - %currentWorkingDirectory%/lib/
16
+ - %currentWorkingDirectory%/tests/
You can’t perform that action at this time.
0 commit comments