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

sharedUser   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 32
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 9
c 1
b 0
f 0
dl 0
loc 32
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 contains information about a user that was shared with the bot using a KeyboardButtonRequestUsers
9
 * button.
10
 */
11
class sharedUser 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 properties which has sub properties */
13
    private const subs = ['array' => ['photo' => 'BPT\types\photoSize']];
14
15
    /**
16
     * Identifier of the shared user. This number may have more than 32 significant bits and some programming
17
     * languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so
18
     * 64-bit integers or double-precision float types are safe for storing these identifiers. The bot may not have
19
     * access to the user and could be unable to use this identifier, unless the user is already known to the bot by
20
     * some other means.
21
     */
22
    public int $user_id;
23
24
    /** Optional. First name of the user, if the name was requested by the bot */
25
    public null|string $first_name = null;
26
27
    /** Optional. Last name of the user, if the name was requested by the bot */
28
    public null|string $last_name = null;
29
30
    /** Optional. Username of the user, if the username was requested by the bot */
31
    public null|string $username = null;
32
33
    /**
34
     * Optional. Available sizes of the chat photo, if the photo was requested by the bot
35
     * @var photoSize[]
36
     */
37
    public null|array $photo = null;
38
39
40
    public function __construct(stdClass|null $object = null) {
41
        if ($object != null) {
42
            parent::__construct($object, self::subs);
43
        }
44
    }
45
}
46