Code Duplication    Length = 5-5 lines in 2 locations

htdocs/xoops_lib/Xmf/Database/Tables.php 2 locations

@@ 117-121 (lines=5) @@
114
            if (isset($tableDef['create']) && $tableDef['create']) {
115
                array_push($tableDef['columns'], $columnDef);
116
            } else {
117
                foreach ($tableDef['columns'] as $col) {
118
                    if (strcasecmp($col['name'], $column) == 0) {
119
                        return true;
120
                    }
121
                }
122
                $this->queue[] = "ALTER TABLE `{$tableDef['name']}`"
123
                    . " ADD COLUMN `{$column}` {$columnDef['attributes']}";
124
                array_push($tableDef['columns'], $columnDef);
@@ 271-275 (lines=5) @@
268
        if (isset($this->tables[$table])) {
269
            $tableDef = $this->tables[$table];
270
            // loop thru and find the column
271
            foreach ($tableDef['columns'] as $col) {
272
                if (strcasecmp($col['name'], $column) === 0) {
273
                    return $col['attributes'];
274
                }
275
            }
276
        }
277
278
        return false;