PHPStan error: Call to an undefined static method
apasov opened this issue · 1 comments
apasov commented
This code works fine:
use GrahamCampbell\GitHub\Facades\GitHub;
$tag_name = GitHub::repo()->releases()->latest('GrahamCampbell', 'Laravel-GitHub')["tag_name"];
$response = GitHub::getHttpClient()->get("repos/GrahamCampbell/Laravel-GitHub/git/ref/tags/$tag_name");
But PHPStan throws errors:
Call to an undefined static method GrahamCampbell\GitHub\Facades\GitHub::repo().
Call to an undefined static method GrahamCampbell\GitHub\Facades\GitHub::getHttpClient().
Of course, these errors can be suppressed in phpstan.neon
:
parameters:
ignoreErrors:
- '#Call to an undefined static method GrahamCampbell\\GitHub\\Facades\\GitHub::[a-zA-Z0-9\\_]()#'
But maybe it's possible to fix them here?
Or is this a PHPStan issue?
GrahamCampbell commented
There are no plans to add facade doc. I believe larastan may be able to fill this for you.