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.
Completed
Pull Request — master (#37)
by
unknown
03:33
created

SmscRuMessage::call()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 6
ccs 0
cts 3
cp 0
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
crap 2
1
<?php
2
3
namespace NotificationChannels\SmscRu;
4
5
class SmscRuMessage
6
{
7
    /**
8
     * The phone number the message should be sent from.
9
     *
10
     * @var string
11
     */
12
    public $from = '';
13
14
    /**
15
     * The message content.
16
     *
17
     * @var string
18
     */
19
    public $content = '';
20
21
    /**
22
     * Time of sending a message.
23
     *
24
     * @var \DateTimeInterface
25
     */
26
    public $sendAt;
27
28
    /**
29
     * Sign of a voice message.
30
     * When forming a voice message, you can transfer both text and attach files.
31
     * Files added to the message must be transferred using the POST method in the body of the http request.
32
     * 0 (default) is a regular message.
33
     * 1 - voice message.
34
     *
35
     * @var boolean
36
     */
37
    public $call;
38
39
    /**
40
     * Voice used to read text (for voice messages only).
41
     * m (default) - male voice.
42
     * m2 is a male alternative voice.
43
     * w is a female voice.
44
     * w2 is a female alternative voice.
45
     *
46
     * @var string
47
     */
48
    public $voice;
49
50
    /**
51
     * Create a new message instance.
52
     *
53
     * @param  string $content
54
     *
55
     * @return static
56
     */
57 4
    public static function create($content = '')
58
    {
59 4
        return new static($content);
60
    }
61
62
    /**
63
     * @param  string  $content
64
     */
65 8
    public function __construct($content = '')
66
    {
67 8
        $this->content = $content;
68 8
    }
69
70
    /**
71
     * Set the message content.
72
     *
73
     * @param  string  $content
74
     *
75
     * @return $this
76
     */
77 1
    public function content($content)
78
    {
79 1
        $this->content = $content;
80
81 1
        return $this;
82
    }
83
84
    /**
85
     * Set the phone number or sender name the message should be sent from.
86
     *
87
     * @param  string  $from
88
     *
89
     * @return $this
90
     */
91 4
    public function from($from)
92
    {
93 4
        $this->from = $from;
94
95 4
        return $this;
96
    }
97
98
    /**
99
     * Set the time the message should be sent.
100
     *
101
     * @param  \DateTimeInterface|null  $sendAt
102
     *
103
     * @return $this
104
     */
105 2
    public function sendAt(\DateTimeInterface $sendAt = null)
106
    {
107 2
        $this->sendAt = $sendAt;
108
109 2
        return $this;
110
    }
111
112
    /**
113
     * Set the sign of a voice message.
114
     *
115
     * @param  boolean|null  $call
116
     *
117
     * @return $this
118
     */
119
    public function call($call = null)
120
    {
121
        $this->call = filter_var($call, FILTER_VALIDATE_BOOLEAN);
122
123
        return $this;
124
    }
125
126
    /**
127
     * Set the voice used to read text (for voice messages only).
128
     *
129
     * @param  string  $call
0 ignored issues
show
Bug introduced by
There is no parameter named $call. Was it maybe removed?

This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.

Consider the following example. The parameter $italy is not defined by the method finale(...).

/**
 * @param array $germany
 * @param array $island
 * @param array $italy
 */
function finale($germany, $island) {
    return "2:1";
}

The most likely cause is that the parameter was removed, but the annotation was not.

Loading history...
130
     *
131
     * @return $this
132
     */
133
    public function voice($voice = null)
134
    {
135
        $this->voice = $voice;
136
137
        return $this;
138
    }
139
}
140