Uploaded image for project: 'Aptana Studio'
  1. Aptana Studio
  2. APSTUD-8108

PHP Code Formatter - Parameter for functions

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Low
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Formatting, PHP
    • Labels:
      None

      Description

      Problem

      Currently the code formatter feature converts this code:

      php example 1

      $my_new_class = new MyClass( 
      	$value_a, 
      	$value_b, 
      	($value_c == 'cool') ? 'yeah' : 'booo!',
      	$value_d,
      	...
      );
      

      to this code:

      php example 2

      $my_new_class = new MyClass($value_a, $value_b, ($value_c == 'cool') ? 'yeah' : 'booo!', $value_d, ...);
      

      If more parameters given than can be displayed legibly in one line I would like to format my code as shown in the first example. But the code formatter feature reformat my code to the second example and there is no option to configure that to my want.

      Suggestion

      • new option, via checkbox "Enable function/method/class parameter wrapping", default value unselected
      • new option, via input "Maximum line width", default value 80 chars

      PS: I know that I can use // @formatter:off , but this looks not nicely

        Attachments

          Activity

            People

            • Assignee:
              pinnamuri Praveen Innamuri (Inactive)
              Reporter:
              hpbeck Hans-Peter Beck
            • Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:

                Git Source Code