Skip to content

Commit fa7a20e

Browse files
authored
[TASK] Add a section on coding style to CONTRIBUTING.md (#773)
This is an exact copy of what we have at our sister project.
1 parent 6026011 commit fa7a20e

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

CONTRIBUTING.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,3 +82,29 @@ To run the existing PHPUnit tests, run this command:
8282
```bash
8383
composer ci:tests:unit
8484
```
85+
86+
## Coding Style
87+
88+
Please use the same coding style
89+
([PER 2.0](https://www.php-fig.org/per/coding-style/)) as the rest of the code.
90+
Indentation is four spaces.
91+
92+
We will only merge pull requests that follow the project's coding style.
93+
94+
Please check your code with the provided static code analysis tools:
95+
96+
```bash
97+
composer ci:static
98+
```
99+
100+
Please make your code clean, well-readable and easy to understand.
101+
102+
If you add new methods or fields, please add proper PHPDoc for the new
103+
methods/fields. Please use grammatically correct, complete sentences in the
104+
code documentation.
105+
106+
You can autoformat your code using the following command:
107+
108+
```bash
109+
composer fix
110+
```

0 commit comments

Comments
 (0)