SqsFifoQueueable   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 52
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 8
c 1
b 0
f 0
dl 0
loc 52
ccs 8
cts 8
cp 1
rs 10
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A withDeduplicator() 0 5 1
A withoutDeduplicator() 0 3 1
A onMessageGroup() 0 5 1
1
<?php
2
3
namespace ShiftOneLabs\LaravelSqsFifoQueue\Bus;
4
5
trait SqsFifoQueueable
6
{
7
    /**
8
     * The message group id the job should be sent to.
9
     *
10
     * @var string
11
     */
12
    public $messageGroupId;
13
14
    /**
15
     * The deduplication method to use for the job.
16
     *
17
     * @var string
18
     */
19
    public $deduplicator;
20
21
    /**
22
     * Set the desired message group id for the job.
23
     *
24
     * @param  string  $messageGroupId
25
     *
26
     * @return $this
27
     */
28 36
    public function onMessageGroup($messageGroupId)
29
    {
30 36
        $this->messageGroupId = $messageGroupId;
31
32 36
        return $this;
33
    }
34
35
    /**
36
     * Set the desired deduplication method for the job.
37
     *
38
     * @param  string  $deduplicator
39
     *
40
     * @return $this
41
     */
42 54
    public function withDeduplicator($deduplicator)
43
    {
44 54
        $this->deduplicator = $deduplicator;
45
46 54
        return $this;
47
    }
48
49
    /**
50
     * Remove the deduplication method from the job.
51
     *
52
     * @return $this
53
     */
54 18
    public function withoutDeduplicator()
55
    {
56 18
        return $this->withDeduplicator('');
57
    }
58
}
59