如何使用FilamentPHP代码的类和“make”方法调整有效缩进?

问题描述 投票:0回答:1

在 PhpStorm 2023.2.2 中使用 Laravel 10 / FilamentPHP 3 应用程序。当我运行“重新格式化代码”命令时,我希望类和

make
方法位于同一行,但在下一行上具有有效缩进,而不是像我现在那样:

return $form
    ->schema([
        Forms\Components\Card::make()
                             ->schema([
                                 TextInput::make('id')->lazy()->disabled()->dehydrated(false)

但是像这样:

return $form
    ->schema([
        Forms\Components\Card::make()
            ->schema([
                 TextInput::make('id')->lazy()->disabled()->dehydrated(false)

就像我在文档中看到的那样: https://filamentphp.com/docs/3.x/panels/resources/creating-records#customizing-the-save-notification

有一些选择吗?

phpstorm
1个回答
1
投票

在您的 PhpStorm 上:

Ctrl+Alt+S -> Editor -> Code Style -> PHP
选择架构。选择您需要更改的内容(我认为是
Tabs and Indents
Wrapping and Braces

© www.soinside.com 2019 - 2024. All rights reserved.