Closed sporchia closed 1 week ago
@sporchia , just so I understand. You've found no issue with the package itself, just an incomplete/erroneous doc block?
The tests for this method are here: https://github.com/pdphilip/laravel-elasticsearch-tests/blob/main/tests/EloquentTests/EloquentQueriesTest.php#L778-L803 - which is passing.
correct, it would be nice to have the doc block correct though
From help from the community, the package has been refactored with PHPstan integration - which applies to your query here. V4.1.0 will have these changes.
Package version
v4.0.3
Describe the bug
When running static analysis over the code using
larastan
which usesphpstan
under the hood this error is generated:from code like this:
To Reproduce
Steps to reproduce the behavior: create standard project with
larastan
as a dev dependency and try using phpstan analysis on level 1Expected behavior
I expect the documentation to have the static calls listed as at least static in the doc block in line with the online documentation.
additionally
there are a few methods that follow this pattern, so it isn't just this single case, this just happens to be the case I was made aware of.
Workaround
Looks like one can add this to their
phpstan.neon
file to avoid thephpstan
error:intelephense
will also complain, adding the following above the code should mute the error: