ResultListEvent::getResult()   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\Event;
4
5
use FOS\RestBundle\Request\ParamFetcherInterface;
6
use Pgs\RestfonyBundle\Model\RestPaginator;
7
use Symfony\Component\EventDispatcher\Event;
8
9
/**
10
 * @author Michał Sikora
11
 */
12
class ResultListEvent extends Event
13
{
14
    /**
15
     * @var ParamFetcherInterface
16
     */
17
    private $paramFetcher;
18
19
    /**
20
     * @var RestPaginator
21
     */
22
    private $result;
23
24 4
    public function __construct(ParamFetcherInterface $paramFetcher, RestPaginator $result)
25
    {
26 4
        $this->paramFetcher = $paramFetcher;
27 4
        $this->result = $result;
28 4
    }
29
30
    /**
31
     * @return ParamFetcherInterface
32
     */
33 1
    public function getParamFetcher()
34
    {
35 1
        return $this->paramFetcher;
36
    }
37
38
    /**
39
     * @return RestPaginator
40
     */
41 2
    public function getResult()
42
    {
43 2
        return $this->result;
44
    }
45
46
    /**
47
     * @param RestPaginator $result
48
     *
49
     * @return $this
50
     */
51 1
    public function setResult(RestPaginator $result)
52
    {
53 1
        $this->result = $result;
54 1
    }
55
}
56