Completed
Push — master ( f9d716...4c8558 )
by Ben
08:54 queued 04:26
created

Easychimp   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 3

Importance

Changes 7
Bugs 0 Features 2
Metric Value
wmc 2
c 7
b 0
f 2
lcom 1
cbo 3
dl 0
loc 21
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A mailingList() 0 4 1
1
<?php
2
3
namespace Easychimp;
4
5
use Mailchimp\Mailchimp;
6
7
class Easychimp
8
{
9
10
    /** @var Mailchimp */
11
    protected $api;
12
13
    public function __construct($apiKey)
14
    {
15
        $this->api = new Mailchimp($apiKey);
16
    }
17
18
    /**
19
     * @param $id
20
     *
21
     * @return \Easychimp\MailingList
22
     */
23
    public function mailingList($id)
24
    {
25
        return new MailingList($this->api, new Support(), $id);
26
    }
27
}