These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more
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 | |||
15 | /** |
||
16 | * Left chat member command |
||
17 | * |
||
18 | * @todo Remove due to deprecation! |
||
19 | */ |
||
20 | View Code Duplication | class LeftchatmemberCommand extends SystemCommand |
|
0 ignored issues
–
show
|
|||
21 | { |
||
22 | /** |
||
23 | * @var string |
||
24 | */ |
||
25 | protected $name = 'leftchatmember'; |
||
26 | |||
27 | /** |
||
28 | * @var string |
||
29 | */ |
||
30 | protected $description = 'Left Chat Member'; |
||
31 | |||
32 | /** |
||
33 | * @var string |
||
34 | */ |
||
35 | protected $version = '1.0.0'; |
||
36 | |||
37 | /** |
||
38 | * Command execute method |
||
39 | * |
||
40 | * @return mixed |
||
41 | * @throws \Longman\TelegramBot\Exception\TelegramException |
||
42 | */ |
||
43 | public function execute() |
||
44 | { |
||
45 | //$message = $this->getMessage(); |
||
46 | //$member = $message->getLeftChatMember(); |
||
47 | |||
48 | trigger_error(__CLASS__ . ' is deprecated and will be removed and handled by ' . GenericmessageCommand::class . ' by default in a future release.', E_USER_DEPRECATED); |
||
49 | |||
50 | return parent::execute(); |
||
51 | } |
||
52 | } |
||
53 |
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.