Skip to content

Commit

Permalink
Add listener stubs
Browse files Browse the repository at this point in the history
  • Loading branch information
rawilk committed Apr 9, 2024
1 parent 920d6d2 commit 0f5b8fa
Show file tree
Hide file tree
Showing 4 changed files with 61 additions and 0 deletions.
17 changes: 17 additions & 0 deletions stubs/listener.queued.stub
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?php

declare(strict_types=1);

namespace {{ namespace }};

use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Queue\InteractsWithQueue;

class {{ class }} implements ShouldQueue
{
use InteractsWithQueue;

public function __invoke(object $event): void
{
}
}
12 changes: 12 additions & 0 deletions stubs/listener.stub
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?php

declare(strict_types=1);

namespace {{ namespace }};

class {{ class }}
{
public function __invoke(object $event): void
{
}
}
18 changes: 18 additions & 0 deletions stubs/listener.typed.queued.stub
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?php

declare(strict_types=1);

namespace {{ namespace }};

use {{ eventNamespace }};
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Queue\InteractsWithQueue;

class {{ class }} implements ShouldQueue
{
use InteractsWithQueue;

public function __invoke({{ event }} $event): void
{
}
}
14 changes: 14 additions & 0 deletions stubs/listener.typed.stub
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?php

declare(strict_types=1);

namespace {{ namespace }};

use {{ eventNamespace }};

class {{ class }}
{
public function __invoke({{ event }} $event): void
{
}
}

0 comments on commit 0f5b8fa

Please sign in to comment.