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

Macro::initPhpDoc() will save original docblock if present. #1116

Merged
merged 4 commits into from
Dec 23, 2020

Conversation

LastDragon-ru
Copy link
Contributor

Summary

The #1006 added support for macros but lost the content of the original docblock that was useful to provide an actual description, params, and return types. This PR fixes it:

  • If the closure has a docblock it will be saved
  • @params will be added only when the original docblock doesn't have them
  • @return will be added only when the original docblock doesn't have it

Fixes #1099

Type of change

  • Bug fix (non-breaking change which fixes an issue)

Checklist

  • Existing tests have been adapted and/or new tests have been added

@barryvdh barryvdh self-requested a review December 21, 2020 08:37
@barryvdh barryvdh requested a review from mfn December 21, 2020 08:37
@barryvdh barryvdh merged commit 25cc68c into barryvdh:master Dec 23, 2020
bytestream pushed a commit to bytestream/laravel-ide-helper that referenced this pull request Apr 20, 2021
…dh#1116)

* `Macro::initPhpDoc()` will save original docblock if present.

* Added `MacroTest::testInitPhpDocClosureWithoutDocBlock()`.

* Mock class rename.

* Code cleanup.

(cherry picked from commit 25cc68c)
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.

Macro docblock regression: empty docblock
3 participants