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
@property-read
https://psalm.dev/r/f818e2d9d9
Type of $_c should be string instead of ''|mixed.
$_c
string
''|mixed
The text was updated successfully, but these errors were encountered:
I found these snippets:
<?php /** * @property-read string|null $p */ class CCC { public function __get(string $name) { return null; } public function f(): void { $_c = $this->p ?? ''; /** @psalm-trace $_c */ } public function g(): void { $_a = $this->p; $_b = $this->p ?? ''; /** @psalm-trace $_a $_b */ } } $_d = (new CCC())->p; /** @psalm-trace $_d */
Psalm output (using commit 03ee02c): INFO: Trace - 22:24 - $_d: null|string INFO: Trace - 12:0 - $_c: ''|mixed INFO: Trace - 17:0 - $_a: null|string INFO: Trace - 17:0 - $_b: string
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
https://psalm.dev/r/f818e2d9d9
Type of
$_c
should bestring
instead of''|mixed
.The text was updated successfully, but these errors were encountered: