EditInfo::getConstant()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
ccs 0
cts 3
cp 0
crap 2
rs 10
c 0
b 0
f 0
1
<?php
2
declare(strict_types=1);
3
4
namespace Ctefan\Kiwi;
5
6
class EditInfo
7
{
8
    /**
9
     * @var Tag
10
     */
11
    protected $tag;
12
13
    /**
14
     * @var Constraint
15
     */
16
    protected $constraint;
17
18
    /**
19
     * @var float
20
     */
21
    protected $constant;
22
23
    /**
24
     * EditInfo constructor.
25
     *
26
     * @param Constraint $constraint
27
     * @param Tag $tag
28
     * @param float $constant
29
     */
30
    public function __construct(Constraint $constraint, Tag $tag, float $constant)
31
    {
32
        $this->constraint = $constraint;
33
        $this->tag = $tag;
34
        $this->constant = $constant;
35
    }
36
37
    /**
38
     * @return Tag
39
     */
40
    public function getTag(): Tag
41
    {
42
        return $this->tag;
43
    }
44
45
    /**
46
     * @param Tag $tag
47
     */
48
    public function setTag(Tag $tag): void
49
    {
50
        $this->tag = $tag;
51
    }
52
53
    /**
54
     * @return Constraint
55
     */
56
    public function getConstraint(): Constraint
57
    {
58
        return $this->constraint;
59
    }
60
61
    /**
62
     * @param Constraint $constraint
63
     */
64
    public function setConstraint(Constraint $constraint): void
65
    {
66
        $this->constraint = $constraint;
67
    }
68
69
    /**
70
     * @return float
71
     */
72
    public function getConstant(): float
73
    {
74
        return $this->constant;
75
    }
76
77
    /**
78
     * @param float $constant
79
     */
80
    public function setConstant(float $constant): void
81
    {
82
        $this->constant = $constant;
83
    }
84
}