PhpStorm 10, idention issue
Hi there,
I'd like to configure the following:
function x($a,b)
{
if ($a<$b)
[TAB]{
[TAB]return($a);
[TAB]}
else
[TAB]{
[TAB]return($b);
[TAB]}
}
what PhpStorm gives me right now is:
function x($a,b)
{
[TAB]if ($a<$b)
[TAB][TAB]{
[TAB][TAB]return($a);
[TAB][TAB]}
[TAB]else
[TAB][TAB]{
[TAB][TAB]return($b);
[TAB][TAB]}
}
What am I missing?
Please sign in to leave a comment.
We're running into the same issue, indents being thrown off. Strikes me as a bug, but either way a workaround seems to be a setting: Editor -> Code Styles -> uncheck "Detect and use existing file indents for editing". So far that seems to do the trick, though it's a weird issue.
I had a similar indentation issue with nested arrays. Problem did not exist with PhpStorm 9 but started after upgrading to 10. Turning off "Detect and use existing file indents for editing" also worked for me.
I'm running into another intendation problem when I use PHP Annotations:
Example (it's from "Getting started" from the TYPO3 FLOW Framework, class shortened for this example):
In the PHPDoc block the cursor should be at the beginning of the next line after RETURN. But it is intended for 4 spaces (or whatever is set).
This happens NOT after the @var annotation, but after @Flow or @ORM annotation.
The trick "Disabling detection of intendation" does not work for this problem.
Nachricht geändert durch Thomas Löffler