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
    {
@@ 342-354 (lines=13) @@
339
340
    }
341
342
    public function getTemplates()
343
    {
344
        $wrap = new CS_REST_Clients(
345
            $this->Config()->get("client_id"),
346
            $this->getAuth()
347
        );
348
        $result = $wrap->get_templates();
349
        return $this->returnResult(
350
            $result,
351
            "GET /api/v3/clients/{id}/templates",
352
            "Get Templates"
353
        );
354
    }
355
356
    public function getTemplate($templatID)
357
    {