From 6ac620930de3dfc302e07b81a50fc0dd81370f77 Mon Sep 17 00:00:00 2001 From: Andreas Braun Date: Mon, 18 Dec 2023 08:34:18 +0100 Subject: [PATCH] Fix psalm errors --- psalm-baseline.xml | 18 ++++++++++-------- src/Model/BSONDocument.php | 3 ++- 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/psalm-baseline.xml b/psalm-baseline.xml index dceee1ba0..50348b082 100644 --- a/psalm-baseline.xml +++ b/psalm-baseline.xml @@ -1,5 +1,5 @@ - + decrypt($document->encryptedField)]]> @@ -114,10 +114,16 @@ >|class-string>]]> + + getArrayCopy()]]> + $this[$key] $value + + stdClass + @@ -509,6 +515,9 @@ + + + @@ -639,13 +648,6 @@ changeStreamOptions['startAfter']]]> - - - $domain - $level - $message - - $id diff --git a/src/Model/BSONDocument.php b/src/Model/BSONDocument.php index 72d2f4bfb..b9a9c0d80 100644 --- a/src/Model/BSONDocument.php +++ b/src/Model/BSONDocument.php @@ -23,6 +23,7 @@ use MongoDB\BSON\Serializable; use MongoDB\BSON\Unserializable; use ReturnTypeWillChange; +use stdClass; use function MongoDB\recursive_copy; @@ -78,7 +79,7 @@ public static function __set_state(array $properties) * Serialize the document to BSON. * * @see https://php.net/mongodb-bson-serializable.bsonserialize - * @return object + * @return stdClass */ #[ReturnTypeWillChange] public function bsonSerialize()