BulkAction::getAction()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php namespace Nord\Lumen\Elasticsearch\Documents\Bulk;
2
3
class BulkAction
4
{
5
    public const ACTION_INDEX = 'index';
6
7
    /**
8
     * @var string
9
     */
10
    private $action;
11
12
    /**
13
     * @var array
14
     */
15
    private $metadata;
16
17
    /**
18
     * @var array
19
     */
20
    private $body;
21
22
23
    /**
24
     * @return string
25
     */
26
    public function getAction()
27
    {
28
        return $this->action;
29
    }
30
31
32
    /**
33
     * @param string $action
34
     * @param array  $metadata
35
     * @return BulkAction
36
     */
37
    public function setAction($action, array $metadata)
38
    {
39
        $this->action   = $action;
40
        $this->metadata = $metadata;
41
        return $this;
42
    }
43
44
45
    /**
46
     * @return array
47
     */
48
    public function getMetadata()
49
    {
50
        return $this->metadata;
51
    }
52
53
54
    /**
55
     * @return array
56
     */
57
    public function getBody()
58
    {
59
        return $this->body;
60
    }
61
62
63
    /**
64
     * @param array $body
65
     * @return BulkAction
66
     */
67
    public function setBody(array $body)
68
    {
69
        $this->body = $body;
70
        return $this;
71
    }
72
}
73