Completed
Push — master ( 16c929...217223 )
by Peter
06:17
created

BaseIntervalPoint::neq()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 1
1
<?php
2
/**
3
 * Pkvs package
4
 *
5
 * @package Pkvs
6
 * @author  Peter Gribanov <[email protected]>
7
 */
8
9
namespace GpsLab\Component\Interval;
10
11
abstract class BaseIntervalPoint implements IntervalPointInterface
12
{
13
    /**
14
     * @param IntervalPointInterface $point
15
     *
16
     * @return bool
17
     */
18
    public function eq(IntervalPointInterface $point)
19
    {
20
        return $this->value() == $point->value();
21
    }
22
23
    /**
24
     * @param IntervalPointInterface $point
25
     *
26
     * @return bool
27
     */
28
    public function neq(IntervalPointInterface $point)
29
    {
30
        return $this->value() != $point->value();
31
    }
32
33
    /**
34
     * @param IntervalPointInterface $point
35
     *
36
     * @return bool
37
     */
38
    public function lt(IntervalPointInterface $point)
39
    {
40
        return $this->value() < $point->value();
41
    }
42
43
    /**
44
     * @param IntervalPointInterface $point
45
     *
46
     * @return bool
47
     */
48
    public function lte(IntervalPointInterface $point)
49
    {
50
        return $this->value() <= $point->value();
51
    }
52
53
    /**
54
     * @param IntervalPointInterface $point
55
     *
56
     * @return bool
57
     */
58
    public function gt(IntervalPointInterface $point)
59
    {
60
        return $this->value() > $point->value();
61
    }
62
63
    /**
64
     * @param IntervalPointInterface $point
65
     *
66
     * @return bool
67
     */
68
    public function gte(IntervalPointInterface $point)
69
    {
70
        return $this->value() >= $point->value();
71
    }
72
}
73