Code Duplication    Length = 12-12 lines in 2 locations

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

@@ 148-159 (lines=12) @@
145
                        return true;
146
                    }
147
                }
148
                switch ($position) {
149
                    case Tables::POSITION_FIRST:
150
                        $pos='FIRST';
151
                        break;
152
                    case '':
153
                    case null:
154
                    case false:
155
                        $pos='';
156
                        break;
157
                    default:
158
                        $pos="AFTER `{$position}`";
159
                }
160
                $this->queue[]="ALTER TABLE `{$tableDef['name']}`"
161
                    . " ADD COLUMN {$column} {$columnDef['attributes']} {$pos} ";
162
            }
@@ 328-339 (lines=12) @@
325
326
                return true;
327
            } else {
328
                switch ($position) {
329
                    case Tables::POSITION_FIRST:
330
                        $pos='FIRST';
331
                        break;
332
                    case '':
333
                    case null:
334
                    case false:
335
                        $pos='';
336
                        break;
337
                    default:
338
                        $pos="AFTER `{$position}`";
339
                }
340
                $this->queue[]="ALTER TABLE `{$tableDef['name']}` " .
341
                    "CHANGE COLUMN `{$column}` `{$newName}` {$attributes} {$pos} ";
342
            }