Code Duplication    Length = 10-10 lines in 2 locations

src/Eccube/Command/PluginCommand/EntityFromDbGenerator.php 2 locations

@@ 234-243 (lines=10) @@
231
        $indexes = $TableInfo->getindexes();
232
233
        $primaryKey = null;
234
        foreach ($indexes as $index) {
235
            if ($index->isPrimary()) {
236
                $tmpCol = $index->getColumns();
237
                foreach ($tmpCol as $colName) {
238
                    $primaryKey = $colName;
239
                    break;
240
                }
241
                break;
242
            }
243
        }
244
245
        $columns = $TableInfo->getColumns();
246
@@ 349-358 (lines=10) @@
346
        $indexes = $TableInfo->getindexes();
347
348
        $primaryKey = null;
349
        foreach ($indexes as $index) {
350
            if ($index->isPrimary()) {
351
                $tmpCol = $index->getColumns();
352
                foreach ($tmpCol as $colName) {
353
                    $primaryKey = $colName;
354
                    break;
355
                }
356
                break;
357
            }
358
        }
359
360
        $id = array(
361
            'type' => null,