Skip to content

Conversation

@ishanvyas22
Copy link
Contributor

@ishanvyas22 ishanvyas22 commented Oct 8, 2021

Fixes rectorphp/rector#6725

This error is raised when there's discrepancies between params and phpDocParams. That means, for example, if method accepts 2 params and phpDoc block is only added for any one of param, in that case this issue is raised.

The reason for the issue is depending on phpDoc $key variable. I tried to check it with param name but it added a duplicated @param tag in docBlock. So as a temporary fix I added isset check for now, so there's no notice/error is raised.

Signed-off-by: Ishan Vyas <isvyas@gmail.com>
…ector/Fixture/overlapped_key_param.php.inc

Co-authored-by: Abdul Malik Ikhsan <samsonasik@gmail.com>
@samsonasik samsonasik enabled auto-merge (squash) October 9, 2021 05:07
@samsonasik
Copy link
Member

Thank you @ishanvyas22

@samsonasik samsonasik merged commit ff32aed into rectorphp:main Oct 9, 2021
@ishanvyas22 ishanvyas22 deleted the bug-6725 branch October 9, 2021 05:10
@ishanvyas22
Copy link
Contributor Author

Thanks. Would it be possible to add "hacktoberfest-accepted" label to this PR?

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.

NarrowUnionTypeDocRector - Attempt to assign property "type" on null

2 participants