Closed creativecag closed 7 years ago
Please follow the issue template provided. More specifically, adding a link to the required debug.md
Gist which includes debugging information that answers our most commonly asked questions: https://github.com/Glavin001/atom-beautify/blob/master/ISSUE_TEMPLATE.md#how-to-create-debugmd-gist
Note that while you did add the debugging information, I must insist that it be in a Gist such that this issue does not get cluttered and also allows the table of contents links to work.
Thank you.
I recommend that you contact https://github.com/FriendsOfPHP/PHP-CS-Fixer as well to see if they support an option that would keep these spaces you want.
Here is Atom-Beautify documentation for PHP language: https://github.com/Glavin001/atom-beautify/blob/master/docs/options.md#php
This issue has been automatically marked as stale because it has not had recent activity. If this is still an issue, please add a comment. It will be closed if no further activity occurs. Thank you for your contributions.
I'm honestly not entirely sure whether this is "expected behavior" or not but when beautify saves a PHP file, it removes spaces around constants and certain operators. I use those spaces to help readability. I'm not sure where it's happening. I'm using php-cs-fixer but I can't find a fixer that says this is what it's doing so I wanted to start here and see if I could at least figure out where it's happening and work from there. Thanks!
For some simple examples (and yes, I know they're bad examples but it explains the problem well):
if ( ! $foo)
gets changed toif (!foo)
<?php echo '<a href="' . ROOT_URL . DS . 'index'">Home</a>'; ?>
changes to<?php echo '<a href="'.ROOT_URL.DS.'index'">Home</a>'; ?>
which to me looks like a big mess. I would like it to leave those spaces intact.Expected Results
The beautified code should not have removed extra spaces.
Atom Beautify - Debugging information
The following debugging information was generated by
Atom Beautify
onTue Jul 05 2016 09:42:27 GMT-0500 (CDT)
.Table Of Contents
Platform: darwin
Versions
Atom Version: 1.8.0
Atom Beautify Version: 0.29.9
Original file to be beautified
Original File Path:
/Users/cgreninger/Sites/brookside/_gitdev.geekrescue.com/cgreninger/nabatak/app/Controller/GroupsController.php
Original File Grammar: PHP
Original File Language: PHP
Language namespace: php
Supported Beautifiers: PHP-CS-Fixer, PHPCBF
Selected Beautifier: PHP-CS-Fixer
Original File Contents
Package Settings
The raw package settings options
Beautification options
Editor Options: Options from Atom Editor settings
Config Options: Options from Atom Beautify package settings
Home Options: Options from
/Users/cgreninger/.jsbeautifyrc
EditorConfig Options: Options from EditorConfig file
Project Options: Options from
.jsbeautifyrc
files starting from directory/Users/cgreninger/Sites/brookside/_gitdev.geekrescue.com/cgreninger/nabatak/app/Controller
and going up to rootPre-Transformed Options: Combined options before transforming them given a beautifier's specifications
Final Options
Final combined and transformed options that are used
Results
Beautified File Contents:
Original vs. Beautified Diff:
Logs
Debug Checklist
debug.md
Gist to this issue