Adam Engebretson
Adam Engebretson

Reputation: 128

PHPStorm disable spaces before anonymous function parentheses

Similar to this question: Webstorm turn off new spaces in anonymous function declaration

Just trying to disable anonymous function call spaces.

$this->call(function ()
{
  return 'test';
});

I'd like the following

$this->call(function()
{
  return 'test';
});

On the question linked above, the answer was provided for JS coding styles, but I'm looking for PHP answers.

Upvotes: 3

Views: 883

Answers (3)

Rimplot
Rimplot

Reputation: 51

It is an included option now, you find it under Settings > Editor > Code Style > PHP > Spaces.

Anonymous function parentheses PHPStorm

Upvotes: 0

Stepan Mazurov
Stepan Mazurov

Reputation: 1374

Its is a known bug in PHPStorm and being tracked in this issue on their issue tracker.

Upvotes: 1

colburton
colburton

Reputation: 4715

As of now with PhpStorm 7.1 this is not, possible. The option under JavaScript Style is "function expression". They did not implement that or something for callbacks for php.

Upvotes: 1

Related Questions