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

MessageOriginUser::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\MessageOrigin;
4
5
use Longman\TelegramBot\Entities\Entity;
6
use Longman\TelegramBot\Entities\User;
7
8
/**
9
 * The message was originally sent by a known user.
10
 *
11
 * @link https://core.telegram.org/bots/api#messageoriginuser
12
 *
13
 * @method string getType()       Type of the message origin, always “user”
14
 * @method int    getDate()       Date the message was sent originally in Unix time
15
 * @method User   getSenderUser() User that sent the message originally
16
 */
17
class MessageOriginUser extends Entity implements MessageOrigin
18
{
19
    protected function subEntities(): array
20
    {
21
        return [
22
            'sender_user' => User::class,
23
        ];
24
    }
25
26
}
27