Margin   A
last analyzed

Complexity

Total Complexity 14

Size/Duplication

Total Lines 151
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 14
c 1
b 0
f 0
lcom 1
cbo 0
dl 0
loc 151
rs 10

14 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 7 1
A getTop() 0 4 1
A setTop() 0 6 1
A getBottom() 0 4 1
A setBottom() 0 6 1
A getLeft() 0 4 1
A setLeft() 0 6 1
A getRight() 0 4 1
A setRight() 0 6 1
A getHead() 0 4 1
A setHead() 0 6 1
A getFoot() 0 4 1
A setFoot() 0 6 1
A setAll() 0 9 1
1
<?php
2
3
namespace Xls;
4
5
class Margin
6
{
7
    protected $top;
8
    protected $bottom;
9
    protected $left;
10
    protected $right;
11
    protected $head;
12
    protected $foot;
13
14
    /**
15
     * @param float $left
16
     * @param float $right
17
     * @param float $top
18
     * @param float $bottom
19
     */
20
    public function __construct($left, $right, $top, $bottom)
21
    {
22
        $this->top = $top;
23
        $this->bottom = $bottom;
24
        $this->left = $left;
25
        $this->right = $right;
26
    }
27
28
    /**
29
     * @return float
30
     */
31
    public function getTop()
32
    {
33
        return $this->top;
34
    }
35
36
    /**
37
     * @param float $top
38
     * @return Margin
39
     */
40
    public function setTop($top)
41
    {
42
        $this->top = $top;
43
44
        return $this;
45
    }
46
47
    /**
48
     * @return float
49
     */
50
    public function getBottom()
51
    {
52
        return $this->bottom;
53
    }
54
55
    /**
56
     * @param float $bottom
57
     * @return Margin
58
     */
59
    public function setBottom($bottom)
60
    {
61
        $this->bottom = $bottom;
62
63
        return $this;
64
    }
65
66
    /**
67
     * @return float
68
     */
69
    public function getLeft()
70
    {
71
        return $this->left;
72
    }
73
74
    /**
75
     * @param float $left
76
     * @return Margin
77
     */
78
    public function setLeft($left)
79
    {
80
        $this->left = $left;
81
82
        return $this;
83
    }
84
85
    /**
86
     * @return float
87
     */
88
    public function getRight()
89
    {
90
        return $this->right;
91
    }
92
93
    /**
94
     * @param float $right
95
     * @return Margin
96
     */
97
    public function setRight($right)
98
    {
99
        $this->right = $right;
100
101
        return $this;
102
    }
103
104
    /**
105
     * @return float
106
     */
107
    public function getHead()
108
    {
109
        return $this->head;
110
    }
111
112
    /**
113
     * @param float $head
114
     * @return Margin
115
     */
116
    public function setHead($head)
117
    {
118
        $this->head = $head;
119
120
        return $this;
121
    }
122
123
    /**
124
     * @return float
125
     */
126
    public function getFoot()
127
    {
128
        return $this->foot;
129
    }
130
131
    /**
132
     * @param float $foot
133
     * @return Margin
134
     */
135
    public function setFoot($foot)
136
    {
137
        $this->foot = $foot;
138
139
        return $this;
140
    }
141
142
    /**
143
     * @param float $margin
144
     * @return Margin
145
     */
146
    public function setAll($margin)
147
    {
148
        $this->setTop($margin);
149
        $this->setBottom($margin);
150
        $this->setLeft($margin);
151
        $this->setRight($margin);
152
153
        return $this;
154
    }
155
}
156