Weird Indentation Issue

I'm having an issue with indentation that I can't seem to switch off.

When I do a function call like so there is no problem:

doSomething(
'string',
[
'key' => 'value'
]
);

But when a class function is called, it seems to want to double-indent the parameters and I can't find anywhere to switch it off.

$instance->someFunction(
'string',
[
'key' => 'value'
]
);
5 comments
Comment actions Permalink

Hi Samuel,

Cannot reproduce, intendation looks the same in both cases:

function(
'string',
['array']
);

$instance->function(
'string',
['array']
);

Could you please revert to the Default Code Style theme for PHP and check if the issue persists?

0
Comment actions Permalink

Hi Eugene,

Thanks for your time. I can confirm the issue persists when using the Default Code Style.

I'm running PhpStorm 10.0.1 on Linux Mint.

Thanks,

Sam

0
Comment actions Permalink

I am able to reproduce it using this snippet. I type the function call up to and including the first round bracket and press the 'Enter' key to go to a new line. That line is double-indented.

<?php

class DummyClass
{
public function dummyFunction()
{

}
}

$dc = new DummyClass;

$dc->dummyFunction(

);
0
Comment actions Permalink

I have no Mint to test, but Ubuntu 14.10 alongside with PhpStorm 10.0.3 doesn't show this behaviour.

Would you mind upgrading to 10.0.3?

 

If the issue persists after that, please do the following:

  1. File -> Export Settings
  2. Backup the ~/.WebIde100 directory (just to be 100% sure)
  3. Remove the ~/.WebIde100/config directory
  4. Start PhpStorm, create an empty project and try again
0
Comment actions Permalink

Hi Eugene,

I tried to update to 10.0.3 but the 'Release Notes / Download' button on the update window didn't do anything when clicked.

That said, I removed the old version and added the new version and the issue hasn't returned. So that's good.

Thanks very much for your help,

Sam

0

Please sign in to leave a comment.