Skip to content

Commit 9c43d7c

Browse files
committed
Update README.md
1 parent b7668fc commit 9c43d7c

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

README.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,21 @@ Requires
99
* [PHP CodeSniffer](https://github.com/squizlabs/PHP_CodeSniffer)
1010
* [Symfony Coding Standard](https://github.com/xalopp/symfony-coding-standard)
1111

12+
##MO4 Coding Standard
13+
14+
The MO4 Coding Standard is an extension to the [Symfony Coding Standard](http://symfony.com/doc/current/contributing/code/standards.html) and adds following rules:
15+
16+
* short tags "[...]" must be used instead of "array(...)",
17+
* in associates arrays, the "=>" operator must be aligned,
18+
* in arrays, the key and '=>' operator must be on the same line.
19+
* each consecutive variable assignements must align on gthe assigment operator,
20+
* use statements must be sorted,
21+
* you should use the imported class name, whenever it was imported with a use statement,
22+
* variables in double quoted strings must be surrounded by { }, e.g. "{$VAR}" instead of "$VAR",
23+
* sprintf or "{$VAR1} {$VAR2}" must be used insted of the concat operator, concat opetor are only allowed to concat constant an multi line strings,
24+
* a white space is requried after each cast opetor, e.g. "(int) $value" instead of "(int)$value",
25+
26+
1227
## Installation
1328

1429
1. Install phpcs:

0 commit comments

Comments
 (0)