Code Duplication    Length = 5-5 lines in 2 locations

htdocs/class/libraries/vendor/xoops/xmf/src/Xmf/Database/Tables.php 2 locations

@@ 430-434 (lines=5) @@
427
            // Is this on a table we are adding?
428
            if (isset($tableDef['create']) && $tableDef['create']) {
429
                // strip everything but the PRIMARY from definition
430
                foreach ($tableDef['keys'] as $keyName => $key) {
431
                    if ($keyName !== 'PRIMARY') {
432
                        unset($tableDef['keys'][$keyName]);
433
                    }
434
                }
435
            } else {
436
                // build drops to strip everything but the PRIMARY
437
                foreach ($tableDef['keys'] as $keyName => $key) {
@@ 437-441 (lines=5) @@
434
                }
435
            } else {
436
                // build drops to strip everything but the PRIMARY
437
                foreach ($tableDef['keys'] as $keyName => $key) {
438
                    if ($keyName !== 'PRIMARY') {
439
                        $this->queue[] = "ALTER TABLE `{$tableDef['name']}` DROP INDEX {$keyName}";
440
                    }
441
                }
442
            }
443
        } else {
444
            return $this->tableNotEstablished();