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

businessConnection   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 31
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 10
c 1
b 0
f 0
dl 0
loc 31
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
 * Describes the connection of the bot with a business account.
9
 */
10
class businessConnection 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...
11
    /** Keep all properties which has sub properties */
12
    private const subs = ['user' => 'BPT\types\user'];
13
14
    /** Unique identifier of the business connection */
15
    public string $id;
16
17
    /** Business account user that created the business connection */
18
    public user $user;
19
20
    /**
21
     * Identifier of a private chat with the user who created the business connection. This number may have more than
22
     * 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But
23
     * it has at most 52 significant bits, so a 64-bit integer or double-precision float type are safe for storing
24
     * this identifier.
25
     */
26
    public int $user_chat_id;
27
28
    /** Date the connection was established in Unix time */
29
    public int $date;
30
31
    /** True, if the bot can act on behalf of the business account in chats that were active in the last 24 hours */
32
    public bool $can_reply;
33
34
    /** True, if the connection is active */
35
    public bool $is_enabled;
36
37
38
    public function __construct(stdClass|null $object = null) {
39
        if ($object != null) {
40
            parent::__construct($object, self::subs);
41
        }
42
    }
43
}
44