AuthCodeMessage   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 51
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 3
eloc 11
dl 0
loc 51
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A content() 0 5 1
A autoGenerate() 0 5 1
A toArray() 0 5 1
1
<?php
2
3
namespace NotificationChannels\RayganSms;
4
5
class AuthCodeMessage
6
{
7
    /**
8
     * @var string
9
     */
10
    public $content;
11
12
    /**
13
     * @var bool
14
     */
15
    public $autoGenerate;
16
17
    /**
18
     * @var string
19
     */
20
    public $type = 'auth';
21
22
    /**
23
     * @param string $content
24
     *
25
     * @return $this
26
     */
27
    public function content($content)
28
    {
29
        $this->content = $content;
30
31
        return $this;
32
    }
33
34
    /**
35
     * @param bool $autoGenerateCode
36
     *
37
     * @return $this
38
     */
39
    public function autoGenerate($autoGenerate = true)
40
    {
41
        $this->autoGenerate = $autoGenerate;
42
43
        return $this;
44
    }
45
46
    /**
47
     * Get an array representation of the message.
48
     *
49
     * @return array
50
     */
51
    public function toArray()
52
    {
53
        return [
54
            'content'      => $this->content,
55
            'autoGenerate' => $this->autoGenerate,
56
        ];
57
    }
58
}
59