-
Notifications
You must be signed in to change notification settings - Fork 127
getArguments is actually of type array[] #141
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
Conversation
Unrelated, but is there a reason it was called |
I don't know why this was called originally arguments but it is the term using in all phpdocumentor packages. For some reason phpstan thinks your change isn't correct. And it needs to be swiched back to |
It's not of type |
It really is |
Oh, i see why it inferred that now, it's because the only assignment to it happens to start off life as |
@ondrejmirtes can you help us here, is this a false report by phpstan? |
@jaapio If you write |
Thanks for the quick response @ondrejmirtes! |
So I'm not sure what you need here, probably just |
The actual return type is |
The array has 2 dimensions. where the second dimension is |
Yeh, so the best we can do it say it has type |
Would accept that for now. |
Ha, sorry. :) |
Could this syntax be what we want: https://github.com/phpDocumentor/TypeResolver/blob/master/tests/unit/TypeResolverTest.php#L376. Does that mean an array of either of those types, but exactly one, or does it mean an array of either of them, if you see what I mean? |
It’s an array of string|stdClass which means that when you access an item,
it will be string or stdClass.
If you need an array of strings or an array of stdClasses, you should write
string[]|stdClass[].
On Thu, 28 Dec 2017 at 22:30, Graham Campbell ***@***.***> wrote:
Could this syntax be what we want:
https://github.com/phpDocumentor/TypeResolver/blob/master/tests/unit/TypeResolverTest.php#L376.
Does that mean an array of either of those types, but exactly one, or does
it mean an array of either of them, if you see what I mean?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#141 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAGZuNgz32OmdiI7cnMTwxCkLEUB7ACpks5tFAiLgaJpZM4RN0lV>
.
--
Ondřej Mirtes
|
Closing because of changed made in #147. |
No description provided.