@@ -28,11 +28,11 @@ discard block |
||
28 | 28 | { |
29 | 29 | global $stateNames; |
30 | 30 | |
31 | - if (isset($stateNames[$stateNo - 1])) { |
|
32 | - return $stateNames[$stateNo - 1]; |
|
31 | + if (isset($stateNames[$stateNo-1])) { |
|
32 | + return $stateNames[$stateNo-1]; |
|
33 | 33 | } else { |
34 | 34 | // not, there so complain |
35 | - throw new Exception("I don't have a state for the index '" . $stateNo . "'", PhpXmlRpc\PhpXmlRpc::$xmlrpcerruser); |
|
35 | + throw new Exception("I don't have a state for the index '".$stateNo."'", PhpXmlRpc\PhpXmlRpc::$xmlrpcerruser); |
|
36 | 36 | } |
37 | 37 | } |
38 | 38 | |
@@ -126,13 +126,13 @@ discard block |
||
126 | 126 | |
127 | 127 | $findstate10_sig = array( |
128 | 128 | /// @todo add a demo and test with closure usage |
129 | - "function" => function ($req) { return findState($req); }, |
|
129 | + "function" => function($req) { return findState($req); }, |
|
130 | 130 | "signature" => array(array(Value::$xmlrpcString, Value::$xmlrpcInt)), |
131 | - "docstring" => 'When passed an integer between 1 and 51 returns the name of a US state, where the integer is the ' . |
|
131 | + "docstring" => 'When passed an integer between 1 and 51 returns the name of a US state, where the integer is the '. |
|
132 | 132 | 'index of that state name in an alphabetic order.', |
133 | 133 | ); |
134 | 134 | |
135 | -$findstate11_sig = $wrapper->wrapPhpFunction(function ($stateNo) { return plain_findstate($stateNo); }); |
|
135 | +$findstate11_sig = $wrapper->wrapPhpFunction(function($stateNo) { return plain_findstate($stateNo); }); |
|
136 | 136 | |
137 | 137 | /// @todo do we really need a new instance ? |
138 | 138 | $c = new xmlrpcServerMethodsContainer(); |
@@ -141,7 +141,7 @@ discard block |
||
141 | 141 | |
142 | 142 | $namespaceSignatures = $wrapper->wrapPhpClass($c, array('prefix' => 'namespacetest.', 'replace_class_name' => true, 'method_filter' => '/^findState$/', 'method_type' => 'static')); |
143 | 143 | |
144 | -$returnObj_sig = $wrapper->wrapPhpFunction(array($c, 'returnObject'), '', array('encode_php_objs' => true)); |
|
144 | +$returnObj_sig = $wrapper->wrapPhpFunction(array($c, 'returnObject'), '', array('encode_php_objs' => true)); |
|
145 | 145 | |
146 | 146 | return array_merge( |
147 | 147 | array( |
@@ -91,7 +91,7 @@ |
||
91 | 91 | |
92 | 92 | // Greek word 'kosme'. NB: NOT a valid ISO8859 string! |
93 | 93 | // NB: we can only register this when setting internal encoding to UTF-8, or it will break system.listMethods |
94 | - "tests.utf8methodname." . 'κόσμε' => array( |
|
94 | + "tests.utf8methodname.".'κόσμε' => array( |
|
95 | 95 | "function" => "stringEcho", |
96 | 96 | "signature" => $stringecho_sig, |
97 | 97 | //"docstring" => $stringecho_doc, |
@@ -66,11 +66,12 @@ |
||
66 | 66 | $a = $req->getParam(0); |
67 | 67 | $b = $req->getParam(1); |
68 | 68 | |
69 | - if ($a->scalartyp() == Value::$xmlrpcNull) |
|
70 | - return new Response(new Value(plain_findstate($b->scalarval()))); |
|
71 | - else |
|
72 | - return new Response(new Value(plain_findstate($a->scalarval()))); |
|
73 | -} |
|
69 | + if ($a->scalartyp() == Value::$xmlrpcNull) { |
|
70 | + return new Response(new Value(plain_findstate($b->scalarval()))); |
|
71 | + } else { |
|
72 | + return new Response(new Value(plain_findstate($a->scalarval()))); |
|
73 | + } |
|
74 | + } |
|
74 | 75 | |
75 | 76 | return array( |
76 | 77 | "tests.getallheaders" => array( |