如何在 PhpStorm IDE 中更改 PHP 代码风格?
How to change PHP code style in PhpStorm IDE?
我正在使用 Laravel 框架。我想从这里更改默认代码样式格式:
return [
'name' => 'required|min:4|string',
'email' => 'required|email|unique:users,email',
'password' => 'required|min:4|confirmed',
'password-confirmation' => 'required|min:4'
];
到这个:
return [
'name' => 'required|min:4|string',
'email' => 'required|email|unique:users,email',
'password' => 'required|min:4|confirmed',
'password-confirmation' => 'required|min:4'
];
我在 PhpStorm 设置中进行了大量搜索,但找不到解决方案。
File | Settings
(macOS 上PhpStorm | Preferences
)
Editor | Code Style | PHP
Wrapping and Braces
选项卡
Array initializer | Align key-value pairs
选项
我正在使用 Laravel 框架。我想从这里更改默认代码样式格式:
return [
'name' => 'required|min:4|string',
'email' => 'required|email|unique:users,email',
'password' => 'required|min:4|confirmed',
'password-confirmation' => 'required|min:4'
];
到这个:
return [
'name' => 'required|min:4|string',
'email' => 'required|email|unique:users,email',
'password' => 'required|min:4|confirmed',
'password-confirmation' => 'required|min:4'
];
我在 PhpStorm 设置中进行了大量搜索,但找不到解决方案。
File | Settings
(macOS 上PhpStorm | Preferences
)Editor | Code Style | PHP
Wrapping and Braces
选项卡Array initializer | Align key-value pairs
选项