1 | <?php |
||
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 = '') |
|
61 | |||
62 | /** |
||
63 | * @param string $content |
||
64 | */ |
||
65 | 8 | public function __construct($content = '') |
|
69 | |||
70 | /** |
||
71 | * Set the message content. |
||
72 | * |
||
73 | * @param string $content |
||
74 | * |
||
75 | * @return $this |
||
76 | */ |
||
77 | 1 | public function content($content) |
|
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) |
|
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) |
|
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) |
||
125 | |||
126 | /** |
||
127 | * Set the voice used to read text (for voice messages only). |
||
128 | * |
||
129 | * @param string $call |
||
|
|||
130 | * |
||
131 | * @return $this |
||
132 | */ |
||
133 | public function voice($voice = null) |
||
139 | } |
||
140 |
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 methodfinale(...)
.The most likely cause is that the parameter was removed, but the annotation was not.