Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
0.00% |
0 / 2 |
|
0.00% |
0 / 2 |
CRAP | |
0.00% |
0 / 1 |
| DeleteInstancyGroupEventListener | |
0.00% |
0 / 2 |
|
0.00% |
0 / 2 |
6 | |
0.00% |
0 / 1 |
| __construct | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| handle | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| 1 | <?php |
| 2 | |
| 3 | namespace App\Listeners; |
| 4 | |
| 5 | use App\Events\DeleteInstancyGroup; |
| 6 | use App\Http\Repositories\InstancyRepository; |
| 7 | use Illuminate\Contracts\Queue\ShouldQueue; |
| 8 | use Illuminate\Support\Facades\Log; |
| 9 | |
| 10 | class DeleteInstancyGroupEventListener implements ShouldQueue |
| 11 | { |
| 12 | protected $instancyRepository; |
| 13 | |
| 14 | /** |
| 15 | * Create the event listener. |
| 16 | */ |
| 17 | public function __construct(InstancyRepository $instancyRepository) |
| 18 | { |
| 19 | $this->instancyRepository = $instancyRepository; |
| 20 | } |
| 21 | |
| 22 | /** |
| 23 | * Handle the event. |
| 24 | */ |
| 25 | public function handle(DeleteInstancyGroup $event) |
| 26 | { |
| 27 | // log the event |
| 28 | $this->instancyRepository->deleteGroup($event->groupInstancyId); |
| 29 | } |
| 30 | } |