-
Notifications
You must be signed in to change notification settings - Fork 266
Fix psalm errors #1209
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix psalm errors #1209
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
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.16.0@2897ba636551a8cb61601cc26f6ccfbba6c36591"> | ||
<files psalm-version="5.18.0@b113f3ed0259fd6e212d87c3df80eec95a6abf19"> | ||
<file src="docs/examples/encryption/csfle-explicit_encryption.php"> | ||
<MixedArgument> | ||
<code><![CDATA[$clientEncryption->decrypt($document->encryptedField)]]></code> | ||
|
@@ -114,10 +114,16 @@ | |
<InvalidParamDefault> | ||
<code><![CDATA[class-string<ArrayIterator<string,mixed>>|class-string<ArrayObject<string,mixed>>]]></code> | ||
</InvalidParamDefault> | ||
<LessSpecificReturnStatement> | ||
<code><![CDATA[(object) $this->getArrayCopy()]]></code> | ||
</LessSpecificReturnStatement> | ||
<MixedAssignment> | ||
<code>$this[$key]</code> | ||
<code>$value</code> | ||
</MixedAssignment> | ||
<MoreSpecificReturnType> | ||
<code>stdClass</code> | ||
</MoreSpecificReturnType> | ||
</file> | ||
<file src="src/Model/BSONIterator.php"> | ||
<MixedArgument> | ||
|
@@ -509,6 +515,9 @@ | |
</MixedAssignment> | ||
</file> | ||
<file src="src/Operation/FindOneAndReplace.php"> | ||
<MixedArgument> | ||
<code><![CDATA[$options['codec'] ?? null]]></code> | ||
</MixedArgument> | ||
Comment on lines
+518
to
+520
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not sure why this errors in that one specific file - it works in all other files where we have the same checks on the codec option and then use it in a typed context 🤷 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I couldn't reproduce. |
||
<MixedAssignment> | ||
<code><![CDATA[$options['fields']]]></code> | ||
</MixedAssignment> | ||
|
@@ -639,13 +648,6 @@ | |
<code><![CDATA[$this->changeStreamOptions['startAfter']]]></code> | ||
</MixedReturnStatement> | ||
</file> | ||
<file src="src/PsrLogAdapter.php"> | ||
<MethodSignatureMismatch> | ||
<code>$domain</code> | ||
<code>$level</code> | ||
<code>$message</code> | ||
</MethodSignatureMismatch> | ||
</file> | ||
<file src="src/UpdateResult.php"> | ||
<MixedAssignment> | ||
<code>$id</code> | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The
LessSpecificReturnStatement
andMoreSpecificReturnType
are due to vimeo/psalm#8187. In essence, Psalm takes the return value of(object) []
to beobject
, even though it isstdClass
.