Skip to content

feat: Add AddReturnDocblockForScalarArrayFromAssignsRector#7151

Merged
TomasVotruba merged 3 commits intorectorphp:mainfrom
imliam:scalar-assign-docblock-rector
Aug 22, 2025
Merged

feat: Add AddReturnDocblockForScalarArrayFromAssignsRector#7151
TomasVotruba merged 3 commits intorectorphp:mainfrom
imliam:scalar-assign-docblock-rector

Conversation

@imliam
Copy link
Contributor

@imliam imliam commented Aug 17, 2025

Add a more specific return docblock for scalar lists when we are certain of the types inside the array (eg. when they were initialised and returned within the same function)

Fixes rectorphp/rector#9312

…ain of the types inside the array (eg. when they were initialised and returned within the same function)
Copilot AI review requested due to automatic review settings August 17, 2025 20:43

This comment was marked as spam.

…calarArrayFromAssignsRector.php

Co-authored-by: Abdul Malik Ikhsan <samsonasik@gmail.com>
@TomasVotruba
Copy link
Member

Thank you for such a quick kick off.
LGTM 👌

This might require few iterations, so lets ship it and test it in the wild 🚀

@TomasVotruba TomasVotruba merged commit 08f39c3 into rectorphp:main Aug 22, 2025
49 checks passed
@samsonasik
Copy link
Member

@TomasVotruba should we try add to type declaration set?

@TomasVotruba
Copy link
Member

@samsonasik Yes, I've missed it.

@samsonasik
Copy link
Member

#7166

@github-actions
Copy link
Contributor

This pull request has been automatically locked because it has been closed for 150 days. Please open a new PR if you want to continue the work.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 25, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[type-coverage] Kick of simpler rule to add @return on known strict scalar iterables

3 participants