SmsBroadcastMessage   A
last analyzed

Complexity

Total Complexity 5

Size/Duplication

Total Lines 45
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 14
c 1
b 0
f 0
dl 0
loc 45
rs 10
wmc 5

5 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 3 1
A reference() 0 5 1
A content() 0 5 1
A delay() 0 5 1
A sender() 0 5 1
1
<?php
2
3
namespace NotificationChannels\SmsBroadcast;
4
5
class SmsBroadcastMessage
6
{
7
    /** @var string */
8
    public $content;
9
10
    /** @var string|null */
11
    public $sender = null;
12
13
    /** @var string|null */
14
    public $reference = null;
15
16
    /** @var int|null */
17
    public $delay = null;
18
19
    public function __construct(string $content = '')
20
    {
21
        $this->content = $content;
22
    }
23
24
    public function content(string $content): self
25
    {
26
        $this->content = $content;
27
28
        return $this;
29
    }
30
31
    public function sender(string $sender): self
32
    {
33
        $this->sender = $sender;
34
35
        return $this;
36
    }
37
38
    public function delay(int $delayMinutes): self
39
    {
40
        $this->delay = $delayMinutes;
41
42
        return $this;
43
    }
44
45
    public function reference(string $reference): self
46
    {
47
        $this->reference = $reference;
48
49
        return $this;
50
    }
51
}
52