Interval::getStart()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 3
rs 10
c 0
b 0
f 0
cc 1
eloc 1
nc 1
nop 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace MartanLV\Koki;
6
7
/**
8
 * Class Interval.
9
 *
10
 * @author yourname
11
 */
12
class Interval implements IntervalInterface
13
{
14
    /**
15
     * The low value of an interval is used as key to maintain order in BST.
16
     * The insert and delete operations are same as insert and delete in self-balancing BST used.
17
     */
18
    protected $low;
19
    protected $high;
20
21
    /**
22
     * undocumented function.
23
     *
24
     * @return void
25
     */
26
    public function __construct($low, $high)
27
    {
28
        $this->high = $high;
29
        $this->low = $low;
30
    }
31
32
    public function getEnd(): int
33
    {
34
        return $this->high;
35
    }
36
37
    public function getStart(): int
38
    {
39
        return $this->low;
40
    }
41
}
42