mirror of
https://github.com/archtechx/tenancy.git
synced 2025-12-13 21:34:04 +00:00
phpstan fixes
This commit is contained in:
parent
3c183e45d9
commit
f955b38e2b
12 changed files with 24 additions and 21 deletions
|
|
@ -7,6 +7,7 @@ namespace Stancl\Tenancy;
|
|||
use Closure;
|
||||
use Illuminate\Database\Eloquent\Builder;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Foundation\Bus\PendingDispatch;
|
||||
use Illuminate\Support\Traits\Macroable;
|
||||
use Stancl\Tenancy\Concerns\DealsWithRouteContexts;
|
||||
use Stancl\Tenancy\Concerns\ManagesRLSPolicies;
|
||||
|
|
@ -71,7 +72,7 @@ class Tenancy
|
|||
*
|
||||
* @template T
|
||||
* @param Closure(Tenant): T $callback
|
||||
* @return T
|
||||
* @return (T is PendingDispatch ? null : T)
|
||||
*/
|
||||
public function run(Tenant $tenant, Closure $callback): mixed
|
||||
{
|
||||
|
|
@ -80,7 +81,7 @@ class Tenancy
|
|||
$this->initialize($tenant);
|
||||
$result = $callback($tenant);
|
||||
|
||||
if ($result instanceof \Illuminate\Foundation\Bus\PendingDispatch) { // #1277
|
||||
if ($result instanceof PendingDispatch) { // #1277
|
||||
$result = null;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue