Passed
Pull Request — develop (#1459)
by Armando
28:33 queued 18:33
created

Giveaway::subEntities()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 2
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 4
rs 10
1
<?php
2
3
namespace Longman\TelegramBot\Entities\Giveaway;
4
5
use Longman\TelegramBot\Entities\Chat;
6
use Longman\TelegramBot\Entities\Entity;
7
8
/**
9
 * This object represents a message about a scheduled giveaway.
10
 *
11
 * @link https://core.telegram.org/bots/api#giveaway
12
 *
13
 * @method array<Chat>   getChats()                         The list of chats which the user must join to participate in the giveaway
14
 * @method int           getWinnersSelectionDate()          Point in time (Unix timestamp) when winners of the giveaway will be selected
15
 * @method int           getWinnerCount()                   The number of users which are supposed to be selected as winners of the giveaway
16
 * @method bool          getOnlyNewMembers()                Optional. True, if only users who join the chats after the giveaway started should be eligible to win
17
 * @method bool          getHasPublicWinners()              Optional. True, if the list of giveaway winners will be visible to everyone
18
 * @method string        getPrizeDescription()              Optional. Description of additional giveaway prize
19
 * @method array<string> getCountryCodes()                  Optional. A list of two-letter ISO 3166-1 alpha-2 country codes indicating the countries from which eligible users for the giveaway must come. If empty, then all users can participate in the giveaway. Users with a phone number that was bought on Fragment can always participate in giveaways.
20
 * @method int           getPremiumSubscriptionMonthCount() Optional. The number of months the Telegram Premium subscription won from the giveaway will be active for
21
 */
22
class Giveaway extends Entity
23
{
24
    protected function subEntities(): array
25
    {
26
        return [
27
            'chats' => [Chat::class],
28
        ];
29
    }
30
}
31