@@ -26,7 +26,7 @@ |
||
26 | 26 | */ |
27 | 27 | function plain_findstate($stateNo) |
28 | 28 | { |
29 | - if (isset(exampleMethods::$stateNames[$stateNo - 1])) { |
|
29 | + if (isset(exampleMethods::$stateNames[$stateNo - 1])) { |
|
30 | 30 | return exampleMethods::$stateNames[$stateNo - 1]; |
31 | 31 | } else { |
32 | 32 | // not, there so complain |
@@ -26,11 +26,11 @@ discard block |
||
26 | 26 | */ |
27 | 27 | function plain_findstate($stateNo) |
28 | 28 | { |
29 | - if (isset(exampleMethods::$stateNames[$stateNo - 1])) { |
|
30 | - return exampleMethods::$stateNames[$stateNo - 1]; |
|
29 | + if (isset(exampleMethods::$stateNames[$stateNo-1])) { |
|
30 | + return exampleMethods::$stateNames[$stateNo-1]; |
|
31 | 31 | } else { |
32 | 32 | // not, there so complain |
33 | - throw new Exception("I don't have a state for the index '" . $stateNo . "'", PhpXmlRpc\PhpXmlRpc::$xmlrpcerruser); |
|
33 | + throw new Exception("I don't have a state for the index '".$stateNo."'", PhpXmlRpc\PhpXmlRpc::$xmlrpcerruser); |
|
34 | 34 | } |
35 | 35 | } |
36 | 36 | |
@@ -124,13 +124,13 @@ discard block |
||
124 | 124 | |
125 | 125 | $findstate10_sig = array( |
126 | 126 | /// @todo add a demo and test with closure usage |
127 | - "function" => function ($req) { return exampleMethods::findState($req); }, |
|
127 | + "function" => function($req) { return exampleMethods::findState($req); }, |
|
128 | 128 | "signature" => array(array(Value::$xmlrpcString, Value::$xmlrpcInt)), |
129 | - "docstring" => 'When passed an integer between 1 and 51 returns the name of a US state, where the integer is the ' . |
|
129 | + "docstring" => 'When passed an integer between 1 and 51 returns the name of a US state, where the integer is the '. |
|
130 | 130 | 'index of that state name in an alphabetic order.', |
131 | 131 | ); |
132 | 132 | |
133 | -$findstate11_sig = $wrapper->wrapPhpFunction(function ($stateNo) { return plain_findstate($stateNo); }); |
|
133 | +$findstate11_sig = $wrapper->wrapPhpFunction(function($stateNo) { return plain_findstate($stateNo); }); |
|
134 | 134 | |
135 | 135 | /// @todo do we really need a new instance ? |
136 | 136 | $c = new handlersContainer(); |
@@ -139,7 +139,7 @@ discard block |
||
139 | 139 | |
140 | 140 | $namespaceSignatures = $wrapper->wrapPhpClass($c, array('prefix' => 'namespacetest.', 'replace_class_name' => true, 'method_filter' => '/^findState$/', 'method_type' => 'static')); |
141 | 141 | |
142 | -$returnObj_sig = $wrapper->wrapPhpFunction(array($c, 'returnObject'), '', array('encode_php_objs' => true)); |
|
142 | +$returnObj_sig = $wrapper->wrapPhpFunction(array($c, 'returnObject'), '', array('encode_php_objs' => true)); |
|
143 | 143 | |
144 | 144 | return array_merge( |
145 | 145 | array( |
@@ -9,7 +9,7 @@ discard block |
||
9 | 9 | * `$functions_parameters_type` and `$exception_handling` |
10 | 10 | */ |
11 | 11 | |
12 | -require_once __DIR__ . "/_prepend.php"; |
|
12 | +require_once __DIR__."/_prepend.php"; |
|
13 | 13 | |
14 | 14 | use PhpXmlRpc\Response; |
15 | 15 | use PhpXmlRpc\Server; |
@@ -94,12 +94,12 @@ discard block |
||
94 | 94 | |
95 | 95 | $addComment_sig = array(array(Value::$xmlrpcInt, Value::$xmlrpcString, Value::$xmlrpcString, Value::$xmlrpcString)); |
96 | 96 | |
97 | -$addComment_doc = 'Adds a comment to an item. The first parameter is the item ID, the second the name of the commenter, ' . |
|
97 | +$addComment_doc = 'Adds a comment to an item. The first parameter is the item ID, the second the name of the commenter, '. |
|
98 | 98 | 'and the third is the comment itself. Returns the number of comments against that ID.'; |
99 | 99 | |
100 | 100 | $getComments_sig = array(array(Value::$xmlrpcArray, Value::$xmlrpcString)); |
101 | 101 | |
102 | -$getComments_doc = 'Returns an array of comments for a given ID, which is the sole argument. Each array item is a struct ' . |
|
102 | +$getComments_doc = 'Returns an array of comments for a given ID, which is the sole argument. Each array item is a struct '. |
|
103 | 103 | 'containing name and comment text.'; |
104 | 104 | |
105 | 105 | $srv = new Server(array( |
@@ -10,7 +10,7 @@ discard block |
||
10 | 10 | * Please _do not_ copy this file verbatim into your production server. |
11 | 11 | */ |
12 | 12 | |
13 | -require_once __DIR__ . "/_prepend.php"; |
|
13 | +require_once __DIR__."/_prepend.php"; |
|
14 | 14 | |
15 | 15 | use PhpXmlRpc\PhpXmlRpc; |
16 | 16 | use PhpXmlRpc\Server; |
@@ -69,7 +69,7 @@ discard block |
||
69 | 69 | } elseif ($_GET['FORCE_AUTH'] == 'Digest') { |
70 | 70 | if (empty($_SERVER['PHP_AUTH_DIGEST'])) { |
71 | 71 | header('HTTP/1.1 401 Unauthorized'); |
72 | - header('WWW-Authenticate: Digest realm="Phpxmlrpc Digest Realm",qop="auth",nonce="' . uniqid() . '",opaque="' . md5('Phpxmlrpc Digest Realm') . '"'); |
|
72 | + header('WWW-Authenticate: Digest realm="Phpxmlrpc Digest Realm",qop="auth",nonce="'.uniqid().'",opaque="'.md5('Phpxmlrpc Digest Realm').'"'); |
|
73 | 73 | die('Text visible if user hits Cancel button'); |
74 | 74 | } |
75 | 75 | } |