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

fix: fixes query builder methods within custom builders #453

Merged
merged 1 commit into from
Feb 5, 2020
Merged

fix: fixes query builder methods within custom builders #453

merged 1 commit into from
Feb 5, 2020

Conversation

canvural
Copy link
Collaborator

@canvural canvural commented Feb 5, 2020

Fixes #352

Calling query builder methods inside the custom builder classes wasn't returning the generic builder. This PR fixes that.

* @param string[] $categories
*
* @return CustomBuilder
* @phpstan-return CustomBuilder<TModelClass>
Copy link
Collaborator

@szepeviktor szepeviktor Feb 5, 2020

Choose a reason for hiding this comment

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

I think other phpdoc parsing softwares understand CustomBuilder<TModelClass>

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

PHPStorm was complaining about it for me.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Oh, cool. But I don't want to install a plugin for that. PHPStorm will eventually support it.

@canvural canvural merged commit f2b3d98 into larastan:master Feb 5, 2020
@canvural canvural deleted the fix-query-builder-methods-with-custom-builders branch February 5, 2020 15:06
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.

Invalid "self" type for custom Builder
4 participants