ListsGetHandler   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 7
c 1
b 0
f 0
dl 0
loc 22
ccs 7
cts 7
cp 1
rs 10
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getApiEndpoint() 0 3 1
A getSubscriberLists() 0 7 1
1
<?php
2
/**
3
 * File: ListsGetHandler.php
4
 *
5
 * @author      Maciej Sławik <[email protected]>
6
 * Github:      https://github.com/maciejslawik
7
 */
8
9
namespace MSlwk\FreshMail\Handler\Lists;
10
11
use MSlwk\FreshMail\Handler\AbstractHandler;
12
13
/**
14
 * Class ListsGetHandler
15
 *
16
 * @package MSlwk\FreshMail\Handler\Lists
17
 */
18
class ListsGetHandler extends AbstractHandler
19
{
20
    const API_ENDPOINT = '/rest/subscribers_list/lists';
21
22
    /**
23
     * @return array
24
     */
25 7
    public function getSubscriberLists(): array
26
    {
27 7
        $getParameters = [];
28 7
        $postParameters = [];
29
30 7
        $response = $this->processRequest($getParameters, $postParameters);
31 7
        return $response->lists;
32
    }
33
34
    /**
35
     * @return string
36
     */
37 7
    protected function getApiEndpoint(): string
38
    {
39 7
        return self::API_ENDPOINT;
40
    }
41
}
42