2

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?

1 Answer 1

6

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

enter image description here

Sign up to request clarification or add additional context in comments.

1 Comment

Thank you! Also I checked Align consecutive assignments in Assignment statement !!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.