Passed
Push — main ( 36dc31...e0778d )
by Miaad
10:46
created

keyboardButtonRequestUser   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 29
Duplicated Lines 0 %

Importance

Changes 2
Bugs 0 Features 1
Metric Value
eloc 8
c 2
b 0
f 1
dl 0
loc 29
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 suitable users. The identifiers of the selected users will be
9
 * shared with the bot when the corresponding button is pressed. More about requesting users »
10
 *
11
 * @method self setRequest_id(int $value)
12
 * @method self setUser_is_bot(bool $value)
13
 * @method self setUser_is_premium(bool $value)
14
 * @method self setMax_quantity(int $value)
15
 *
16
 * @deprecated use keyboardButtonRequestUsers instead
17
 */
18
class keyboardButtonRequestUser 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...
19
    /** Keep all properties which has sub properties */
20
    private const subs = [];
21
22
    /**
23
     * Signed 32-bit identifier of the request that will be received back in the UsersShared object. Must be unique
24
     * within the message
25
     */
26
    public int $request_id;
27
28
    /**
29
     * Optional. Pass True to request bots, pass False to request regular users. If not specified, no additional
30
     * restrictions are applied.
31
     */
32
    public bool $user_is_bot;
33
34
    /**
35
     * Optional. Pass True to request premium users, pass False to request non-premium users. If not specified, no
36
     * additional restrictions are applied.
37
     */
38
    public bool $user_is_premium;
39
40
    /** Optional. The maximum number of users to be selected; 1-10. Defaults to 1. */
41
    public int $max_quantity;
42
43
44
    public function __construct(stdClass|null $object = null) {
45
        if ($object != null) {
46
            parent::__construct($object, self::subs);
47
        }
48
    }
49
}
50