GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.

EngageSparkMessage::recipient_type()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 6
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
1
<?php
2
3
namespace LBHurtado\EngageSpark;
4
5
use Illuminate\Support\Str;
6
7
class EngageSparkMessage
8
{
9
    /**
10
     * The mode.
11
     *
12
     * @var string
13
     */
14
    public $mode = 'sms'; //sms or topup
15
16
    /**
17
     * The air_time.
18
     *
19
     * @var double
20
     */
21
    public $air_time = 0;
22
23
    /**
24
     * The phone number the message should be sent from.
25
     *
26
     * @var string
27
     */
28
    public $from = '';
29
30
    /**
31
     * The recipient type.
32
     *
33
     * @var string
34
     */
35
    public $recipient_type = 'mobile_number'; //mobile_number or contact_id
36
37
    /**
38
     * The message content.
39
     *
40
     * @var string
41
     */
42
    public $content;
43
44
    /**
45
     * The sender id.
46
     *
47
     * @var string
48
     */
49
    public $sender_id;
50
51
52
    /**
53
     * Create a message object.
54
     * @param string $content
55
     * @return static
56
     */
57
    public static function create($content = '')
58
    {
59
        return new static($content);
60
    }
61
62
    /**
63
     * Create a new message instance.
64
     *
65
     * @param  string $content
66
     */
67
    public function __construct($content = '')
68
    {
69
        $this->content = $content;
70
    }
71
72
    public function mode($mode)
73
    {
74
        $this->mode = $mode;
75
76
        return $this;
77
    }
78
79
    public function transfer($amount)
80
    {
81
        $this->air_time = $amount;
82
83
        return $this;
84
    }
85
86
    /**
87
     * Set the message content.
88
     *
89
     * @param  string $content
90
     * @return $this
91
     */
92
    public function content($content)
93
    {
94
        $this->content = $content;
95
96
        return $this;
97
    }
98
99
    /**
100
     * Set the phone number or sender name the message should be sent from.
101
     *
102
     * @param  string  $from
103
     *
104
     * @return $this
105
     */
106
    public function from($from)
107
    {
108
        $this->from = $from;
109
110
        return $this;
111
    }
112
113
    public function recipient_type($recipient_type)
114
    {
115
        $this->recipient_type = $recipient_type;
116
117
        return $this;
118
    }
119
120
    public function sender_id($sender_id)
121
    {
122
        $this->sender_id = $sender_id;
123
124
        return $this;
125
    }
126
127
    public function generateClientReference()
128
    {
129
        return Str::random(12);
130
    }
131
}
132