Skip to content

Commit 8956fb5

Browse files
Merge v1.20 into v1.x (#1389)
2 parents c20d4d1 + c5a384a commit 8956fb5

File tree

3 files changed

+8
-5
lines changed

3 files changed

+8
-5
lines changed

psalm-baseline.xml

-3
Original file line numberDiff line numberDiff line change
@@ -322,9 +322,6 @@
322322
</PossiblyNullArgument>
323323
</file>
324324
<file src="src/Model/CodecCursor.php">
325-
<ImplementedReturnTypeMismatch>
326-
<code><![CDATA[CursorId|Int64]]></code>
327-
</ImplementedReturnTypeMismatch>
328325
<TooManyArguments>
329326
<code><![CDATA[getId]]></code>
330327
</TooManyArguments>

src/ChangeStream.php

+4-1
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,10 @@ public function current()
106106
return $this->codec->decode($value);
107107
}
108108

109-
/** @return CursorId|Int64 */
109+
/**
110+
* @return CursorId|Int64
111+
* @psalm-return ($asInt64 is true ? Int64 : CursorId)
112+
*/
110113
#[ReturnTypeWillChange]
111114
public function getCursorId(bool $asInt64 = false)
112115
{

src/Model/CodecCursor.php

+4-1
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,10 @@ public static function fromCursor(Cursor $cursor, DocumentCodec $codec): self
7171
return new self($cursor, $codec);
7272
}
7373

74-
/** @return CursorId|Int64 */
74+
/**
75+
* @return CursorId|Int64
76+
* @psalm-return ($asInt64 is true ? Int64 : CursorId)
77+
*/
7578
#[ReturnTypeWillChange]
7679
public function getId(bool $asInt64 = false)
7780
{

0 commit comments

Comments
 (0)