1
0
Fork 0
mirror of https://github.com/archtechx/tenancy.git synced 2025-12-12 17:24:03 +00:00

get down to 59 phpstan errors

This commit is contained in:
Samuel Štancl 2022-09-29 22:20:55 +02:00
parent 193e044777
commit a94227a19c
26 changed files with 130 additions and 130 deletions

View file

@ -4,21 +4,21 @@ declare(strict_types=1);
namespace Stancl\Tenancy\Listeners;
use Stancl\Tenancy\Database\Contracts\TenantWithDatabase;
use Stancl\Tenancy\Database\DatabaseManager;
use Stancl\Tenancy\Events\Contracts\TenantEvent;
class CreateTenantConnection
{
/** @var DatabaseManager */
protected $database;
public function __construct(DatabaseManager $database)
{
$this->database = $database;
}
public function __construct(
protected DatabaseManager $database,
) {}
public function handle(TenantEvent $event): void
{
$this->database->createTenantConnection($event->tenant);
/** @var TenantWithDatabase */
$tenant = $event->tenant;
$this->database->createTenantConnection($tenant);
}
}

View file

@ -13,7 +13,7 @@ abstract class QueueableListener implements ShouldQueue
{
public static bool $shouldQueue = false;
public function shouldQueue($event): bool
public function shouldQueue(object $event): bool
{
if (static::$shouldQueue) {
return true;