Skip to content

Commit 12a9a05

Browse files
Update Psalm baseline
1 parent 0f68f77 commit 12a9a05

File tree

1 file changed

+93
-1
lines changed

1 file changed

+93
-1
lines changed

.psalm/baseline.xml

Lines changed: 93 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<files psalm-version="5.18.0@b113f3ed0259fd6e212d87c3df80eec95a6abf19">
2+
<files psalm-version="5.20.0@3f284e96c9d9be6fe6b15c79416e1d1903dcfef4">
33
<file src="src/Framework/Assert.php">
44
<ArgumentTypeCoercion>
55
<code><![CDATA[$actualElement->childNodes->item($i)]]></code>
@@ -246,6 +246,9 @@
246246
<RedundantConditionGivenDocblockType>
247247
<code>is_object($classOrObject)</code>
248248
</RedundantConditionGivenDocblockType>
249+
<RiskyTruthyFalsyComparison>
250+
<code>$hint = self::detectLocationHint($message)</code>
251+
</RiskyTruthyFalsyComparison>
249252
<TypeDoesNotContainType>
250253
<code>!$attribute</code>
251254
<code>!$attribute</code>
@@ -794,6 +797,10 @@
794797
<PossiblyNullArgument>
795798
<code><![CDATA[$client->__getFunctions()]]></code>
796799
</PossiblyNullArgument>
800+
<RiskyTruthyFalsyComparison>
801+
<code>!$parameterStart</code>
802+
<code>empty($methods)</code>
803+
</RiskyTruthyFalsyComparison>
797804
</file>
798805
<file src="src/Framework/MockObject/Invocation.php">
799806
<MissingClosureReturnType>
@@ -1448,6 +1455,12 @@
14481455
<PossiblyInvalidArgument>
14491456
<code><![CDATA[$sections['FILEEOF']]]></code>
14501457
</PossiblyInvalidArgument>
1458+
<PossiblyNullArgument>
1459+
<code><![CDATA[$trace[0]['file']]]></code>
1460+
<code><![CDATA[$trace[0]['file']]]></code>
1461+
<code><![CDATA[$trace[0]['line']]]></code>
1462+
<code><![CDATA[$trace[0]['line']]]></code>
1463+
</PossiblyNullArgument>
14511464
<PossiblyNullReference>
14521465
<code>append</code>
14531466
</PossiblyNullReference>
@@ -1457,6 +1470,10 @@
14571470
<PossiblyUndefinedVariable>
14581471
<code>$sectionOffset</code>
14591472
</PossiblyUndefinedVariable>
1473+
<RiskyTruthyFalsyComparison>
1474+
<code>$sectionName</code>
1475+
<code>$sectionName</code>
1476+
</RiskyTruthyFalsyComparison>
14601477
</file>
14611478
<file src="src/Runner/TestSuiteSorter.php">
14621479
<MissingClosureParamType>
@@ -1481,6 +1498,11 @@
14811498
<code>getName</code>
14821499
</UndefinedInterfaceMethod>
14831500
</file>
1501+
<file src="src/Runner/Version.php">
1502+
<RiskyTruthyFalsyComparison>
1503+
<code><![CDATA[strpos(self::id(), '-')]]></code>
1504+
</RiskyTruthyFalsyComparison>
1505+
</file>
14841506
<file src="src/TextUI/Command.php">
14851507
<ArgumentTypeCoercion>
14861508
<code>$printerClass</code>
@@ -1523,6 +1545,7 @@
15231545
<code>$optionName</code>
15241546
</PossiblyInvalidOperand>
15251547
<PossiblyNullArgument>
1548+
<code><![CDATA[$_SERVER['argv']]]></code>
15261549
<code>$suite</code>
15271550
<code>$suite</code>
15281551
<code>$suite</code>
@@ -1534,6 +1557,10 @@
15341557
<RedundantCondition>
15351558
<code>$testSuite !== null</code>
15361559
</RedundantCondition>
1560+
<RiskyTruthyFalsyComparison>
1561+
<code>$loaderFile</code>
1562+
<code>$printerFile</code>
1563+
</RiskyTruthyFalsyComparison>
15371564
<UnresolvableInclude>
15381565
<code>require $file</code>
15391566
<code>require $loaderFile</code>
@@ -1717,6 +1744,10 @@
17171744
<code>process</code>
17181745
<code>reorderTestsInSuite</code>
17191746
</MissingThrowsDocblock>
1747+
<PossiblyNullArgument>
1748+
<code><![CDATA[$arguments['enforceTimeLimit']]]></code>
1749+
<code>$cacheLocation</code>
1750+
</PossiblyNullArgument>
17201751
<PossiblyNullPropertyAssignmentValue>
17211752
<code>$loader</code>
17221753
</PossiblyNullPropertyAssignmentValue>
@@ -1737,6 +1768,9 @@
17371768
<RedundantConditionGivenDocblockType>
17381769
<code><![CDATA[$this->printer !== null]]></code>
17391770
</RedundantConditionGivenDocblockType>
1771+
<RiskyTruthyFalsyComparison>
1772+
<code><![CDATA[$arguments['configuration']->hasValidationErrors()]]></code>
1773+
</RiskyTruthyFalsyComparison>
17401774
<UnresolvableInclude>
17411775
<code><![CDATA[require_once $extension['file']]]></code>
17421776
<code><![CDATA[require_once $listener['file']]]></code>
@@ -1789,6 +1823,11 @@
17891823
<RedundantCast>
17901824
<code><![CDATA[(string) $matches['value'][$i]]]></code>
17911825
</RedundantCast>
1826+
<RiskyTruthyFalsyComparison>
1827+
<code>!preg_match_all(self::REGEX_DATA_PROVIDER, $docComment, $matches)</code>
1828+
<code><![CDATA[empty($requires[$matches['name']])]]></code>
1829+
<code><![CDATA[preg_match_all('/@(?P<name>[A-Za-z_-]+)(?:[ \t]+(?P<value>.*?))?[ \t]*\r?$/m', $docBlock, $matches)]]></code>
1830+
</RiskyTruthyFalsyComparison>
17921831
</file>
17931832
<file src="src/Util/Blacklist.php">
17941833
<DocblockTypeContradiction>
@@ -1903,6 +1942,14 @@
19031942
<code>assert($directoryNode instanceof DOMElement)</code>
19041943
<code>assert($fileNode instanceof DOMElement)</code>
19051944
</RedundantConditionGivenDocblockType>
1945+
<RiskyTruthyFalsyComparison>
1946+
<code>!$verbatim</code>
1947+
<code>$force</code>
1948+
<code>$force</code>
1949+
<code>$includePathFile</code>
1950+
<code>$testdox</code>
1951+
<code><![CDATA[$this->getBoolean($root->getAttribute('colors'), false)]]></code>
1952+
</RiskyTruthyFalsyComparison>
19061953
<UndefinedMethod>
19071954
<code>getAttribute</code>
19081955
<code>getAttribute</code>
@@ -1932,6 +1979,9 @@
19321979
</MissingReturnType>
19331980
</file>
19341981
<file src="src/Util/FileLoader.php">
1982+
<RiskyTruthyFalsyComparison>
1983+
<code>!$includePathFilename</code>
1984+
</RiskyTruthyFalsyComparison>
19351985
<UnresolvableInclude>
19361986
<code>include_once $filename</code>
19371987
</UnresolvableInclude>
@@ -1958,6 +2008,11 @@
19582008
<PossiblyNullArgument>
19592009
<code>$long_options</code>
19602010
</PossiblyNullArgument>
2011+
<RiskyTruthyFalsyComparison>
2012+
<code>!$long_options</code>
2013+
<code>$long_options</code>
2014+
<code>$opt_arg</code>
2015+
</RiskyTruthyFalsyComparison>
19612016
</file>
19622017
<file src="src/Util/GlobalState.php">
19632018
<MissingParamType>
@@ -2010,6 +2065,9 @@
20102065
<code>JUnit</code>
20112066
<code>JUnit</code>
20122067
</PropertyNotSetInConstructor>
2068+
<RiskyTruthyFalsyComparison>
2069+
<code>empty($testOutput)</code>
2070+
</RiskyTruthyFalsyComparison>
20132071
<UndefinedInterfaceMethod>
20142072
<code>getName</code>
20152073
<code>getName</code>
@@ -2046,6 +2104,9 @@
20462104
<code>TeamCity</code>
20472105
<code>TeamCity</code>
20482106
</PropertyNotSetInConstructor>
2107+
<RiskyTruthyFalsyComparison>
2108+
<code><![CDATA[$this->flowId]]></code>
2109+
</RiskyTruthyFalsyComparison>
20492110
<UndefinedInterfaceMethod>
20502111
<code>getName</code>
20512112
<code>getName</code>
@@ -2081,6 +2142,11 @@
20812142
<PossiblyNullReference>
20822143
<code>merge</code>
20832144
</PossiblyNullReference>
2145+
<RiskyTruthyFalsyComparison>
2146+
<code>!$file</code>
2147+
<code>!$file</code>
2148+
<code>$file</code>
2149+
</RiskyTruthyFalsyComparison>
20842150
<UndefinedInterfaceMethod>
20852151
<code>addToAssertionCount</code>
20862152
<code>setResult</code>
@@ -2099,6 +2165,9 @@
20992165
<RedundantCondition>
21002166
<code>$_SERVER</code>
21012167
</RedundantCondition>
2168+
<RiskyTruthyFalsyComparison>
2169+
<code><![CDATA[!($this->tempFile = tempnam(sys_get_temp_dir(), 'PHPUnit'))]]></code>
2170+
</RiskyTruthyFalsyComparison>
21022171
<TypeDoesNotContainNull>
21032172
<code>[]</code>
21042173
</TypeDoesNotContainNull>
@@ -2122,6 +2191,11 @@
21222191
<code>$out</code>
21232192
<code>$outTarget</code>
21242193
</PropertyNotSetInConstructor>
2194+
<RiskyTruthyFalsyComparison>
2195+
<code><![CDATA[$this->out]]></code>
2196+
<code><![CDATA[$this->out]]></code>
2197+
<code><![CDATA[$this->out]]></code>
2198+
</RiskyTruthyFalsyComparison>
21252199
</file>
21262200
<file src="src/Util/Reflection.php">
21272201
<ArgumentTypeCoercion>
@@ -2153,6 +2227,12 @@
21532227
$e
21542228
);]]></code>
21552229
</MissingThrowsDocblock>
2230+
<RiskyTruthyFalsyComparison>
2231+
<code>$classShortcut</code>
2232+
<code>$hint</code>
2233+
<code><![CDATA[strpos($methodName, 'private')]]></code>
2234+
<code><![CDATA[strpos($methodName, 'protected')]]></code>
2235+
</RiskyTruthyFalsyComparison>
21562236
</file>
21572237
<file src="src/Util/TestDox/CliTestDoxPrinter.php">
21582238
<DeprecatedInterface>
@@ -2173,6 +2253,9 @@
21732253
<code><![CDATA[$prefix['start']]]></code>
21742254
<code><![CDATA[$prefix['trace']]]></code>
21752255
</PossiblyInvalidArrayOffset>
2256+
<PossiblyNullArgument>
2257+
<code>$style</code>
2258+
</PossiblyNullArgument>
21762259
<PossiblyUndefinedArrayOffset>
21772260
<code><![CDATA[self::STATUS_STYLES[$result['status']]['message']]]></code>
21782261
</PossiblyUndefinedArrayOffset>
@@ -2182,6 +2265,12 @@
21822265
<code>CliTestDoxPrinter</code>
21832266
<code>CliTestDoxPrinter</code>
21842267
</PropertyNotSetInConstructor>
2268+
<RiskyTruthyFalsyComparison>
2269+
<code>$diff</code>
2270+
<code>$diff</code>
2271+
<code>$message</code>
2272+
<code>$message</code>
2273+
</RiskyTruthyFalsyComparison>
21852274
</file>
21862275
<file src="src/Util/TestDox/HtmlResultPrinter.php">
21872276
<DeprecatedInterface>
@@ -2219,6 +2308,9 @@
22192308
<RedundantConditionGivenDocblockType>
22202309
<code>is_string($value)</code>
22212310
</RedundantConditionGivenDocblockType>
2311+
<RiskyTruthyFalsyComparison>
2312+
<code>empty($className)</code>
2313+
</RiskyTruthyFalsyComparison>
22222314
</file>
22232315
<file src="src/Util/TestDox/ResultPrinter.php">
22242316
<DeprecatedInterface>

0 commit comments

Comments
 (0)