Completed
Push — master ( f4b0de...7c84cc )
by
unknown
17s queued 10s
created

AbstractTransformEvent::getFields()   A

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\Event;
13
14
use Elastica\Document;
15
use Symfony\Contracts\EventDispatcher\Event;
16
17
abstract class AbstractTransformEvent extends Event
18
{
19
    /**
20
     * @var Document
21
     */
22
    protected $document;
23
24
    /**
25
     * @var array
26
     */
27
    private $fields;
28
29
    /**
30
     * @var object
31
     */
32
    private $object;
33
34 9
    public function __construct(Document $document, array $fields, object $object)
35
    {
36 9
        $this->document = $document;
37 9
        $this->fields = $fields;
38 9
        $this->object = $object;
39 9
    }
40
41 5
    public function getDocument(): Document
42
    {
43 5
        return $this->document;
44
    }
45
46 2
    public function getFields(): array
47
    {
48 2
        return $this->fields;
49
    }
50
51 2
    public function getObject(): object
52
    {
53 2
        return $this->object;
54
    }
55
}
56