mirror of
https://github.com/archtechx/tenancy.git
synced 2025-12-12 12:54:05 +00:00
fix phpstan errors
This commit is contained in:
parent
18a16e6a74
commit
4372e1bef2
20 changed files with 105 additions and 16 deletions
|
|
@ -10,6 +10,9 @@ use Illuminate\Database\Eloquent\Scope;
|
|||
|
||||
class ParentModelScope implements Scope
|
||||
{
|
||||
/**
|
||||
* @param Builder<Model> $builder
|
||||
*/
|
||||
public function apply(Builder $builder, Model $model): void
|
||||
{
|
||||
if (! tenancy()->initialized) {
|
||||
|
|
@ -19,6 +22,9 @@ class ParentModelScope implements Scope
|
|||
$builder->whereHas($builder->getModel()->getRelationshipToPrimaryModel());
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Builder<Model> $builder
|
||||
*/
|
||||
public function extend(Builder $builder): void
|
||||
{
|
||||
$builder->macro('withoutParentModel', function (Builder $builder) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue