Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
100.00% |
10 / 10 |
|
100.00% |
7 / 7 |
CRAP | |
100.00% |
1 / 1 |
Row | |
100.00% |
10 / 10 |
|
100.00% |
7 / 7 |
7 | |
100.00% |
1 / 1 |
__construct | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
isTblHeader | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
setTblHeader | |
100.00% |
2 / 2 |
|
100.00% |
1 / 1 |
1 | |||
isCantSplit | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
setCantSplit | |
100.00% |
2 / 2 |
|
100.00% |
1 / 1 |
1 | |||
isExactHeight | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
setExactHeight | |
100.00% |
2 / 2 |
|
100.00% |
1 / 1 |
1 |
1 | <?php |
2 | |
3 | /** |
4 | * This file is part of PHPWord - A pure PHP library for reading and writing |
5 | * word processing documents. |
6 | * |
7 | * PHPWord is free software distributed under the terms of the GNU Lesser |
8 | * General Public License version 3 as published by the Free Software Foundation. |
9 | * |
10 | * For the full copyright and license information, please read the LICENSE |
11 | * file that was distributed with this source code. For the full list of |
12 | * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. |
13 | * |
14 | * @see https://github.com/PHPOffice/PHPWord |
15 | * |
16 | * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 |
17 | */ |
18 | |
19 | namespace PhpOffice\PhpWord\Style; |
20 | |
21 | /** |
22 | * Table row style. |
23 | * |
24 | * @since 0.8.0 |
25 | */ |
26 | class Row extends AbstractStyle |
27 | { |
28 | /** |
29 | * Repeat table row on every new page. |
30 | * |
31 | * @var bool |
32 | */ |
33 | private $tblHeader = false; |
34 | |
35 | /** |
36 | * Table row cannot break across pages. |
37 | * |
38 | * @var bool |
39 | */ |
40 | private $cantSplit = false; |
41 | |
42 | /** |
43 | * Table row exact height. |
44 | * |
45 | * @var bool |
46 | */ |
47 | private $exactHeight = false; |
48 | |
49 | /** |
50 | * Create a new row style. |
51 | */ |
52 | public function __construct() |
53 | { |
54 | } |
55 | |
56 | /** |
57 | * Is tblHeader. |
58 | */ |
59 | public function isTblHeader(): bool |
60 | { |
61 | return $this->tblHeader; |
62 | } |
63 | |
64 | /** |
65 | * Is tblHeader. |
66 | */ |
67 | public function setTblHeader(bool $value = true): self |
68 | { |
69 | $this->tblHeader = $this->setBoolVal($value, $this->tblHeader); |
70 | |
71 | return $this; |
72 | } |
73 | |
74 | /** |
75 | * Is cantSplit. |
76 | */ |
77 | public function isCantSplit(): bool |
78 | { |
79 | return $this->cantSplit; |
80 | } |
81 | |
82 | /** |
83 | * Is cantSplit. |
84 | */ |
85 | public function setCantSplit(bool $value = true): self |
86 | { |
87 | $this->cantSplit = $this->setBoolVal($value, $this->cantSplit); |
88 | |
89 | return $this; |
90 | } |
91 | |
92 | /** |
93 | * Is exactHeight. |
94 | */ |
95 | public function isExactHeight(): bool |
96 | { |
97 | return $this->exactHeight; |
98 | } |
99 | |
100 | /** |
101 | * Set exactHeight. |
102 | */ |
103 | public function setExactHeight(bool $value = true): self |
104 | { |
105 | $this->exactHeight = $this->setBoolVal($value, $this->exactHeight); |
106 | |
107 | return $this; |
108 | } |
109 | } |