AsyncBroker   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 6
dl 0
loc 15
rs 10
c 0
b 0
f 0
wmc 4

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 3 1
A handle() 0 4 3
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