-
-
Notifications
You must be signed in to change notification settings - Fork 9.8k
Description
The CliDumper is not currently able to style integer and double values separately. This is a bit unfortunate since in PHP they are fundamentally different types, and in some contexts such as REPLs this coloring can be a bit confusing.
I'd like to add the ability to style both types separately via CliDumper::setStyles(), but maintaining the current default behavior and avoiding BC breaks.
Proposed Patch
The problem with simply replacing $style = 'num' in each branch is that then setting a custom num style via setStyles() would no longer work. But CliDumper could keep using num unless the user of the library sets integer or double through setStyles(), which currently no one does. I believe this would deliver the feature without any client breakage. If it looks good to you I can submit the PR myself.
