Completed
Push — master ( 4e4cd8...063296 )
by Maksim
16s
created

PrePersistEvent::getPager()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 4
Ratio 100 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
dl 4
loc 4
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
crap 1
1
<?php
2
namespace FOS\ElasticaBundle\Persister\Event;
3
4
use FOS\ElasticaBundle\Persister\ObjectPersisterInterface;
5
use FOS\ElasticaBundle\Provider\PagerInterface;
6
use Symfony\Component\EventDispatcher\Event;
7
8 View Code Duplication
final class PrePersistEvent extends Event
0 ignored issues
show
Duplication introduced by
This class seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
9
{
10
    /**
11
     * @var PagerInterface
12
     */
13
    private $pager;
14
15
    /**
16
     * @var ObjectPersisterInterface
17
     */
18
    private $objectPersister;
19
20
    /**
21
     * @var array
22
     */
23
    private $options;
24
25 15
    public function __construct(PagerInterface $pager, ObjectPersisterInterface $objectPersister, array $options)
26
    {
27 15
        $this->pager = $pager;
28 15
        $this->objectPersister = $objectPersister;
29 15
        $this->options = $options;
30 15
    }
31
32
    /**
33
     * @return PagerInterface
34
     */
35 10
    public function getPager()
36
    {
37 10
        return $this->pager;
38
    }
39
40
    /**
41
     * @param PagerInterface $pager
42
     */
43 1
    public function setPager($pager)
44
    {
45 1
        $this->pager = $pager;
46 1
    }
47
48
    /**
49
     * @return array
50
     */
51 10
    public function getOptions()
52
    {
53 10
        return $this->options;
54
    }
55
56
    /**
57
     * @param array $options
58
     */
59 1
    public function setOptions(array $options)
60
    {
61 1
        $this->options = $options;
62 1
    }
63
64
    /**
65
     * @return ObjectPersisterInterface
66
     */
67 3
    public function getObjectPersister()
68
    {
69 3
        return $this->objectPersister;
70
    }
71
72
    /**
73
     * @param ObjectPersisterInterface $objectPersister
74
     */
75 1
    public function setObjectPersister(ObjectPersisterInterface $objectPersister)
76
    {
77 1
        $this->objectPersister = $objectPersister;
78 1
    }
79
}
80