Code Duplication    Length = 5-5 lines in 2 locations

src/Material.php 2 locations

@@ 247-251 (lines=5) @@
244
            foreach ($dbTableFieldsIds as $field) {
245
                /** Add table columns names */
246
                $tableColumns[] = $field->Name;
247
                if ($field->local == 1) {
248
                    $localizedFields[] = $field->id;
249
                } else {
250
                    $unlocalizedFields[] = $field->id;
251
                }
252
            }
253
254
            // Get table row materials
@@ 339-343 (lines=5) @@
336
            foreach (dbQuery('field')->order_by('priority')->cond('FieldID', $dbTableFieldsIds)->exec() as $field) {
337
                /** Add table columns names */
338
                $tableColumns[] = $field->Name;
339
                if ($field->local == 1) {
340
                    $localizedFields[] = $field->id;
341
                } else {
342
                    $unlocalizedFields[] = $field->id;
343
                }
344
            }
345
346
            // Query to get table rows(table materials)