Code Duplication    Length = 6-6 lines in 2 locations

code/model/CampaignMonitorCampaign.php 2 locations

@@ 401-406 (lines=6) @@
398
                //check drafts
399
                $result = $this->api->$apiMethod1();
400
                if (isset($result)) {
401
                    foreach ($result as $key => $campaign) {
402
                        if ($this->$field == $campaign->$field) {
403
                            $this->_existsOnCampaignMonitorCheck = true;
404
                            break;
405
                        }
406
                    }
407
                } elseif ($apiMethod2) {
408
                    //check sent ones
409
                    $result = $this->api->$apiMethod2();
@@ 411-416 (lines=6) @@
408
                    //check sent ones
409
                    $result = $this->api->$apiMethod2();
410
                    if (isset($result)) {
411
                        foreach ($result as $key => $campaign) {
412
                            if ($this->$field == $campaign->$field) {
413
                                $this->_existsOnCampaignMonitorCheck = true;
414
                                break;
415
                            }
416
                        }
417
                    }
418
                }
419
            }