|
1 | 1 | <?xml version="1.0" encoding="UTF-8"?>
|
2 |
| -<files psalm-version="5.18.0@b113f3ed0259fd6e212d87c3df80eec95a6abf19"> |
| 2 | +<files psalm-version="5.20.0@3f284e96c9d9be6fe6b15c79416e1d1903dcfef4"> |
3 | 3 | <file src="src/Framework/Assert.php">
|
4 | 4 | <ArgumentTypeCoercion>
|
5 | 5 | <code><![CDATA[$actualElement->childNodes->item($i)]]></code>
|
|
246 | 246 | <RedundantConditionGivenDocblockType>
|
247 | 247 | <code>is_object($classOrObject)</code>
|
248 | 248 | </RedundantConditionGivenDocblockType>
|
| 249 | + <RiskyTruthyFalsyComparison> |
| 250 | + <code>$hint = self::detectLocationHint($message)</code> |
| 251 | + </RiskyTruthyFalsyComparison> |
249 | 252 | <TypeDoesNotContainType>
|
250 | 253 | <code>!$attribute</code>
|
251 | 254 | <code>!$attribute</code>
|
|
794 | 797 | <PossiblyNullArgument>
|
795 | 798 | <code><![CDATA[$client->__getFunctions()]]></code>
|
796 | 799 | </PossiblyNullArgument>
|
| 800 | + <RiskyTruthyFalsyComparison> |
| 801 | + <code>!$parameterStart</code> |
| 802 | + <code>empty($methods)</code> |
| 803 | + </RiskyTruthyFalsyComparison> |
797 | 804 | </file>
|
798 | 805 | <file src="src/Framework/MockObject/Invocation.php">
|
799 | 806 | <MissingClosureReturnType>
|
|
1448 | 1455 | <PossiblyInvalidArgument>
|
1449 | 1456 | <code><![CDATA[$sections['FILEEOF']]]></code>
|
1450 | 1457 | </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> |
1451 | 1464 | <PossiblyNullReference>
|
1452 | 1465 | <code>append</code>
|
1453 | 1466 | </PossiblyNullReference>
|
|
1457 | 1470 | <PossiblyUndefinedVariable>
|
1458 | 1471 | <code>$sectionOffset</code>
|
1459 | 1472 | </PossiblyUndefinedVariable>
|
| 1473 | + <RiskyTruthyFalsyComparison> |
| 1474 | + <code>$sectionName</code> |
| 1475 | + <code>$sectionName</code> |
| 1476 | + </RiskyTruthyFalsyComparison> |
1460 | 1477 | </file>
|
1461 | 1478 | <file src="src/Runner/TestSuiteSorter.php">
|
1462 | 1479 | <MissingClosureParamType>
|
|
1481 | 1498 | <code>getName</code>
|
1482 | 1499 | </UndefinedInterfaceMethod>
|
1483 | 1500 | </file>
|
| 1501 | + <file src="src/Runner/Version.php"> |
| 1502 | + <RiskyTruthyFalsyComparison> |
| 1503 | + <code><![CDATA[strpos(self::id(), '-')]]></code> |
| 1504 | + </RiskyTruthyFalsyComparison> |
| 1505 | + </file> |
1484 | 1506 | <file src="src/TextUI/Command.php">
|
1485 | 1507 | <ArgumentTypeCoercion>
|
1486 | 1508 | <code>$printerClass</code>
|
|
1523 | 1545 | <code>$optionName</code>
|
1524 | 1546 | </PossiblyInvalidOperand>
|
1525 | 1547 | <PossiblyNullArgument>
|
| 1548 | + <code><![CDATA[$_SERVER['argv']]]></code> |
1526 | 1549 | <code>$suite</code>
|
1527 | 1550 | <code>$suite</code>
|
1528 | 1551 | <code>$suite</code>
|
|
1534 | 1557 | <RedundantCondition>
|
1535 | 1558 | <code>$testSuite !== null</code>
|
1536 | 1559 | </RedundantCondition>
|
| 1560 | + <RiskyTruthyFalsyComparison> |
| 1561 | + <code>$loaderFile</code> |
| 1562 | + <code>$printerFile</code> |
| 1563 | + </RiskyTruthyFalsyComparison> |
1537 | 1564 | <UnresolvableInclude>
|
1538 | 1565 | <code>require $file</code>
|
1539 | 1566 | <code>require $loaderFile</code>
|
|
1717 | 1744 | <code>process</code>
|
1718 | 1745 | <code>reorderTestsInSuite</code>
|
1719 | 1746 | </MissingThrowsDocblock>
|
| 1747 | + <PossiblyNullArgument> |
| 1748 | + <code><![CDATA[$arguments['enforceTimeLimit']]]></code> |
| 1749 | + <code>$cacheLocation</code> |
| 1750 | + </PossiblyNullArgument> |
1720 | 1751 | <PossiblyNullPropertyAssignmentValue>
|
1721 | 1752 | <code>$loader</code>
|
1722 | 1753 | </PossiblyNullPropertyAssignmentValue>
|
|
1737 | 1768 | <RedundantConditionGivenDocblockType>
|
1738 | 1769 | <code><![CDATA[$this->printer !== null]]></code>
|
1739 | 1770 | </RedundantConditionGivenDocblockType>
|
| 1771 | + <RiskyTruthyFalsyComparison> |
| 1772 | + <code><![CDATA[$arguments['configuration']->hasValidationErrors()]]></code> |
| 1773 | + </RiskyTruthyFalsyComparison> |
1740 | 1774 | <UnresolvableInclude>
|
1741 | 1775 | <code><![CDATA[require_once $extension['file']]]></code>
|
1742 | 1776 | <code><![CDATA[require_once $listener['file']]]></code>
|
|
1789 | 1823 | <RedundantCast>
|
1790 | 1824 | <code><![CDATA[(string) $matches['value'][$i]]]></code>
|
1791 | 1825 | </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> |
1792 | 1831 | </file>
|
1793 | 1832 | <file src="src/Util/Blacklist.php">
|
1794 | 1833 | <DocblockTypeContradiction>
|
|
1903 | 1942 | <code>assert($directoryNode instanceof DOMElement)</code>
|
1904 | 1943 | <code>assert($fileNode instanceof DOMElement)</code>
|
1905 | 1944 | </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> |
1906 | 1953 | <UndefinedMethod>
|
1907 | 1954 | <code>getAttribute</code>
|
1908 | 1955 | <code>getAttribute</code>
|
|
1932 | 1979 | </MissingReturnType>
|
1933 | 1980 | </file>
|
1934 | 1981 | <file src="src/Util/FileLoader.php">
|
| 1982 | + <RiskyTruthyFalsyComparison> |
| 1983 | + <code>!$includePathFilename</code> |
| 1984 | + </RiskyTruthyFalsyComparison> |
1935 | 1985 | <UnresolvableInclude>
|
1936 | 1986 | <code>include_once $filename</code>
|
1937 | 1987 | </UnresolvableInclude>
|
|
1958 | 2008 | <PossiblyNullArgument>
|
1959 | 2009 | <code>$long_options</code>
|
1960 | 2010 | </PossiblyNullArgument>
|
| 2011 | + <RiskyTruthyFalsyComparison> |
| 2012 | + <code>!$long_options</code> |
| 2013 | + <code>$long_options</code> |
| 2014 | + <code>$opt_arg</code> |
| 2015 | + </RiskyTruthyFalsyComparison> |
1961 | 2016 | </file>
|
1962 | 2017 | <file src="src/Util/GlobalState.php">
|
1963 | 2018 | <MissingParamType>
|
|
2010 | 2065 | <code>JUnit</code>
|
2011 | 2066 | <code>JUnit</code>
|
2012 | 2067 | </PropertyNotSetInConstructor>
|
| 2068 | + <RiskyTruthyFalsyComparison> |
| 2069 | + <code>empty($testOutput)</code> |
| 2070 | + </RiskyTruthyFalsyComparison> |
2013 | 2071 | <UndefinedInterfaceMethod>
|
2014 | 2072 | <code>getName</code>
|
2015 | 2073 | <code>getName</code>
|
|
2046 | 2104 | <code>TeamCity</code>
|
2047 | 2105 | <code>TeamCity</code>
|
2048 | 2106 | </PropertyNotSetInConstructor>
|
| 2107 | + <RiskyTruthyFalsyComparison> |
| 2108 | + <code><![CDATA[$this->flowId]]></code> |
| 2109 | + </RiskyTruthyFalsyComparison> |
2049 | 2110 | <UndefinedInterfaceMethod>
|
2050 | 2111 | <code>getName</code>
|
2051 | 2112 | <code>getName</code>
|
|
2081 | 2142 | <PossiblyNullReference>
|
2082 | 2143 | <code>merge</code>
|
2083 | 2144 | </PossiblyNullReference>
|
| 2145 | + <RiskyTruthyFalsyComparison> |
| 2146 | + <code>!$file</code> |
| 2147 | + <code>!$file</code> |
| 2148 | + <code>$file</code> |
| 2149 | + </RiskyTruthyFalsyComparison> |
2084 | 2150 | <UndefinedInterfaceMethod>
|
2085 | 2151 | <code>addToAssertionCount</code>
|
2086 | 2152 | <code>setResult</code>
|
|
2099 | 2165 | <RedundantCondition>
|
2100 | 2166 | <code>$_SERVER</code>
|
2101 | 2167 | </RedundantCondition>
|
| 2168 | + <RiskyTruthyFalsyComparison> |
| 2169 | + <code><![CDATA[!($this->tempFile = tempnam(sys_get_temp_dir(), 'PHPUnit'))]]></code> |
| 2170 | + </RiskyTruthyFalsyComparison> |
2102 | 2171 | <TypeDoesNotContainNull>
|
2103 | 2172 | <code>[]</code>
|
2104 | 2173 | </TypeDoesNotContainNull>
|
|
2122 | 2191 | <code>$out</code>
|
2123 | 2192 | <code>$outTarget</code>
|
2124 | 2193 | </PropertyNotSetInConstructor>
|
| 2194 | + <RiskyTruthyFalsyComparison> |
| 2195 | + <code><![CDATA[$this->out]]></code> |
| 2196 | + <code><![CDATA[$this->out]]></code> |
| 2197 | + <code><![CDATA[$this->out]]></code> |
| 2198 | + </RiskyTruthyFalsyComparison> |
2125 | 2199 | </file>
|
2126 | 2200 | <file src="src/Util/Reflection.php">
|
2127 | 2201 | <ArgumentTypeCoercion>
|
|
2153 | 2227 | $e
|
2154 | 2228 | );]]></code>
|
2155 | 2229 | </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> |
2156 | 2236 | </file>
|
2157 | 2237 | <file src="src/Util/TestDox/CliTestDoxPrinter.php">
|
2158 | 2238 | <DeprecatedInterface>
|
|
2173 | 2253 | <code><![CDATA[$prefix['start']]]></code>
|
2174 | 2254 | <code><![CDATA[$prefix['trace']]]></code>
|
2175 | 2255 | </PossiblyInvalidArrayOffset>
|
| 2256 | + <PossiblyNullArgument> |
| 2257 | + <code>$style</code> |
| 2258 | + </PossiblyNullArgument> |
2176 | 2259 | <PossiblyUndefinedArrayOffset>
|
2177 | 2260 | <code><![CDATA[self::STATUS_STYLES[$result['status']]['message']]]></code>
|
2178 | 2261 | </PossiblyUndefinedArrayOffset>
|
|
2182 | 2265 | <code>CliTestDoxPrinter</code>
|
2183 | 2266 | <code>CliTestDoxPrinter</code>
|
2184 | 2267 | </PropertyNotSetInConstructor>
|
| 2268 | + <RiskyTruthyFalsyComparison> |
| 2269 | + <code>$diff</code> |
| 2270 | + <code>$diff</code> |
| 2271 | + <code>$message</code> |
| 2272 | + <code>$message</code> |
| 2273 | + </RiskyTruthyFalsyComparison> |
2185 | 2274 | </file>
|
2186 | 2275 | <file src="src/Util/TestDox/HtmlResultPrinter.php">
|
2187 | 2276 | <DeprecatedInterface>
|
|
2219 | 2308 | <RedundantConditionGivenDocblockType>
|
2220 | 2309 | <code>is_string($value)</code>
|
2221 | 2310 | </RedundantConditionGivenDocblockType>
|
| 2311 | + <RiskyTruthyFalsyComparison> |
| 2312 | + <code>empty($className)</code> |
| 2313 | + </RiskyTruthyFalsyComparison> |
2222 | 2314 | </file>
|
2223 | 2315 | <file src="src/Util/TestDox/ResultPrinter.php">
|
2224 | 2316 | <DeprecatedInterface>
|
|
0 commit comments