cvs: phpdoc /en/reference/array/functions array-diff-uassoc.xml array-filter.xml array-map.xml array-reduce.xml array-udiff-assoc.xml
array-udiff-uassoc.xml array-udiff.xml array-walk.xml uksort.xml usort.xml
| From: | Mehdi Achour | Date: | Thu, 15 Jan 2004 12:42:01 +0000 |
| Subject: | cvs: phpdoc /en/reference/array/functions array-diff-uassoc.xml array-filter.xml array-map.xml array-reduce.xml array-udiff-assoc.xml array-udiff-uassoc.xml array-udiff.xml array-walk.xml uksort.xml usort.xml |
||
| Groups: | php.doc | ||
| Request: | Send a blank email to phpdoc+get-969358192@lists.php.net to get a copy of this message | ||
didou Thu Jan 15 07:42:01 2004 EDT
Modified files:
/phpdoc/en/reference/array/functions array-diff-uassoc.xml
array-filter.xml array-map.xml
array-reduce.xml
array-udiff-assoc.xml
array-udiff-uassoc.xml
array-udiff.xml array-walk.xml
uksort.xml usort.xml
Log:
CS : Function declarations follow the 'one true brace' convention
Index: phpdoc/en/reference/array/functions/array-diff-uassoc.xml diff -u phpdoc/en/reference/array/functions/array-diff-uassoc.xml:1.2 phpdoc/en/reference/array/functions/array-diff-uassoc.xml:1.3 --- phpdoc/en/reference/array/functions/array-diff-uassoc.xml:1.2 Mon Nov 3 09:05:07 2003 +++ phpdoc/en/reference/array/functions/array-diff-uassoc.xml Thu Jan 15 07:42:01 2004 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.2 $ --> +<!-- $Revision: 1.3 $ --> <!-- splitted from ./en/functions/array.xml, last change in rev 1.14 --> <refentry id="function.array-diff-uassoc"> <refnamediv> @@ -33,8 +33,11 @@ <programlisting role="php"> <![CDATA[ <?php -function key_compare_func($a, $b) { - if ($a === $b) return 0; +function key_compare_func($a, $b) +{ + if ($a === $b) { + return 0; + } return ($a > $b)? 1:-1; } Index: phpdoc/en/reference/array/functions/array-filter.xml diff -u phpdoc/en/reference/array/functions/array-filter.xml:1.13 phpdoc/en/reference/array/functions/array-filter.xml:1.14 --- phpdoc/en/reference/array/functions/array-filter.xml:1.13 Wed Nov 12 16:06:32 2003 +++ phpdoc/en/reference/array/functions/array-filter.xml Thu Jan 15 07:42:01 2004 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.13 $ --> +<!-- $Revision: 1.14 $ --> <!-- splitted from ./en/functions/array.xml, last change in rev 1.62 --> <refentry id="function.array-filter"> <refnamediv> @@ -29,11 +29,13 @@ <programlisting role="php"> <![CDATA[ <?php -function odd($var) { +function odd($var) +{ return($var % 2 == 1); } -function even($var) { +function even($var) +{ return($var % 2 == 0); } Index: phpdoc/en/reference/array/functions/array-map.xml diff -u phpdoc/en/reference/array/functions/array-map.xml:1.10 phpdoc/en/reference/array/functions/array-map.xml:1.11 --- phpdoc/en/reference/array/functions/array-map.xml:1.10 Sun Aug 17 08:21:03 2003 +++ phpdoc/en/reference/array/functions/array-map.xml Thu Jan 15 07:42:01 2004 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.10 $ --> +<!-- $Revision: 1.11 $ --> <!-- splitted from ./en/functions/array.xml, last change in rev 1.62 --> <refentry id="function.array-map"> <refnamediv> @@ -31,7 +31,8 @@ <programlisting role="php"> <![CDATA[ <?php -function cube($n) { +function cube($n) +{ return($n * $n * $n); } @@ -64,11 +65,13 @@ <programlisting role="php"> <![CDATA[ <?php -function show_Spanish($n, $m) { +function show_Spanish($n, $m) +{ return("The number $n is called $m in Spanish"); } -function map_Spanish($n, $m) { +function map_Spanish($n, $m) +{ return(array($n => $m)); } Index: phpdoc/en/reference/array/functions/array-reduce.xml diff -u phpdoc/en/reference/array/functions/array-reduce.xml:1.7 phpdoc/en/reference/array/functions/array-reduce.xml:1.8 --- phpdoc/en/reference/array/functions/array-reduce.xml:1.7 Fri Jul 25 12:38:56 2003 +++ phpdoc/en/reference/array/functions/array-reduce.xml Thu Jan 15 07:42:01 2004 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.7 $ --> +<!-- $Revision: 1.8 $ --> <!-- splitted from ./en/functions/array.xml, last change in rev 1.2 --> <refentry id="function.array-reduce"> <refnamediv> @@ -31,12 +31,14 @@ <programlisting role="php"> <![CDATA[ <?php -function rsum($v, $w) { +function rsum($v, $w) +{ $v += $w; return $v; } -function rmul($v, $w) { +function rmul($v, $w) +{ $v *= $w; return $v; } Index: phpdoc/en/reference/array/functions/array-udiff-assoc.xml diff -u phpdoc/en/reference/array/functions/array-udiff-assoc.xml:1.4 phpdoc/en/reference/array/functions/array-udiff-assoc.xml:1.5 --- phpdoc/en/reference/array/functions/array-udiff-assoc.xml:1.4 Mon Dec 15 11:47:04 2003 +++ phpdoc/en/reference/array/functions/array-udiff-assoc.xml Thu Jan 15 07:42:01 2004 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.4 $ --> +<!-- $Revision: 1.5 $ --> <!-- splitted from ./en/functions/array.xml, last change in rev 1.14 --> <refentry id="function.array-udiff-assoc"> <refnamediv> @@ -34,14 +34,18 @@ <?php class cr { var $priv_member; - function cr($val) { + function cr($val) + { $this->priv_member = $val; } - function comp_func_cr($a, $b) { + + function comp_func_cr($a, $b) + { if ($a->priv_member === $b->priv_member) return 0; return ($a->priv_member > $b->priv_member)? 1:-1; } } + $a = array("0.1" => new cr(9), "0.5" => new cr(12), 0 => new cr(23), 1=> new cr(4), 2 => new cr(-15),); $b = array("0.2" => new cr(9), "0.5" => new cr(22), 0 => new cr(3), 1=> new cr(4), 2 => new cr(-15),); Index: phpdoc/en/reference/array/functions/array-udiff-uassoc.xml diff -u phpdoc/en/reference/array/functions/array-udiff-uassoc.xml:1.7 phpdoc/en/reference/array/functions/array-udiff-uassoc.xml:1.8 --- phpdoc/en/reference/array/functions/array-udiff-uassoc.xml:1.7 Mon Dec 15 11:47:04 2003 +++ phpdoc/en/reference/array/functions/array-udiff-uassoc.xml Thu Jan 15 07:42:01 2004 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.7 $ --> +<!-- $Revision: 1.8 $ --> <!-- splitted from ./en/functions/array.xml, last change in rev 1.14 --> <refentry id="function.array-udiff-uassoc"> <refnamediv> @@ -39,14 +39,19 @@ <?php class cr { var $priv_member; - function cr($val) { + function cr($val) + { $this->priv_member = $val; } - function comp_func_cr($a, $b) { + + function comp_func_cr($a, $b) + { if ($a->priv_member === $b->priv_member) return 0; return ($a->priv_member > $b->priv_member)? 1:-1; } - function comp_func_key($a, $b) { + + function comp_func_key($a, $b) + { if ($a === $b) return 0; return ($a > $b)? 1:-1; } Index: phpdoc/en/reference/array/functions/array-udiff.xml diff -u phpdoc/en/reference/array/functions/array-udiff.xml:1.5 phpdoc/en/reference/array/functions/array-udiff.xml:1.6 --- phpdoc/en/reference/array/functions/array-udiff.xml:1.5 Fri Dec 26 13:42:02 2003 +++ phpdoc/en/reference/array/functions/array-udiff.xml Thu Jan 15 07:42:01 2004 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.5 $ --> +<!-- $Revision: 1.6 $ --> <!-- splitted from ./en/functions/array.xml, last change in rev 1.14 --> <refentry id="function.array-udiff"> <refnamediv> @@ -35,10 +35,13 @@ <?php class cr { var $priv_member; - function cr($val) { + function cr($val) + { $this->priv_member = $val; } - function comp_func_cr($a, $b) { + + function comp_func_cr($a, $b) + { if ($a->priv_member === $b->priv_member) return 0; return ($a->priv_member > $b->priv_member)? 1:-1; } Index: phpdoc/en/reference/array/functions/array-walk.xml diff -u phpdoc/en/reference/array/functions/array-walk.xml:1.13 phpdoc/en/reference/array/functions/array-walk.xml:1.14 --- phpdoc/en/reference/array/functions/array-walk.xml:1.13 Mon Dec 15 11:47:04 2003 +++ phpdoc/en/reference/array/functions/array-walk.xml Thu Jan 15 07:42:01 2004 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.13 $ --> +<!-- $Revision: 1.14 $ --> <!-- splitted from ./en/functions/array.xml, last change in rev 1.2 --> <refentry id="function.array-walk"> <refnamediv> @@ -77,11 +77,13 @@ <?php $fruits = array("d" => "lemon", "a" => "orange", "b" => "banana", "c" => "apple"); -function test_alter(&$item1, $key, $prefix) { +function test_alter(&$item1, $key, $prefix) +{ $item1 = "$prefix: $item1"; } -function test_print($item2, $key) { +function test_print($item2, $key) +{ echo "$key. $item2<br />\n"; } Index: phpdoc/en/reference/array/functions/uksort.xml diff -u phpdoc/en/reference/array/functions/uksort.xml:1.11 phpdoc/en/reference/array/functions/uksort.xml:1.12 --- phpdoc/en/reference/array/functions/uksort.xml:1.11 Fri Dec 26 04:56:59 2003 +++ phpdoc/en/reference/array/functions/uksort.xml Thu Jan 15 07:42:01 2004 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.11 $ --> +<!-- $Revision: 1.12 $ --> <!-- splitted from ./en/functions/array.xml, last change in rev 1.2 --> <refentry id="function.uksort"> <refnamediv> @@ -38,7 +38,8 @@ <programlisting role="php"> <![CDATA[ <?php -function cmp($a, $b) { +function cmp($a, $b) +{ if ($a == $b) { return 0; } Index: phpdoc/en/reference/array/functions/usort.xml diff -u phpdoc/en/reference/array/functions/usort.xml:1.16 phpdoc/en/reference/array/functions/usort.xml:1.17 --- phpdoc/en/reference/array/functions/usort.xml:1.16 Fri Dec 26 04:56:59 2003 +++ phpdoc/en/reference/array/functions/usort.xml Thu Jan 15 07:42:01 2004 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.16 $ --> +<!-- $Revision: 1.17 $ --> <!-- splitted from ./en/functions/array.xml, last change in rev 1.2 --> <refentry id="function.usort"> <refnamediv> @@ -46,7 +46,8 @@ <programlisting role="php"> <![CDATA[ <?php -function cmp($a, $b) { +function cmp($a, $b) +{ if ($a == $b) { return 0; } @@ -91,7 +92,8 @@ <programlisting role="php"> <![CDATA[ <?php -function cmp($a, $b) { +function cmp($a, $b) +{ return strcmp($a["fruit"], $b["fruit"]); } @@ -135,12 +137,14 @@ class TestObj { var $name; - function TestObj($name) { + function TestObj($name) + { $this->name = $name; } /* This is the static comparing function: */ - function cmp_obj($a, $b) { + function cmp_obj($a, $b) + { $al = strtolower($a->name); $bl = strtolower($b->name); if ($al == $bl) {
Index: phpdoc/en/reference/array/functions/array-diff-uassoc.xml diff -u phpdoc/en/reference/array/functions/array-diff-uassoc.xml:1.2 phpdoc/en/reference/array/functions/array-diff-uassoc.xml:1.3 --- phpdoc/en/reference/array/functions/array-diff-uassoc.xml:1.2 Mon Nov 3 09:05:07 2003 +++ phpdoc/en/reference/array/functions/array-diff-uassoc.xml Thu Jan 15 07:42:01 2004 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.2 $ --> +<!-- $Revision: 1.3 $ --> <!-- splitted from ./en/functions/array.xml, last change in rev 1.14 --> <refentry id="function.array-diff-uassoc"> <refnamediv> @@ -33,8 +33,11 @@ <programlisting role="php"> <![CDATA[ <?php -function key_compare_func($a, $b) { - if ($a === $b) return 0; +function key_compare_func($a, $b) +{ + if ($a === $b) { + return 0; + } return ($a > $b)? 1:-1; } Index: phpdoc/en/reference/array/functions/array-filter.xml diff -u phpdoc/en/reference/array/functions/array-filter.xml:1.13 phpdoc/en/reference/array/functions/array-filter.xml:1.14 --- phpdoc/en/reference/array/functions/array-filter.xml:1.13 Wed Nov 12 16:06:32 2003 +++ phpdoc/en/reference/array/functions/array-filter.xml Thu Jan 15 07:42:01 2004 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.13 $ --> +<!-- $Revision: 1.14 $ --> <!-- splitted from ./en/functions/array.xml, last change in rev 1.62 --> <refentry id="function.array-filter"> <refnamediv> @@ -29,11 +29,13 @@ <programlisting role="php"> <![CDATA[ <?php -function odd($var) { +function odd($var) +{ return($var % 2 == 1); } -function even($var) { +function even($var) +{ return($var % 2 == 0); } Index: phpdoc/en/reference/array/functions/array-map.xml diff -u phpdoc/en/reference/array/functions/array-map.xml:1.10 phpdoc/en/reference/array/functions/array-map.xml:1.11 --- phpdoc/en/reference/array/functions/array-map.xml:1.10 Sun Aug 17 08:21:03 2003 +++ phpdoc/en/reference/array/functions/array-map.xml Thu Jan 15 07:42:01 2004 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.10 $ --> +<!-- $Revision: 1.11 $ --> <!-- splitted from ./en/functions/array.xml, last change in rev 1.62 --> <refentry id="function.array-map"> <refnamediv> @@ -31,7 +31,8 @@ <programlisting role="php"> <![CDATA[ <?php -function cube($n) { +function cube($n) +{ return($n * $n * $n); } @@ -64,11 +65,13 @@ <programlisting role="php"> <![CDATA[ <?php -function show_Spanish($n, $m) { +function show_Spanish($n, $m) +{ return("The number $n is called $m in Spanish"); } -function map_Spanish($n, $m) { +function map_Spanish($n, $m) +{ return(array($n => $m)); } Index: phpdoc/en/reference/array/functions/array-reduce.xml diff -u phpdoc/en/reference/array/functions/array-reduce.xml:1.7 phpdoc/en/reference/array/functions/array-reduce.xml:1.8 --- phpdoc/en/reference/array/functions/array-reduce.xml:1.7 Fri Jul 25 12:38:56 2003 +++ phpdoc/en/reference/array/functions/array-reduce.xml Thu Jan 15 07:42:01 2004 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.7 $ --> +<!-- $Revision: 1.8 $ --> <!-- splitted from ./en/functions/array.xml, last change in rev 1.2 --> <refentry id="function.array-reduce"> <refnamediv> @@ -31,12 +31,14 @@ <programlisting role="php"> <![CDATA[ <?php -function rsum($v, $w) { +function rsum($v, $w) +{ $v += $w; return $v; } -function rmul($v, $w) { +function rmul($v, $w) +{ $v *= $w; return $v; } Index: phpdoc/en/reference/array/functions/array-udiff-assoc.xml diff -u phpdoc/en/reference/array/functions/array-udiff-assoc.xml:1.4 phpdoc/en/reference/array/functions/array-udiff-assoc.xml:1.5 --- phpdoc/en/reference/array/functions/array-udiff-assoc.xml:1.4 Mon Dec 15 11:47:04 2003 +++ phpdoc/en/reference/array/functions/array-udiff-assoc.xml Thu Jan 15 07:42:01 2004 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.4 $ --> +<!-- $Revision: 1.5 $ --> <!-- splitted from ./en/functions/array.xml, last change in rev 1.14 --> <refentry id="function.array-udiff-assoc"> <refnamediv> @@ -34,14 +34,18 @@ <?php class cr { var $priv_member; - function cr($val) { + function cr($val) + { $this->priv_member = $val; } - function comp_func_cr($a, $b) { + + function comp_func_cr($a, $b) + { if ($a->priv_member === $b->priv_member) return 0; return ($a->priv_member > $b->priv_member)? 1:-1; } } + $a = array("0.1" => new cr(9), "0.5" => new cr(12), 0 => new cr(23), 1=> new cr(4), 2 => new cr(-15),); $b = array("0.2" => new cr(9), "0.5" => new cr(22), 0 => new cr(3), 1=> new cr(4), 2 => new cr(-15),); Index: phpdoc/en/reference/array/functions/array-udiff-uassoc.xml diff -u phpdoc/en/reference/array/functions/array-udiff-uassoc.xml:1.7 phpdoc/en/reference/array/functions/array-udiff-uassoc.xml:1.8 --- phpdoc/en/reference/array/functions/array-udiff-uassoc.xml:1.7 Mon Dec 15 11:47:04 2003 +++ phpdoc/en/reference/array/functions/array-udiff-uassoc.xml Thu Jan 15 07:42:01 2004 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.7 $ --> +<!-- $Revision: 1.8 $ --> <!-- splitted from ./en/functions/array.xml, last change in rev 1.14 --> <refentry id="function.array-udiff-uassoc"> <refnamediv> @@ -39,14 +39,19 @@ <?php class cr { var $priv_member; - function cr($val) { + function cr($val) + { $this->priv_member = $val; } - function comp_func_cr($a, $b) { + + function comp_func_cr($a, $b) + { if ($a->priv_member === $b->priv_member) return 0; return ($a->priv_member > $b->priv_member)? 1:-1; } - function comp_func_key($a, $b) { + + function comp_func_key($a, $b) + { if ($a === $b) return 0; return ($a > $b)? 1:-1; } Index: phpdoc/en/reference/array/functions/array-udiff.xml diff -u phpdoc/en/reference/array/functions/array-udiff.xml:1.5 phpdoc/en/reference/array/functions/array-udiff.xml:1.6 --- phpdoc/en/reference/array/functions/array-udiff.xml:1.5 Fri Dec 26 13:42:02 2003 +++ phpdoc/en/reference/array/functions/array-udiff.xml Thu Jan 15 07:42:01 2004 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.5 $ --> +<!-- $Revision: 1.6 $ --> <!-- splitted from ./en/functions/array.xml, last change in rev 1.14 --> <refentry id="function.array-udiff"> <refnamediv> @@ -35,10 +35,13 @@ <?php class cr { var $priv_member; - function cr($val) { + function cr($val) + { $this->priv_member = $val; } - function comp_func_cr($a, $b) { + + function comp_func_cr($a, $b) + { if ($a->priv_member === $b->priv_member) return 0; return ($a->priv_member > $b->priv_member)? 1:-1; } Index: phpdoc/en/reference/array/functions/array-walk.xml diff -u phpdoc/en/reference/array/functions/array-walk.xml:1.13 phpdoc/en/reference/array/functions/array-walk.xml:1.14 --- phpdoc/en/reference/array/functions/array-walk.xml:1.13 Mon Dec 15 11:47:04 2003 +++ phpdoc/en/reference/array/functions/array-walk.xml Thu Jan 15 07:42:01 2004 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.13 $ --> +<!-- $Revision: 1.14 $ --> <!-- splitted from ./en/functions/array.xml, last change in rev 1.2 --> <refentry id="function.array-walk"> <refnamediv> @@ -77,11 +77,13 @@ <?php $fruits = array("d" => "lemon", "a" => "orange", "b" => "banana", "c" => "apple"); -function test_alter(&$item1, $key, $prefix) { +function test_alter(&$item1, $key, $prefix) +{ $item1 = "$prefix: $item1"; } -function test_print($item2, $key) { +function test_print($item2, $key) +{ echo "$key. $item2<br />\n"; } Index: phpdoc/en/reference/array/functions/uksort.xml diff -u phpdoc/en/reference/array/functions/uksort.xml:1.11 phpdoc/en/reference/array/functions/uksort.xml:1.12 --- phpdoc/en/reference/array/functions/uksort.xml:1.11 Fri Dec 26 04:56:59 2003 +++ phpdoc/en/reference/array/functions/uksort.xml Thu Jan 15 07:42:01 2004 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.11 $ --> +<!-- $Revision: 1.12 $ --> <!-- splitted from ./en/functions/array.xml, last change in rev 1.2 --> <refentry id="function.uksort"> <refnamediv> @@ -38,7 +38,8 @@ <programlisting role="php"> <![CDATA[ <?php -function cmp($a, $b) { +function cmp($a, $b) +{ if ($a == $b) { return 0; } Index: phpdoc/en/reference/array/functions/usort.xml diff -u phpdoc/en/reference/array/functions/usort.xml:1.16 phpdoc/en/reference/array/functions/usort.xml:1.17 --- phpdoc/en/reference/array/functions/usort.xml:1.16 Fri Dec 26 04:56:59 2003 +++ phpdoc/en/reference/array/functions/usort.xml Thu Jan 15 07:42:01 2004 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.16 $ --> +<!-- $Revision: 1.17 $ --> <!-- splitted from ./en/functions/array.xml, last change in rev 1.2 --> <refentry id="function.usort"> <refnamediv> @@ -46,7 +46,8 @@ <programlisting role="php"> <![CDATA[ <?php -function cmp($a, $b) { +function cmp($a, $b) +{ if ($a == $b) { return 0; } @@ -91,7 +92,8 @@ <programlisting role="php"> <![CDATA[ <?php -function cmp($a, $b) { +function cmp($a, $b) +{ return strcmp($a["fruit"], $b["fruit"]); } @@ -135,12 +137,14 @@ class TestObj { var $name; - function TestObj($name) { + function TestObj($name) + { $this->name = $name; } /* This is the static comparing function: */ - function cmp_obj($a, $b) { + function cmp_obj($a, $b) + { $al = strtolower($a->name); $bl = strtolower($b->name); if ($al == $bl) {