Commit df65ffe
committed
feature #39042 [Console] Extracting ProgressBar's format's magic strings into const (CesarScur)
This PR was merged into the 5.3-dev branch.
Discussion
----------
[Console] Extracting ProgressBar's format's magic strings into const
| Q | A
| ------------- | ---
| Branch? | 5.x
| Bug fix? | no
| New feature? | yes
| Deprecations? | no
| Tickets |
| License | MIT
| Doc PR |
The existence of these magic string is propagating outside the project on the user land while constructing a command:
```php
$bar->setFormat('very_verbose');
```
Objective is to provide reusability and resilience to miss naming:
```php
$bar->setFormat(ProgressBar::VERBOSE);
```
Commits
-------
a4b2606 Extracting ProgressBar's format's magic strings into constFile tree
2 files changed
+26
-16
lines changed- src/Symfony/Component/Console
- Helper
- Tests/Helper
2 files changed
+26
-16
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
29 | 39 | | |
30 | 40 | | |
31 | 41 | | |
| |||
489 | 499 | | |
490 | 500 | | |
491 | 501 | | |
492 | | - | |
| 502 | + | |
493 | 503 | | |
494 | | - | |
| 504 | + | |
495 | 505 | | |
496 | | - | |
| 506 | + | |
497 | 507 | | |
498 | | - | |
| 508 | + | |
499 | 509 | | |
500 | 510 | | |
501 | 511 | | |
| |||
547 | 557 | | |
548 | 558 | | |
549 | 559 | | |
550 | | - | |
551 | | - | |
| 560 | + | |
| 561 | + | |
552 | 562 | | |
553 | | - | |
554 | | - | |
| 563 | + | |
| 564 | + | |
555 | 565 | | |
556 | | - | |
557 | | - | |
| 566 | + | |
| 567 | + | |
558 | 568 | | |
559 | | - | |
560 | | - | |
| 569 | + | |
| 570 | + | |
561 | 571 | | |
562 | 572 | | |
563 | 573 | | |
| |||
Lines changed: 4 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
210 | 210 | | |
211 | 211 | | |
212 | 212 | | |
213 | | - | |
| 213 | + | |
214 | 214 | | |
215 | 215 | | |
216 | 216 | | |
| |||
220 | 220 | | |
221 | 221 | | |
222 | 222 | | |
223 | | - | |
| 223 | + | |
224 | 224 | | |
225 | 225 | | |
226 | 226 | | |
| |||
828 | 828 | | |
829 | 829 | | |
830 | 830 | | |
831 | | - | |
| 831 | + | |
832 | 832 | | |
833 | 833 | | |
834 | 834 | | |
| |||
837 | 837 | | |
838 | 838 | | |
839 | 839 | | |
840 | | - | |
| 840 | + | |
841 | 841 | | |
842 | 842 | | |
843 | 843 | | |
| |||
0 commit comments