Passed
Push — main ( 104144...d23e8a )
by Miaad
10:23
created

keyboardButtonRequestChat   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 51
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 14
c 1
b 0
f 0
dl 0
loc 51
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 defines the criteria used to request a suitable chat. The identifier of the selected chat will be
9
 * shared with the bot when the corresponding button is pressed.
10
 */
11
class keyboardButtonRequestChat 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...
12
    /** Keep all of properties which has sub properties */
13
    private const subs = [
14
        'user_administrator_rights' => 'BPT\types\chatAdministratorRights',
15
        'bot_administrator_rights' => 'BPT\types\chatAdministratorRights',
16
    ];
17
18
    /** Signed 32-bit identifier of the request */
19
    public int $request_id;
20
21
    /** Pass True to request a channel chat, pass False to request a group or a supergroup chat. */
22
    public bool $chat_is_channel;
23
24
    /**
25
     * Optional. Pass True to request a forum supergroup, pass False to request a non-forum chat. If not specified,
26
     * no additional restrictions are applied.
27
     */
28
    public bool $chat_is_forum;
29
30
    /**
31
     * Optional. Pass True to request a supergroup or a channel with a username, pass False to request a chat without
32
     * a username. If not specified, no additional restrictions are applied.
33
     */
34
    public bool $chat_has_username;
35
36
    /** Optional. Pass True to request a chat owned by the user. Otherwise, no additional restrictions are applied. */
37
    public bool $chat_is_created;
38
39
    /**
40
     * Optional. A JSON-serialized object listing the required administrator rights of the user in the chat. If not
41
     * specified, no additional restrictions are applied.
42
     */
43
    public chatAdministratorRights $user_administrator_rights;
44
45
    /**
46
     * Optional. A JSON-serialized object listing the required administrator rights of the bot in the chat. The
47
     * rights must be a subset of user_administrator_rights. If not specified, no additional restrictions are
48
     * applied.
49
     */
50
    public chatAdministratorRights $bot_administrator_rights;
51
52
    /**
53
     * Optional. Pass True to request a chat with the bot as a member. Otherwise, no additional restrictions are
54
     * applied.
55
     */
56
    public bool $bot_is_member;
57
58
59
    public function __construct(stdClass|null $object = null) {
60
        if ($object != null) {
61
            parent::__construct($object, self::subs);
62
        }
63
    }
64
}
65