Code Duplication    Length = 22-22 lines in 2 locations

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

@@ 1066-1087 (lines=22) @@
1063
     *
1064
     * @param Schema $schema
1065
     */
1066
    protected function addOrocrmMagentoCartItemForeignKeys(Schema $schema)
1067
    {
1068
        $table = $schema->getTable('orocrm_magento_cart_item');
1069
        $table->addForeignKeyConstraint(
1070
            $schema->getTable('orocrm_magento_cart'),
1071
            ['cart_id'],
1072
            ['id'],
1073
            ['onDelete' => 'CASCADE']
1074
        );
1075
        $table->addForeignKeyConstraint(
1076
            $schema->getTable('oro_integration_channel'),
1077
            ['channel_id'],
1078
            ['id'],
1079
            ['onDelete' => 'SET NULL']
1080
        );
1081
        $table->addForeignKeyConstraint(
1082
            $schema->getTable('oro_organization'),
1083
            ['owner_id'],
1084
            ['id'],
1085
            ['onDelete' => 'SET NULL']
1086
        );
1087
    }
1088
1089
    /**
1090
     * Add orocrm_magento_customer_addr foreign keys.
@@ 1404-1425 (lines=22) @@
1401
     *
1402
     * @param Schema $schema
1403
     */
1404
    protected function addOrocrmMagentoOrderItemsForeignKeys(Schema $schema)
1405
    {
1406
        $table = $schema->getTable('orocrm_magento_order_items');
1407
        $table->addForeignKeyConstraint(
1408
            $schema->getTable('orocrm_magento_order'),
1409
            ['order_id'],
1410
            ['id'],
1411
            ['onDelete' => 'CASCADE']
1412
        );
1413
        $table->addForeignKeyConstraint(
1414
            $schema->getTable('oro_integration_channel'),
1415
            ['channel_id'],
1416
            ['id'],
1417
            ['onDelete' => 'SET NULL']
1418
        );
1419
        $table->addForeignKeyConstraint(
1420
            $schema->getTable('oro_organization'),
1421
            ['owner_id'],
1422
            ['id'],
1423
            ['onDelete' => 'SET NULL']
1424
        );
1425
    }
1426
1427
    /**
1428
     * Add orocrm_magento_newsl_subscr foreign keys.