Completed
Push — master ( 621fe7...1b6290 )
by Luke
02:31
created

MinMaxAreaObject::setMinimum()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 1
dl 0
loc 5
ccs 3
cts 3
cp 1
crap 1
rs 9.4285
c 0
b 0
f 0
1
<?php
2
3
namespace ZpgRtf\Objects;
4
5
/**
6
 * The min_max_area object defines an area range. Where only one is specified, we will regard them both as having the
7
 * same value - i.e. a fixed area.
8
 */
9
class MinMaxAreaObject implements \JsonSerializable
10
{
11
    /** @var AreaObject */
12
    private $minimum;
13
14
    /** @var AreaObject */
15
    private $maximum;
16
17
    /**
18
     * @return AreaObject
19
     */
20 2
    public function getMinimum()
21
    {
22 2
        return $this->minimum;
23
    }
24
25
    /**
26
     * @param AreaObject $minimum
27
     *
28
     * @return MinMaxAreaObject
29
     */
30 1
    public function setMinimum(AreaObject $minimum)
31
    {
32 1
        $this->minimum = $minimum;
33
34 1
        return $this;
35
    }
36
37
    /**
38
     * @return AreaObject
39
     */
40 2
    public function getMaximum()
41
    {
42 2
        return $this->maximum;
43
    }
44
45
    /**
46
     * @param AreaObject $maximum
47
     *
48
     * @return MinMaxAreaObject
49
     */
50 1
    public function setMaximum(AreaObject $maximum)
51
    {
52 1
        $this->maximum = $maximum;
53
54 1
        return $this;
55
    }
56
57
    /** {@inheritDoc} */
58 1
    public function jsonSerialize()
59
    {
60
        return [
61 1
            'minimum' => $this->getMinimum(),
62 1
            'maximum' => $this->getMaximum(),
63
        ];
64
    }
65
}
66