Passed
Push — master ( 65bfad...7e7f23 )
by Chris
14:13
created

InvalidateCache   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 5
c 1
b 0
f 0
dl 0
loc 24
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 Meema\CloudFront\Jobs;
4
5
use Illuminate\Bus\Queueable;
6
use Illuminate\Contracts\Queue\ShouldQueue;
7
use Illuminate\Foundation\Bus\Dispatchable;
8
use Illuminate\Queue\InteractsWithQueue;
9
use Illuminate\Queue\SerializesModels;
10
use Meema\CloudFront\Facades\CloudFront;
11
12
class InvalidateCache 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 Meema\CloudFront\Jobs\InvalidateCache: $id, $relations, $class, $keyBy
Loading history...
15
16
    private $paths;
17
18
    /**
19
     * Create a new job instance.
20
     *
21
     * @param string|array $paths
22
     */
23
    public function __construct($paths)
24
    {
25
        $this->paths = $paths;
26
    }
27
28
    /**
29
     * Execute the job.
30
     *
31
     * @return void
32
     */
33
    public function handle()
34
    {
35
        CloudFront::invalidate($this->paths);
36
    }
37
}
38