Completed
Push — master ( 0cb834...ce1742 )
by Camilo
04:29
created

ChosenInlineResult::mapSubObjects()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %
Metric Value
dl 0
loc 6
rs 9.4285
cc 1
eloc 3
nc 1
nop 0
1
<?php
2
3
declare(strict_types = 1);
4
5
namespace unreal4u\Telegram\Types;
6
7
use unreal4u\Abstracts\TelegramTypes;
8
9
/**
10
 * This object represents a result of an inline query that was chosen by the user and sent to their chat partner.
11
 *
12
 * Objects defined as-is january 2016
13
 *
14
 * @see https://core.telegram.org/bots/api#choseninlineresult
15
 */
16
class ChosenInlineResult extends TelegramTypes
17
{
18
    /**
19
     * The unique identifier for the result that was chosen
20
     * @var string
21
     */
22
    public $result_id = '';
23
24
    /**
25
     * The user that chose the result
26
     * @var User
27
     */
28
    public $from = null;
29
30
    /**
31
     * Text of the query
32
     * @var string
33
     */
34
    public $query = '';
35
36
    protected function mapSubObjects(): array
37
    {
38
        return [
39
            'from' => 'User',
40
        ];
41
    }
42
}
43