Code Duplication    Length = 22-22 lines in 2 locations

src/OroCRM/Bundle/MagentoBundle/Migrations/Schema/OroCRMMagentoBundleInstaller.php 2 locations

@@ 1043-1064 (lines=22) @@
1040
     *
1041
     * @param Schema $schema
1042
     */
1043
    protected function addOrocrmMagentoCartItemForeignKeys(Schema $schema)
1044
    {
1045
        $table = $schema->getTable('orocrm_magento_cart_item');
1046
        $table->addForeignKeyConstraint(
1047
            $schema->getTable('orocrm_magento_cart'),
1048
            ['cart_id'],
1049
            ['id'],
1050
            ['onDelete' => 'CASCADE']
1051
        );
1052
        $table->addForeignKeyConstraint(
1053
            $schema->getTable('oro_integration_channel'),
1054
            ['channel_id'],
1055
            ['id'],
1056
            ['onDelete' => 'SET NULL']
1057
        );
1058
        $table->addForeignKeyConstraint(
1059
            $schema->getTable('oro_organization'),
1060
            ['owner_id'],
1061
            ['id'],
1062
            ['onDelete' => 'SET NULL']
1063
        );
1064
    }
1065
1066
    /**
1067
     * Add orocrm_magento_customer_addr foreign keys.
@@ 1369-1390 (lines=22) @@
1366
     *
1367
     * @param Schema $schema
1368
     */
1369
    protected function addOrocrmMagentoOrderItemsForeignKeys(Schema $schema)
1370
    {
1371
        $table = $schema->getTable('orocrm_magento_order_items');
1372
        $table->addForeignKeyConstraint(
1373
            $schema->getTable('orocrm_magento_order'),
1374
            ['order_id'],
1375
            ['id'],
1376
            ['onDelete' => 'CASCADE']
1377
        );
1378
        $table->addForeignKeyConstraint(
1379
            $schema->getTable('oro_integration_channel'),
1380
            ['channel_id'],
1381
            ['id'],
1382
            ['onDelete' => 'SET NULL']
1383
        );
1384
        $table->addForeignKeyConstraint(
1385
            $schema->getTable('oro_organization'),
1386
            ['owner_id'],
1387
            ['id'],
1388
            ['onDelete' => 'SET NULL']
1389
        );
1390
    }
1391
1392
    /**
1393
     * Add orocrm_magento_newsl_subscr foreign keys.