mirror of
https://github.com/archtechx/tenancy.git
synced 2026-05-06 20:54:02 +00:00
phpstan fix: Scope generics
phpstan started failing with '... implements generic interface Illuminate\Database\Eloquent\Scope but does not specify its types: TModel'. We solve this by adding an implements docblock to the scopes implementing that interface. They're fairly generic - we just use the Model type itself in the code - so we use Model for the type parameter.
This commit is contained in:
parent
e31249dd09
commit
c32f52ce7c
3 changed files with 3 additions and 0 deletions
|
|
@ -8,6 +8,7 @@ use Illuminate\Database\Eloquent\Builder;
|
|||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Scope;
|
||||
|
||||
/** @implements Scope<Model> */
|
||||
class PendingScope implements Scope
|
||||
{
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue