1
0
Fork 0
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:
Samuel Štancl 2024-08-06 04:35:25 +02:00
parent 18a16e6a74
commit 4372e1bef2
20 changed files with 105 additions and 16 deletions

View file

@ -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) {