Skip to content

Commit c58d597

Browse files
committed
removed CS rules that are defined in PSR-1 and PSR-2
1 parent f378f18 commit c58d597

File tree

1 file changed

+3
-26
lines changed

1 file changed

+3
-26
lines changed

contributing/code/standards.rst

Lines changed: 3 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ follow the same guidelines, and you should too.
99
Remember that the main advantage of standards is that every piece of code
1010
looks and feels familiar, it's not about this or that being more readable.
1111

12+
Symfony follows the standards defined in the PSR-0, PSR-1, and PSR-2
13+
documents.
14+
1215
Since a picture - or some code - is worth a thousand words, here's a short
1316
example containing most features described below:
1417

@@ -61,45 +64,19 @@ example containing most features described below:
6164
Structure
6265
---------
6366

64-
* Never use short tags (`<?`);
65-
66-
* Don't end class files with the usual `?>` closing tag;
67-
68-
* Indentation is done by steps of four spaces (tabs are never allowed);
69-
70-
* Use the linefeed character (`0x0A`) to end lines;
71-
7267
* Add a single space after each comma delimiter;
7368

74-
* Don't put spaces after an opening parenthesis and before a closing one;
75-
7669
* Add a single space around operators (`==`, `&&`, ...);
7770

78-
* Add a single space before the opening parenthesis of a control keyword
79-
(`if`, `else`, `for`, `while`, ...);
80-
8171
* Add a blank line before `return` statements, unless the return is alone
8272
inside a statement-group (like an `if` statement);
8373

84-
* Don't add trailing spaces at the end of lines;
85-
8674
* Use braces to indicate control structure body regardless of the number of
8775
statements it contains;
8876

89-
* Put braces on their own line for classes, methods, and functions
90-
declaration;
91-
92-
* Separate the conditional statements (`if`, `else`, ...) and the opening
93-
brace with a single space and no blank line;
94-
9577
* Declare visibility explicitly for class, methods, and properties (usage of
9678
`var` is prohibited);
9779

98-
* Use lowercase PHP native typed constants: `false`, `true`, and `null`. The
99-
same goes for `array()`;
100-
101-
* Use uppercase strings for constants with words separated with underscores;
102-
10380
* Define one class per file - this does not apply to private helper classes
10481
that are not intended to be instantiated from the outside and thus are not
10582
concerned by the PSR-0 standard;

0 commit comments

Comments
 (0)