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

S3Upload::handle()   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 0
1
<?php
2
3
namespace Faithgen\Testimonies\Jobs;
4
5
use FaithGen\SDK\Traits\SavesToAmazonS3;
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
13
final class S3Upload implements ShouldQueue
14
{
15
    use Dispatchable,
16
        InteractsWithQueue,
17
        Queueable,
18
        SerializesModels,
19
        SavesToAmazonS3;
20
    /**
21
     * @var Testimony
22
     */
23
    private Testimony $testimony;
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...
24
25
    public bool $deleteWhenMissingModels = true;
26
27
    /**
28
     * Create a new job instance.
29
     *
30
     * @param Testimony $testimony
31
     */
32
    public function __construct(Testimony $testimony)
33
    {
34
        $this->testimony = $testimony;
35
    }
36
37
    /**
38
     * Execute the job.
39
     *
40
     * @return void
41
     */
42
    public function handle()
43
    {
44
        $this->saveFiles($this->testimony);
45
    }
46
}
47