GiveawayWinners   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 7
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
eloc 4
c 1
b 0
f 0
dl 0
loc 7
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A subEntities() 0 5 1
1
<?php
2
3
namespace Longman\TelegramBot\Entities\Giveaway;
4
5
use Longman\TelegramBot\Entities\Chat;
6
use Longman\TelegramBot\Entities\Entity;
7
use Longman\TelegramBot\Entities\User;
8
9
/**
10
 * This object represents a message about the completion of a giveaway with public winners.
11
 *
12
 * @link https://core.telegram.org/bots/api#giveawaywinners
13
 *
14
 * @method Chat        getChat()                          The chat that created the giveaway
15
 * @method int         getGiveawayMessageId()             Identifier of the message with the giveaway in the chat
16
 * @method int         getWinnersSelectionDate()          Point in time (Unix timestamp) when winners of the giveaway were selected
17
 * @method int         getWinnerCount()                   Total number of winners in the giveaway
18
 * @method array<User> getWinners()                       List of up to 100 winners of the giveaway
19
 * @method int         getAdditionalChatCount()           Optional. The number of other chats the user had to join in order to be eligible for the giveaway
20
 * @method int         getPremiumSubscriptionMonthCount() Optional. The number of months the Telegram Premium subscription won from the giveaway will be active for
21
 * @method int         getUnclaimedPrizeCount()           Optional. Number of undistributed prizes
22
 * @method bool        getOnlyNewMembers()                Optional. True, if only users who had joined the chats after the giveaway started were eligible to win
23
 * @method bool        getWasRefunded()                   Optional. True, if the giveaway was canceled because the payment for it was refunded
24
 * @method string      getPrizeDescription()              Optional. Description of additional giveaway prize
25
 */
26
class GiveawayWinners extends Entity
27
{
28
    protected function subEntities(): array
29
    {
30
        return [
31
            'chat'    => Chat::class,
32
            'winners' => [User::class],
33
        ];
34
    }
35
}
36