Code Duplication    Length = 138-139 lines in 2 locations

src/Types/Inline/ChosenInlineResult.php 1 location

@@ 15-153 (lines=139) @@
12
 *
13
 * @package TelegramBot\Api\Types
14
 */
15
class ChosenInlineResult extends BaseType
16
{
17
    /**
18
     * {@inheritdoc}
19
     *
20
     * @var array
21
     */
22
    static protected $requiredParams = ['result_id', 'from', 'query'];
23
24
    /**
25
     * {@inheritdoc}
26
     *
27
     * @var array
28
     */
29
    static protected $map = [
30
        'result_id' => true,
31
        'from' => User::class,
32
        'location' => Location::class,
33
        'inline_message_id' => true,
34
        'query' => true,
35
    ];
36
37
    /**
38
     * The unique identifier for the result that was chosen.
39
     *
40
     * @var string
41
     */
42
    protected $resultId;
43
44
    /**
45
     * The user that chose the result.
46
     *
47
     * @var User
48
     */
49
    protected $from;
50
51
    /**
52
     * Optional. Sender location, only for bots that require user location
53
     *
54
     * @var Location
55
     */
56
    protected $location;
57
58
    /**
59
     * Optional. Identifier of the sent inline message.
60
     * Available only if there is an inline keyboard attached to the message.
61
     * Will be also received in callback queries and can be used to edit the message.
62
     *
63
     * @var string
64
     */
65
    protected $inlineMessageId;
66
67
    /**
68
     * The query that was used to obtain the result.
69
     *
70
     * @var string
71
     */
72
    protected $query;
73
74
    /**
75
     * @return string
76
     */
77
    public function getResultId()
78
    {
79
        return $this->resultId;
80
    }
81
82
    /**
83
     * @param string $resultId
84
     */
85
    public function setResultId($resultId)
86
    {
87
        $this->resultId = $resultId;
88
    }
89
90
    /**
91
     * @return User
92
     */
93
    public function getFrom()
94
    {
95
        return $this->from;
96
    }
97
98
    /**
99
     * @param User $from
100
     */
101
    public function setFrom(User $from)
102
    {
103
        $this->from = $from;
104
    }
105
106
    /**
107
     * @return Location
108
     */
109
    public function getLocation()
110
    {
111
        return $this->location;
112
    }
113
114
    /**
115
     * @param Location $location
116
     */
117
    public function setLocation($location)
118
    {
119
        $this->location = $location;
120
    }
121
122
    /**
123
     * @return string
124
     */
125
    public function getInlineMessageId()
126
    {
127
        return $this->inlineMessageId;
128
    }
129
130
    /**
131
     * @param string $inlineMessageId
132
     */
133
    public function setInlineMessageId($inlineMessageId)
134
    {
135
        $this->inlineMessageId = $inlineMessageId;
136
    }
137
138
    /**
139
     * @return string
140
     */
141
    public function getQuery()
142
    {
143
        return $this->query;
144
    }
145
146
    /**
147
     * @param string $query
148
     */
149
    public function setQuery($query)
150
    {
151
        $this->query = $query;
152
    }
153
}
154

src/Types/Inline/InlineQuery.php 1 location

@@ 16-153 (lines=138) @@
13
 *
14
 * @package TelegramBot\Api\Types
15
 */
16
class InlineQuery extends BaseType
17
{
18
    /**
19
     * {@inheritdoc}
20
     *
21
     * @var array
22
     */
23
    static protected $requiredParams = ['id', 'from', 'query', 'offset'];
24
25
    /**
26
     * {@inheritdoc}
27
     *
28
     * @var array
29
     */
30
    static protected $map = [
31
        'id' => true,
32
        'from' => User::class,
33
        'location' => Location::class,
34
        'query' => true,
35
        'offset' => true,
36
    ];
37
38
    /**
39
     * Unique identifier for this query
40
     *
41
     * @var string
42
     */
43
    protected $id;
44
45
    /**
46
     * Sender
47
     *
48
     * @var User
49
     */
50
    protected $from;
51
52
53
    /**
54
     * Optional. Sender location, only for bots that request user location
55
     *
56
     * @var Location
57
     */
58
    protected $location;
59
60
    /**
61
     * Text of the query
62
     *
63
     * @var string
64
     */
65
    protected $query;
66
67
    /**
68
     * Offset of the results to be returned, can be controlled by the bot
69
     *
70
     * @var string
71
     */
72
    protected $offset;
73
74
    /**
75
     * @return string
76
     */
77
    public function getId()
78
    {
79
        return $this->id;
80
    }
81
82
    /**
83
     * @param string $id
84
     */
85
    public function setId($id)
86
    {
87
        $this->id = $id;
88
    }
89
90
    /**
91
     * @return User
92
     */
93
    public function getFrom()
94
    {
95
        return $this->from;
96
    }
97
98
    /**
99
     * @param User $from
100
     */
101
    public function setFrom(User $from)
102
    {
103
        $this->from = $from;
104
    }
105
106
    /**
107
     * @return Location
108
     */
109
    public function getLocation()
110
    {
111
        return $this->location;
112
    }
113
114
    /**
115
     * @param Location $location
116
     */
117
    public function setLocation($location)
118
    {
119
        $this->location = $location;
120
    }
121
122
    /**
123
     * @return string
124
     */
125
    public function getQuery()
126
    {
127
        return $this->query;
128
    }
129
130
    /**
131
     * @param string $query
132
     */
133
    public function setQuery($query)
134
    {
135
        $this->query = $query;
136
    }
137
138
    /**
139
     * @return string
140
     */
141
    public function getOffset()
142
    {
143
        return $this->offset;
144
    }
145
146
    /**
147
     * @param string $offset
148
     */
149
    public function setOffset($offset)
150
    {
151
        $this->offset = $offset;
152
    }
153
}
154