Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Configuration options for PHP #915

Closed
BramVanroy opened this issue Apr 12, 2016 · 4 comments
Closed

Configuration options for PHP #915

BramVanroy opened this issue Apr 12, 2016 · 4 comments

Comments

@BramVanroy
Copy link

Description

The results of beautification are not what I expect. I correctly installed the PHP-CS-FIXERs file, and PHP code is beautified. But the problem is that I cannot find any configuration file for beautifying. As an example, I want functions to have braces on the same line as the declaration, but instead they are on a new line. Obviously this only an example. I wonder where the configuration file for PHP is.

I am not entirely sure if there ought to be a config file. I know that some coding standards are followed such as leaving out the last ?> in a block and so on. But does that mean that all of this is handled by the php-cs-fixer file and cannot be made configurable by atom beautify? Is it, thus, impossible to change such small behaviour and only possible by writing one's own standard?

Results

  function setProgressClasses($index)
  {
      global $step;
      if ($step == $index) {
          echo 'class="active"';
      } elseif ($step > $index) {
          echo 'class="done"';
      }
  }

Expected Results

The beautified code should have looked like:

  function setProgressClasses($index) {
      global $step;
      if ($step == $index) {
          echo 'class="active"';
      } elseif ($step > $index) {
          echo 'class="done"';
      }
  }

Steps to Reproduce

  1. Add code to Atom editor
  2. Run command Atom Beautify: Beautify Editor
  3. This beautified code does not look right!
@Glavin001
Copy link
Owner

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
Thank you.

@Glavin001
Copy link
Owner

The documentation of supported options for PHP-CS-Fixer beautifier can be found at https://github.com/Glavin001/atom-beautify/blob/master/docs/options.md#php-cs-fixer

@stale
Copy link

stale bot commented Nov 4, 2017

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.

@stale stale bot added the stale label Nov 4, 2017
@stale stale bot closed this as completed Nov 11, 2017
@meeprakash25
Copy link

i have the same issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants