mirror of
https://github.com/archtechx/tenancy.git
synced 2025-12-12 14:34:04 +00:00
phpstan fixes
This commit is contained in:
parent
252e337ef8
commit
6b6c883234
5 changed files with 7 additions and 11 deletions
|
|
@ -5,8 +5,8 @@ declare(strict_types=1);
|
|||
namespace Stancl\Tenancy\Contracts;
|
||||
|
||||
use Exception;
|
||||
use Spatie\Ignition\Contracts\BaseSolution;
|
||||
use Spatie\Ignition\Contracts\ProvidesSolution;
|
||||
use Spatie\ErrorSolutions\Contracts\BaseSolution;
|
||||
use Spatie\ErrorSolutions\Contracts\ProvidesSolution;
|
||||
|
||||
abstract class TenantCouldNotBeIdentifiedException extends Exception implements ProvidesSolution
|
||||
{
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@ class PendingScope implements Scope
|
|||
return $builder->withoutPending();
|
||||
}
|
||||
|
||||
return $builder->withoutGlobalScope($this);
|
||||
return $builder->withoutGlobalScope(static::class);
|
||||
});
|
||||
}
|
||||
|
||||
|
|
@ -64,7 +64,7 @@ class PendingScope implements Scope
|
|||
protected function addWithoutPending(Builder $builder)
|
||||
{
|
||||
$builder->macro('withoutPending', function (Builder $builder) {
|
||||
$builder->withoutGlobalScope($this)
|
||||
$builder->withoutGlobalScope(static::class)
|
||||
->whereNull($builder->getModel()->getColumnForQuery('pending_since'))
|
||||
->orWhereNull($builder->getModel()->getDataColumn());
|
||||
|
||||
|
|
@ -80,7 +80,7 @@ class PendingScope implements Scope
|
|||
protected function addOnlyPending(Builder $builder)
|
||||
{
|
||||
$builder->macro('onlyPending', function (Builder $builder) {
|
||||
$builder->withoutGlobalScope($this)->whereNotNull($builder->getModel()->getColumnForQuery('pending_since'));
|
||||
$builder->withoutGlobalScope(static::class)->whereNotNull($builder->getModel()->getColumnForQuery('pending_since'));
|
||||
|
||||
return $builder;
|
||||
});
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ class ParentModelScope implements Scope
|
|||
public function extend(Builder $builder): void
|
||||
{
|
||||
$builder->macro('withoutParentModel', function (Builder $builder) {
|
||||
return $builder->withoutGlobalScope($this);
|
||||
return $builder->withoutGlobalScope(static::class);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ class TenantScope implements Scope
|
|||
public function extend(Builder $builder): void
|
||||
{
|
||||
$builder->macro('withoutTenancy', function (Builder $builder) {
|
||||
return $builder->withoutGlobalScope($this);
|
||||
return $builder->withoutGlobalScope(static::class);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue