File: FunctionCallSignatureStandard.xml

package info (click to toggle)
php-codesniffer 1.3.4-1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 4,092 kB
  • sloc: php: 30,445; xml: 3,768; makefile: 15; pascal: 8; sh: 6
file content (19 lines) | stat: -rw-r--r-- 669 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
<documentation title="Function Calls">
    <standard>
    <![CDATA[
      Functions should be called with no spaces between the function name, the opening parenthesis, and the first parameter; and no space between the last parameter, the closing parenthesis, and the semicolon.
    ]]>
    </standard>
    <code_comparison>
        <code title="Valid: spaces between parameters">
        <![CDATA[
$var = foo($bar, $baz, $quux);
        ]]>
        </code>
        <code title="Invalid: additional spaces used">
        <![CDATA[
$var = foo<em> </em>(<em> </em>$bar, $baz, $quux<em> </em>)<em> </em>;
        ]]>
        </code>
    </code_comparison>
</documentation>