giveawayWinners   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 15
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
 * This object represents a message about the completion of a giveaway with public winners.
9
 */
10
class giveawayWinners 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 = ['chat' => 'BPT\types\chat', 'array' => ['winners' => 'BPT\types\user']];
13
14
    /** The chat that created the giveaway */
15
    public chat $chat;
16
17
    /** Identifier of the message with the giveaway in the chat */
18
    public int $giveaway_message_id;
19
20
    /** Point in time (Unix timestamp) when winners of the giveaway were selected */
21
    public int $winners_selection_date;
22
23
    /** Total number of winners in the giveaway */
24
    public int $winner_count;
25
26
    /**
27
     * List of up to 100 winners of the giveaway
28
     * @var user[]
29
     */
30
    public array $winners;
31
32
    /** Optional. The number of other chats the user had to join in order to be eligible for the giveaway */
33
    public null|int $additional_chat_count = null;
34
35
    /** Optional. The number of months the Telegram Premium subscription won from the giveaway will be active for */
36
    public null|int $premium_subscription_month_count = null;
37
38
    /** Optional. Number of undistributed prizes */
39
    public null|int $unclaimed_prize_count = null;
40
41
    /** Optional. True, if only users who had joined the chats after the giveaway started were eligible to win */
42
    public null|bool $only_new_members = null;
43
44
    /** Optional. True, if the giveaway was canceled because the payment for it was refunded */
45
    public null|bool $was_refunded = null;
46
47
    /** Optional. Description of additional giveaway prize */
48
    public null|string $prize_description = 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