Completed
Push — upgrade ( f08820...3a8411 )
by Simonas
02:02
created

BulkEvent   A

Complexity

Total Complexity 9

Size/Duplication

Total Lines 55
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
wmc 9
lcom 0
cbo 1
dl 0
loc 55
c 0
b 0
f 0
rs 10

9 Methods

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