RestManager::getManager()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 4
rs 10
ccs 2
cts 2
cp 1
cc 1
eloc 2
nc 1
nop 0
crap 1
1
<?php
2
3
namespace Pgs\RestfonyBundle\Controller;
4
5
use Pgs\RestfonyBundle\Form\Factory\RestFormFactory;
6
use Pgs\RestfonyBundle\Manager\ManagerInterface;
7
8
/**
9
 * @author Michał Sikora
10
 */
11
class RestManager
12
{
13
    /**
14
     * @var string
15
     */
16
    private $moduleName;
17
18
    /**
19
     * @var ManagerInterface
20
     */
21
    private $manager;
22
23
    /**
24
     * @var RestFormFactory
25
     */
26
    private $restFormFactory;
27
28
    /**
29
     * @var RestFormFactory
30
     */
31
    private $restFilterFactory;
32
33
    /**
34
     * @param $moduleName
35
     * @param ManagerInterface $manager
36
     * @param RestFormFactory  $restFormFactory
37
     * @param RestFormFactory  $restFilterFactory
38
     */
39 4
    public function __construct(
40
        $moduleName,
41
        ManagerInterface $manager,
42
        RestFormFactory $restFormFactory,
43
        RestFormFactory $restFilterFactory
44
    ) {
45 4
        $this->moduleName = $moduleName;
46 4
        $this->manager = $manager;
47 4
        $this->restFormFactory = $restFormFactory;
48 4
        $this->restFilterFactory = $restFilterFactory;
49 4
    }
50
51
    /**
52
     * @return ManagerInterface
53
     */
54 1
    public function getManager()
55
    {
56 1
        return $this->manager;
57
    }
58
59
    /**
60
     * @return RestFormFactory
61
     */
62 1
    public function getRestFormFactory()
63
    {
64 1
        return $this->restFormFactory;
65
    }
66
67
    /**
68
     * @return RestFormFactory
69
     */
70 1
    public function getRestFilterFactory()
71
    {
72 1
        return $this->restFilterFactory;
73
    }
74
75
    /**
76
     * @return string
77
     */
78 1
    public function getModuleName()
79
    {
80 1
        return $this->moduleName;
81
    }
82
}
83