Mercurial > hg > isophonics-drupal-site
annotate vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/Functions/OpeningFunctionBraceKernighanRitchieStandard.xml @ 19:fa3358dc1485 tip
Add ndrum files
author | Chris Cannam |
---|---|
date | Wed, 28 Aug 2019 13:14:47 +0100 |
parents | 129ea1e6d783 |
children |
rev | line source |
---|---|
Chris@0 | 1 <documentation title="Opening Brace in Function Declarations"> |
Chris@0 | 2 <standard> |
Chris@0 | 3 <![CDATA[ |
Chris@0 | 4 Function declarations follow the "Kernighan/Ritchie style". The function brace is on the same line as the function declaration. One space is required between the closing parenthesis and the brace. |
Chris@0 | 5 ]]> |
Chris@0 | 6 </standard> |
Chris@0 | 7 <code_comparison> |
Chris@0 | 8 <code title="Valid: brace on same line"> |
Chris@0 | 9 <![CDATA[ |
Chris@0 | 10 function fooFunction($arg1, $arg2 = '')<em> {</em> |
Chris@0 | 11 ... |
Chris@0 | 12 } |
Chris@0 | 13 ]]> |
Chris@0 | 14 </code> |
Chris@0 | 15 <code title="Invalid: brace on next line"> |
Chris@0 | 16 <![CDATA[ |
Chris@0 | 17 function fooFunction($arg1, $arg2 = '') |
Chris@0 | 18 <em>{</em> |
Chris@0 | 19 ... |
Chris@0 | 20 } |
Chris@0 | 21 ]]> |
Chris@0 | 22 </code> |
Chris@0 | 23 </code_comparison> |
Chris@0 | 24 </documentation> |