This commit is contained in:
philipp lang 2022-02-12 15:35:58 +01:00
parent 5632ed60e2
commit 09e8ab1bcc
3 changed files with 12 additions and 12 deletions

View File

@ -7,9 +7,7 @@ use Zoomyboy\LaravelNami\NamiUser;
class Initializer {
public $user;
public static $initializers = [
public static array $initializers = [
InitializeNationalities::class,
InitializeFees::class,
InitializeConfessions::class,
@ -21,7 +19,7 @@ class Initializer {
InitializeMembers::class,
];
public function run(NamiUser $namiUser) {
public function run(NamiUser $namiUser): void {
foreach (static::$initializers as $initializer) {
(new $initializer($namiUser->api()))->handle($namiUser);
}

View File

@ -12,16 +12,17 @@ use Illuminate\Foundation\Bus\Dispatchable;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Queue\SerializesModels;
use Zoomyboy\LaravelNami\Nami;
use Zoomyboy\LaravelNami\NamiUser;
class CreateJob implements ShouldQueue
{
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
public $memberId;
public $member;
public $user;
public int $memberId;
public Member $member;
public NamiUser $user;
public function __construct(Member $member, $user)
public function __construct(Member $member, NamiUser $user)
{
$this->memberId = $member->id;
$this->user = $user;

View File

@ -9,16 +9,17 @@ use Illuminate\Foundation\Bus\Dispatchable;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Queue\SerializesModels;
use Zoomyboy\LaravelNami\Nami;
use Zoomyboy\LaravelNami\NamiUser;
class DeleteJob implements ShouldQueue
{
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
public $memberId;
public $member;
public $user;
public int $memberId;
public Member $member;
public NamiUser $user;
public function __construct(Member $member, $user)
public function __construct(Member $member, NamiUser $user)
{
$this->memberId = $member->id;
$this->user = $user;