Completed
Pull Request — master (#15)
by Nick
07:21 queued 02:21
created

Decision::getRuleId()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 0
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 string
39
     */
40 View Code Duplication
    public function getContentList()
41
    {
42
        $contentList = $this->getEntityValue('content', '');
43
        $ret = [];
44
        foreach ($contentList as $content) {
45
            $ret[] = new Content($content);
46
        }
47
48
        return $ret;
49
    }
50
51
    /**
52
     * Gets the 'policy' parameter.
53
     *
54
     * @return string
55
     */
56
    public function getPolicy()
57
    {
58
        return $this->getEntityValue('policy', '');
59
    }
60
61
    /**
62
     * Gets the 'rule_id' parameter.
63
     *
64
     * @return string
65
     */
66
    public function getRuleId()
67
    {
68
        return $this->getEntityValue('rule_id', '');
69
    }
70
71
    /**
72
     * Gets the 'rule_id' parameter.
73
     *
74
     * @return string
75
     */
76
    public function getRuleName()
77
    {
78
        return $this->getEntityValue('rule_name', '');
79
    }
80
}
81