From c4ca59647de6c8716a76645b6689b58425e8a116 Mon Sep 17 00:00:00 2001 From: legenerationlazi Date: Fri, 13 Apr 2007 19:32:57 +0000 Subject: [PATCH] testing conversion to wiki markup script --- ...- Coding Style - Functions and methods.php | 95 ++++++++----------- 1 file changed, 42 insertions(+), 53 deletions(-) diff --git a/manual/docs/Coding standards - Coding Style - Functions and methods.php b/manual/docs/Coding standards - Coding Style - Functions and methods.php index a7f8b0d94..8b15661c0 100644 --- a/manual/docs/Coding standards - Coding Style - Functions and methods.php +++ b/manual/docs/Coding standards - Coding Style - Functions and methods.php @@ -1,22 +1,21 @@ - - - - - - /** * Documentation Block Here */ @@ -28,14 +27,11 @@ class Foo { // entire content of function // must be indented four spaces } -}"); +} -?> - - /** * Documentation Block Here */ @@ -46,16 +42,14 @@ class Foo { public function bar(&\$baz) { } } -"); -?> - - - + +* Call-time pass by-reference is prohibited. + + +* The return value must not be enclosed in parentheses. This can hinder readability and can also break code if a method is later changed to return by reference. + + /** * Documentation Block Here */ @@ -72,29 +66,24 @@ class Foo { public function bar() { return \$this->bar; } -}"); -?> - - + +* Function arguments are separated by a single trailing space after the comma delimiter. This is an example of an acceptable function call for a function that takes three arguments: + + threeArguments(1, 2, 3); -?>"); -?> -
    -
  • Call-time pass by-reference is prohibited. See the function declarations section for the proper way to pass function arguments by-reference. -
-
    -
  • For functions whose arguments permitted arrays, the function call may include the "array" construct and can be split into multiple lines to improve readability. In these cases, the standards for writing arrays still apply: -
-
+ +* Call-time pass by-reference is prohibited. See the function declarations section for the proper way to pass function arguments by-reference. + + +* For functions whose arguments permitted arrays, the function call may include the "array" construct and can be split into multiple lines to improve readability. In these cases, the standards for writing arrays still apply: + + threeArguments(array(1, 2, 3), 2, 3); threeArguments(array(1, 2, 3, 'Framework', 'Doctrine', 56.44, 500), 2, 3); -?>"); -?> +?>