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

TotalVoiceMessageOptions   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 58
Duplicated Lines 0 %

Coupling/Cohesion

Components 3
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 3
lcom 3
cbo 0
dl 0
loc 58
ccs 9
cts 9
cp 1
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A fakeNumber() 0 6 1
A recordAudio() 0 6 1
A detectCallbox() 0 6 1
1
<?php
2
3
namespace NotificationChannels\TotalVoice;
4
5
trait TotalVoiceMessageOptions
6
{
7
    /**
8
     * @var null|string
9
     */
10
    public $fake_number = null;
11
12
    /**
13
     * @var bool
14
     */
15
    public $record_audio = false;
16
17
    /**
18
     * @var bool
19
     */
20
    public $detect_callbox = false;
21
22
    /**
23
     * Define o número de telefone que aparecerá no identificador
24
     * de quem receber a chamada, formato DDD + Número exemplo: 4832830151.
25
     *
26
     * @param $fake_number
27
     * @return $this
28
     */
29 2
    public function fakeNumber($fake_number)
30
    {
31 2
        $this->fake_number = $fake_number;
32
33 2
        return $this;
34
    }
35
36
    /**
37
     * Define se vai gravar a chamada.
38
     *
39
     * @param bool $record_audio
40
     * @return $this
41
     */
42 2
    public function recordAudio($record_audio)
43
    {
44 2
        $this->record_audio = $record_audio;
45
46 2
        return $this;
47
    }
48
49
    /**
50
     * Define se vai desconectar em caso de cair na caixa postal
51
     * (vivo, claro, tim e oi).
52
     *
53
     * @param bool $detect_callbox
54
     * @return $this
55
     */
56 2
    public function detectCallbox($detect_callbox)
57
    {
58 2
        $this->detect_callbox = $detect_callbox;
59
60 2
        return $this;
61
    }
62
}
63