Skip to content

Commit 26d11ca

Browse files
Update to Psalm 4
1 parent 4fc95bd commit 26d11ca

File tree

4 files changed

+30
-16
lines changed

4 files changed

+30
-16
lines changed

.phive/phars.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<phar name="php-cs-fixer" version="^2.16" installed="2.16.4" location="./tools/php-cs-fixer" copy="true"/>
55
<phar name="phpdox" version="^0.12" installed="0.12.0" location="./tools/phpdox" copy="true"/>
66
<phar name="phploc" version="^4.0" installed="4.0.1" location="./tools/phploc" copy="true"/>
7-
<phar name="psalm" version="^3.6" installed="3.18.2" location="./tools/psalm" copy="true"/>
7+
<phar name="psalm" version="^4.0" installed="4.0.1" location="./tools/psalm" copy="true"/>
88
<phar name="humbug/php-scoper" version="^0.13.2" installed="0.13.5" location="./tools/php-scoper" copy="true"/>
99
<phar name="roave/backwardcompatibilitycheck" version="^5.0.0" installed="5.0.0" location="./tools/roave-backward-compatibility-check" copy="true"/>
1010
</phive>

.psalm/baseline.xml

Lines changed: 28 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<files psalm-version="3.17.2@9e526d9cb569fe4631e6a737bbb7948d05596e3f">
2+
<files psalm-version="4.0.1@b1e2e30026936ef8d5bf6a354d1c3959b6231f44">
33
<file src="src/Framework/Assert.php">
44
<ArgumentTypeCoercion occurrences="2">
55
<code>$actualElement-&gt;childNodes-&gt;item($i)</code>
@@ -1205,6 +1205,9 @@
12051205
</PossiblyUnusedMethod>
12061206
</file>
12071207
<file src="src/Framework/TestResult.php">
1208+
<ArgumentTypeCoercion occurrences="1">
1209+
<code>$test</code>
1210+
</ArgumentTypeCoercion>
12081211
<DeprecatedClass occurrences="4">
12091212
<code>TestListener</code>
12101213
<code>TestListener</code>
@@ -1226,7 +1229,8 @@
12261229
<code>$codeCoverage</code>
12271230
<code>$topTestSuite</code>
12281231
</MissingConstructor>
1229-
<PossiblyUndefinedVariable occurrences="1">
1232+
<PossiblyUndefinedVariable occurrences="2">
1233+
<code>$_timeout</code>
12301234
<code>$isAnyCoverageRequired</code>
12311235
</PossiblyUndefinedVariable>
12321236
<PossiblyUnusedMethod occurrences="17">
@@ -1252,6 +1256,16 @@
12521256
<code>$this-&gt;codeCoverage !== null</code>
12531257
<code>$this-&gt;codeCoverage !== null</code>
12541258
</RedundantConditionGivenDocblockType>
1259+
<UndefinedClass occurrences="2">
1260+
<code>Invoker</code>
1261+
<code>TimeoutException</code>
1262+
</UndefinedClass>
1263+
<UndefinedInterfaceMethod occurrences="4">
1264+
<code>getSize</code>
1265+
<code>getSize</code>
1266+
<code>getSize</code>
1267+
<code>runBare</code>
1268+
</UndefinedInterfaceMethod>
12551269
</file>
12561270
<file src="src/Framework/TestSuite.php">
12571271
<ArgumentTypeCoercion occurrences="2">
@@ -1268,8 +1282,10 @@
12681282
<MissingThrowsDocblock occurrences="2">
12691283
<code>new PhptTestCase($filename)</code>
12701284
</MissingThrowsDocblock>
1271-
<PossiblyUndefinedVariable occurrences="1">
1285+
<PossiblyUndefinedVariable occurrences="3">
12721286
<code>$afterClassMethod</code>
1287+
<code>$afterClassMethod</code>
1288+
<code>$test</code>
12731289
</PossiblyUndefinedVariable>
12741290
<PossiblyUnusedMethod occurrences="2">
12751291
<code>setGroupDetails</code>
@@ -1370,11 +1386,6 @@
13701386
<code>usesDataProvider</code>
13711387
</PossiblyUnusedMethod>
13721388
</file>
1373-
<file src="src/Runner/TestResultCache.php">
1374-
<PossiblyUnusedMethod occurrences="1">
1375-
<code>load</code>
1376-
</PossiblyUnusedMethod>
1377-
</file>
13781389
<file src="src/Runner/TestSuiteLoader.php">
13791390
<PossiblyUnusedMethod occurrences="1">
13801391
<code>reload</code>
@@ -1508,6 +1519,7 @@
15081519
<code>$this-&gt;loader === null</code>
15091520
<code>$this-&gt;printer === null</code>
15101521
</DocblockTypeContradiction>
1522+
<InvalidCatch occurrences="1"/>
15111523
<MissingThrowsDocblock occurrences="4">
15121524
<code>addFilter</code>
15131525
<code>addFilter</code>
@@ -1517,8 +1529,9 @@
15171529
<PossiblyNullPropertyAssignmentValue occurrences="1">
15181530
<code>$loader</code>
15191531
</PossiblyNullPropertyAssignmentValue>
1520-
<PossiblyUndefinedVariable occurrences="1">
1532+
<PossiblyUndefinedVariable occurrences="2">
15211533
<code>$whitelistFromConfigurationFile</code>
1534+
<code>$whitelistFromOption</code>
15221535
</PossiblyUndefinedVariable>
15231536
<PossiblyUnusedMethod occurrences="1">
15241537
<code>setPrinter</code>
@@ -1617,14 +1630,14 @@
16171630
<PossiblyUnusedMethod occurrences="1">
16181631
<code>unregister</code>
16191632
</PossiblyUnusedMethod>
1633+
<UnusedClosureParam occurrences="1">
1634+
<code>$errorString</code>
1635+
</UnusedClosureParam>
16201636
</file>
16211637
<file src="src/Util/FileLoader.php">
16221638
<UnresolvableInclude occurrences="1">
16231639
<code>include_once $filename</code>
16241640
</UnresolvableInclude>
1625-
<UnusedParam occurrences="1">
1626-
<code>$filename</code>
1627-
</UnusedParam>
16281641
</file>
16291642
<file src="src/Util/Filter.php">
16301643
<MissingParamType occurrences="3">
@@ -1661,6 +1674,9 @@
16611674
<MissingParamType occurrences="1">
16621675
<code>$json</code>
16631676
</MissingParamType>
1677+
<UnusedVariable occurrences="1">
1678+
<code>$key</code>
1679+
</UnusedVariable>
16641680
</file>
16651681
<file src="src/Util/Log/JUnit.php">
16661682
<ArgumentTypeCoercion occurrences="1">
@@ -1731,9 +1747,6 @@
17311747
<code>TeamCity</code>
17321748
<code>TeamCity</code>
17331749
</PropertyNotSetInConstructor>
1734-
<RedundantCondition occurrences="1">
1735-
<code>$previous-&gt;getPrevious()</code>
1736-
</RedundantCondition>
17371750
<UndefinedInterfaceMethod occurrences="7">
17381751
<code>getName</code>
17391752
<code>getName</code>

.psalm/config.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
44
xmlns="https://getpsalm.org/schema/config"
55
xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd"
6+
resolveFromConfigFile="false"
67
cacheDirectory=".psalm/cache"
78
totallyTyped="false"
89
checkForThrowsDocblock="true"

tools/psalm

64.9 KB
Binary file not shown.

0 commit comments

Comments
 (0)