JakubOnderka / PHP-Parallel-Lint

This tool check syntax of PHP files faster than serial check with fancier output.
Other
647 stars 62 forks source link

Issue #78: added option to force colors #82

Closed glady closed 7 years ago

glady commented 8 years ago

Fixes: setForceStyle now only set on --color / on windows commandline without --no-color colors were set to output ( ......XXS.....).

Now

Tested by me with Cmder (color support) and windows cmd.exe (no color support). Tests not failing.

glady commented 8 years ago

Changed internal behavior to enum and adapted tests.

I decided not to use an enum within first version, because the property is used directly by other classes and e.g. different classes are used by checking $settings->colors for output a text. Now i have to check there against $settings->colors === Settings::DISABLED. I would prefer to move this check to a function $settings->areColorsDisabled()/$settings->areColorsEnabled()/$settings->areColorsForced() and make colors property private. This would be completely different from each other setting within that class. There are only setter and getter for paths, not for any other setting. I tried to maintain consistency within the project.

Krinkle commented 6 years ago

It'd be nice to have a release for this addition.