Code Duplication    Length = 32-39 lines in 16 locations

src/Commands/SystemCommands/ChannelchatcreatedCommand.php 1 location

@@ 20-52 (lines=33) @@
17
 *
18
 * @todo Remove due to deprecation!
19
 */
20
class ChannelchatcreatedCommand extends SystemCommand
21
{
22
    /**
23
     * @var string
24
     */
25
    protected $name = 'channelchatcreated';
26
27
    /**
28
     * @var string
29
     */
30
    protected $description = 'Channel chat created';
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
        //$channel_chat_created = $message->getChannelChatCreated();
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

src/Commands/SystemCommands/ChannelpostCommand.php 1 location

@@ 20-51 (lines=32) @@
17
 *
18
 * @todo Remove due to deprecation!
19
 */
20
class ChannelpostCommand extends SystemCommand
21
{
22
    /**
23
     * @var string
24
     */
25
    protected $name = 'channelpost';
26
27
    /**
28
     * @var string
29
     */
30
    protected $description = 'Handle channel post';
31
32
    /**
33
     * @var string
34
     */
35
    protected $version = '1.0.0';
36
37
    /**
38
     * Execute command
39
     *
40
     * @return mixed
41
     * @throws \Longman\TelegramBot\Exception\TelegramException
42
     */
43
    public function execute()
44
    {
45
        //$channel_post = $this->getUpdate()->getChannelPost();
46
47
        trigger_error(__CLASS__ . ' is deprecated and will be removed and handled by ' . GenericmessageCommand::class . ' by default in a future release.', E_USER_DEPRECATED);
48
49
        return parent::execute();
50
    }
51
}
52

src/Commands/SystemCommands/ChoseninlineresultCommand.php 1 location

@@ 20-54 (lines=35) @@
17
 *
18
 * @todo Remove due to deprecation!
19
 */
20
class ChoseninlineresultCommand extends SystemCommand
21
{
22
    /**
23
     * @var string
24
     */
25
    protected $name = 'choseninlineresult';
26
27
    /**
28
     * @var string
29
     */
30
    protected $description = 'Chosen result query';
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
        //Information about chosen result is returned
46
        //$update = $this->getUpdate();
47
        //$inline_query = $update->getChosenInlineResult();
48
        //$query = $inline_query->getQuery();
49
50
        trigger_error(__CLASS__ . ' is deprecated and will be removed and handled by ' . GenericmessageCommand::class . ' by default in a future release.', E_USER_DEPRECATED);
51
52
        return parent::execute();
53
    }
54
}
55

src/Commands/SystemCommands/DeletechatphotoCommand.php 1 location

@@ 20-52 (lines=33) @@
17
 *
18
 * @todo Remove due to deprecation!
19
 */
