Skip to content

Commit 4a5be76

Browse files
committed
Add phpcs, phpstan and phpunit configurations
1 parent 45c30a0 commit 4a5be76

File tree

3 files changed

+39
-8
lines changed

3 files changed

+39
-8
lines changed

phpcs.xml.dist

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<?xml version="1.0"?>
2+
<ruleset name="Slim coding standard">
3+
<description>Slim coding standard</description>
4+
5+
<!-- display progress -->
6+
<arg value="p"/>
7+
<!-- use colors in output -->
8+
<arg name="colors"/>
9+
10+
<!-- inherit rules from: -->
11+
<rule ref="PSR2"/>
12+
<rule ref="Generic.Arrays.DisallowLongArraySyntax"/>
13+
<rule ref="../Slim-Coding-Standard/ruleset.xml"/>
14+
15+
<!-- Paths to check -->
16+
<file>src</file>
17+
<file>tests</file>
18+
</ruleset>

phpstan.neon.dist

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
parameters:
2+
level: max
3+
inferPrivatePropertyTypeFromConstructor: true

phpunit.xml.dist

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,35 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
3-
<phpunit backupGlobals="false"
2+
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xsi:noNamespaceSchemaLocation="http://schema.phpunit.de/8.5/phpunit.xsd"
4+
backupGlobals="false"
45
backupStaticAttributes="false"
6+
beStrictAboutTestsThatDoNotTestAnything="true"
7+
beStrictAboutChangesToGlobalState="true"
8+
beStrictAboutOutputDuringTests="true"
59
colors="true"
610
convertErrorsToExceptions="true"
711
convertNoticesToExceptions="true"
812
convertWarningsToExceptions="true"
913
processIsolation="false"
1014
stopOnFailure="false"
11-
syntaxCheck="false"
1215
bootstrap="tests/bootstrap.php"
1316
>
1417
<testsuites>
15-
<testsuite name="Slim Test Suite">
16-
<directory>tests/</directory>
18+
<testsuite name="Slim HttpCache Test Suite">
19+
<directory>./tests/</directory>
1720
</testsuite>
1821
</testsuites>
19-
2022
<filter>
21-
<whitelist>
22-
<directory>src/</directory>
23+
<whitelist processUncoveredFilesFromWhitelist="true">
24+
<directory>./src/</directory>
2325
</whitelist>
2426
</filter>
27+
<logging>
28+
<log
29+
type="coverage-html"
30+
target="./coverage"
31+
lowUpperBound="20"
32+
highLowerBound="50"
33+
/>
34+
</logging>
2535
</phpunit>

0 commit comments

Comments
 (0)