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

Adding PHPDoc for Facade so ide-helper works #460

Open
BoGnY opened this issue Nov 3, 2023 · 4 comments
Open

Adding PHPDoc for Facade so ide-helper works #460

BoGnY opened this issue Nov 3, 2023 · 4 comments

Comments

@BoGnY
Copy link

BoGnY commented Nov 3, 2023

Description

I would like to add PHPDoc for Facade so that the ide helper works properly.

Screenshots

This is what I would like to do:
image

This is the ide helper without my code:
image

And this is the ide helper with the phpdoc added:
image

Additional context

In the end it doesn't change any logic, but it's improves the operation of the ide (at least phpstorm/idea) but I think also with vscode.

@usernotnull
Copy link
Owner

The controversy of which is "cleaner", facades or static methods :)

That's part of the reason why for IDEs and for shorter code (both the library and its usage), I opted for the easier toast() and did not document the facade way of doing it as you did.

I'll add them if I get more requests for this.

@BoGnY
Copy link
Author

BoGnY commented Nov 3, 2023

Yes ^^
I personally prefer Facade on php files and helper on blade files, but obviously the choice remains up to the dev.
I found somewhere that this is more recommended.

I hope others are interested ^^
Also because a few lines of documentation simplifies the use of the Facade :)

@usernotnull
Copy link
Owner

Hmm. Have you tried laravel helper plugin or the free laravel ide helper? They add these annotations automatically.

@BoGnY
Copy link
Author

BoGnY commented Nov 11, 2023

Hmm. Have you tried laravel helper plugin or the free laravel ide helper? They add these annotations automatically.

Yes I have tried laravel-ide-helper, but needs to put Facade manually on config/app.php...
I don't know why...

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

2 participants