Code Duplication    Length = 8-10 lines in 17 locations

src/OroCRM/Bundle/CaseBundle/Migrations/Schema/v1_0/OroCRMCaseBundle.php 2 locations

@@ 97-104 (lines=8) @@
94
    /**
95
     * @param Schema $schema
96
     */
97
    protected function createCaseStatusTable(Schema $schema)
98
    {
99
        $table = $schema->createTable('orocrm_case_status');
100
        $table->addColumn('name', 'string', array('length' => 16));
101
        $table->addColumn('`order`', 'integer');
102
        $table->addColumn('label', 'string', array('length' => 255));
103
        $table->setPrimaryKey(array('name'));
104
    }
105
106
    /**
107
     * Generate table orocrm_case_status_trans
@@ 133-140 (lines=8) @@
130
    /**
131
     * @param Schema $schema
132
     */
133
    protected function createCasePriorityTable(Schema $schema)
134
    {
135
        $table = $schema->createTable('orocrm_case_priority');
136
        $table->addColumn('name', 'string', array('length' => 16));
137
        $table->addColumn('`order`', 'integer');
138
        $table->addColumn('label', 'string', array('length' => 255));
139
        $table->setPrimaryKey(array('name'));
140
    }
141
142
    /**
143
     * Generate table orocrm_case_priority_trans

src/OroCRM/Bundle/ContactBundle/Migrations/Schema/OroCRMContactBundleInstaller.php 2 locations

@@ 244-251 (lines=8) @@
241
     *
242
     * @param Schema $schema
243
     */
244
    protected function createOrocrmContactMethodTable(Schema $schema)
245
    {
246
        $table = $schema->createTable('orocrm_contact_method');
247
        $table->addColumn('name', 'string', ['length' => 32]);
248
        $table->addColumn('label', 'string', ['length' => 255]);
249
        $table->setPrimaryKey(['name']);
250
        $table->addUniqueIndex(['label'], 'UNIQ_B88D41BEA750E8');
251
    }
252
253
    /**
254
     * Create orocrm_contact_phone table
@@ 276-283 (lines=8) @@
273
     *
274
     * @param Schema $schema
275
     */
276
    protected function createOrocrmContactSourceTable(Schema $schema)
277
    {
278
        $table = $schema->createTable('orocrm_contact_source');
279
        $table->addColumn('name', 'string', ['length' => 32]);
280
        $table->addColumn('label', 'string', ['length' => 255]);
281
        $table->setPrimaryKey(['name']);
282
        $table->addUniqueIndex(['label'], 'UNIQ_A5B9108EA750E8');
283
    }
284
285
    /**
286
     * Create orocrm_contact_to_contact_grp table

src/OroCRM/Bundle/ContactBundle/Migrations/Schema/v1_0/OroCRMContactBundle.php 2 locations

@@ 177-186 (lines=10) @@
174
     *
175
     * @param Schema $schema
176
     */
177
    public static function orocrmContactMethodTable(Schema $schema)
178
    {
179
        /** Generate table orocrm_contact_method **/
180
        $table = $schema->createTable('orocrm_contact_method');
181
        $table->addColumn('name', 'string', ['length' => 32]);
182
        $table->addColumn('label', 'string', ['length' => 255]);
183
        $table->setPrimaryKey(['name']);
184
        $table->addUniqueIndex(['label'], 'UNIQ_B88D41BEA750E8');
185
        /** End of generate table orocrm_contact_method **/
186
    }
187
188
    /**
189
     * Generate table orocrm_contact_phone
@@ 212-221 (lines=10) @@
209
     *
210
     * @param Schema $schema
211
     */
212
    public static function orocrmContactSourceTable(Schema $schema)
213
    {
214
        /** Generate table orocrm_contact_source **/
215
        $table = $schema->createTable('orocrm_contact_source');
216
        $table->addColumn('name', 'string', ['length' => 32]);
217
        $table->addColumn('label', 'string', ['length' => 255]);
218
        $table->setPrimaryKey(['name']);
219
        $table->addUniqueIndex(['label'], 'UNIQ_A5B9108EA750E8');
220
        /** End of generate table orocrm_contact_source **/
221
    }
