Completed
Push — 920-new_system_commands ( da604d...268d3b )
by Armando
02:22
created

StartCommand::execute()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 10

Duplication

Lines 10
Ratio 100 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 10
loc 10
ccs 0
cts 3
cp 0
rs 9.9332
c 0
b 0
f 0
cc 1
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\Commands\SystemCommands;
12
13
use Longman\TelegramBot\Commands\SystemCommand;
14
use Longman\TelegramBot\Request;
15
16
/**
17
 * Start command
18
 *
19
 * @todo Remove due to deprecation!
20
 */
21 View Code Duplication
class StartCommand extends SystemCommand
0 ignored issues
show
Duplication introduced by
This class seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
22
{
23
    /**
24
     * @var string
25
     */
26
    protected $name = 'start';
27
28
    /**
29
     * @var string
30
     */
31
    protected $description = 'Start command';
32
33
    /**
34
     * @var string
35
     */
36
    protected $usage = '/start';
37
38
    /**
39
     * @var string
40
     */
41
    protected $version = '1.0.0';
42
43
    /**
44
     * Command execute method
45
     *
46
     * @return mixed
47
     * @throws \Longman\TelegramBot\Exception\TelegramException
48
     */
49
    public function execute()
50
    {
51
        //$message = $this->getMessage();
52
        //$chat_id = $message->getChat()->getId();
53
        //$user_id = $message->getFrom()->getId();
54
55
        trigger_error(__CLASS__ . ' is deprecated and will be removed and handled by ' . GenericmessageCommand::class . ' by default in a future release.', E_USER_DEPRECATED);
56
57
        return parent::execute();
58
    }
59
}
60