Total Complexity | 7 |
Total Lines | 109 |
Duplicated Lines | 0 % |
Coverage | 84.21% |
Changes | 0 |
1 | <?php |
||
5 | class RowDimension extends Dimension |
||
6 | { |
||
7 | /** |
||
8 | * Row index. |
||
9 | * |
||
10 | * @var int |
||
11 | */ |
||
12 | private $rowIndex; |
||
13 | |||
14 | /** |
||
15 | * Row height (in pt). |
||
16 | * |
||
17 | * When this is set to a negative value, the row height should be ignored by IWriter |
||
18 | * |
||
19 | * @var float |
||
20 | */ |
||
21 | private $height = -1; |
||
22 | |||
23 | /** |
||
24 | * ZeroHeight for Row? |
||
25 | * |
||
26 | * @var bool |
||
27 | */ |
||
28 | private $zeroHeight = false; |
||
29 | |||
30 | /** |
||
31 | * Create a new RowDimension. |
||
32 | * |
||
33 | * @param int $pIndex Numeric row index |
||
34 | */ |
||
35 | 237 | public function __construct($pIndex = 0) |
|
36 | { |
||
37 | // Initialise values |
||
38 | 237 | $this->rowIndex = $pIndex; |
|
39 | |||
40 | // set dimension as unformatted by default |
||
41 | 237 | parent::__construct(null); |
|
42 | 237 | } |
|
43 | |||
44 | /** |
||
45 | * Get Row Index. |
||
46 | * |
||
47 | * @return int |
||
48 | */ |
||
49 | 49 | public function getRowIndex() |
|
50 | { |
||
51 | 49 | return $this->rowIndex; |
|
52 | } |
||
53 | |||
54 | /** |
||
55 | * Set Row Index. |
||
56 | * |
||
57 | * @param int $pValue |
||
58 | * |
||
59 | * @return RowDimension |
||
60 | */ |
||
61 | 2 | public function setRowIndex($pValue) |
|
62 | { |
||
63 | 2 | $this->rowIndex = $pValue; |
|
64 | |||
65 | 2 | return $this; |
|
66 | } |
||
67 | |||
68 | /** |
||
69 | * Get Row Height. |
||
70 | * |
||
71 | * @return float |
||
72 | */ |
||
73 | 105 | public function getRowHeight() |
|
76 | } |
||
77 | |||
78 | /** |
||
79 | * Set Row Height. |
||
80 | * |
||
81 | * @param float $pValue |
||
82 | * |
||
83 | * @return RowDimension |
||
84 | */ |
||
85 | 33 | public function setRowHeight($pValue) |
|
86 | { |
||
87 | 33 | $this->height = $pValue; |
|
88 | |||
89 | 33 | return $this; |
|
90 | } |
||
91 | |||
92 | /** |
||
93 | * Get ZeroHeight. |
||
94 | * |
||
95 | * @return bool |
||
96 | */ |
||
97 | 85 | public function getZeroHeight() |
|
100 | } |
||
101 | |||
102 | /** |
||
103 | * Set ZeroHeight. |
||
104 | * |
||
105 | * @param bool $pValue |
||
106 | * |
||
107 | * @return RowDimension |
||
108 | */ |
||
109 | public function setZeroHeight($pValue) |
||
116 |