Tomáš Procházka created NETBEANS-2994:
-----------------------------------------
Summary: 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
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: [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