Code Duplication    Length = 7-7 lines in 2 locations

src/Commands/CommandBus.php 2 locations

@@ 90-96 (lines=7) @@
87
        }
88
89
        foreach ($command->getAliases() as $alias) {
90
            if (isset($this->commands[$alias])) {
91
                throw new TelegramSDKException(sprintf(
92
                    '[Error] Alias [%s] conflicts with command name of "%s" try with another name or remove this alias from the list.',
93
                    $alias,
94
                    get_class($command)
95
                ));
96
            }
97
98
            if (isset($this->commandAliases[$alias])) {
99
                throw new TelegramSDKException(sprintf(
@@ 98-104 (lines=7) @@
95
                ));
96
            }
97
98
            if (isset($this->commandAliases[$alias])) {
99
                throw new TelegramSDKException(sprintf(
100
                    '[Error] Alias [%s] conflicts with another command\'s alias list: "%s", try with another name or remove this alias from the list.',
101
                    $alias,
102
                    get_class($command)
103
                ));
104
            }
105
106
            $this->commandAliases[$alias] = $command;
107
        }