mirror of
https://github.com/archtechx/tenancy.git
synced 2025-12-12 09:54:03 +00:00
phpstan fixes
This commit is contained in:
parent
252e337ef8
commit
6b6c883234
5 changed files with 7 additions and 11 deletions
|
|
@ -28,10 +28,6 @@ parameters:
|
||||||
message: '#invalid type Laravel\\Telescope\\IncomingEntry#'
|
message: '#invalid type Laravel\\Telescope\\IncomingEntry#'
|
||||||
paths:
|
paths:
|
||||||
- src/Features/TelescopeTags.php
|
- 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#'
|
message: '#PHPDoc tag \@param has invalid value \(dynamic#'
|
||||||
paths:
|
paths:
|
||||||
|
|
|
||||||
|
|
@ -5,8 +5,8 @@ declare(strict_types=1);
|
||||||
namespace Stancl\Tenancy\Contracts;
|
namespace Stancl\Tenancy\Contracts;
|
||||||
|
|
||||||
use Exception;
|
use Exception;
|
||||||
use Spatie\Ignition\Contracts\BaseSolution;
|
use Spatie\ErrorSolutions\Contracts\BaseSolution;
|
||||||
use Spatie\Ignition\Contracts\ProvidesSolution;
|
use Spatie\ErrorSolutions\Contracts\ProvidesSolution;
|
||||||
|
|
||||||
abstract class TenantCouldNotBeIdentifiedException extends Exception implements ProvidesSolution
|
abstract class TenantCouldNotBeIdentifiedException extends Exception implements ProvidesSolution
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -52,7 +52,7 @@ class PendingScope implements Scope
|
||||||
return $builder->withoutPending();
|
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)
|
protected function addWithoutPending(Builder $builder)
|
||||||
{
|
{
|
||||||
$builder->macro('withoutPending', function (Builder $builder) {
|
$builder->macro('withoutPending', function (Builder $builder) {
|
||||||
$builder->withoutGlobalScope($this)
|
$builder->withoutGlobalScope(static::class)
|
||||||
->whereNull($builder->getModel()->getColumnForQuery('pending_since'))
|
->whereNull($builder->getModel()->getColumnForQuery('pending_since'))
|
||||||
->orWhereNull($builder->getModel()->getDataColumn());
|
->orWhereNull($builder->getModel()->getDataColumn());
|
||||||
|
|
||||||
|
|
@ -80,7 +80,7 @@ class PendingScope implements Scope
|
||||||
protected function addOnlyPending(Builder $builder)
|
protected function addOnlyPending(Builder $builder)
|
||||||
{
|
{
|
||||||
$builder->macro('onlyPending', function (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;
|
return $builder;
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,7 @@ class ParentModelScope implements Scope
|
||||||
public function extend(Builder $builder): void
|
public function extend(Builder $builder): void
|
||||||
{
|
{
|
||||||
$builder->macro('withoutParentModel', function (Builder $builder) {
|
$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
|
public function extend(Builder $builder): void
|
||||||
{
|
{
|
||||||
$builder->macro('withoutTenancy', function (Builder $builder) {
|
$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