Fixed time zone calculation issue
[GitHub/WoltLab/WCF.git] / CONTRIBUTING.md
1 CONTRIBUTING
2 ============
3
4 First of all: Thanks for your interest in contributing to WoltLab Community Framework! However, you have to meet some requirements in order to get your changes accepted.
5
6 General requirements
7 --------------------
8 - Testing is the key, you MUST try out your changes before submitting pull requests. It saves us and yourself a lot of time.
9 - The code SHOULD be written by yourself, otherwise you have to check the license beforehand with regard to compatibility and give the proper credit to the original author.
10
11 Files
12 -----
13 - Unix newlines (\n) MUST be used in every file (php, tpl, less, js, etc.)
14 - All files MUST be saved in ASCII encoding, except language files, which MUST be UTF-8 encoded
15
16 Formatting
17 ----------
18 - Tabs MUST be used for indentation, you HAVE TO use a tab size of 8
19 - empty lines MUST be indentated as deep as the previous line
20 - All identifiers and comments MUST be written in English
21 - PHP
22 - The closing PHP tag MUST be omitted
23 - Every file MUST end with a newline character (\n)
24
25 Additionally: Have a look at existing files to find out what they should look like.
26
27 Automated tests
28 ---------------
29 We are running [PHP Codesniffer](https://github.com/squizlabs/PHP_CodeSniffer) to ensure most of our formatting rules. You SHOULD test your changes before submitting them with it.
30
31 1. Install PHP Codesniffer, either via PEAR or via cloning it
32 2. Execute the following command in the root of your clone of Community Framework:
33
34 ```sh
35 $ phpcs -p --extensions=php --standard="`pwd`/CodeSniff/WCF" .
36 ```
37 3. Fix any errors
38 4. Repeat it until no more errors occur