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

Incorrect return type in docblock? #47966

Closed
fremantle-matt opened this issue Aug 4, 2023 · 3 comments
Closed

Incorrect return type in docblock? #47966

fremantle-matt opened this issue Aug 4, 2023 · 3 comments

Comments

@fremantle-matt
Copy link

Laravel Version

10.4.1

PHP Version

8.1.4

Database Driver & Version

No response

Description

The return type of the Builder::get() method is listed as either a Collection or static[]. Given the method returns Model::newCollection(), whose return type is always Collection, is it correct to say that static[] is a potential option?

Proposal: remove static[] as a potential return type in Builder::get().

* @return \Illuminate\Database\Eloquent\Collection|static[]

Steps To Reproduce

Review the following line:

* @return \Illuminate\Database\Eloquent\Collection|static[]

@fremantle-matt
Copy link
Author

(This is causing me lint issues, hence the request)

@crynobone
Copy link
Member

Hey there, thanks for reporting this issue.

If you notice improper DocBlock, PHPStan, or IDE warnings while using Laravel, do not create a GitHub issue. Instead, please submit a pull request to fix the problem. Also see our contribution guide.

Thanks!

@FrazerFlanagan
Copy link

FrazerFlanagan commented Aug 29, 2023

#48228 - This has been merged now @fremantle-matt

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

No branches or pull requests

3 participants