File tree Expand file tree Collapse file tree
WordPress/Docs/NamingConventions Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ <?xml version =" 1.0" ?>
2+ <documentation xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
3+ xsi : noNamespaceSchemaLocation =" https://phpcsstandards.github.io/PHPCSDevTools/phpcsdocs.xsd"
4+ title =" Valid Function Name"
5+ >
6+ <standard >
7+ <![CDATA[
8+ Use lowercase letters in function names. Separate words using underscores. Do not use double underscores as a prefix.
9+ ]]>
10+ </standard >
11+ <code_comparison >
12+ <code title =" Valid: lowercase function name." >
13+ <![CDATA[
14+ function <em>prefix_function_name()</em> {}
15+ ]]>
16+ </code >
17+ <code title =" Invalid: mixed case function name." >
18+ <![CDATA[
19+ function <em>Prefix_Function_NAME()</em> {}
20+ ]]>
21+ </code >
22+ </code_comparison >
23+ <code_comparison >
24+ <code title =" Valid: words separated by underscores." >
25+ <![CDATA[
26+ class My_Class {
27+ public static <em>method_name()</em> {}
28+ }
29+ ]]>
30+ </code >
31+ <code title =" Invalid: using camel case to separate words." >
32+ <![CDATA[
33+ class My_Class {
34+ public static <em>methodName()</em> {}
35+ }
36+ ]]>
37+ </code >
38+ </code_comparison >
39+ </documentation >
You can’t perform that action at this time.
0 commit comments