1- <documentation title =" Class Declarations " >
1+ <documentation title =" Class Declaration " >
22 <standard >
33 <![CDATA[
4- The opening brace of a class must be on the line after the definition by itself.
4+ The opening brace of an OO structure must be on the line directly after the OO signature. The opening brace must be on a line by itself.
55 ]]>
66 </standard >
77 <code_comparison >
@@ -12,24 +12,12 @@ class Foo
1212}
1313 ]]>
1414 </code >
15- <code title =" Invalid: Opening brace on same line as declaration ." >
15+ <code title =" Invalid: Opening brace on incorrect line." >
1616 <![CDATA[
17- class Foo <em>{</em>
17+ class BraceOnSignatureLine <em>{</em>
1818}
19- ]]>
20- </code >
21- </code_comparison >
22- <code_comparison >
23- <code title =" Valid: Opening brace on the correct line." >
24- <![CDATA[
25- class Foo
26- <em>{</em>
27- }
28- ]]>
29- </code >
30- <code title =" Invalid: Newline between declaration and opening brace." >
31- <![CDATA[
32- class Foo
19+
20+ class BlankLineBetween
3321<em></em>
3422{
3523}
@@ -44,7 +32,7 @@ class Foo
4432}
4533 ]]>
4634 </code >
47- <code title =" Invalid: Opening brace is not alone on its line." >
35+ <code title =" Invalid: Opening brace is not on a line by itself ." >
4836 <![CDATA[
4937class Foo
5038{<em> public function __construct() {}</em>
@@ -54,40 +42,32 @@ class Foo
5442 </code_comparison >
5543 <standard >
5644 <![CDATA[
57- The opening brace must be indented to the same depth as the class declaration.
45+ The opening brace must be indented to the same depth as the OO structure's declaration.
5846 ]]>
5947 </standard >
6048 <code_comparison >
61- <code title =" Valid: Opening brace indentation depth matches the class definition ." >
49+ <code title =" Valid: Opening brace indentation depth matches the OO structure signature's depth ." >
6250 <![CDATA[
63- if (!class_exists('Foo ')) {
64- abstract class Foo
51+ if (!class_exists('IndentedFourSpaces ')) {
52+ abstract class IndentedFourSpaces
6553 <em>{</em>
6654 }
6755}
68- ]]>
69- </code >
70- <code title =" Invalid: Expected 4 spaces before opening brace; 0 found." >
71- <![CDATA[
72- if (!class_exists('Foo')) {
73- abstract class Foo
56+
57+ class NotIndented
7458<em>{</em>
75- }
7659}
7760 ]]>
7861 </code >
79- </code_comparison >
80- <code_comparison >
81- <code title =" Valid: Opening brace indentation depth matches the class definition." >
62+ <code title =" Invalid: Opening brace indentation depth does not match the OO structure signature's depth." >
8263 <![CDATA[
83- class Foo
64+ if (!class_exists('IndentedFourSpaces')) {
65+ abstract class IndentedFourSpaces
8466<em>{</em>
8567}
86- ]]>
87- </code >
88- <code title =" Invalid: Expected 0 spaces before opening brace; 4 found." >
89- <![CDATA[
90- class Foo
68+ }
69+
70+ class NotIndented
9171 <em>{</em>
9272 }
9373 ]]>
0 commit comments