aboutsummaryrefslogtreecommitdiffhomepage
path: root/GUIDELINES.md
diff options
context:
space:
mode:
authorNicolas LÅ“uillet <nicolas.loeuillet@smile.fr>2014-10-10 13:33:54 +0200
committerNicolas LÅ“uillet <nicolas.loeuillet@smile.fr>2014-10-10 13:33:54 +0200
commit44d35257e805856b4913c63fcbed3c0acb64bae8 (patch)
tree11e9d276c34b1b287706cb61182bdc71729661e2 /GUIDELINES.md
parentaf8292c1de1886cd975d79f0f42df40e0bd1c5bd (diff)
parentcf8a5e1eedbed484dbcb1ddc9f7a13fc19b7a27b (diff)
downloadwallabag-44d35257e805856b4913c63fcbed3c0acb64bae8.tar.gz
wallabag-44d35257e805856b4913c63fcbed3c0acb64bae8.tar.zst
wallabag-44d35257e805856b4913c63fcbed3c0acb64bae8.zip
Merge branch 'dev'1.8.0
Diffstat (limited to 'GUIDELINES.md')
-rw-r--r--GUIDELINES.md53
1 files changed, 53 insertions, 0 deletions
diff --git a/GUIDELINES.md b/GUIDELINES.md
new file mode 100644
index 00000000..51e0de93
--- /dev/null
+++ b/GUIDELINES.md
@@ -0,0 +1,53 @@
1# Guidelines for wallabag
2
3If you want to contribute to wallabag, you have some rules to respect. These rules were defined by [PHP Framework Interop Group](http://www.php-fig.org).
4
5## Basic Coding Standard (PSR-1)
6
7This section of the standard comprises what should be considered the standard coding elements that are required to ensure a high level of technical interoperability between shared PHP code.
8
9* Files MUST use only `<?php` and `<?=` tags.
10
11* Files MUST use only UTF-8 without BOM for PHP code.
12
13* Files SHOULD either declare symbols (classes, functions, constants, etc.) or cause side-effects (e.g. generate output, change .ini settings, etc.) but SHOULD NOT do both.
14
15* Namespaces and classes MUST follow [PSR-0](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-0.md).
16
17* Class names MUST be declared in `StudlyCaps`.
18
19* Class constants MUST be declared in all upper case with underscore separators.
20
21* Method names MUST be declared in `camelCase`.
22
23You can read details on [PHP FIG website](http://www.php-fig.org/psr/psr-1/).
24
25## Coding Style Guide (PSR-2)
26
27This guide extends and expands on PSR-1, the basic coding standard.
28
29The intent of this guide is to reduce cognitive friction when scanning code from different authors. It does so by enumerating a shared set of rules and expectations about how to format PHP code.
30
31The style rules herein are derived from commonalities among the various member projects. When various authors collaborate across multiple projects, it helps to have one set of guidelines to be used among all those projects. Thus, the benefit of this guide is not in the rules themselves, but in the sharing of those rules.
32
33* Code MUST follow PSR-1.
34
35* Code MUST use 4 spaces for indenting, not tabs.
36
37* There MUST NOT be a hard limit on line length; the soft limit MUST be 120 characters; lines SHOULD be 80 characters or less.
38
39* There MUST be one blank line after the `namespace` declaration, and there MUST be one blank line after the block of `use` declarations.
40
41* Opening braces for classes MUST go on the next line, and closing braces MUST go on the next line after the body.
42
43* Opening braces for methods MUST go on the next line, and closing braces MUST go on the next line after the body.
44
45* Visibility MUST be declared on all properties and methods; `abstract` and `final` MUST be declared before the visibility; `static` MUST be declared after the visibility.
46
47* Control structure keywords MUST have one space after them; method and function calls MUST NOT.
48
49* Opening braces for control structures MUST go on the same line, and closing braces MUST go on the next line after the body.
50
51* Opening parentheses for control structures MUST NOT have a space after them, and closing parentheses for control structures MUST NOT have a space before.
52
53You can read details on [PHP FIG website](http://www.php-fig.org/psr/psr-2/). \ No newline at end of file