Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
11.1
Description
Formatting of unary operators in PHP adds extra space around operator, where it is not wanted.
Input:
<?php $noSpace++; $spaces ++; $afterIndexNoSpace[ 1 ]++; $afterIndexSpaces[ 1 ] ++; ++$noSpace; ++ $spaces; ++ $afterIndex[ 1 ];
- In PHP project properties set Formatting - Use project specific options.
- Language: PHP, Category: Spaces
- Uncheck Around Operators - Unary Operators
- Format code
Actual result:
<?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 ];
Expected result:
<?php $noSpace++; $spaces++; $afterIndexNoSpace[ 1 ]++; $afterIndexSpaces[ 1 ]++; ++$noSpace; ++$spaces; ++$afterIndex[ 1 ];
Attachments
Issue Links
- links to