You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[Docs] Add XML doc for Squiz.Classes.ValidClassName sniff (#842)
* Add XML doc for Squiz\Classes\ValidClassName sniff
* [Doc] Use em tags for ValidClassName doc XML
Uses `<em>` tags in the code sample for Squiz.Classes.ValidClassName to
highlight the critical part of the sample.
* Clarify PascalCase class naming requirement
Added a friendlier description of the PascalCase requirements.
Adds an extra example to clarify that it's not just a leading capital
we're looking for - we also need only letters and numbers.
Class names must be written in Pascal case. This means that it starts with a capital letter, and the first letter of each word in the class name is capitalized. Only letters and numbers are allowed.
5
+
]]>
6
+
</standard>
7
+
<code_comparison>
8
+
<codetitle="Valid: Class name starts with a capital letter.">
9
+
<![CDATA[
10
+
class <em>PascalCaseStandard</em>
11
+
{
12
+
}
13
+
]]>
14
+
</code>
15
+
<codetitle="Invalid: Class name does not start with a capital letter.">
16
+
<![CDATA[
17
+
class <em>notPascalCaseStandard</em>
18
+
{
19
+
}
20
+
]]>
21
+
</code>
22
+
</code_comparison>
23
+
<code_comparison>
24
+
<codetitle="Valid: Class name contains only letters and numbers.">
25
+
<![CDATA[
26
+
class <em>PSR7Response</em>
27
+
{
28
+
}
29
+
]]>
30
+
</code>
31
+
<codetitle="Invalid: Class name contains underscores.">
0 commit comments