Passed
Push — api-7.0 ( 7410c3...14c77e )
by Armando
28:03 queued 15:34
created

Giveaway   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 7
Duplicated Lines 0 %

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A subEntities() 0 4 1
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
 *
23
 */
24
class Giveaway extends Entity
25
{
26
27
    protected function subEntities(): array
28
    {
29
        return [
30
            'chats' => [Chat::class],
31
        ];
32
    }
33
34
}
35