File tree 1 file changed +35
-0
lines changed
src/Standards/PSR12/Docs/Classes
1 file changed +35
-0
lines changed Original file line number Diff line number Diff line change
1
+ <documentation title =" Closing Brace" >
2
+ <standard >
3
+ <![CDATA[
4
+ The closing brace of object-oriented constructs and functions must not be followed by any comment or statement on the same line.
5
+ ]]>
6
+ </standard >
7
+ <code_comparison >
8
+ <code title =" Valid: Closing brace is the last content on the line." >
9
+ <![CDATA[
10
+ class Foo
11
+ {
12
+ // Class content.
13
+ }<em></em>
14
+
15
+ function bar()
16
+ {
17
+ // Function content.
18
+ }<em></em>
19
+ ]]>
20
+ </code >
21
+ <code title =" Invalid: Comment or statement following the closing brace on the same line." >
22
+ <![CDATA[
23
+ interface Foo2
24
+ {
25
+ // Interface content.
26
+ } <em>echo 'Hello!';</em>
27
+
28
+ function bar()
29
+ {
30
+ // Function content.
31
+ } <em>//end bar()</em>
32
+ ]]>
33
+ </code >
34
+ </code_comparison >
35
+ </documentation >
You can’t perform that action at this time.
0 commit comments