mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-08-02 09:04:44 +02:00
[Coding style policy] Add proposals
parent
656f52d988
commit
dba27bf103
1 changed files with 21 additions and 5 deletions
|
@ -12,7 +12,16 @@ __echo false;
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
* Next proposal here
|
* Proposal 2
|
||||||
|
|
||||||
|
Use one tab per indentation level (rendered as 4 spaces in GitHub)
|
||||||
|
```PHP
|
||||||
|
if(true){
|
||||||
|
__echo true;
|
||||||
|
} else {
|
||||||
|
__echo false;
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
## Trailing white spaces
|
## Trailing white spaces
|
||||||
|
|
||||||
|
@ -20,15 +29,15 @@ __echo false;
|
||||||
|
|
||||||
Lines must be trimmed of any trailing white spaces
|
Lines must be trimmed of any trailing white spaces
|
||||||
|
|
||||||
* Next proposal here
|
|
||||||
|
|
||||||
## Line length
|
## Line length
|
||||||
|
|
||||||
* Proposal 1
|
* Proposal 1
|
||||||
|
|
||||||
Lines must be limited to 80 characters
|
Lines must be limited to 80 characters
|
||||||
|
|
||||||
* Next proposal here
|
* Proposal 2
|
||||||
|
|
||||||
|
Lines should have a length of less than 80 characters where possible. The maximum length for one line is 120 characters.
|
||||||
|
|
||||||
## Variables, functions, methods and class naming
|
## Variables, functions, methods and class naming
|
||||||
|
|
||||||
|
@ -42,4 +51,11 @@ class thisClass {
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
* Next proposal here
|
* Proposal 2
|
||||||
|
|
||||||
|
```PHP
|
||||||
|
var $thisVariable; // camelCase
|
||||||
|
function this_function(){} // lower-case & underscore ('_')
|
||||||
|
class ThisClass { // UpperCamelCase (PascalCase)
|
||||||
|
function ThisMethod(){} // UpperCamelCase (PascalCase)
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue