InlineQuery::subEntities()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 7
ccs 0
cts 7
cp 0
rs 9.4285
cc 1
eloc 4
nc 1
nop 0
crap 2
1
<?php
2
/**
3
 * This file is part of the TelegramBot package.
4
 *
5
 * (c) Avtandil Kikabidze aka LONGMAN <[email protected]>
6
 *
7
 * For the full copyright and license information, please view the LICENSE
8
 * file that was distributed with this source code.
9
 */
10
11
namespace Longman\TelegramBot\Entities;
12
13
/**
14
 * Class InlineQuery
15
 *
16
 * @link https://core.telegram.org/bots/api#inlinequery
17
 *
18
 * @method string   getId()       Unique identifier for this query
19
 * @method User     getFrom()     Sender
20
 * @method Location getLocation() Optional. Sender location, only for bots that request user location
21
 * @method string   getQuery()    Text of the query (up to 512 characters)
22
 * @method string   getOffset()   Offset of the results to be returned, can be controlled by the bot
23
 */
24
class InlineQuery extends Entity
25
{
26
    /**
27
     * {@inheritdoc}
28
     */
29
    protected function subEntities()
30
    {
31
        return [
32
            'from'     => User::class,
33
            'location' => Location::class,
34
        ];
35
    }
36
}
37