We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
https://psalm.dev/r/a6ff20c81e
Expected: array<array-key, \stdClass> Got: array<array-key, mixed>
The text was updated successfully, but these errors were encountered:
I found these snippets:
<?php /** @psalm-suppress MixedAssignment */ $array = json_decode(file_get_contents('php://stdin')); if (is_array($array) && $array === array_filter($array, function ($value): bool { return $value instanceof stdClass; })) { /** @psalm-trace $array */; }
Psalm output (using commit 1046477): INFO: Trace - 9:31 - $array: array<array-key, mixed>
Sorry, something went wrong.
The type should definitely get filtered here: https://psalm.dev/r/4281721dda
<?php /** @psalm-suppress MixedAssignment */ $array = json_decode(file_get_contents('php://stdin')); if (is_array($array)) { $filtered = array_filter($array, fn ($value) => $value instanceof stdClass); if ($array === $filtered) { /** @psalm-trace $array */ } }
Psalm output (using commit 1046477): INFO: Trace - 10:0 - $array: array<array-key, mixed>
4faa6bb
Fix vimeo#4976 - improve type narrowing
25505b4
No branches or pull requests
https://psalm.dev/r/a6ff20c81e
Expected: array<array-key, \stdClass>
Got: array<array-key, mixed>
The text was updated successfully, but these errors were encountered: