LaravelJobHandlerClearLogsJob   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 5
c 1
b 0
f 0
dl 0
loc 23
rs 10
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 3 1
A handle() 0 4 1
1
<?php
2
3
namespace Famdirksen\LaravelJobHandler\Jobs;
4
5
use Famdirksen\LaravelJobHandler\Http\Controllers\CrawlLogController;
6
use Illuminate\Bus\Queueable;
7
use Illuminate\Queue\SerializesModels;
8
use Illuminate\Queue\InteractsWithQueue;
9
use Illuminate\Contracts\Queue\ShouldQueue;
10
use Illuminate\Foundation\Bus\Dispatchable;
11
12
class LaravelJobHandlerClearLogsJob 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 Famdirksen\LaravelJobHan...lJobHandlerClearLogsJob: $id, $relations, $class, $keyBy
Loading history...
15
16
    /**
17
     * Create a new job instance.
18
     *
19
     * @return void
20
     */
21
    public function __construct()
22
    {
23
        $this->queue = config('laravel-job-handler.clear_log_via_job_queue', 'default');
24
    }
25
26
    /**
27
     * Execute the job.
28
     *
29
     * @return void
30
     */
31
    public function handle()
32
    {
33
        $clc = new CrawlLogController();
34
        $clc->clearAllLogs(true);
35
    }
36
}
37