mirror of
https://github.com/archtechx/tenancy.git
synced 2025-12-12 14:14:04 +00:00
phpstan fixes
This commit is contained in:
parent
3c183e45d9
commit
f955b38e2b
12 changed files with 24 additions and 21 deletions
|
|
@ -17,9 +17,9 @@ use Stancl\Tenancy\Events\PullingPendingTenant;
|
|||
/**
|
||||
* @property ?Carbon $pending_since
|
||||
*
|
||||
* @method static static|\Illuminate\Database\Eloquent\Builder|\Illuminate\Database\Query\Builder withPending(bool $withPending = true)
|
||||
* @method static static|\Illuminate\Database\Eloquent\Builder|\Illuminate\Database\Query\Builder onlyPending()
|
||||
* @method static static|\Illuminate\Database\Eloquent\Builder|\Illuminate\Database\Query\Builder withoutPending()
|
||||
* @method static static|\Illuminate\Database\Eloquent\Builder<static>|\Illuminate\Database\Query\Builder withPending(bool $withPending = true)
|
||||
* @method static static|\Illuminate\Database\Eloquent\Builder<static>|\Illuminate\Database\Query\Builder onlyPending()
|
||||
* @method static static|\Illuminate\Database\Eloquent\Builder<static>|\Illuminate\Database\Query\Builder withoutPending()
|
||||
*/
|
||||
trait HasPending
|
||||
{
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@ use Stancl\Tenancy\Database\TenantDatabaseManagers\TenantDatabaseManager;
|
|||
/**
|
||||
* @method \Illuminate\Database\Connection database()
|
||||
* @mixin TenantDatabaseManager
|
||||
* @phpstan-require-extends TenantDatabaseManager
|
||||
*/
|
||||
trait ManagesPostgresUsers
|
||||
{
|
||||
|
|
@ -40,8 +41,6 @@ trait ManagesPostgresUsers
|
|||
|
||||
public function deleteUser(DatabaseConfig $databaseConfig): bool
|
||||
{
|
||||
/** @var TenantDatabaseManager $this */
|
||||
|
||||
// Tenant DB username
|
||||
$username = $databaseConfig->getUsername();
|
||||
|
||||
|
|
|
|||
|
|
@ -5,8 +5,12 @@ declare(strict_types=1);
|
|||
namespace Stancl\Tenancy\Database\Concerns;
|
||||
|
||||
use Closure;
|
||||
use Illuminate\Foundation\Bus\PendingDispatch;
|
||||
use Stancl\Tenancy\Contracts\Tenant;
|
||||
|
||||
/**
|
||||
* @phpstan-require-implements Tenant
|
||||
*/
|
||||
trait TenantRun
|
||||
{
|
||||
/**
|
||||
|
|
@ -16,11 +20,10 @@ trait TenantRun
|
|||
*
|
||||
* @template T
|
||||
* @param Closure(Tenant): T $callback
|
||||
* @return T
|
||||
* @return (T is PendingDispatch ? null : T)
|
||||
*/
|
||||
public function run(Closure $callback): mixed
|
||||
{
|
||||
/** @var Tenant $this */
|
||||
return tenancy()->run($this, $callback);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue