Completed
Pull Request — master (#8)
by
unknown
05:09
created

Action::getEntities()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 3
ccs 0
cts 0
cp 0
rs 10
nc 1
cc 1
eloc 2
nop 0
crap 2
1
<?php
2
3
namespace Tgallice\Wit\Model\Step;
4
5
use Tgallice\Wit\Model\Step;
6
7
class Action implements Step
8
{
9
    /**
10
     * @var string
11
     */
12
    private $action;
13
14
    /**
15
     * @var float
16
     */
17
    private $confidence;
18
19
    /**
20
     * @var array
21
     */
22
    private $entities;
23 8
24
    /**
25 8
     * @param string $action
26 8
     * @param float $confidence
27 8
     */
28
    public function __construct($action, $confidence, $entities)
29
    {
30
        $this->action = $action;
31
        $this->confidence = (float) $confidence;
32 2
        $this->entities = $entities;
33
    }
34 2
35
    /**
36
     * @return string
37
     */
38
    public function getAction()
39
    {
40 1
        return $this->action;
41
    }
42 1
43
    /**
44
     * @return float
45
     */
46
    public function getConfidence()
47
    {
48 1
        return $this->confidence;
49
    }
50 1
51
    /**
52
     * @return string
53
     */
54
    public function getType()
55
    {
56
        return Step::TYPE_ACTION;
57
    }
58
59
    /**
60
     * @return array
61
     */
62
    public function getEntities() {
63
        return $this->entities;
64
    }
65
}
66