Commit f0ec497
authored
fix: Allow vAlign and vMerge on Style\Cell to be set to null (#2676)
* fix: Allow vAlign and vMerge on Style\Cell to be set to null (#2673)
vAlign and vMerge are initialized as `null` in every style until it is explicitly set.
Right now, it is not possible to unset them, after it has been set once.
I've added a null-check to skip the validation, based on the default
parameter value of `null`, which indicates to me that it once was intended to work like this.
I've also fixed the type-hints, which were wrong from the start.
* docs(changelog): Add note about supporting vAlign and vMerge to be unset
* test: Extend existing table test case to check if unsetting vAlign works
* test: Add test case to check if unsetting vMerge works
This should fix the reduction in test coverage because of the
new null checking code in the Setter1 parent fa0cea0 commit f0ec497
File tree
3 files changed
+63
-6
lines changed- docs/changes/1.x
- src/PhpWord/Style
- tests/PhpWordTests/Writer/HTML/Element
3 files changed
+63
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
13 | 14 | | |
14 | 15 | | |
15 | 16 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
69 | 69 | | |
70 | 70 | | |
71 | 71 | | |
72 | | - | |
| 72 | + | |
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
| |||
93 | 93 | | |
94 | 94 | | |
95 | 95 | | |
96 | | - | |
| 96 | + | |
97 | 97 | | |
98 | 98 | | |
99 | 99 | | |
| |||
128 | 128 | | |
129 | 129 | | |
130 | 130 | | |
131 | | - | |
| 131 | + | |
132 | 132 | | |
133 | 133 | | |
134 | 134 | | |
| |||
138 | 138 | | |
139 | 139 | | |
140 | 140 | | |
141 | | - | |
| 141 | + | |
142 | 142 | | |
143 | 143 | | |
144 | 144 | | |
145 | 145 | | |
146 | 146 | | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
147 | 153 | | |
148 | 154 | | |
149 | 155 | | |
| |||
235 | 241 | | |
236 | 242 | | |
237 | 243 | | |
238 | | - | |
| 244 | + | |
239 | 245 | | |
240 | 246 | | |
241 | 247 | | |
| |||
245 | 251 | | |
246 | 252 | | |
247 | 253 | | |
248 | | - | |
| 254 | + | |
249 | 255 | | |
250 | 256 | | |
251 | 257 | | |
252 | 258 | | |
253 | 259 | | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
254 | 266 | | |
255 | 267 | | |
256 | 268 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| 23 | + | |
23 | 24 | | |
24 | 25 | | |
25 | 26 | | |
| |||
179 | 180 | | |
180 | 181 | | |
181 | 182 | | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
182 | 188 | | |
183 | 189 | | |
184 | 190 | | |
185 | 191 | | |
186 | 192 | | |
187 | 193 | | |
188 | 194 | | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
189 | 233 | | |
190 | 234 | | |
0 commit comments