-
Notifications
You must be signed in to change notification settings - Fork 660
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
Support for aliases? #9372
Labels
easy problems
Issues that can be fixed without background knowledge of Psalm
enhancement
good first issue
Help wanted
Comments
I found these snippets: https://psalm.dev/r/9d70fdf31d<?php
$str = "1|2|3|4|5|6";
$parts = explode('|', $str);
if (count($parts) != 6) {
die('6 parts required!');
}
[$a, $b, $c, $d, $e, $f] = $parts;
print_r([$a, $b, $c, $d, $e, $f]);
https://psalm.dev/r/8a26a0a0f9<?php
$str = "1|2|3|4|5|6";
$parts = explode('|', $str);
if (sizeof($parts) != 6) {
die('6 parts required!');
}
[$a, $b, $c, $d, $e, $f] = $parts;
print_r([$a, $b, $c, $d, $e, $f]);
|
Not expected as in 'incorrect'. |
Aliases reference: https://www.php.net/manual/en/aliases.php |
Adding sizeof here:
|
orklah
added
easy problems
Issues that can be fixed without background knowledge of Psalm
Help wanted
good first issue
labels
Feb 22, 2023
You absolutely can. |
Done, thanks! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
easy problems
Issues that can be fixed without background knowledge of Psalm
enhancement
good first issue
Help wanted
Psalm does not seem to take PHP aliases into account. Examples:
count
: https://psalm.dev/r/9d70fdf31dsizeof
: https://psalm.dev/r/8a26a0a0f9Is this the expected behavior?
The text was updated successfully, but these errors were encountered: