Skip to content

Commit f24806e

Browse files
authored
Merge pull request #57 from geekcom/develop
Develop
2 parents 581364f + 09a651e commit f24806e

File tree

4 files changed

+42
-5
lines changed

4 files changed

+42
-5
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,5 @@ composer.phar
33
composer.lock
44
.DS_Store
55
.idea/
6+
/tests/log/
7+
*.cache

composer.json

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,12 @@
1212
"php": "^7.2"
1313
},
1414
"require-dev": {
15-
"phpunit/phpunit": "^8.3",
15+
"phpunit/phpunit": "^8.4",
1616
"orchestra/testbench": "^4.0",
17-
"symplify/changelog-linker": "^6.1"
17+
"symplify/changelog-linker": "^6.1",
18+
"php-coveralls/php-coveralls": "^2.2",
19+
"squizlabs/php_codesniffer": "*",
20+
"phpstan/phpstan": "^0.12.5"
1821
},
1922
"autoload": {
2023
"psr-4": {
@@ -32,5 +35,17 @@
3235
"geekcom\\ValidatorDocs\\ValidatorProvider"
3336
]
3437
}
38+
},
39+
"scripts": {
40+
"phpcs": "phpcs --standard=PSR12 -n src",
41+
"phpcbf" : "phpcbf --standard=PSR12 -n src",
42+
"unit": "phpunit --coverage-clover ./tests/log/clover.xml --colors=always",
43+
"unit-html": "php -d phar.readonly=0 vendor/bin/phpunit --coverage-html ./tests/log/ --colors=always",
44+
"phpstan": "phpstan analyse src --level 8",
45+
"test": [
46+
"@phpcs",
47+
"@unit",
48+
"@phpstan"
49+
]
3550
}
3651
}

phpcs.xml

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,16 @@
11
<?xml version="1.0"?>
22
<ruleset>
3-
<file>./</file>
4-
<exclude-pattern>./vendor/*</exclude-pattern>
5-
<rule ref="PSR1" />
3+
<arg name="basepath" value="."/>
4+
<arg name="extensions" value="php"/>
5+
<arg name="parallel" value="80"/>
6+
<arg name="cache" value=".phpcs-cache"/>
7+
<arg name="colors"/>
8+
9+
<arg value="p"/>
10+
11+
<exclude-pattern type="relative">^/tests/*</exclude-pattern>
12+
13+
<file>src</file>
14+
15+
<rule ref="PSR12"/>
616
</ruleset>

phpunit.xml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,14 @@
1313
<directory suffix=".php">./tests/</directory>
1414
</testsuite>
1515
</testsuites>
16+
<filter>
17+
<whitelist processUncoveredFilesFromWhitelist="true">
18+
<directory>./src/</directory>
19+
</whitelist>
20+
</filter>
21+
<logging>
22+
<log type="coverage-html" target="./tests/log/report"
23+
lowUpperBound="35" highLowerBound="70"/>
24+
<log type="coverage-clover" target="./tests/log/clover.xml"/>
25+
</logging>
1626
</phpunit>

0 commit comments

Comments
 (0)