222
223
    /**
224
     * Generate table orocrm_contact_to_contact_group

src/OroCRM/Bundle/MagentoBundle/Migrations/Schema/v1_0/OroCRMMagentoBundle.php 1 location

@@ 242-251 (lines=10) @@
239
     *
240
     * @param Schema $schema
241
     */
242
    public static function orocrmMagentoCartStatusTable(Schema $schema)
243
    {
244
        /** Generate table orocrm_magento_cart_status **/
245
        $table = $schema->createTable('orocrm_magento_cart_status');
246
        $table->addColumn('name', 'string', ['length' => 32]);
247
        $table->addColumn('label', 'string', ['length' => 255]);
248
        $table->setPrimaryKey(['name']);
249
        $table->addUniqueIndex(['label'], 'UNIQ_26317505EA750E8');
250
        /** End of generate table orocrm_magento_cart_status **/
251
    }
252
253
    /**
254
     * Generate table orocrm_magento_customer

src/OroCRM/Bundle/MarketingListBundle/Migrations/Schema/OroCRMMarketingListBundleInstaller.php 1 location

@@ 48-55 (lines=8) @@
45
     *
46
     * @param Schema $schema
47
     */
48
    protected function createOrocrmMarketingListTypeTable(Schema $schema)
49
    {
50
        $table = $schema->createTable('orocrm_marketing_list_type');
51
        $table->addColumn('name', 'string', ['length' => 32]);
52
        $table->addColumn('label', 'string', ['length' => 255]);
53
        $table->addUniqueIndex(['label'], 'uniq_143b81a8ea750e8');
54
        $table->setPrimaryKey(['name']);
55
    }
56
57
    /**
58
     * Create orocrm_marketing_list table

src/OroCRM/Bundle/MarketingListBundle/Migrations/Schema/v1_0/OroCRMMarketingListBundle.php 1 location

@@ 35-42 (lines=8) @@
32
     *
33
     * @param Schema $schema
34
     */
35
    protected function createOrocrmMarketingListTypeTable(Schema $schema)
36
    {
37
        $table = $schema->createTable('orocrm_marketing_list_type');
38
        $table->addColumn('name', 'string', ['length' => 32]);
39
        $table->addColumn('label', 'string', ['length' => 255]);
40
        $table->addUniqueIndex(['label'], 'uniq_143b81a8ea750e8');
41
        $table->setPrimaryKey(['name']);
42
    }
43
44
    /**
45
     * Create orocrm_marketing_list_item table

src/OroCRM/Bundle/SalesBundle/Migrations/Schema/v1_0/OroCRMSalesBundle.php 3 locations

@@ 94-103 (lines=10) @@
91
     *
92
     * @param Schema $schema
93
     */
94
    public static function orocrmSalesLeadStatusTable(Schema $schema)
95
    {
96
        /** Generate table orocrm_sales_lead_status **/
97
        $table = $schema->createTable('orocrm_sales_lead_status');
98
        $table->addColumn('name', 'string', ['length' => 32]);
99
        $table->addColumn('label', 'string', ['length' => 255]);
100
        $table->setPrimaryKey(['name']);
101
        $table->addUniqueIndex(['label'], 'UNIQ_4516951BEA750E8');
102
        /** End of generate table orocrm_sales_lead_status **/
103
    }
104
105
    /**
106
     * Generate table orocrm_sales_lead_status
@@ 151-160 (lines=10) @@
148
     * @param Schema $schema
149
     * @param string $tableName
150
     */
151
    public static function orocrmSalesOpportunityCloseReasonTable(Schema $schema, $tableName = null)
152
    {
153
        /** Generate table orocrm_sales_opportunity_close_reason **/
154
        $table = $schema->createTable($tableName ?: 'orocrm_sales_opportunity_close_reason');
155
        $table->addColumn('name', 'string', ['length' => 32]);
156
        $table->addColumn('label', 'string', ['length' => 255]);
157
        $table->setPrimaryKey(['name']);
158
        $table->addUniqueIndex(['label'], 'UNIQ_FA526A41EA750E8');
159
        /** End of generate table orocrm_sales_opportunity_close_reason **/
160
    }
