Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
100.00% |
10 / 10 |
|
100.00% |
10 / 10 |
CRAP | |
100.00% |
1 / 1 |
TrackChangesView | |
100.00% |
10 / 10 |
|
100.00% |
10 / 10 |
15 | |
100.00% |
1 / 1 |
hasMarkup | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
setMarkup | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
2 | |||
hasComments | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
setComments | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
2 | |||
hasInsDel | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
setInsDel | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
2 | |||
hasFormatting | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
setFormatting | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
2 | |||
hasInkAnnotations | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
setInkAnnotations | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
2 |
1 | <?php |
2 | /** |
3 | * This file is part of PHPWord - A pure PHP library for reading and writing |
4 | * word processing documents. |
5 | * |
6 | * PHPWord is free software distributed under the terms of the GNU Lesser |
7 | * General Public License version 3 as published by the Free Software Foundation. |
8 | * |
9 | * For the full copyright and license information, please read the LICENSE |
10 | * file that was distributed with this source code. For the full list of |
11 | * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. |
12 | * |
13 | * @see https://github.com/PHPOffice/PHPWord |
14 | * |
15 | * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 |
16 | */ |
17 | |
18 | namespace PhpOffice\PhpWord\ComplexType; |
19 | |
20 | /** |
21 | * Visibility of Annotation Types. |
22 | * |
23 | * @see http://www.datypic.com/sc/ooxml/e-w_revisionView-1.html |
24 | */ |
25 | final class TrackChangesView |
26 | { |
27 | /** |
28 | * Display Visual Indicator Of Markup Area. |
29 | * |
30 | * @var bool |
31 | */ |
32 | private $markup; |
33 | |
34 | /** |
35 | * Display Comments. |
36 | * |
37 | * @var bool |
38 | */ |
39 | private $comments; |
40 | |
41 | /** |
42 | * Display Content Revisions. |
43 | * |
44 | * @var bool |
45 | */ |
46 | private $insDel; |
47 | |
48 | /** |
49 | * Display Formatting Revisions. |
50 | * |
51 | * @var bool |
52 | */ |
53 | private $formatting; |
54 | |
55 | /** |
56 | * Display Ink Annotations. |
57 | * |
58 | * @var bool |
59 | */ |
60 | private $inkAnnotations; |
61 | |
62 | /** |
63 | * Get Display Visual Indicator Of Markup Area. |
64 | * |
65 | * @return bool True if markup is shown |
66 | */ |
67 | public function hasMarkup() |
68 | { |
69 | return $this->markup; |
70 | } |
71 | |
72 | /** |
73 | * Set Display Visual Indicator Of Markup Area. |
74 | * |
75 | * @param ?bool $markup |
76 | * Set to true to show markup |
77 | */ |
78 | public function setMarkup($markup): void |
79 | { |
80 | $this->markup = $markup === null ? true : $markup; |
81 | } |
82 | |
83 | /** |
84 | * Get Display Comments. |
85 | * |
86 | * @return bool True if comments are shown |
87 | */ |
88 | public function hasComments() |
89 | { |
90 | return $this->comments; |
91 | } |
92 | |
93 | /** |
94 | * Set Display Comments. |
95 | * |
96 | * @param ?bool $comments |
97 | * Set to true to show comments |
98 | */ |
99 | public function setComments($comments): void |
100 | { |
101 | $this->comments = $comments === null ? true : $comments; |
102 | } |
103 | |
104 | /** |
105 | * Get Display Content Revisions. |
106 | * |
107 | * @return bool True if content revisions are shown |
108 | */ |
109 | public function hasInsDel() |
110 | { |
111 | return $this->insDel; |
112 | } |
113 | |
114 | /** |
115 | * Set Display Content Revisions. |
116 | * |
117 | * @param ?bool $insDel |
118 | * Set to true to show content revisions |
119 | */ |
120 | public function setInsDel($insDel): void |
121 | { |
122 | $this->insDel = $insDel === null ? true : $insDel; |
123 | } |
124 | |
125 | /** |
126 | * Get Display Formatting Revisions. |
127 | * |
128 | * @return bool True if formatting revisions are shown |
129 | */ |
130 | public function hasFormatting() |
131 | { |
132 | return $this->formatting; |
133 | } |
134 | |
135 | /** |
136 | * Set Display Formatting Revisions. |
137 | * |
138 | * @param null|bool $formatting |
139 | * Set to true to show formatting revisions |
140 | */ |
141 | public function setFormatting($formatting = null): void |
142 | { |
143 | $this->formatting = $formatting === null ? true : $formatting; |
144 | } |
145 | |
146 | /** |
147 | * Get Display Ink Annotations. |
148 | * |
149 | * @return bool True if ink annotations are shown |
150 | */ |
151 | public function hasInkAnnotations() |
152 | { |
153 | return $this->inkAnnotations; |
154 | } |
155 | |
156 | /** |
157 | * Set Display Ink Annotations. |
158 | * |
159 | * @param ?bool $inkAnnotations |
160 | * Set to true to show ink annotations |
161 | */ |
162 | public function setInkAnnotations($inkAnnotations): void |
163 | { |
164 | $this->inkAnnotations = $inkAnnotations === null ? true : $inkAnnotations; |
165 | } |
166 | } |