Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions src/Standards/PSR12/Docs/Classes/ClosingBraceStandard.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<documentation title="Closing Brace">
<standard>
<![CDATA[
Any closing brace must not be followed by any comment or statement on the same line.
]]>
</standard>
<code_comparison>
<code title="Valid: No content on the line with the closing brace.">
<![CDATA[
class Foo
{
// Class content.
}<em></em>

function bar()
{
// Function content.
}<em></em>
]]>
</code>
<code title="Invalid: Content on the line with the closing brace.">
<![CDATA[
interface Foo2
{
// Interface content.
} <em>echo 'Hello!';</em>

function bar()
{
// Function content.
} <em>//end bar()</em>
]]>
</code>
</code_comparison>
</documentation>