mirror of
https://github.com/archtechx/tenancy.git
synced 2025-12-15 05:24:04 +00:00
phpstan improvements
This commit is contained in:
parent
87212e5390
commit
d463e2da61
10 changed files with 18 additions and 27 deletions
|
|
@ -24,7 +24,7 @@ class CreateDatabase implements ShouldQueue
|
|||
) {
|
||||
}
|
||||
|
||||
public function handle(DatabaseManager $databaseManager)
|
||||
public function handle(DatabaseManager $databaseManager): bool
|
||||
{
|
||||
event(new CreatingDatabase($this->tenant));
|
||||
|
||||
|
|
@ -38,5 +38,7 @@ class CreateDatabase implements ShouldQueue
|
|||
$this->tenant->database()->manager()->createDatabase($this->tenant);
|
||||
|
||||
event(new DatabaseCreated($this->tenant));
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -16,24 +16,11 @@ class CreateStorageSymlinks implements ShouldQueue
|
|||
{
|
||||
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
|
||||
|
||||
public Tenant $tenant;
|
||||
public function __construct(
|
||||
public Tenant $tenant,
|
||||
) {}
|
||||
|
||||
/**
|
||||
* Create a new job instance.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function __construct(Tenant $tenant)
|
||||
{
|
||||
$this->tenant = $tenant;
|
||||
}
|
||||
|
||||
/**
|
||||
* Execute the job.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function handle()
|
||||
public function handle(): void
|
||||
{
|
||||
CreateStorageSymlinksAction::handle($this->tenant);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,14 +9,12 @@ use Illuminate\Database\Eloquent\Model;
|
|||
use Illuminate\Foundation\Bus\Dispatchable;
|
||||
use Illuminate\Queue\InteractsWithQueue;
|
||||
use Illuminate\Queue\SerializesModels;
|
||||
use Stancl\Tenancy\Database\Concerns\HasDomains;
|
||||
use Stancl\Tenancy\Database\Contracts\TenantWithDatabase;
|
||||
|
||||
class DeleteDomains
|
||||
{
|
||||
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
|
||||
|
||||
/** @var TenantWithDatabase&Model&HasDomains */ // todo unresolvable type for phpstan
|
||||
protected TenantWithDatabase&Model $tenant;
|
||||
|
||||
public function __construct(TenantWithDatabase&Model $tenant)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue