-
Notifications
You must be signed in to change notification settings - Fork 62
Add scope parameters to the repository and docblock generator #487
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
base: main
Are you sure you want to change the base?
Add scope parameters to the repository and docblock generator #487
Conversation
…ocblock-generator-#66
|
I pushed a few changes to this PR. The main remaining bit I'm not 100% sure about is how we should generate docblocks for parameters with #[Scope]
public function withObject(Builder $query, Stringable $stringable = new Stringable(''))
{
//
}Ideally, we'd emit something like: /**
* withObject(\Illuminate\Support\Stringable $stringable = new \Illuminate\Support\Stringable(''))
*/…but doing that accurately would require parsing the source text which I'd rather avoid for now. So the current implementation generates: /**
* withObject(\Illuminate\Support\Stringable $stringable = new \Illuminate\Support\Stringable(...))
*/Alternatively, we could drop the /**
* withObject(\Illuminate\Support\Stringable $stringable = new \Illuminate\Support\Stringable)
*/Aside from that, I think this is good to go. |
|
@TitasGailius I suggest the option without
|
|
@N1ebieski both options show the same thing in VS Code, because I think docblocks like this aren't properly supported yet. That said, I agree that omitting |
|
@TitasGailius Without
|


Before:
After:
This feature needs more testing, especially in large projects with many scope methods using union/intersect type parameters.