Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
0.00% |
0 / 3 |
|
0.00% |
0 / 2 |
CRAP | |
0.00% |
0 / 1 |
| CloneShortcuts | |
0.00% |
0 / 3 |
|
0.00% |
0 / 2 |
6 | |
0.00% |
0 / 1 |
| __construct | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| handle | |
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
2 | |||
| 1 | <?php |
| 2 | |
| 3 | namespace App\Listeners\User; |
| 4 | |
| 5 | use App\Events\User\FlyShareLinkGenerated; |
| 6 | use App\Http\Services\FlyShareService; |
| 7 | use Illuminate\Contracts\Queue\ShouldQueue; |
| 8 | |
| 9 | class CloneShortcuts implements ShouldQueue |
| 10 | { |
| 11 | /** |
| 12 | * The flyshare service implementation. |
| 13 | * |
| 14 | * @var FlyShareService |
| 15 | */ |
| 16 | protected $flyshareService; |
| 17 | |
| 18 | /** |
| 19 | * Create the event listener. |
| 20 | * |
| 21 | * @return void |
| 22 | */ |
| 23 | public function __construct(FlyShareService $flyshareService) |
| 24 | { |
| 25 | $this->flyshareService = $flyshareService; |
| 26 | } |
| 27 | |
| 28 | /** |
| 29 | * Handle the event. |
| 30 | */ |
| 31 | public function handle(FlyShareLinkGenerated $event): void |
| 32 | { |
| 33 | $flyshare = $event->flyshare; |
| 34 | |
| 35 | $this->flyshareService->cloneShortcuts($flyshare->shortcut_ids, $flyshare->_id); |
| 36 | } |
| 37 | } |