webhookInfo   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 44
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 13
c 1
b 0
f 0
dl 0
loc 44
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 current status of a webhook.
9
 */
10
class webhookInfo 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 of properties which has sub properties */
12
    private const subs = [];
13
14
    /** Webhook URL, may be empty if webhook is not set up */
15
    public string $url = '';
16
17
    /** True, if a custom certificate was provided for webhook certificate checks */
18
    public null|bool $has_custom_certificate = null;
19
20
    /** Number of updates awaiting delivery */
21
    public int $pending_update_count;
22
23
    /** Optional. Currently used webhook IP address */
24
    public null|string $ip_address = null;
25
26
    /** Optional. Unix time for the most recent error that happened when trying to deliver an update via webhook */
27
    public null|int $last_error_date = null;
28
29
    /**
30
     * Optional. Error message in human-readable format for the most recent error that happened when trying to
31
     * deliver an update via webhook
32
     */
33
    public null|string $last_error_message = null;
34
35
    /**
36
     * Optional. Unix time of the most recent error that happened when trying to synchronize available updates with
37
     * Telegram datacenters
38
     */
39
    public null|int $last_synchronization_error_date = null;
40
41
    /** Optional. The maximum allowed number of simultaneous HTTPS connections to the webhook for update delivery */
42
    public null|int $max_connections = null;
43
44
    /**
45
     * Optional. A list of update types the bot is subscribed to. Defaults to all update types except chat_member
46
     * @var string[]
47
     */
48
    public null|array $allowed_updates = null;
49
50
51
    public function __construct(stdClass|null $object = null) {
52
        if ($object != null) {
53
            parent::__construct($object, self::subs);
54
        }
55
    }
56
}
57