Skip to content
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

Generate @param for iterable type #2343

Merged
merged 1 commit into from
Aug 22, 2023
Merged

Conversation

mamazu
Copy link
Contributor

@mamazu mamazu commented Aug 19, 2023

Closes #2084

Comment on lines +76 to +80
if ($claimedReturnType->isDefined()
&& !$claimedReturnType->isClass()
&& !$claimedReturnType->isArray()
&& !$claimedReturnType->isClosure()
&& !$claimedReturnType->isIterable()
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would probably be easier to list the cases where it's true. Like scalar types?

@dantleech dantleech merged commit def61a2 into phpactor:master Aug 22, 2023
10 checks passed
@dantleech
Copy link
Collaborator

thanks! although I'm not sure what the original issue was as it was only a truncated screenshot. Probably this is the fix 😅

@mamazu
Copy link
Contributor Author

mamazu commented Aug 22, 2023

The problem was that if you're function return type was iterable it didn't suggest generating a docblock for the specific type. Like it does with arrays.

@mamazu mamazu deleted the phpactor-2084 branch December 27, 2023 03:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Generate @param refactoring not triggered for iterable
2 participants