Offset::setLeft()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 2
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
1
<?php
2
3
declare(strict_types=1);
4
/**
5
 * Offset class.
6
 *
7
 * @package   YetiForcePDF\Layout\Coordinates
8
 *
9
 * @copyright YetiForce Sp. z o.o
10
 * @license   MIT
11
 * @author    Rafal Pospiech <[email protected]>
12
 */
13
14
namespace YetiForcePDF\Layout\Coordinates;
15
16
use YetiForcePDF\Layout\Box;
17
18
/**
19
 * Class Offset.
20
 */
21
class Offset extends \YetiForcePDF\Base
22
{
23
	/**
24
	 * @var Box
25
	 */
26
	protected $box;
27
	/**
28
	 * Offset top.
29
	 *
30
	 * @var string|null
31
	 */
32
	protected $top;
33
	/**
34
	 * Offset left.
35
	 *
36
	 * @var string
37
	 */
38
	protected $left = '0';
39
40
	/**
41
	 * Get offset top.
42
	 *
43
	 * @return string
44
	 */
45
	public function getTop()
46
	{
47
		return $this->top;
48
	}
49
50
	/**
51
	 * Set offset top.
52
	 *
53
	 * @param string $top
54
	 *
55
	 * @return $this
56
	 */
57
	public function setTop(string $top)
58
	{
59
		$this->top = $top;
60
		return $this;
61
	}
62
63
	/**
64
	 * Get offset left.
65
	 *
66
	 * @return string
67
	 */
68
	public function getLeft()
69
	{
70
		return $this->left;
71
	}
72
73
	/**
74
	 * Set offset left.
75
	 *
76
	 * @param string $left
77
	 *
78
	 * @return $this
79
	 */
80
	public function setLeft(string $left)
81
	{
82
		$this->left = $left;
83
		return $this;
84
	}
85
86
	/**
87
	 * Set box.
88
	 *
89
	 * @param \YetiForcePDF\Layout\Box $box
90
	 *
91
	 * @return $this
92
	 */
93
	public function setBox(Box $box)
94
	{
95
		$this->box = $box;
96
		return $this;
97
	}
98
99
	/**
100
	 * Get box.
101
	 *
102
	 * @return \YetiForcePDF\Layout\Box
103
	 */
104
	public function getBox()
105
	{
106
		return $this->box;
107
	}
108
}
109