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

PrePersistEvent   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
lcom 0
cbo 1
dl 0
loc 25
c 1
b 0
f 0
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A getDocument() 0 4 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
}