Code Duplication    Length = 8-8 lines in 2 locations

src/Api.php 2 locations

@@ 1226-1233 (lines=8) @@
1223
     *
1224
     * @param Update $update
1225
     */
1226
    public function processCommand(Update $update)
1227
    {
1228
        $message = $update->getMessage();
1229
1230
        if ($message !== null && $message->has('text')) {
1231
            $this->getCommandBus()->handler($message->getText(), $update);
1232
        }
1233
    }
1234
1235
    /**
1236
     * Check update object for a command and process.
@@ 1240-1247 (lines=8) @@
1237
     *
1238
     * @param Update $update
1239
     */
1240
    public function processConversation(Update $update)
1241
    {
1242
        $message = $update->getMessage();
1243
1244
        if ($message !== null && $message->has('text')) {
1245
            $this->getConversationBus()->handler($message->getText(), $update);
1246
        }
1247
    }
1248
1249
    /**
1250
     * Helper to Trigger Commands.