[
https://issues.apache.org/jira/browse/NETBEANS-2994?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16920121#comment-16920121
]
Tomáš Procházka commented on NETBEANS-2994:
-------------------------------------------
Fix works.
Thank you.
> 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
> Fix For: 11.2
>
> Time Spent: 20m
> Remaining Estimate: 0h
>
> 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
(v8.3.2#803003)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists