kokororin / vscode-phpfmt

Integrates phpfmt into VS Code
https://marketplace.visualstudio.com/items?itemName=kokororin.vscode-phpfmt
BSD 3-Clause "New" or "Revised" License
130 stars 30 forks source link

Alt + Shift + F Formatting Adds Unwanted Underscores to Static Variables #86

Closed bryanwrightscode closed 1 year ago

bryanwrightscode commented 5 years ago

Issue Description

When I format a php file using Alt + Shift + F, two private static variables' declared names are changed without warning or explanation. Specifically for each of the 2 variable names, two underscores each are added to the beginning of the variable name.

Variables Before Formatting

    private static $config;
    private static $debugLog;

Variables After Formatting

    private static $__config;
    private static $__debugLog;

I could not find a similar issue when searching for "underscore" in any of title, body, or comments. Please review and if already reported direct me to the Issue No. or related pull request. Otherwise, could this please be investigated as a possible bug? Lastly, if this is an intended design of the formatter, please direct me to where this behavior is documented.

bryanwrightscode commented 5 years ago

VS Code Console Output

Output from phpfmt in VS Code when formatting the file as explained above:

php "C:\Users\bwright\.vscode\extensions\kokororin.vscode-phpfmt-1.0.30\node_modules\phpfmt\fmt.phar" --psr2 --indent_with_space=4 --cakephp C:\Users\bwright\AppData\Local\Temp\temp-sjsolgmoi.php