MyungHun
MyungHun

Reputation: 77

How to make space between variable and operator in PhpStorm?

I'm using Mac & Windows, but the code reformat works differently on Mac and Windows.

On Mac

return response()->json([
    'access_token' => $jwtToken,
    'token_type'   => 'bearer',
    'expires_in'   => Auth::guard()->factory()->getTTL() * 60
]);

On Windows

return response()->json([
    'access_token' => $jwtToken,
    'token_type' => 'bearer',
    'expires_in' => Auth::guard()->factory()->getTTL() * 60
]);

I want to reformat the code like on Mac.

How can I adjust the code reformat rule?

Upvotes: 2

Views: 578

Answers (1)

Maxim Sagaydachny
Maxim Sagaydachny

Reputation: 2218

Settings->Editor->Code Style -> PHP -> Wrapping and Braces ->Array Initializer -> Align key-value pairs

enter image description here

Upvotes: 6

Related Questions