Code Duplication    Length = 22-22 lines in 2 locations

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

@@ 1112-1133 (lines=22) @@
1109
     *
1110
     * @param Schema $schema
1111
     */
1112
    protected function addOrocrmMagentoCartItemForeignKeys(Schema $schema)
1113
    {
1114
        $table = $schema->getTable('orocrm_magento_cart_item');
1115
        $table->addForeignKeyConstraint(
1116
            $schema->getTable('orocrm_magento_cart'),
1117
            ['cart_id'],
1118
            ['id'],
1119
            ['onDelete' => 'CASCADE']
1120
        );
1121
        $table->addForeignKeyConstraint(
1122
            $schema->getTable('oro_integration_channel'),
1123
            ['channel_id'],
1124
            ['id'],
1125
            ['onDelete' => 'SET NULL']
1126
        );
1127
        $table->addForeignKeyConstraint(
1128
            $schema->getTable('oro_organization'),
1129
            ['owner_id'],
1130
            ['id'],
1131
            ['onDelete' => 'SET NULL']
1132
        );
1133
    }
1134
1135
    /**
1136
     * Add orocrm_magento_customer_addr foreign keys.
@@ 1470-1491 (lines=22) @@
1467
     *
1468
     * @param Schema $schema
1469
     */
1470
    protected function addOrocrmMagentoOrderItemsForeignKeys(Schema $schema)
1471
    {
1472
        $table = $schema->getTable('orocrm_magento_order_items');
1473
        $table->addForeignKeyConstraint(
1474
            $schema->getTable('orocrm_magento_order'),
1475
            ['order_id'],
1476
            ['id'],
1477
            ['onDelete' => 'CASCADE']
1478
        );
1479
        $table->addForeignKeyConstraint(
1480
            $schema->getTable('oro_integration_channel'),
1481
            ['channel_id'],
1482
            ['id'],
1483
            ['onDelete' => 'SET NULL']
1484
        );
1485
        $table->addForeignKeyConstraint(
1486
            $schema->getTable('oro_organization'),
1487
            ['owner_id'],
1488
            ['id'],
1489
            ['onDelete' => 'SET NULL']
1490
        );
1491
    }
1492
1493
    /**
1494
     * Add orocrm_magento_newsl_subscr foreign keys.