replyKeyboardMarkup   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 46
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 10
c 0
b 0
f 0
dl 0
loc 46
rs 10
wmc 2

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 3 2
1
<?php
2
3
namespace BPT\types;
4
5
use stdClass;
6
7
/**
8
 * This object represents a custom keyboard with reply options (see Introduction to bots for details and
9
 * examples). Not supported in channels and for messages sent on behalf of a Telegram Business account.
10
 * @method self setKeyboard(array $value)
11
 * @method self setIs_persistent(bool $value)
12
 * @method self setResize_keyboard(bool $value)
13
 * @method self setOne_time_keyboard(bool $value)
14
 * @method self setInput_field_placeholder(string $value)
15
 * @method self setSelective(bool $value)
16
 */
17
class replyKeyboardMarkup extends types {
0 ignored issues
show
Bug introduced by
The type BPT\types\types was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
18
    /** Keep all properties which has sub properties */
19
    private const subs = ['array' => ['array' => ['keyboard' => 'BPT\types\keyboardButton']]];
20
21
    /**
22
     * Array of button rows, each represented by an Array of KeyboardButton objects
23
     * @var keyboardButton[][]
24
     */
25
    public array $keyboard;
26
27
    /**
28
     * Optional. Requests clients to always show the keyboard when the regular keyboard is hidden. Defaults to false,
29
     * in which case the custom keyboard can be hidden and opened with a keyboard icon.
30
     */
31
    public bool $is_persistent;
32
33
    /**
34
     * Optional. Requests clients to resize the keyboard vertically for optimal fit (e.g., make the keyboard smaller
35
     * if there are just two rows of buttons). Defaults to false, in which case the custom keyboard is always of the
36
     * same height as the app's standard keyboard.
37
     */
38
    public bool $resize_keyboard;
39
40
    /**
41
     * Optional. Requests clients to hide the keyboard as soon as it's been used. The keyboard will still be
42
     * available, but clients will automatically display the usual letter-keyboard in the chat - the user can press a
43
     * special button in the input field to see the custom keyboard again. Defaults to false.
44
     */
45
    public bool $one_time_keyboard;
46
47
    /** Optional. The placeholder to be shown in the input field when the keyboard is active; 1-64 characters */
48
    public string $input_field_placeholder;
49
50
    /**
51
     * Optional. Use this parameter if you want to show the keyboard to specific users only. Targets: 1) users that
52
     * are mentioned in the text of the Message object; 2) if the bot's message is a reply to a message in the same
53
     * chat and forum topic, sender of the original message.Example: A user requests to change the bot's language,
54
     * bot replies to the request with a keyboard to select the new language. Other users in the group don't see the
55
     * keyboard.
56
     */
57
    public bool $selective;
58
59
60
    public function __construct(stdClass|null $object = null) {
61
        if ($object != null) {
62
            parent::__construct($object, self::subs);
63
        }
64
    }
65
}
66