Completed
Push — master ( 43dd0a...110067 )
by Nick
19s
created

Decision::getContent()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 6
ccs 0
cts 3
cp 0
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 3
nc 1
nop 0
crap 2
1
<?php
2
3
namespace Acquia\LiftClient\Entity;
4
5
class Decision extends Entity
6
{
7
    /**
8
     * @param array $array
9
     */
10
    public function __construct(array $array = [])
11
    {
12
        parent::__construct($array);
13
    }
14
15
    /**
16
     * Gets the 'slot_id' parameter.
17
     *
18
     * @return string
19
     */
20
    public function getSlotId()
21
    {
22
        return $this->getEntityValue('slot_id', '');
23
    }
24
25
    /**
26
     * Gets the 'slot_name' parameter.
27
     *
28
     * @return string
29
     */
30
    public function getSlotName()
31
    {
32
        return $this->getEntityValue('slot_name', '');
33
    }
34
35
    /**
36
     * Gets the 'content' parameter.
37
     *
38
     * @return Content
39
     */
40
    public function getContent()
41
    {
42
        $content = $this->getEntityValue('content', []);
43
44
        return new Content($content);
45
    }
46
47
    /**
48
     * Gets the 'policy' parameter.
49
     *
50
     * @return string
51
     */
52
    public function getPolicy()
53
    {
54
        return $this->getEntityValue('policy', '');
55
    }
56
57
    /**
58
     * Gets the 'rule_id' parameter.
59
     *
60
     * @return string
61
     */
62
    public function getRuleId()
63
    {
64
        return $this->getEntityValue('rule_id', '');
65
    }
66
67
    /**
68
     * Gets the 'rule_id' parameter.
69
     *
70
     * @return string
71
     */
72
    public function getRuleName()
73
    {
74
        return $this->getEntityValue('rule_name', '');
75
    }
76
}
77