Total Complexity | 8 |
Total Lines | 34 |
Duplicated Lines | 0 % |
Coverage | 88.89% |
Changes | 0 |
1 | <?php |
||
5 | class TinyMailListBuilder |
||
6 | { |
||
7 | protected $listFolder; |
||
8 | protected $mailList; |
||
9 | |||
10 | 3 | public function __construct($mailList = [], $listFolder = 'list') |
|
11 | { |
||
12 | 3 | $this->listFolder = $listFolder; |
|
13 | 3 | $this->mailList = $mailList; |
|
14 | 3 | } |
|
15 | |||
16 | 3 | public function add($email, $list) |
|
17 | { |
||
18 | 3 | $email = $this->checkEmail($email); |
|
19 | 3 | if ($email) { |
|
20 | 3 | return $this->storeEmail($email, $list); |
|
21 | } |
||
22 | } |
||
23 | |||
24 | 3 | protected function checkEmail($email) |
|
31 | } |
||
32 | |||
33 | 3 | protected function storeEmail($email, $list) |
|
42 |