I have some questions regarding reformatting phpstorm code.
I have a long line and one line.
$this->getSelect()->join('some_code_here')->join('some_code_here')->join('some_code_here')->join('some_code_here')->join('some_code_here'); $this->getSelect()->join('some_code_here')->join('some_code_here');
I want to configure a parameter:
Code Style / PHP / Wrapping and Bindings / Call Chains
This parameter has 4 options:
Do not wrap (1) Wrap if long (2) Crop down if long (3) Wrap always (4)
When I select 2 or 3, I have the following:
$this->getSelect()->join('some_code_here')->join('some_code_here')->join('some_code_here')->join( 'some_code_here' )->join('some_code_here'); $this->getSelect()->join('some_code_here')->join('some_code_here');
When I choose the fourth, I have:
$this->getSelect() ->join('some_code_here') ->join('some_code_here') ->join('some_code_here') ->join('some_code_here') ->join('some_code_here'); $this->getSelect() ->join('some_code_here') ->join('some_code_here');
My question is:
Is it possible to wrap each call from a new line only if the method is very long (more than 120 characters).
Expected Result:
$this->getSelect() ->join('some_code_here') ->join('some_code_here') ->join('some_code_here') ->join('some_code_here') ->join('some_code_here'); $this->getSelect()->join('some_code_here')->join('some_code_here');
phpstorm wrapping reformatting
zhartaunik
source share