PostInsertObjectsEvent::getObjects()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
crap 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 PostInsertObjectsEvent 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 object[]
32
     */
33
    private $objects;
34
35
    /**
36
     * @var array
37
     */
38
    private $options;
39
40 20 View Code Duplication
    public function __construct(PagerInterface $pager, ObjectPersisterInterface $objectPersister, array $objects, array $options)
41
    {
42 20
        $this->pager = $pager;
43 20
        $this->objectPersister = $objectPersister;
44 20
        $this->objects = $objects;
45 20
        $this->options = $options;
46 20
    }
47
48 6
    public function getPager(): PagerInterface
49
    {
50 6
        return $this->pager;
51
    }
52
53 2
    public function getOptions(): array
54
    {
55 2
        return $this->options;
56
    }
57
58 2
    public function getObjectPersister(): ObjectPersisterInterface
59
    {
60 2
        return $this->objectPersister;
61
    }
62
63
    /**
64
     * @return object[]
65
     */
66 2
    public function getObjects(): array
67
    {
68 2
        return $this->objects;
69
    }
70
}
71