Passed
Push — main ( 23165f...4af278 )
by Miaad
01:25
created

keyboardButton   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 37
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 1
eloc 8
dl 0
loc 37
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 2 1
1
<?php
2
3
namespace BPT\types;
4
5
use stdClass;
6
7
/**
8
 * This object represents one button of the reply keyboard. For simple text buttons String can be used instead of
9
 * this object to specify text of the button. Optional fields web_app, request_contact, request_location, and
10
 * request_poll are mutually exclusive.
11
 */
12
class keyboardButton 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...
13
	/** Keep all of properties which has sub properties */
14
	private const subs = ['request_poll' => 'BPT\types\keyboardButtonPollType', 'web_app' => 'BPT\types\webAppInfo'];
15
16
	/**
17
	 * Text of the button. If none of the optional fields are used, it will be sent as a message when the button is
18
	 * pressed
19
	 */
20
	public string $text;
21
22
	/**
23
	 * Optional. If True, the user's phone number will be sent as a contact when the button is pressed. Available in
24
	 * private chats only.
25
	 */
26
	public bool $request_contact;
27
28
	/**
29
	 * Optional. If True, the user's current location will be sent when the button is pressed. Available in private
30
	 * chats only.
31
	 */
32
	public bool $request_location;
33
34
	/**
35
	 * Optional. If specified, the user will be asked to create a poll and send it to the bot when the button is
36
	 * pressed. Available in private chats only.
37
	 */
38
	public keyboardButtonPollType $request_poll;
39
40
	/**
41
	 * Optional. If specified, the described Web App will be launched when the button is pressed. The Web App will be
42
	 * able to send a “web_app_data” service message. Available in private chats only.
43
	 */
44
	public webAppInfo $web_app;
0 ignored issues
show
Bug introduced by
The type BPT\types\webAppInfo 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...
45
46
47
	public function __construct(stdClass $update) {
48
		parent::__construct($update, self::subs);
49
	}
50
}
51