1
0
Fork 0
mirror of https://github.com/archtechx/tenancy.git synced 2025-12-12 07:04:03 +00:00

phpstan fixes

This commit is contained in:
Samuel Štancl 2024-07-04 20:48:55 +02:00
parent 252e337ef8
commit 6b6c883234
5 changed files with 7 additions and 11 deletions

View file

@ -28,10 +28,6 @@ parameters:
message: '#invalid type Laravel\\Telescope\\IncomingEntry#'
paths:
- src/Features/TelescopeTags.php
-
message: '#Parameter \#1 \$key of method Illuminate\\Cache\\Repository::put\(\) expects#'
paths:
- src/helpers.php
-
message: '#PHPDoc tag \@param has invalid value \(dynamic#'
paths:

View file

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

View file

@ -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;
});

View file

@ -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);
});
}
}

View file

@ -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);
});
}
}