Passed
Push — main ( 4af278...3f64e8 )
by Miaad
01:24
created

webhookInfo   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 40
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 1
eloc 12
dl 0
loc 40
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 2 1
1
<?php
2
3
namespace BPT\types;
4
5
use stdClass;
6
7
/**
8
 * Contains information about 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 bool $has_custom_certificate;
19
20
	/** Number of updates awaiting delivery */
21
	public int $pending_update_count;
22
23
	/** Optional. Currently used webhook IP address */
24
	public string $ip_address;
25
26
	/** Optional. Unix time for the most recent error that happened when trying to deliver an update via webhook */
27
	public int $last_error_date;
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 string $last_error_message;
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 int $last_synchronization_error_date;
40
41
	/** Optional. Maximum allowed number of simultaneous HTTPS connections to the webhook for update delivery */
42
	public int $max_connections;
43
44
	/** Optional. A list of update types the bot is subscribed to. Defaults to all update types except chat_member */
45
	public array $allowed_updates;
46
47
48
	public function __construct(stdClass $update) {
49
		parent::__construct($update, self::subs);
50
	}
51
}
52