@@ -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 | } |
@@ -53,11 +53,11 @@ discard block |
||
53 | 53 | $snv = $sno->scalarval(); |
54 | 54 | |
55 | 55 | // look it up in our array (zero-based) |
56 | - if (isset(self::$stateNames[$snv - 1])) { |
|
57 | - $stateName = self::$stateNames[$snv - 1]; |
|
56 | + if (isset(self::$stateNames[$snv-1])) { |
|
57 | + $stateName = self::$stateNames[$snv-1]; |
|
58 | 58 | } else { |
59 | 59 | // not there, so complain |
60 | - $err = "I don't have a state for the index '" . $snv . "'"; |
|
60 | + $err = "I don't have a state for the index '".$snv."'"; |
|
61 | 61 | } |
62 | 62 | |
63 | 63 | if ($err != '') { |
@@ -131,7 +131,7 @@ discard block |
||
131 | 131 | $s = $req->getParam(0); |
132 | 132 | $t = $req->getParam(1); |
133 | 133 | |
134 | - return new Response(new Value($s->scalarval() + $t->scalarval(), Value::$xmlrpcInt)); |
|
134 | + return new Response(new Value($s->scalarval()+$t->scalarval(), Value::$xmlrpcInt)); |
|
135 | 135 | } |
136 | 136 | |
137 | 137 | public static $addtwodouble_sig = array(array('double', 'double', 'double')); |
@@ -141,7 +141,7 @@ discard block |
||
141 | 141 | $s = $req->getParam(0); |
142 | 142 | $t = $req->getParam(1); |
143 | 143 | |
144 | - return new Response(new Value($s->scalarval() + $t->scalarval(), Value::$xmlrpcDouble)); |
|
144 | + return new Response(new Value($s->scalarval()+$t->scalarval(), Value::$xmlrpcDouble)); |
|
145 | 145 | } |
146 | 146 | |
147 | 147 | public static $stringecho_sig = array(array('string', 'string')); |
@@ -157,7 +157,7 @@ discard block |
||
157 | 157 | public static function echoBack($req) |
158 | 158 | { |
159 | 159 | // just sends back a string with what I got sent to me, that's all (escaping for xml is automatic) |
160 | - $s = "I got the following message:\n" . $req->serialize(); |
|
160 | + $s = "I got the following message:\n".$req->serialize(); |
|
161 | 161 | |
162 | 162 | return new Response(new Value($s)); |
163 | 163 | } |
@@ -230,17 +230,17 @@ discard block |
||
230 | 230 | |
231 | 231 | /// @todo in real life, we should check for presence of return characters to avoid header injection! |
232 | 232 | |
233 | - $msgHdr = "From: " . $mFrom->scalarval() . "\n"; |
|
234 | - $msgHdr .= "To: " . $mTo->scalarval() . "\n"; |
|
233 | + $msgHdr = "From: ".$mFrom->scalarval()."\n"; |
|
234 | + $msgHdr .= "To: ".$mTo->scalarval()."\n"; |
|
235 | 235 | |
236 | 236 | if ($mCc->scalarval() != "") { |
237 | - $msgHdr .= "Cc: " . $mCc->scalarval() . "\n"; |
|
237 | + $msgHdr .= "Cc: ".$mCc->scalarval()."\n"; |
|
238 | 238 | } |
239 | 239 | if ($mBcc->scalarval() != "") { |
240 | - $msgHdr .= "Bcc: " . $mBcc->scalarval() . "\n"; |
|
240 | + $msgHdr .= "Bcc: ".$mBcc->scalarval()."\n"; |
|
241 | 241 | } |
242 | 242 | if ($mMime->scalarval() != "") { |
243 | - $msgHdr .= "Content-type: " . $mMime->scalarval() . "\n"; |
|
243 | + $msgHdr .= "Content-type: ".$mMime->scalarval()."\n"; |
|
244 | 244 | } |
245 | 245 | $msgHdr .= "X-Mailer: XML-RPC for PHP mailer 1.0"; |
246 | 246 |