Skip to content

Commit cc93677

Browse files
authored
Add RiskyTruthyFalsyComparison psalm errors to the baseline for maintenance branch (#1223)
1 parent 1c3dc79 commit cc93677

File tree

2 files changed

+18
-1
lines changed

2 files changed

+18
-1
lines changed

psalm-baseline.xml

+10-1
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="docs/examples/encryption/csfle-explicit_encryption.php">
44
<MixedArgument>
55
<code><![CDATA[$clientEncryption->decrypt($document->encryptedField)]]></code>
@@ -50,6 +50,9 @@
5050
<DeprecatedConstant>
5151
<code>self::CURSOR_NOT_FOUND</code>
5252
</DeprecatedConstant>
53+
<RiskyTruthyFalsyComparison>
54+
<code><![CDATA[! $this->resumeCallable]]></code>
55+
</RiskyTruthyFalsyComparison>
5356
</file>
5457
<file src="src/Client.php">
5558
<MixedArgument>
@@ -321,6 +324,9 @@
321324
<MixedMethodCall>
322325
<code>isInTransaction</code>
323326
</MixedMethodCall>
327+
<RiskyTruthyFalsyComparison>
328+
<code><![CDATA[empty($this->filter)]]></code>
329+
</RiskyTruthyFalsyComparison>
324330
</file>
325331
<file src="src/Operation/CreateCollection.php">
326332
<MixedArgument>
@@ -395,6 +401,9 @@
395401
<MixedMethodCall>
396402
<code>isInTransaction</code>
397403
</MixedMethodCall>
404+
<RiskyTruthyFalsyComparison>
405+
<code><![CDATA[empty($this->filter)]]></code>
406+
</RiskyTruthyFalsyComparison>
398407
</file>
399408
<file src="src/Operation/DropCollection.php">
400409
<MixedArgument>

psalm.xml.dist

+8
Original file line numberDiff line numberDiff line change
@@ -34,5 +34,13 @@
3434

3535
<!-- This is often the result of type checks due to missing native types -->
3636
<DocblockTypeContradiction errorLevel="info" />
37+
38+
<!-- If the result of getenv is falsy, using the default URI is fine -->
39+
<RiskyTruthyFalsyComparison>
40+
<errorLevel type="suppress">
41+
<directory name="examples" />
42+
<directory name="docs/examples" />
43+
</errorLevel>
44+
</RiskyTruthyFalsyComparison>
3745
</issueHandlers>
3846
</psalm>

0 commit comments

Comments
 (0)