Skip to content

Commit 91f3367

Browse files
committed
Merge branch 'v1.17'
* v1.17: Fix psalm errors (#1209)
2 parents adf469d + dc74549 commit 91f3367

File tree

2 files changed

+12
-9
lines changed

2 files changed

+12
-9
lines changed

psalm-baseline.xml

Lines changed: 10 additions & 8 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="5.16.0@2897ba636551a8cb61601cc26f6ccfbba6c36591">
2+
<files psalm-version="5.18.0@b113f3ed0259fd6e212d87c3df80eec95a6abf19">
33
<file src="docs/examples/encryption/csfle-explicit_encryption.php">
44
<MixedArgument>
55
<code><![CDATA[$clientEncryption->decrypt($document->encryptedField)]]></code>
@@ -114,10 +114,16 @@
114114
<InvalidParamDefault>
115115
<code><![CDATA[class-string<ArrayIterator<string,mixed>>|class-string<ArrayObject<string,mixed>>]]></code>
116116
</InvalidParamDefault>
117+
<LessSpecificReturnStatement>
118+
<code><![CDATA[(object) $this->getArrayCopy()]]></code>
119+
</LessSpecificReturnStatement>
117120
<MixedAssignment>
118121
<code>$this[$key]</code>
119122
<code>$value</code>
120123
</MixedAssignment>
124+
<MoreSpecificReturnType>
125+
<code>stdClass</code>
126+
</MoreSpecificReturnType>
121127
</file>
122128
<file src="src/Model/BSONIterator.php">
123129
<MixedArgument>
@@ -509,6 +515,9 @@
509515
</MixedAssignment>
510516
</file>
511517
<file src="src/Operation/FindOneAndReplace.php">
518+
<MixedArgument>
519+
<code><![CDATA[$options['codec'] ?? null]]></code>
520+
</MixedArgument>
512521
<MixedAssignment>
513522
<code><![CDATA[$options['fields']]]></code>
514523
</MixedAssignment>
@@ -639,13 +648,6 @@
639648
<code><![CDATA[$this->changeStreamOptions['startAfter']]]></code>
640649
</MixedReturnStatement>
641650
</file>
642-
<file src="src/PsrLogAdapter.php">
643-
<MethodSignatureMismatch>
644-
<code>$domain</code>
645-
<code>$level</code>
646-
<code>$message</code>
647-
</MethodSignatureMismatch>
648-
</file>
649651
<file src="src/UpdateResult.php">
650652
<MixedAssignment>
651653
<code>$id</code>

src/Model/BSONDocument.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
use MongoDB\BSON\Serializable;
2424
use MongoDB\BSON\Unserializable;
2525
use ReturnTypeWillChange;
26+
use stdClass;
2627

2728
use function MongoDB\recursive_copy;
2829

@@ -78,7 +79,7 @@ public static function __set_state(array $properties)
7879
* Serialize the document to BSON.
7980
*
8081
* @see https://php.net/mongodb-bson-serializable.bsonserialize
81-
* @return object
82+
* @return stdClass
8283
*/
8384
#[ReturnTypeWillChange]
8485
public function bsonSerialize()

0 commit comments

Comments
 (0)