Lister   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 39
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

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

4 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 3 1
A generateData() 0 3 1
A buildList() 0 5 1
A generateResponse() 0 3 1
1
<?php
2
3
namespace Povs\ListerBundle\Service;
4
5
use Povs\ListerBundle\Declaration\ListerInterface;
6
use Symfony\Component\HttpFoundation\Response;
7
8
/**
9
 * @author Povilas Margaiatis <[email protected]>
10
 */
11
class Lister implements ListerInterface
12
{
13
    /**
14
     * @var ListManager
15
     */
16
    private $listManager;
17
18
    /**
19
     * @param ListManager $listManager
20
     */
21 3
    public function __construct(ListManager $listManager)
22
    {
23 3
        $this->listManager = $listManager;
24
    }
25
26
    /**
27
     * @inheritDoc
28
     */
29 1
    public function buildList(string $list, string $type, array $parameters = []): ListerInterface
30
    {
31 1
        $this->listManager->buildList($list, $type, $parameters);
32
33 1
        return $this;
34
    }
35
36
    /**
37
     * @inheritDoc
38
     */
39 1
    public function generateResponse(array $options = []): Response
40
    {
41 1
        return $this->listManager->getResponse($options);
42
    }
43
44
    /**
45
     * @inheritDoc
46
     */
47 1
    public function generateData(array $options = [])
48
    {
49 1
        return $this->listManager->getData($options);
50
    }
51
}
52