PostPersistEvent   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 39
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
dl 0
loc 39
c 0
b 0
f 0
wmc 4
lcom 0
cbo 1
ccs 11
cts 11
cp 1
rs 10

4 Methods

Rating   Name   Duplication   Size   Complexity  
A getObjectPersister() 0 4 1
A __construct() 0 6 1
A getPager() 0 4 1
A getOptions() 0 4 1
1
<?php
2
3
/*
4
 * This file is part of the FOSElasticaBundle package.
5
 *
6
 * (c) FriendsOfSymfony <https://friendsofsymfony.github.com/>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace FOS\ElasticaBundle\Persister\Event;
13
14
use FOS\ElasticaBundle\Persister\ObjectPersisterInterface;
15
use FOS\ElasticaBundle\Provider\PagerInterface;
16
use Symfony\Contracts\EventDispatcher\Event;
17
18
final class PostPersistEvent extends Event implements PersistEvent
19
{
20
    /**
21
     * @var PagerInterface
22
     */
23
    private $pager;
24
25
    /**
26
     * @var ObjectPersisterInterface
27
     */
28
    private $objectPersister;
29
30
    /**
31
     * @var array
32
     */
33
    private $options;
34
35 15
    public function __construct(PagerInterface $pager, ObjectPersisterInterface $objectPersister, array $options)
36
    {
37 15
        $this->pager = $pager;
38 15
        $this->objectPersister = $objectPersister;
39 15
        $this->options = $options;
40 15
    }
41
42 2
    public function getPager(): PagerInterface
43
    {
44 2
        return $this->pager;
45
    }
46
47 2
    public function getOptions(): array
48
    {
49 2
        return $this->options;
50
    }
51
52 2
    public function getObjectPersister(): ObjectPersisterInterface
53
    {
54 2
        return $this->objectPersister;
55
    }
56
}
57