Skip to content

Commit ea39dba

Browse files
authored
Merge pull request #27 from facile-it/psalm-6
Run Psalm on tests too
2 parents fd391ce + 4b60361 commit ea39dba

File tree

3 files changed

+32
-4
lines changed

3 files changed

+32
-4
lines changed

composer.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@
4343
"phpstan/phpstan": "2.1.17",
4444
"phpstan/phpstan-phpunit": "2.0.6",
4545
"phpunit/phpunit": "^10 || ^11 || ^12",
46+
"psalm/plugin-phpunit": "0.19.3",
4647
"rector/rector": "2.0.17",
4748
"shipmonk/composer-dependency-analyser": "^1.8",
4849
"symfony/phpunit-bridge": "^6.4 || ^7.0",

psalm-baseline.xml

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,30 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<files psalm-version="6.12.0@cf420941d061a57050b6c468ef2c778faf40aee2">
33
<file src="src/AbstractTerminableCommand.php">
4+
<PossiblyUnusedReturnValue>
5+
<code><![CDATA[false]]></code>
6+
</PossiblyUnusedReturnValue>
7+
</file>
8+
<file src="tests/E2E/TerminateCommandTest.php">
9+
<PossiblyUnusedMethod>
10+
<code><![CDATA[commandLineProvider]]></code>
11+
<code><![CDATA[provideSignals]]></code>
12+
</PossiblyUnusedMethod>
13+
<TooManyTemplateParams>
14+
<code><![CDATA[Process<string>]]></code>
15+
</TooManyTemplateParams>
16+
</file>
17+
<file src="tests/Stub/StubTerminableCommand.php">
18+
<MixedAssignment>
19+
<code><![CDATA[$paramValue]]></code>
20+
</MixedAssignment>
421
<UnusedClass>
5-
<code><![CDATA[AbstractTerminableCommand]]></code>
22+
<code><![CDATA[StubTerminableCommand]]></code>
623
</UnusedClass>
724
</file>
25+
<file src="tests/Unit/AbstractTerminableCommandTest.php">
26+
<PossiblyUnusedMethod>
27+
<code><![CDATA[signalProvider]]></code>
28+
</PossiblyUnusedMethod>
29+
</file>
830
</files>

psalm.xml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,17 @@
88
errorBaseline="psalm-baseline.xml"
99
>
1010
<projectFiles>
11-
<directory name="src" />
11+
<directory name="src"/>
12+
<directory name="tests"/>
1213
<ignoreFiles>
13-
<directory name="vendor" />
14+
<directory name="vendor"/>
1415
</ignoreFiles>
1516
</projectFiles>
1617
<issueHandlers>
17-
<MissingOverrideAttribute errorLevel="suppress" />
18+
<ClassMustBeFinal errorLevel="suppress"/>
19+
<MissingOverrideAttribute errorLevel="suppress"/>
1820
</issueHandlers>
21+
<plugins>
22+
<pluginClass class="Psalm\PhpUnitPlugin\Plugin"/>
23+
</plugins>
1924
</psalm>

0 commit comments

Comments
 (0)