Code Duplication    Length = 5-7 lines in 2 locations

src/Http/Api/IssueController.php 2 locations

@@ 2471-2477 (lines=7) @@
2468
                }
2469
                $types = $new_types;
2470
2471
                foreach ($subtask_issues as $issue)
2472
                {
2473
                    if (isset($issue['parent_id']) && $issue['parent_id']) {
2474
                        $this->importIssue($project_key, $issue, $types[$issue['type']]['schema'], $types[$issue['type']]['workflow']);
2475
                    }
2476
                }
2477
2478
                foreach ($standard_issues as $issue)
2479
                {
2480
                    $id = $this->importIssue($project_key, $issue, $types[$issue['type']]['schema'], $types[$issue['type']]['workflow']);
@@ 2484-2488 (lines=5) @@
2481
                    if (!isset($subtask_issues[$issue['title']]) || !$subtask_issues[$issue['title']]) {
2482
                        continue;
2483
                    }
2484
                    foreach ($subtask_issues[$issue['title']] as $sub_issue)
2485
                    {
2486
                        $sub_issue['parent_id'] = $id;
2487
                        $this->importIssue($project_key, $sub_issue, $types[$sub_issue['type']]['schema'], $types[$sub_issue['type']]['workflow']);
2488
                    }
2489
                }
2490
            }
2491
        );