Completed
Push — master ( 25d74a...9d4d02 )
by Armando
02:14
created

InlinequeryCommand   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 32
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 4

Importance

Changes 0
Metric Value
wmc 1
c 0
b 0
f 0
lcom 0
cbo 4
dl 0
loc 32
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A execute() 0 8 1
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\Commands\SystemCommands;
12
13
use Longman\TelegramBot\Commands\SystemCommand;
14
use Longman\TelegramBot\Entities\InlineQuery\InlineQueryResultArticle;
15
use Longman\TelegramBot\Entities\InputMessageContent\InputTextMessageContent;
16
use Longman\TelegramBot\Request;
17
18
/**
19
 * Inline query command
20
 */
21
class InlinequeryCommand extends SystemCommand
22
{
23
    /**
24
     * @var string
25
     */
26
    protected $name = 'inlinequery';
27
28
    /**
29
     * @var string
30
     */
31
    protected $description = 'Reply to inline query';
32
33
    /**
34
     * @var string
35
     */
36
    protected $version = '1.0.0';
37
38
    /**
39
     * Command execute method
40
     *
41
     * @return mixed
42
     * @throws \Longman\TelegramBot\Exception\TelegramException
43
     */
44
    public function execute()
45
    {
46
        //$inline_query = $this->getUpdate()->getInlineQuery();
47
        //$user_id      = $inline_query->getFrom()->getId();
48
        //$query        = $inline_query->getQuery();
49
50
        return Request::answerInlineQuery(['inline_query_id' => $this->getUpdate()->getInlineQuery()->getId()]);
51
    }
52
}
53