Completed
Push — master ( 262368...c98826 )
by Gusev
08:20
created

ChosenInlineResult   A

Complexity

Total Complexity 6

Size/Duplication

Total Lines 89
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 2
Bugs 1 Features 1
Metric Value
wmc 6
c 2
b 1
f 1
lcom 0
cbo 1
dl 0
loc 89
rs 10

6 Methods

Rating   Name   Duplication   Size   Complexity  
A getResultId() 0 4 1
A setResultId() 0 4 1
A getFrom() 0 4 1
A setFrom() 0 4 1
A getQuery() 0 4 1
A setQuery() 0 4 1
1
<?php
2
3
namespace TelegramBot\Api\Types\Inline;
4
5
use TelegramBot\Api\BaseType;
6
use TelegramBot\Api\Types\User;
7
8
/**
9
 * Class ChosenInlineResult
10
 * This object represents a result of an inline query that was chosen by the user and sent to their chat partner.
11
 *
12
 * @package TelegramBot\Api\Types
13
 */
14
class ChosenInlineResult extends BaseType
15
{
16
    /**
17
     * {@inheritdoc}
18
     *
19
     * @var array
20
     */
21
    static protected $requiredParams = ['result_id', 'from', 'query'];
22
23
    /**
24
     * {@inheritdoc}
25
     *
26
     * @var array
27
     */
28
    static protected $map = [
29
        'result_id' => true,
30
        'from' => User::class,
31
        'query' => true,
32
    ];
33
34
    /**
35
     * The unique identifier for the result that was chosen.
36
     *
37
     * @var string
38
     */
39
    protected $resultId;
40
41
    /**
42
     * The user that chose the result.
43
     *
44
     * @var User
45
     */
46
    protected $from;
47
48
    /**
49
     * The query that was used to obtain the result.
50
     *
51
     * @var string
52
     */
53
    protected $query;
54
55
    /**
56
     * @return string
57
     */
58
    public function getResultId()
59
    {
60
        return $this->resultId;
61
    }
62
63
    /**
64
     * @param string $resultId
65
     */
66
    public function setResultId($resultId)
67
    {
68
        $this->resultId = $resultId;
69
    }
70
71
    /**
72
     * @return User
73
     */
74
    public function getFrom()
75
    {
76
        return $this->from;
77
    }
78
79
    /**
80
     * @param User $from
81
     */
82
    public function setFrom(User $from)
83
    {
84
        $this->from = $from;
85
    }
86
87
    /**
88
     * @return string
89
     */
90
    public function getQuery()
91
    {
92
        return $this->query;
93
    }
94
95
    /**
96
     * @param string $query
97
     */
98
    public function setQuery($query)
99
    {
100
        $this->query = $query;
101
    }
102
}
103