Commit 2a12587
authored
AutoFilter Improvements (#2393)
* AutoFilter Improvements
Fix issue #2378. The following changes are made:
- NotEqual tests must be part of a custom filter. Documentation has been changed to indicate that.
- Method setAndOr was replaced by setJoin some time ago. Documentation now reflects that change.
- Documentation to indicate that string filters are not case-sensitive, same as in Excel.
- Filters testing against numeric value now include a numeric test (not numeric for not equal, numeric for all others).
- String filter had previously treated everything as a test for "equal". It now handles "not equal" and the variants of "greater/less" with or without "equal".
- Documentation correctly stated that no more than 2 rules are allowed in a custom filter. Code did not enforce this restriction. It now does, throwing an exception if an attempt is made to add a third rule.
- Deleted a lot of comments in Rule.php to make it easier to see what is not yet implemented (between, begins with, etc.). I may take these on in future.
- Added a number of tests for the new functionality.
* Not Sure Why Phpstan Results Differ Local vs Github
Let's see if this change suffices.
* Phpstan Still
Not sure how to convince it. Let's try this.
* Phpstan Solved
Figured out the problem on my local machine. Expect this to work.1 parent 52585a9 commit 2a12587
File tree
7 files changed
+392
-76
lines changed- docs/topics
- src/PhpSpreadsheet/Worksheet
- AutoFilter
- Column
- tests/PhpSpreadsheetTests/Worksheet/AutoFilter
7 files changed
+392
-76
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
99 | 99 | | |
100 | 100 | | |
101 | 101 | | |
| 102 | + | |
| 103 | + | |
102 | 104 | | |
103 | 105 | | |
104 | 106 | | |
| |||
113 | 115 | | |
114 | 116 | | |
115 | 117 | | |
| 118 | + | |
| 119 | + | |
116 | 120 | | |
117 | 121 | | |
118 | 122 | | |
| |||
255 | 259 | | |
256 | 260 | | |
257 | 261 | | |
| 262 | + | |
258 | 263 | | |
259 | 264 | | |
260 | 265 | | |
| |||
290 | 295 | | |
291 | 296 | | |
292 | 297 | | |
293 | | - | |
294 | | - | |
| 298 | + | |
| 299 | + | |
295 | 300 | | |
296 | 301 | | |
297 | 302 | | |
| |||
501 | 506 | | |
502 | 507 | | |
503 | 508 | | |
504 | | - | |
| 509 | + | |
505 | 510 | | |
506 | 511 | | |
507 | 512 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6052 | 6052 | | |
6053 | 6053 | | |
6054 | 6054 | | |
6055 | | - | |
| 6055 | + | |
6056 | 6056 | | |
6057 | 6057 | | |
6058 | 6058 | | |
| |||
6065 | 6065 | | |
6066 | 6066 | | |
6067 | 6067 | | |
6068 | | - | |
6069 | | - | |
6070 | | - | |
6071 | | - | |
6072 | | - | |
6073 | 6068 | | |
6074 | 6069 | | |
6075 | 6070 | | |
6076 | 6071 | | |
6077 | 6072 | | |
6078 | | - | |
6079 | | - | |
6080 | | - | |
6081 | | - | |
6082 | | - | |
6083 | 6073 | | |
6084 | 6074 | | |
6085 | 6075 | | |
| |||
6120 | 6110 | | |
6121 | 6111 | | |
6122 | 6112 | | |
6123 | | - | |
6124 | | - | |
6125 | | - | |
6126 | | - | |
6127 | | - | |
6128 | 6113 | | |
6129 | 6114 | | |
6130 | 6115 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
345 | 345 | | |
346 | 346 | | |
347 | 347 | | |
| 348 | + | |
348 | 349 | | |
349 | 350 | | |
350 | 351 | | |
| |||
357 | 358 | | |
358 | 359 | | |
359 | 360 | | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
360 | 367 | | |
361 | 368 | | |
362 | | - | |
| 369 | + | |
363 | 370 | | |
364 | | - | |
| 371 | + | |
| 372 | + | |
365 | 373 | | |
366 | | - | |
| 374 | + | |
367 | 375 | | |
368 | 376 | | |
369 | 377 | | |
370 | | - | |
| 378 | + | |
371 | 379 | | |
372 | 380 | | |
373 | 381 | | |
374 | | - | |
| 382 | + | |
375 | 383 | | |
376 | 384 | | |
377 | 385 | | |
378 | | - | |
| 386 | + | |
379 | 387 | | |
380 | 388 | | |
381 | 389 | | |
382 | | - | |
| 390 | + | |
383 | 391 | | |
384 | 392 | | |
385 | 393 | | |
386 | | - | |
| 394 | + | |
387 | 395 | | |
388 | 396 | | |
389 | 397 | | |
390 | | - | |
391 | | - | |
| 398 | + | |
| 399 | + | |
392 | 400 | | |
393 | 401 | | |
394 | 402 | | |
| |||
404 | 412 | | |
405 | 413 | | |
406 | 414 | | |
407 | | - | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
408 | 441 | | |
409 | 442 | | |
410 | 443 | | |
| |||
840 | 873 | | |
841 | 874 | | |
842 | 875 | | |
843 | | - | |
| 876 | + | |
844 | 877 | | |
845 | 878 | | |
846 | 879 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
176 | 176 | | |
177 | 177 | | |
178 | 178 | | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
179 | 182 | | |
180 | 183 | | |
181 | 184 | | |
| |||
305 | 308 | | |
306 | 309 | | |
307 | 310 | | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
308 | 314 | | |
309 | 315 | | |
310 | 316 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
125 | 125 | | |
126 | 126 | | |
127 | 127 | | |
128 | | - | |
129 | | - | |
130 | | - | |
131 | | - | |
132 | | - | |
133 | | - | |
134 | | - | |
135 | | - | |
136 | | - | |
| 128 | + | |
137 | 129 | | |
138 | 130 | | |
139 | 131 | | |
| |||
166 | 158 | | |
167 | 159 | | |
168 | 160 | | |
169 | | - | |
170 | | - | |
| 161 | + | |
| 162 | + | |
171 | 163 | | |
172 | | - | |
173 | | - | |
174 | | - | |
175 | | - | |
176 | 164 | | |
177 | | - | |
178 | | - | |
179 | | - | |
180 | | - | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
181 | 169 | | |
182 | | - | |
183 | | - | |
184 | | - | |
185 | | - | |
186 | | - | |
187 | | - | |
188 | | - | |
189 | | - | |
190 | | - | |
191 | | - | |
192 | | - | |
193 | | - | |
194 | | - | |
195 | | - | |
196 | | - | |
197 | | - | |
198 | | - | |
199 | | - | |
200 | | - | |
201 | | - | |
| 170 | + | |
| 171 | + | |
202 | 172 | | |
203 | 173 | | |
204 | 174 | | |
| |||
0 commit comments