Code Duplication    Length = 11-13 lines in 4 locations

code/api/CampaignMonitorAPIConnector.php 4 locations

@@ 262-272 (lines=11) @@
259
     *         'TotalRecipients' => The number of recipients of the campaign
260
     *     }
261
     */
262
    public function getCampaigns()
263
    {
264
        //require_once '../../csrest_clients.php';
265
        $wrap = new CS_REST_Clients($this->Config()->get("client_id"), $this->getAuth());
266
        $result = $wrap->get_campaigns();
267
        return $this->returnResult(
268
            $result,
269
            "GET /api/v3.1/clients/{id}/campaigns",
270
            "Got sent campaigns"
271
        );
272
    }
273
274
    public function getDrafts()
275
    {
@@ 274-284 (lines=11) @@
271
        );
272
    }
273
274
    public function getDrafts()
275
    {
276
        //require_once '../../csrest_clients.php';
277
        $wrap = new CS_REST_Clients($this->Config()->get("client_id"), $this->getAuth());
278
        $result = $wrap->get_drafts();
279
        return $this->returnResult(
280
            $result,
281
            "GET /api/v3.1/clients/{id}/drafts",
282
            "Got draft campaigns"
283
        );
284
    }
285
286
    /**
287
     * Gets all subscriber lists the current client has created
@@ 296-306 (lines=11) @@
293
     *     }
294
     * )
295
     */
296
    public function getLists()
297
    {
298
        //require_once '../../csrest_clients.php';
299
        $wrap = new CS_REST_Clients($this->Config()->get("client_id"), $this->getAuth());
300
        $result = $wrap->get_lists();
301
        return $this->returnResult(
302
            $result,
303
            "GET /api/v3.1/clients/{id}/lists",
304
            "Got Lists"
305
        );
306
    }
307
308
    public function getScheduled()
309
    {
@@ 341-353 (lines=13) @@
338
        );
339
    }
340
341
    public function getTemplates()
342
    {
343
        $wrap = new CS_REST_Clients(
344
            $this->Config()->get("client_id"),
345
            $this->getAuth()
346
        );
347
        $result = $wrap->get_templates();
348
        return $this->returnResult(
349
            $result,
350
            "GET /api/v3/clients/{id}/templates",
351
            "Get Templates"
352
        );
353
    }
354
355
    public function getTemplate($templatID)
356
    {