Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,17 @@ root=true
[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true

[*.{json,yaml,yml,tf}]
indent_size = 2

[*.php]
ij_continuation_indent_size = 4
indent_size = 4
indent_style = space
insert_final_newline = true
tab_width = 4
trim_trailing_whitespace = true

[{*.php}]
ij_php_align_key_value_pairs = true
ij_php_align_multiline_array_initializer_expression = true
ij_php_align_multiline_chained_methods = true
Expand Down
11 changes: 7 additions & 4 deletions dist/.editorconfig.dist
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,17 @@ root=true
[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true

[*.{json,yaml,yml,tf}]
indent_size = 2

[*.php]
ij_continuation_indent_size = 4
indent_size = 4
indent_style = space
insert_final_newline = true
tab_width = 4
trim_trailing_whitespace = true

[{*.php}]
ij_php_align_key_value_pairs = true
ij_php_align_multiline_array_initializer_expression = true
ij_php_align_multiline_chained_methods = true
Expand Down
8 changes: 8 additions & 0 deletions docs/EditorConfig/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,14 @@ This helps:
- Maintain clean and readable code
- Standardize formatting across different team members' environments

## 🎛️ Usage

To enable it just copy the `.editorconfig` file to your repository root (or use the `vendor/bin/code-tools publish:config editorconfig` command).

For PHPStorm you can find the instruction [here](https://www.jetbrains.com/help/phpstorm/editorconfig.html).

Alternatively you can go to `Settings -> Editor -> Code Style -> PHP -> Scheme -> ⚙️ -> Import Scheme...` and import the `.editorconfig` file as inspection settings without the need to add the file to the repository.

## ⚙️ Sample .editorconfig

```ini
Expand Down
Loading