Button   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Test Coverage

Coverage 0%

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A setText() 0 6 1
1
<?php
2
namespace Telegram\Bot\Keyboard;
3
4
/**
5
 * Class Button
6
 *
7
 * @method $this setRequestContact($boolean)    Optional. If True, the user's phone number will be sent as a contact when the button is pressed. Available in private chats only.
8
 * @method $this setRequestLocation($boolean)   Optional. If True, the user's current location will be sent when the button is pressed. Available in private chats only.
9
 *
10
 * @method $this setUrl($string)                (Inline Button Only) Optional. HTTP url to be opened when button is pressed.
11
 * @method $this setCallbackData($string)       (Inline Button Only) Optional. Data to be sent in a callback query to the bot when button is pressed.
12
 * @method $this setSwitchInlineQuery($string)  (Inline Button Only) Optional. If set, pressing the button will prompt the user to select one of their chats, open that chat and insert the bot‘s username and the specified inline query in the input field. Can be empty, in which case just the bot’s username will be inserted.
13
 */
14
class Button extends Base
15
{
16
    /**
17
     * Button Label Text
18
     *
19
     * @param string $text
20
     *
21
     * @return $this
22
     */
23
    public function setText($text)
24
    {
25
        $this->items['text'] = $text;
26
27
        return $this;
28
    }
29
}
30