netbeans-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Junichi Yamamoto (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (NETBEANS-2994) PHP - formatting of unary operators adds extra space
Date Fri, 16 Aug 2019 12:52:00 GMT

    [ https://issues.apache.org/jira/browse/NETBEANS-2994?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16909030#comment-16909030
] 

Junichi Yamamoto commented on NETBEANS-2994:
--------------------------------------------

Reproducible. Thank you for reporting it.

> 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 &amp; Indentation
>    Affects Versions: 11.1
>            Reporter: Tomáš Procházka
>            Priority: Minor
>
> 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-unsubscribe@netbeans.apache.org
For additional commands, e-mail: commits-help@netbeans.apache.org

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


Mime
View raw message