Skip to content

Commit fb0fc01

Browse files
authored
Merge branch 'WordPress:develop' into doc/WordPress.DB.SlowDBQuery
2 parents baea92e + d77b020 commit fb0fc01

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
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>

0 commit comments

Comments
 (0)