Skip to content

Commit cc01a79

Browse files
committed
Add XML doc for Squiz\Classes\ClassFileName sniff
1 parent 894bf72 commit cc01a79

File tree

1 file changed

+47
-0
lines changed

1 file changed

+47
-0
lines changed
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
<documentation title="Class File Name">
2+
<standard>
3+
<![CDATA[
4+
The file name and the name of the class defined within the file must match exactly, including case.
5+
]]>
6+
</standard>
7+
<code_comparison>
8+
<code title="Valid: Defined class name and filename match.">
9+
<![CDATA[
10+
<em>/* ./src/Foo.php contents: */</em>
11+
12+
class Foo
13+
{
14+
}
15+
]]>
16+
</code>
17+
<code title="Invalid: Class name does not match filename.">
18+
<![CDATA[
19+
<em>/* ./src/Foo.php contents: */</em>
20+
21+
class MyFoo
22+
{
23+
}
24+
]]>
25+
</code>
26+
</code_comparison>
27+
<code_comparison>
28+
<code title="Valid: Class name and filename use the same casing.">
29+
<![CDATA[
30+
<em>/* ./src/MyFoo.php contents: */</em>
31+
32+
class MyFoo
33+
{
34+
}
35+
]]>
36+
</code>
37+
<code title="Invalid: Class name case does not match filename case.">
38+
<![CDATA[
39+
<em>/* ./src/myFoo.php contents: */</em>
40+
41+
class MyFoo
42+
{
43+
}
44+
]]>
45+
</code>
46+
</code_comparison>
47+
</documentation>

0 commit comments

Comments
 (0)