Completed
Pull Request — develop (#456)
by
unknown
03:33
created

InlinequeryCommand::execute()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 8
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
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();
0 ignored issues
show
Unused Code Comprehensibility introduced by
65% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
47
        //$user_id      = $inline_query->getFrom()->getId();
0 ignored issues
show
Unused Code Comprehensibility introduced by
65% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
48
        //$query        = $inline_query->getQuery();
0 ignored issues
show
Unused Code Comprehensibility introduced by
60% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
49
50
        return Request::answerInlineQuery(['inline_query_id' => $this->getUpdate()->getInlineQuery()->getId()]);
51
    }
52
}
53