Completed
Push — master ( 107204...169de4 )
by Innocent
13:28
created

ProcessImages::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
1
<?php
2
3
namespace Faithgen\Testimonies\Jobs;
4
5
use FaithGen\SDK\Traits\ProcessesImages;
6
use Faithgen\Testimonies\Models\Testimony;
7
use Illuminate\Bus\Queueable;
8
use Illuminate\Contracts\Queue\ShouldQueue;
9
use Illuminate\Foundation\Bus\Dispatchable;
10
use Illuminate\Queue\InteractsWithQueue;
11
use Illuminate\Queue\SerializesModels;
12
use Intervention\Image\ImageManager;
13
14
final class ProcessImages implements ShouldQueue
15
{
16
    use Dispatchable,
17
        InteractsWithQueue,
18
        Queueable,
19
        SerializesModels,
20
        ProcessesImages;
21
22
    public bool $deleteWhenMissingModels = true;
0 ignored issues
show
Bug introduced by
This code did not parse for me. Apparently, there is an error somewhere around this line:

Syntax error, unexpected T_STRING, expecting T_FUNCTION or T_CONST
Loading history...
23
24
    /**
25
     * The testimony to process images for.
26
     *
27
     * @var Testimony
28
     */
29
    protected Testimony $testimony;
30
31
    /**
32
     * Create a new job instance.
33
     *
34
     * @param Testimony $testimony
35
     */
36
    public function __construct(Testimony $testimony)
37
    {
38
        $this->testimony = $testimony;
39
    }
40
41
    /**
42
     * Execute the job.
43
     *
44
     * @param ImageManager $imageManager
45
     *
46
     * @return void
47
     */
48
    public function handle(ImageManager $imageManager)
49
    {
50
        $this->processImage($imageManager, $this->testimony);
51
    }
52
}
53