1
0
Fork 0
mirror of https://github.com/archtechx/tenancy.git synced 2026-03-23 10:54:04 +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

@ -11,6 +11,9 @@ use Stancl\Tenancy\Tenancy;
class TenantScope implements Scope
{
/**
* @param Builder<Model> $builder
*/
public function apply(Builder $builder, Model $model)
{
if (! tenancy()->initialized) {
@ -20,6 +23,9 @@ class TenantScope implements Scope
$builder->where($model->qualifyColumn(Tenancy::tenantKeyColumn()), tenant()->getTenantKey());
}
/**
* @param Builder<Model> $builder
*/
public function extend(Builder $builder): void
{
$builder->macro('withoutTenancy', function (Builder $builder) {