Completed
Pull Request — master (#812)
by
unknown
02:08
created

PrePersistEvent::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
dl 0
loc 4
c 1
b 0
f 0
rs 10
cc 1
eloc 2
nc 1
nop 1
1
<?php
2
3
namespace ONGR\ElasticsearchBundle\Event;
4
5
use Symfony\Component\EventDispatcher\Event;
6
7
class PrePersistEvent extends Event
8
{
9
    /**
10
     * @var object
11
     */
12
    protected $document;
13
14
    /**
15
     * PrePersistEvent constructor.
16
     *
17
     * @param $document
18
     */
19
    public function __construct($document)
20
    {
21
        $this->document = $document;
22
    }
23
24
    /**
25
     * @return object
26
     */
27
    public function getDocument()
28
    {
29
        return $this->document;
30
    }
31
}