Completed
Push — master ( 0cdd35...cbf418 )
by Rafael
03:53 queued 02:54
created

TotalVoiceMessage   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 73
Duplicated Lines 0 %

Coupling/Cohesion

Components 2
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 5
lcom 2
cbo 0
dl 0
loc 73
ccs 13
cts 13
cp 1
rs 10
c 0
b 0
f 0

5 Methods

Rating   Name   Duplication   Size   Complexity  
A create() 0 4 1
A __construct() 0 4 1
A content() 0 6 1
A provideFeedback() 0 6 1
A getProvideFeedback() 0 4 1
1
<?php
2
3
namespace NotificationChannels\TotalVoice;
4
5
abstract class TotalVoiceMessage
6
{
7
    /**
8
     * The message content.
9
     *
10
     * @var string
11
     */
12
    public $content;
13
14
    /**
15
     * Aguardar uma resposta do destinatário.
16
     *
17
     * @var bool
18
     */
19
    public $provide_feedback = false;
20
21
    /**
22
     * Create a message object.
23
     *
24
     * @param string $content
25
     * @return static
26
     */
27 7
    public static function create($content = '')
28
    {
29 7
        return new static($content);
30
    }
31
32
    /**
33
     * Create a new message instance.
34
     *
35
     * @param  string $content
36
     */
37 19
    public function __construct($content = '')
38
    {
39 19
        $this->content = $content;
40 19
    }
41
42
    /**
43
     * Set the message content.
44
     *
45
     * @param string $content
46
     * @return $this
47
     */
48 3
    public function content($content)
49
    {
50 3
        $this->content = $content;
51
52 3
        return $this;
53
    }
54
55
    /**
56
     * Set the provide feedback option.
57
     *
58
     * @param bool $provideFeedback
59
     * @return $this
60
     */
61 12
    public function provideFeedback($provideFeedback)
62
    {
63 12
        $this->provide_feedback = $provideFeedback;
64
65 12
        return $this;
66
    }
67
68
    /**
69
     * Get the provide feedback option.
70
     *
71
     * @return null|bool
72
     */
73 3
    public function getProvideFeedback()
74
    {
75 3
        return $this->provide_feedback;
76
    }
77
}
78