20
class DeletechatphotoCommand extends SystemCommand
21
{
22
    /**
23
     * @var string
24
     */
25
    protected $name = 'deletechatphoto';
26
27
    /**
28
     * @var string
29
     */
30
    protected $description = 'Delete chat photo';
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
        //$delete_chat_photo = $message->getDeleteChatPhoto();
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

src/Commands/SystemCommands/EditedchannelpostCommand.php 1 location

@@ 20-51 (lines=32) @@
17
 *
18
 * @todo Remove due to deprecation!
19
 */
20
class EditedchannelpostCommand extends SystemCommand
21
{
22
    /**
23
     * @var string
24
     */
25
    protected $name = 'editedchannelpost';
26
27
    /**
28
     * @var string
29
     */
30
    protected $description = 'Handle edited channel post';
31
32
    /**
33
     * @var string
34
     */
35
    protected $version = '1.0.0';
36
37
    /**
38
     * Execute command
39
     *
40
     * @return mixed
41
     * @throws \Longman\TelegramBot\Exception\TelegramException
42
     */
43
    public function execute()
44
    {
45
        //$edited_channel_post = $this->getUpdate()->getEditedChannelPost();
46
47
        trigger_error(__CLASS__ . ' is deprecated and will be removed and handled by ' . GenericmessageCommand::class . ' by default in a future release.', E_USER_DEPRECATED);
48
49
        return parent::execute();
50
    }
51
}
52

src/Commands/SystemCommands/EditedmessageCommand.php 1 location

@@ 20-52 (lines=33) @@
17
 *
18
 * @todo Remove due to deprecation!
19
 */
20
class EditedmessageCommand extends SystemCommand
21
{
22
    /**
23
     * @var string
24
     */
25
    protected $name = 'editedmessage';
26
27
    /**
28
     * @var string
29
     */
30
    protected $description = 'User edited message';
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
        //$update = $this->getUpdate();
46
        //$edited_message = $update->getEditedMessage();
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

src/Commands/SystemCommands/GroupchatcreatedCommand.php 1 location

@@ 20-52 (lines=33) @@
17
 *
18
 * @todo Remove due to deprecation!
19
 */
20
class GroupchatcreatedCommand extends SystemCommand
21
{
22
    /**
23
     * @var string
24
     */
25
    protected $name = 'groupchatcreated';
26
27
    /**
28
     * @var string
29
     */
30
    protected $description = 'Group chat created';
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
        //$group_chat_created = $message->getGroupChatCreated();
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

src/Commands/SystemCommands/LeftchatmemberCommand.php 1 location

@@ 20-52 (lines=33) @@
17
 *
18
 * @todo Remove due to deprecation!
19
 */
20
class LeftchatmemberCommand extends SystemCommand
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

src/Commands/SystemCommands/MigratefromchatidCommand.php 1 location

@@ 20-52 (lines=33) @@
17
 *
18
 * @todo Remove due to deprecation!
19
 */
20
class MigratefromchatidCommand extends SystemCommand
21
{
22
    /**
23
     * @var string
24
     */
25
    protected $name = 'migratefromchatid';
26
27
    /**
28
     * @var string
29
     */
30
    protected $description = 'Migrate from chat id';
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
        //$migrate_from_chat_id = $message->getMigrateFromChatId();
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

src/Commands/SystemCommands/MigratetochatidCommand.php 1 location

@@ 20-52 (lines=33) @@
17
 *
18
 * @todo Remove due to deprecation!
19
 */
20
class MigratetochatidCommand extends SystemCommand
21
{
22
    /**
23
     * @var string
24
     */
25
    protected $name = 'migratetochatid';
26
27
    /**
28
     * @var string
29
     */
30
    protected $description = 'Migrate to chat id';
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
        //$migrate_to_chat_id = $message->getMigrateToChatId();
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

src/Commands/SystemCommands/NewchatmembersCommand.php 1 location

@@ 20-52 (lines=33) @@
17
 *
18
 * @todo Remove due to deprecation!
19
 */
20
class NewchatmembersCommand extends SystemCommand
21
{
22
    /**
23
     * @var string
24
     */
25
    protected $name = 'newchatmembers';
26
27
    /**
28
     * @var string
29
     */
30
    protected $description = 'New Chat Member(s)';
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
        //$members = $message->getNewChatMembers();
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

src/Commands/SystemCommands/NewchatphotoCommand.php 1 location

@@ 20-52 (lines=33) @@
17
 *
18
 * @todo Remove due to deprecation!
19
 */
20
class NewchatphotoCommand extends SystemCommand
21
{
22
    /**
23
     * @var string
24
     */
25
    protected $name = 'newchatphoto';
26
27
    /**
28
     * @var string
29
     */
30
    protected $description = 'New chat Photo';
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
        //$new_chat_photo = $message->getNewChatPhoto();
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

src/Commands/SystemCommands/NewchattitleCommand.php 1 location

@@ 20-52 (lines=33) @@
17
 *
18
 * @todo Remove due to deprecation!
19
 */
20
class NewchattitleCommand extends SystemCommand
21
{
22
    /**
23
     * @var string
24
     */
25
    protected $name = 'newchattitle';
26
27
    /**
28
     * @var string
29
     */
30
    protected $description = 'New chat Title';
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
        //$new_chat_title = $message->getNewChatTitle();
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

src/Commands/SystemCommands/PinnedmessageCommand.php 1 location

@@ 20-52 (lines=33) @@
17
 *
18
 * @todo Remove due to deprecation!
19
 */
20
class PinnedmessageCommand extends SystemCommand
21
{
22
    /**
23
     * @var string
24
     */
25
    protected $name = 'pinnedmessage';
26
27
    /**
28
     * @var string
29
     */
30
    protected $description = 'Message was pinned';
31
32
    /**
33
     * @var string
34
     */
35
    protected $version = '1.0.0';
36
37
    /**
38
     * Execute command
39
     *
40
     * @return mixed
41
     * @throws \Longman\TelegramBot\Exception\TelegramException
42
     */
43
    public function execute()
44
    {
45
        //$message = $this->getMessage();
46
        //$pinned_message = $message->getPinnedMessage();
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

src/Commands/SystemCommands/StartCommand.php 1 location

@@ 21-59 (lines=39) @@
18
 *
19
 * @todo Remove due to deprecation!
20
 */
21
class StartCommand extends SystemCommand
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

src/Commands/SystemCommands/SupergroupchatcreatedCommand.php 1 location

@@ 20-52 (lines=33) @@
17
 *
18
 * @todo Remove due to deprecation!
19
 */
20
class SupergroupchatcreatedCommand extends SystemCommand
21
{
22
    /**
23
     * @var string
24
     */
25
    protected $name = 'supergroupchatcreated';
26
27
    /**
28
     * @var string
29
     */
30
    protected $description = 'Super group chat created';
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
        //$supergroup_chat_created = $message->getSuperGroupChatCreated();
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