1
0
Fork 0
mirror of https://github.com/archtechx/tenancy.git synced 2026-05-07 01:44:03 +00:00

phpstan fixes

This commit is contained in:
Samuel Štancl 2025-01-05 15:50:30 +01:00
parent 3c183e45d9
commit f955b38e2b
12 changed files with 24 additions and 21 deletions

View file

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