[ 
https://issues.apache.org/jira/browse/NETBEANS-2994?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

ASF GitHub Bot updated NETBEANS-2994:
-------------------------------------
    Labels: pull-request-available  (was: )

> PHP - formatting of unary operators adds extra space
> ----------------------------------------------------
>
>                 Key: NETBEANS-2994
>                 URL: https://issues.apache.org/jira/browse/NETBEANS-2994
>             Project: NetBeans
>          Issue Type: Bug
>          Components: php - Formatting & Indentation
>    Affects Versions: 11.1
>            Reporter: Tomáš Procházka
>            Assignee: Junichi Yamamoto
>            Priority: Minor
>              Labels: pull-request-available
>
> Formatting of unary operators in PHP adds extra space around operator, where 
> it is not wanted.
> Input:
> {code:java}
> <?php
> $noSpace++;
> $spaces   ++;
> $afterIndexNoSpace[ 1 ]++;
> $afterIndexSpaces[ 1 ]   ++;
> ++$noSpace;
> ++   $spaces;
> ++  $afterIndex[ 1 ];{code}
>  # In PHP project properties set Formatting - Use project specific options.
>  # Language: PHP, Category: Spaces
>  # Uncheck Around Operators - Unary Operators
>  # Format code
> Actual result:
> {code:java}
> <?php
> $noSpace++; // OK
> $spaces ++; // Still one space left
> $afterIndexNoSpace[ 1 ] ++; // Space is added before ++
> $afterIndexSpaces[ 1 ] ++; // Still one space left before ++
> ++$noSpace;
> ++$spaces;
> ++$afterIndex[ 1 ];
> {code}
> Expected result:
> {code:java}
> <?php
> $noSpace++;
> $spaces++;
> $afterIndexNoSpace[ 1 ]++;
> $afterIndexSpaces[ 1 ]++;
> ++$noSpace;
> ++$spaces;
> ++$afterIndex[ 1 ];
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@netbeans.apache.org
For additional commands, e-mail: commits-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists

Reply via email to