Gert-dev / php-ide-serenata

Atom IDE package that integrates the Serenata server to provide PHP code assistance
https://serenata.gitlab.io/
Other
275 stars 19 forks source link

How to avoid ""Classlike is not defined or imported anywhere." ? #466

Closed iwasherefirst2 closed 4 years ago

iwasherefirst2 commented 5 years ago

Hello, this is not a bug report, but a question.

Sometimes I do not return an imported class. In this case, a warning appears. For example, in any method from any Laravel Controller I have this warning:

image

Is it possible to disable this kind of warning in general (for return check). Or may I tell the system somehow, that the helper function view is not needed to be imported? Something like this

?

Gert-dev commented 5 years ago

Hello.

You could use mixed for this, which is a valid return type, i.e. @return mixed view. Any other type should indeed be a valid type that is imported, by saying mixed, you can say "it can be anything".

Gert-dev commented 4 years ago

Closing this due to age as well as that Serenata 5.0 no longer does any semantic linting, so this is automatically solved that way.