Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions psalm-baseline.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<files psalm-version="5.25.0@01a8eb06b9e9cc6cfb6a320bf9fb14331919d505">
<files psalm-version="5.26.1@d747f6500b38ac4f7dfc5edbcae6e4b637d7add0">
<file src="examples/atlas_search.php">
<MixedArgument>
<code><![CDATA[$document['name']]]></code>
Expand Down Expand Up @@ -145,9 +145,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 @@ -110,7 +110,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 @@ -76,7 +76,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