Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
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
1 change: 1 addition & 0 deletions package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1519,6 +1519,7 @@ http://pear.php.net/dtd/package-2.0.xsd">
<file baseinstalldir="PHP/CodeSniffer" name="ArrayDeclarationStandard.xml" role="php" />
</dir>
<dir name="Classes">
<file baseinstalldir="PHP/CodeSniffer" name="ClassDeclarationStandard.xml" role="php" />
<file baseinstalldir="PHP/CodeSniffer" name="LowercaseClassKeywordsStandard.xml" role="php" />
<file baseinstalldir="PHP/CodeSniffer" name="SelfMemberReferenceStandard.xml" role="php" />
</dir>
Expand Down
23 changes: 23 additions & 0 deletions src/Standards/Squiz/Docs/Classes/ClassDeclarationStandard.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<documentation title="Class Declaration">
<standard>
<![CDATA[
This extends the PSR2 standard, adding to the requirements for the 'SpaceBeforeKeyword' code. It ensures that keywords like 'class' do not have a space before them.
]]>
</standard>
<code_comparison>
<code title="Valid: Class Declaration.">
<![CDATA[
class<em> </em>Foo
{
}
]]>
</code>
<code title="Invalid: Class Declaration.">
<![CDATA[
class<em> </em>Foo
{
}
]]>
</code>
</code_comparison>
</documentation>