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://phpstan.org/r/7a9008c1-c923-4c04-8bbb-9886b5a40bdc
/** * @return array{int, int} */ function size(): array { return [10, 20]; } class HelloWorld { public function bar(): void { $x = size()[2]; // Offset 2 does not exist on array(int, int). [$width, $height, $depth] = size(); // Nothing } }
Interestingly Psalm has the exact same bug missing feature https://psalm.dev/r/c335c7713c :)
The text was updated successfully, but these errors were encountered:
Actually it's a feature request, there curently isn't a check for that :) (False positives are bugs, false negatives are feature requests in my eye)
Sorry, something went wrong.
Fair enough 🙂
Implemented :) https://phpstan.org/r/20b36937-552a-4993-851d-8536e62c8b0a
Commit: phpstan/phpstan-src@aae34d9
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
No branches or pull requests
Feature request
https://phpstan.org/r/7a9008c1-c923-4c04-8bbb-9886b5a40bdc
Interestingly Psalm has the exact
same bugmissing feature https://psalm.dev/r/c335c7713c :)The text was updated successfully, but these errors were encountered: