Skip to content

Commit 0760b5a

Browse files
phpstan.neon and phpunit.xml adding
1 parent 654b9e7 commit 0760b5a

4 files changed

Lines changed: 53 additions & 7 deletions

File tree

composer.json

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@
1212
"license": "MIT",
1313
"require": {
1414
"php": "^8.4",
15-
"ext-json": "*"
15+
"ext-json": "*",
16+
"ext-mbstring": "*"
1617
},
1718
"require-dev": {
1819
"tomasvotruba/type-coverage": "^2.1",
@@ -61,11 +62,14 @@
6162
],
6263
"scripts": {
6364
"test:lint": "pint",
64-
"test:type": "phpstan",
65-
"test:unit": "phpunit",
66-
"test:coverage": "phpunit",
65+
"test:type": "phpstan analyse",
66+
"test:unit": "phpunit --testdox",
67+
"test:coverage": "phpunit --coverage-text --coverage-clover coverage.xml",
6768
"test": [
68-
"@test:lint"
69+
"@test:lint",
70+
"@test:type",
71+
"@test:unit",
72+
"@test:coverage"
6973
]
7074
},
7175
"config": {

composer.lock

Lines changed: 3 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

phpstan.neon

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
includes:
2+
- vendor/phpstan/phpstan/conf/bleedingEdge.neon
3+
4+
parameters:
5+
level: max
6+
paths:
7+
- src
8+
9+
reportUnmatchedIgnoredErrors: true
10+
11+
type_coverage:
12+
declare: 100
13+
return_type: 100
14+
param_type: 100
15+
property_type: 100
16+
constant: 100

phpunit.xml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd"
4+
bootstrap="vendor/autoload.php"
5+
cacheDirectory=".phpunit.cache"
6+
executionOrder="depends,defects"
7+
requireCoverageMetadata="true"
8+
beStrictAboutCoverageMetadata="true"
9+
beStrictAboutOutputDuringTests="true"
10+
displayDetailsOnPhpunitDeprecations="true"
11+
failOnPhpunitDeprecation="true"
12+
failOnRisky="true"
13+
failOnWarning="true" colors="true">
14+
<testsuites>
15+
<testsuite name="default">
16+
<directory>tests</directory>
17+
</testsuite>
18+
</testsuites>
19+
20+
<source ignoreIndirectDeprecations="true" restrictNotices="true" restrictWarnings="true">
21+
<include>
22+
<directory>src</directory>
23+
</include>
24+
</source>
25+
</phpunit>

0 commit comments

Comments
 (0)