ProcessImage   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 31
Duplicated Lines 0 %

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 3 1
A handle() 0 3 1
1
<?php
2
3
namespace Innoflash\Events\Jobs\Saved;
4
5
use FaithGen\SDK\Traits\ProcessesImages;
6
use Illuminate\Bus\Queueable;
7
use Illuminate\Contracts\Queue\ShouldQueue;
8
use Illuminate\Foundation\Bus\Dispatchable;
9
use Illuminate\Queue\InteractsWithQueue;
10
use Illuminate\Queue\SerializesModels;
11
use Innoflash\Events\Models\Event;
12
use Intervention\Image\ImageManager;
13
14
class ProcessImage implements ShouldQueue
15
{
16
    use Dispatchable,
0 ignored issues
show
introduced by
The trait FaithGen\SDK\Traits\ProcessesImages requires some properties which are not provided by Innoflash\Events\Jobs\Saved\ProcessImage: $name, $images
Loading history...
introduced by
The trait Illuminate\Queue\SerializesModels requires some properties which are not provided by Innoflash\Events\Jobs\Saved\ProcessImage: $id, $relations, $class, $keyBy
Loading history...
17
        InteractsWithQueue,
18
        Queueable,
19
        SerializesModels,
20
        ProcessesImages;
21
22
    public bool $deleteWhenMissingModels = true;
23
    protected Event $event;
24
25
    /**
26
     * Create a new job instance.
27
     *
28
     * @param Event $event
29
     */
30
    public function __construct(Event $event)
31
    {
32
        $this->event = $event;
33
    }
34
35
    /**
36
     * Execute the job.
37
     *
38
     * @param ImageManager $imageManager
39
     *
40
     * @return void
41
     */
42
    public function handle(ImageManager $imageManager)
43
    {
44
        $this->processImage($imageManager, $this->event);
45
    }
46
}
47