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

ChatBoostSourceGiveaway   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 9
Duplicated Lines 0 %

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A subEntities() 0 4 1
1
<?php
2
3
namespace Longman\TelegramBot\Entities\ChatBoostSource;
4
5
use Longman\TelegramBot\Entities\Entity;
6
use Longman\TelegramBot\Entities\User;
7
8
/**
9
 * The boost was obtained by the creation of a Telegram Premium giveaway. This boosts the chat 4 times for the duration of the corresponding Telegram Premium subscription.
10
 *
11
 * @link https://core.telegram.org/bots/api#chatboostsourcegiveaway
12
 *
13
 * @method string getSource()            Source of the boost, always “giveaway”
14
 * @method int    getGiveawayMessageId() Identifier of a message in the chat with the giveaway; the message could have been deleted already. May be 0 if the message isn't sent yet.
15
 * @method User   getUser()              Optional. User that won the prize in the giveaway if any
16
 * @method bool   getIsUnclaimed()       Optional. True, if the giveaway was completed, but there was no user to win the prize
17
 */
18
class ChatBoostSourceGiveaway extends Entity implements ChatBoostSource
19
{
20
    /**
21
     * {@inheritdoc}
22
     */
23
    protected function subEntities(): array
24
    {
25
        return [
26
            'user' => User::class,
27
        ];
28
    }
29
}
30