Completed
Push — 3.1.x ( b8b6d2...fd2df9 )
by Karel
14:12 queued 11:28
created

TransformEvent   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 63
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 50%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 5
lcom 0
cbo 1
dl 0
loc 63
c 1
b 0
f 0
ccs 7
cts 14
cp 0.5
rs 10

5 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 6 1
A getDocument() 0 4 1
A getFields() 0 4 1
A getObject() 0 4 1
A setDocument() 0 4 1
1
<?php
2
3
/**
4
 * This file is part of the FOSElasticaBundle project.
5
 *
6
 * (c) Infinite Networks Pty Ltd <http://www.infinite.net.au>
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 Symfony\Component\EventDispatcher\Event;
15
16
class TransformEvent extends Event
17
{
18
    const POST_TRANSFORM = 'fos_elastica.post_transform';
19
20
    /**
21
     * @var mixed
22
     */
23
    private $document;
24
25
    /**
26
     * @var array
27
     */
28
    private $fields;
29
30
    /**
31
     * @var mixed
32
     */
33
    private $object;
34
35
    /**
36
     * @param mixed $document
37
     * @param array $fields
38
     * @param mixed $object
39
     */
40 1
    public function __construct($document, array $fields, $object)
41
    {
42 1
        $this->document = $document;
43 1
        $this->fields = $fields;
44 1
        $this->object = $object;
45 1
    }
46
47
    /**
48
     * @return mixed
49
     */
50 1
    public function getDocument()
51
    {
52 1
        return $this->document;
53
    }
54
55
    /**
56
     * @return array
57
     */
58
    public function getFields()
59
    {
60
        return $this->fields;
61
    }
62
63
    /**
64
     * @return mixed
65
     */
66
    public function getObject()
67
    {
68
        return $this->object;
69
    }
70
71
    /**
72
     * @param mixed $document
73
     */
74
    public function setDocument($document)
75
    {
76
        $this->document = $document;
77
    }
78
}
79