Completed
Pull Request — master (#615)
by
unknown
02:55
created

PreCommitEvent   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 44
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

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

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A getCommitMode() 0 4 1
A getParams() 0 4 1
1
<?php
2
3
/*
4
 * This file is part of the ONGR package.
5
 *
6
 * (c) NFQ Technologies UAB <[email protected]>
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 ONGR\ElasticsearchBundle\Event;
13
14
use Symfony\Component\EventDispatcher\Event;
15
16
class PreCommitEvent extends Event
17
{
18
    /**
19
     * @var string
20
     */
21
    private $commitMode;
22
23
    /**
24
     * @var array
25
     */
26
    private $params;
27
28
    /**
29
     * Constructor
30
     *
31
     * @param string $commitMode
32
     * @param array  $params
33
     */
34
    public function __construct($commitMode, array $params = [])
35
    {
36
        $this->commitMode = $commitMode;
37
        $this->params = $params;
38
    }
39
40
    /**
41
     * Returns commit mode
42
     *
43
     * @return string
44
     */
45
    public function getCommitMode()
46
    {
47
        return $this->commitMode;
48
    }
49
50
    /**
51
     * Returns params
52
     *
53
     * @return array
54
     */
55
    public function getParams()
56
    {
57
        return $this->params;
58
    }
59
}
60