Code Duplication    Length = 22-22 lines in 2 locations

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

@@ 1060-1081 (lines=22) @@
1057
     *
1058
     * @param Schema $schema
1059
     */
1060
    protected function addOrocrmMagentoCartItemForeignKeys(Schema $schema)
1061
    {
1062
        $table = $schema->getTable('orocrm_magento_cart_item');
1063
        $table->addForeignKeyConstraint(
1064
            $schema->getTable('orocrm_magento_cart'),
1065
            ['cart_id'],
1066
            ['id'],
1067
            ['onDelete' => 'CASCADE']
1068
        );
1069
        $table->addForeignKeyConstraint(
1070
            $schema->getTable('oro_integration_channel'),
1071
            ['channel_id'],
1072
            ['id'],
1073
            ['onDelete' => 'SET NULL']
1074
        );
1075
        $table->addForeignKeyConstraint(
1076
            $schema->getTable('oro_organization'),
1077
            ['owner_id'],
1078
            ['id'],
1079
            ['onDelete' => 'SET NULL']
1080
        );
1081
    }
1082
1083
    /**
1084
     * Add orocrm_magento_customer_addr foreign keys.
@@ 1398-1419 (lines=22) @@
1395
     *
1396
     * @param Schema $schema
1397
     */
1398
    protected function addOrocrmMagentoOrderItemsForeignKeys(Schema $schema)
1399
    {
1400
        $table = $schema->getTable('orocrm_magento_order_items');
1401
        $table->addForeignKeyConstraint(
1402
            $schema->getTable('orocrm_magento_order'),
1403
            ['order_id'],
1404
            ['id'],
1405
            ['onDelete' => 'CASCADE']
1406
        );
1407
        $table->addForeignKeyConstraint(
1408
            $schema->getTable('oro_integration_channel'),
1409
            ['channel_id'],
1410
            ['id'],
1411
            ['onDelete' => 'SET NULL']
1412
        );
1413
        $table->addForeignKeyConstraint(
1414
            $schema->getTable('oro_organization'),
1415
            ['owner_id'],
1416
            ['id'],
1417
            ['onDelete' => 'SET NULL']
1418
        );
1419
    }
1420
1421
    /**
1422
     * Add orocrm_magento_newsl_subscr foreign keys.