WriteSystemLog::handle()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
cc 1
eloc 1
c 1
b 0
f 1
nc 1
nop 0
dl 0
loc 3
rs 10
1
<?php
2
3
namespace App\Jobs;
4
5
use Illuminate\Bus\Queueable;
6
use Illuminate\Queue\SerializesModels;
7
use Illuminate\Queue\InteractsWithQueue;
8
use Illuminate\Contracts\Queue\ShouldQueue;
9
use Illuminate\Foundation\Bus\Dispatchable;
10
use App\Repository\Admin\LogRepository;
11
12
class WriteSystemLog implements ShouldQueue
13
{
14
    use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
0 ignored issues
show
introduced by
The trait Illuminate\Queue\SerializesModels requires some properties which are not provided by App\Jobs\WriteSystemLog: $id, $relations, $class, $keyBy
Loading history...
15
16
    private $data;
17
18
    /**
19
     * Create a new job instance.
20
     *
21
     * @return void
22
     */
23
    public function __construct(array $data)
24
    {
25
        $this->data = $data;
26
    }
27
28
    /**
29
     * Execute the job.
30
     *
31
     * @return void
32
     */
33
    public function handle()
34
    {
35
        LogRepository::add($this->data);
36
    }
37
}
38