AsyncBroker::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 1
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace TopviewDigital\TranslationHelper\Service;
4
5
use Illuminate\Bus\Queueable;
6
use Illuminate\Contracts\Queue\ShouldQueue;
7
use Illuminate\Foundation\Bus\Dispatchable;
8
use Illuminate\Queue\InteractsWithQueue;
9
use Illuminate\Queue\SerializesModels;
10
11
class AsyncBroker implements ShouldQueue
12
{
13
    use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
0 ignored issues
show
introduced by
The trait Illuminate\Queue\SerializesModels requires some properties which are not provided by TopviewDigital\Translati...per\Service\AsyncBroker: $id, $class, $relations
Loading history...
14
15
    protected $service;
16
17
    public function __construct($service)
18
    {
19
        $this->service = $service;
20
    }
21
22
    public function handle()
23
    {
24
        if (is_object($this->service) && method_exists($this->service, 'handle')) {
25
            $this->service->handle();
26
        }
27
    }
28
}
29