S3Upload   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 29
Duplicated Lines 0 %

Importance

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

2 Methods

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