161
162
    /**
163
     * Generate table orocrm_sales_opportunity_status
@@ 168-177 (lines=10) @@
165
     * @param Schema $schema
166
     * @param string $tableName
167
     */
168
    public static function orocrmSalesOpportunityStatusTable(Schema $schema, $tableName = null)
169
    {
170
        /** Generate table orocrm_sales_opportunity_status **/
171
        $table = $schema->createTable($tableName ?: 'orocrm_sales_opportunity_status');
172
        $table->addColumn('name', 'string', ['length' => 32]);
173
        $table->addColumn('label', 'string', ['length' => 255]);
174
        $table->setPrimaryKey(['name']);
175
        $table->addUniqueIndex(['label'], 'UNIQ_2DB212B5EA750E8');
176
        /** End of generate table orocrm_sales_opportunity_status **/
177
    }
178
179
    /**
180
     * Generate table orocrm_sales_funnel

src/OroCRM/Bundle/CaseBundle/Migrations/Schema/OroCRMCaseBundleInstaller.php 2 locations

@@ 183-190 (lines=8) @@
180
     *
181
     * @param Schema $schema
182
     */
183
    protected function createOrocrmCaseStatusTable(Schema $schema)
184
    {
185
        $table = $schema->createTable('orocrm_case_status');
186
        $table->addColumn('name', 'string', ['length' => 16]);
187
        $table->addColumn('`order`', 'integer');
188
        $table->addColumn('label', 'string', ['length' => 255]);
189
        $table->setPrimaryKey(['name']);
190
    }
191
192
    /**
193
     * Create orocrm_case_status_trans table
@@ 219-226 (lines=8) @@
216
     *
217
     * @param Schema $schema
218
     */
219
    protected function createOrocrmCasePriorityTable(Schema $schema)
220
    {
221
        $table = $schema->createTable('orocrm_case_priority');
222
        $table->addColumn('name', 'string', ['length' => 16]);
223
        $table->addColumn('`order`', 'integer');
224
        $table->addColumn('label', 'string', ['length' => 255]);
225
        $table->setPrimaryKey(['name']);
226
    }
227
228
    /**
229
     * Create orocrm_case_priority_trans table

src/OroCRM/Bundle/SalesBundle/Migrations/Schema/OroCRMSalesBundleInstaller.php 3 locations

@@ 236-243 (lines=8) @@
233
     *
234
     * @param Schema $schema
235
     */
236
    protected function createOrocrmSalesLeadStatusTable(Schema $schema)
237
    {
238
        $table = $schema->createTable('orocrm_sales_lead_status');
239
        $table->addColumn('name', 'string', ['length' => 32]);
240
        $table->addColumn('label', 'string', ['length' => 255]);
241
        $table->addUniqueIndex(['label'], 'uniq_4516951bea750e8');
242
        $table->setPrimaryKey(['name']);
243
    }
244
245
    /**
246
     * Create orocrm_sales_funnel table
@@ 274-281 (lines=8) @@
271
     *
272
     * @param Schema $schema
273
     */
274
    protected function createOrocrmSalesOpportStatusTable(Schema $schema)
275
    {
276
        $table = $schema->createTable('orocrm_sales_opport_status');
277
        $table->addColumn('name', 'string', ['length' => 32]);
278
        $table->addColumn('label', 'string', ['length' => 255]);
279
        $table->addUniqueIndex(['label'], 'uniq_2db212b5ea750e8');
280
        $table->setPrimaryKey(['name']);
281
    }
282
283
    /**
284
     * Create orocrm_sales_opport_close_rsn table
@@ 288-295 (lines=8) @@
285
     *
286
     * @param Schema $schema
287
     */
288
    protected function createOrocrmSalesOpportCloseRsnTable(Schema $schema)
289
    {
290
        $table = $schema->createTable('orocrm_sales_opport_close_rsn');
291
        $table->addColumn('name', 'string', ['length' => 32]);
292
        $table->addColumn('label', 'string', ['length' => 255]);
293
        $table->addUniqueIndex(['label'], 'uniq_fa526a41ea750e8');
294
        $table->setPrimaryKey(['name']);
295
    }
296
297
    /**
298
     * Create orocrm_sales_lead table