Completed
Push — master ( 952551...2fc2de )
by Gallice
45s
created

AbstractStep::getConfidence()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

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