Completed
Pull Request — master (#659)
by
unknown
03:02
created

BulkEvent   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 53
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

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

4 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 6 1
A getType() 0 4 1
A getQuery() 0 4 1
A getOperation() 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 BulkEvent extends Event
17
{
18
    /**
19
     * @var string
20
     */
21
    private $operation;
22
23
    /**
24
     * @var string|array
25
     */
26
    private $type;
27
28
    /**
29
     * @var array
30
     */
31
    private $query;
32
33
    /**
34
     * @param string       $operation
35
     * @param string|array $type
36
     * @param array        $query
37
     */
38
    public function __construct($operation, $type, array $query)
39
    {
40
        $this->type = $type;
41
        $this->query = $query;
42
        $this->operation = $operation;
43
    }
44
45
    /**
46
     * @return array|string
47
     */
48
    public function getType()
49
    {
50
        return $this->type;
51
    }
52
53
    /**
54
     * @return array
55
     */
56
    public function getQuery()
57
    {
58
        return $this->query;
59
    }
60
61
    /**
62
     * @return array
63
     */
64
    public function getOperation()
65
    {
66
        return $this->operation;
67
    }
68
}
69