Skip to content

Commit

Permalink
Merge v1.20 into v1.x (#1389)
Browse files Browse the repository at this point in the history
  • Loading branch information
mongodb-php-bot authored Sep 12, 2024
2 parents c20d4d1 + c5a384a commit 8956fb5
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
3 changes: 0 additions & 3 deletions psalm-baseline.xml
Original file line number Diff line number Diff line change
Expand Up @@ -322,9 +322,6 @@
</PossiblyNullArgument>
</file>
<file src="src/Model/CodecCursor.php">
<ImplementedReturnTypeMismatch>
<code><![CDATA[CursorId|Int64]]></code>
</ImplementedReturnTypeMismatch>
<TooManyArguments>
<code><![CDATA[getId]]></code>
</TooManyArguments>
Expand Down
5 changes: 4 additions & 1 deletion src/ChangeStream.php
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,10 @@ public function current()
return $this->codec->decode($value);
}

/** @return CursorId|Int64 */
/**
* @return CursorId|Int64
* @psalm-return ($asInt64 is true ? Int64 : CursorId)
*/
#[ReturnTypeWillChange]
public function getCursorId(bool $asInt64 = false)
{
Expand Down
5 changes: 4 additions & 1 deletion src/Model/CodecCursor.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,10 @@ public static function fromCursor(Cursor $cursor, DocumentCodec $codec): self
return new self($cursor, $codec);
}

/** @return CursorId|Int64 */
/**
* @return CursorId|Int64
* @psalm-return ($asInt64 is true ? Int64 : CursorId)
*/
#[ReturnTypeWillChange]
public function getId(bool $asInt64 = false)
{
Expand Down

0 comments on commit 8956fb5

Please sign in to comment.