Passed
Push — master ( bd7691...51530c )
by Gaetano
08:10
created
tests/09HTTPTest.php 2 patches
Braces   +4 added lines, -8 removed lines patch added patch discarded remove patch
@@ -201,8 +201,7 @@  discard block
 block discarded – undo
201 201
         {
202 202
             $this->markTestSkipped('CURL missing: cannot test http 1.1 w. proxy');
203 203
             return;
204
-        }
205
-        else if ($this->args['PROXYSERVER'] == '')
204
+        } else if ($this->args['PROXYSERVER'] == '')
206 205
         {
207 206
             $this->markTestSkipped('PROXYSERVER definition missing: cannot test proxy w. http 1.1');
208 207
             return;
@@ -226,8 +225,7 @@  discard block
 block discarded – undo
226 225
         {
227 226
             $this->markTestSkipped('CURL missing: cannot test https functionality');
228 227
             return;
229
-        }
230
-        else if ($this->args['HTTPSSERVER'] == '')
228
+        } else if ($this->args['HTTPSSERVER'] == '')
231 229
         {
232 230
             $this->markTestSkipped('HTTPS SERVER definition missing: cannot test https');
233 231
             return;
@@ -278,13 +276,11 @@  discard block
 block discarded – undo
278 276
         {
279 277
             $this->markTestSkipped('CURL missing: cannot test https w. proxy');
280 278
             return;
281
-        }
282
-        else if ($this->args['PROXYSERVER'] == '')
279
+        } else if ($this->args['PROXYSERVER'] == '')
283 280
         {
284 281
             $this->markTestSkipped('PROXYSERVER definition missing: cannot test proxy w. https');
285 282
             return;
286
-        }
287
-        else if ($this->args['HTTPSSERVER'] == '')
283
+        } else if ($this->args['HTTPSSERVER'] == '')
288 284
         {
289 285
             $this->markTestSkipped('HTTPS SERVER definition missing: cannot test https w. proxy');
290 286
             return;
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-include_once __DIR__ . '/08ServerTest.php';
3
+include_once __DIR__.'/08ServerTest.php';
4 4
 
5 5
 /**
6 6
  * Tests which stress http features of the library.
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
         );
26 26
 
27 27
         $methods = array();
28
-        foreach(get_class_methods('ServerTest') as $method)
28
+        foreach (get_class_methods('ServerTest') as $method)
29 29
         {
30 30
             if (strpos($method, 'test') === 0 && !in_array($method, $unsafeMethods))
31 31
             {
@@ -317,7 +317,7 @@  discard block
 block discarded – undo
317 317
                 preg_match('/ubunutu([0-9]+)/', $output[0], $matches);
318 318
                 $ubuntuVersion = @$matches[1];
319 319
             }
320
-            if ($ubuntuVersion >= 20) {
320
+            if ($ubuntuVersion>=20) {
321 321
                 $this->markTestSkipped('HTTPS via Socket known to fail on php less than 7.2 on Ubuntu 20 and higher');
322 322
                 return;
323 323
             }
Please login to merge, or discard this patch.
demo/vardemo.php 1 patch
Spacing   +25 added lines, -25 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-require_once __DIR__ . "/client/_prepend.php";
2
+require_once __DIR__."/client/_prepend.php";
3 3
 
4 4
 output('<html lang="en">
5 5
 <head><title>phpxmlrpc</title></head>
@@ -10,25 +10,25 @@  discard block
 block discarded – undo
10 10
 output("<p>Please note that in most cases you are better off using `new PhpXmlRpc\Encoder()->encode()` to create nested Value objects</p>\n");
11 11
 
12 12
 $v = new PhpXmlRpc\Value(1234, 'int');
13
-output("Int: <PRE>" . htmlentities($v->serialize()) . "</PRE>");
13
+output("Int: <PRE>".htmlentities($v->serialize())."</PRE>");
14 14
 
15 15
 $v = new PhpXmlRpc\Value('Are the following characters escaped? < & >');
16
-output("String <PRE>" . htmlentities($v->serialize()) . "</PRE>");
16
+output("String <PRE>".htmlentities($v->serialize())."</PRE>");
17 17
 
18 18
 $v = new PhpXmlRpc\Value(true, 'boolean');
19
-output("Boolean: <PRE>" . htmlentities($v->serialize()) . "</PRE>");
19
+output("Boolean: <PRE>".htmlentities($v->serialize())."</PRE>");
20 20
 
21 21
 $v = new PhpXmlRpc\Value(1234.5678, 'double');
22
-output("Double: <PRE>" . htmlentities($v->serialize()) . "</PRE>");
22
+output("Double: <PRE>".htmlentities($v->serialize())."</PRE>");
23 23
 
24 24
 $v = new PhpXmlRpc\Value(time(), 'dateTime.iso8601');
25
-output("Datetime (from timestamp): <PRE>" . htmlentities($v->serialize()) . "</PRE>");
25
+output("Datetime (from timestamp): <PRE>".htmlentities($v->serialize())."</PRE>");
26 26
 $v = new PhpXmlRpc\Value(new DateTime(), 'dateTime.iso8601');
27
-output("Datetime (from php DateTime): <PRE>" . htmlentities($v->serialize()) . "</PRE>");
27
+output("Datetime (from php DateTime): <PRE>".htmlentities($v->serialize())."</PRE>");
28 28
 
29 29
 $v = new PhpXmlRpc\Value('hello world', 'base64');
30
-output("Base64: <PRE>" . htmlentities($v->serialize()) . "</PRE>");
31
-output("(value of base64 string is: '" . $v->scalarval() . "')<BR><BR>");
30
+output("Base64: <PRE>".htmlentities($v->serialize())."</PRE>");
31
+output("(value of base64 string is: '".$v->scalarval()."')<BR><BR>");
32 32
 
33 33
 $v = new PhpXmlRpc\Value(
34 34
     array(
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
     ),
42 42
     "array"
43 43
 );
44
-output("Array: <PRE>" . htmlentities($v->serialize()) . "</PRE>");
44
+output("Array: <PRE>".htmlentities($v->serialize())."</PRE>");
45 45
 
46 46
 $v = new PhpXmlRpc\Value(
47 47
     array(
@@ -61,10 +61,10 @@  discard block
 block discarded – undo
61 61
     ),
62 62
     "struct"
63 63
 );
64
-output("Struct: <PRE>" . htmlentities($v->serialize()) . "</PRE>");
64
+output("Struct: <PRE>".htmlentities($v->serialize())."</PRE>");
65 65
 
66 66
 $w = new PhpXmlRpc\Value(array($v), 'array');
67
-output("Array containing a struct: <PRE>" . htmlentities($w->serialize()) . "</PRE>");
67
+output("Array containing a struct: <PRE>".htmlentities($w->serialize())."</PRE>");
68 68
 
69 69
 class MyClass
70 70
 {
@@ -76,49 +76,49 @@  discard block
 block discarded – undo
76 76
 // the public property is the only one which will be serialized. As such, it has to be of type Value
77 77
 $myObject->public = new \PhpXmlRpc\Value('a public property, wrapped');
78 78
 $w = new PhpXmlRpc\Value($myObject, 'struct');
79
-output("Struct encoding a php object: <PRE>" . htmlentities($w->serialize()) . "</PRE>");
79
+output("Struct encoding a php object: <PRE>".htmlentities($w->serialize())."</PRE>");
80 80
 
81 81
 output("<h3>Testing value serialization - xml-rpc extensions</h3>\n");
82 82
 $v = new PhpXmlRpc\Value(1234, 'i8');
83
-output("I8: <PRE>" . htmlentities($v->serialize()) . "</PRE>");
83
+output("I8: <PRE>".htmlentities($v->serialize())."</PRE>");
84 84
 $v = new PhpXmlRpc\Value(null, 'null');
85
-output("Null: <PRE>" . htmlentities($v->serialize()) . "</PRE>");
85
+output("Null: <PRE>".htmlentities($v->serialize())."</PRE>");
86 86
 \PhpXmlRpc\PhpXmlRpc::$xmlrpc_null_apache_encoding = true;
87
-output("Null, alternative: <PRE>" . htmlentities($v->serialize()) . "</PRE>");
87
+output("Null, alternative: <PRE>".htmlentities($v->serialize())."</PRE>");
88 88
 
89 89
 output("<h3>Testing value serialization - character encoding</h3>\n");
90 90
 // The greek word 'kosme'
91 91
 $v = new PhpXmlRpc\Value('κόσμε');
92
-output("Greek (default encoding): <PRE>" . htmlentities($v->serialize()) . "</PRE>");
93
-output("Greek (utf8 encoding): <PRE>" . htmlentities($v->serialize('UTF-8')) . "</PRE>");
92
+output("Greek (default encoding): <PRE>".htmlentities($v->serialize())."</PRE>");
93
+output("Greek (utf8 encoding): <PRE>".htmlentities($v->serialize('UTF-8'))."</PRE>");
94 94
 if (function_exists('mb_convert_encoding')) {
95
-    output("Greek (ISO-8859-7 encoding): <PRE>" . htmlentities($v->serialize('ISO-8859-7')) . "</PRE>");
95
+    output("Greek (ISO-8859-7 encoding): <PRE>".htmlentities($v->serialize('ISO-8859-7'))."</PRE>");
96 96
 }
97 97
 
98 98
 output("<h3>Testing request serialization</h3>\n");
99 99
 $req = new PhpXmlRpc\Request('examples.getStateName');
100 100
 $req->method('examples.getStateName');
101 101
 $req->addParam(new PhpXmlRpc\Value(42, 'int'));
102
-output("<PRE>" . htmlentities($req->serialize()) . "</PRE>");
102
+output("<PRE>".htmlentities($req->serialize())."</PRE>");
103 103
 
104 104
 output("<h3>Testing response serialization</h3>\n");
105 105
 $resp = new PhpXmlRpc\Response(new PhpXmlRpc\Value('The meaning of life'));
106
-output("<PRE>" . htmlentities($resp->serialize()) . "</PRE>");
106
+output("<PRE>".htmlentities($resp->serialize())."</PRE>");
107 107
 
108 108
 output("<h3>Testing ISO date formatting</h3><pre>\n");
109 109
 $t = time();
110 110
 $date = PhpXmlRpc\Helper\Date::iso8601Encode($t);
111 111
 output("Now is $t --> $date\n");
112
-output("Or in UTC, that is " . PhpXmlRpc\Helper\Date::iso8601Encode($t, 1) . "\n");
112
+output("Or in UTC, that is ".PhpXmlRpc\Helper\Date::iso8601Encode($t, 1)."\n");
113 113
 $tb = PhpXmlRpc\Helper\Date::iso8601Decode($date);
114 114
 output("That is to say $date --> $tb\n");
115
-output("Which comes out at " . PhpXmlRpc\Helper\Date::iso8601Encode($tb) . "\n");
116
-output("Which was the time in UTC at " . PhpXmlRpc\Helper\Date::iso8601Encode($tb, 1) . "\n");
115
+output("Which comes out at ".PhpXmlRpc\Helper\Date::iso8601Encode($tb)."\n");
116
+output("Which was the time in UTC at ".PhpXmlRpc\Helper\Date::iso8601Encode($tb, 1)."\n");
117 117
 output("</pre>\n");
118 118
 
119 119
 output("<h3>Testing reduced-precision formatting for doubles</h3><pre>\n");
120 120
 $v = new PhpXmlRpc\Value(1234.56789, 'double');
121 121
 \PhpXmlRpc\PhpXmlRpc::$xmlpc_double_precision = 2;
122
-output("Double, limited precision: <PRE>" . htmlentities($v->serialize()) . "</PRE>");
122
+output("Double, limited precision: <PRE>".htmlentities($v->serialize())."</PRE>");
123 123
 
124 124
 output('</body></html>');
Please login to merge, or discard this patch.
demo/server/server.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
     }
25 25
 }
26 26
 
27
-require_once __DIR__ . "/_prepend.php";
27
+require_once __DIR__."/_prepend.php";
28 28
 
29 29
 use PhpXmlRpc\PhpXmlRpc;
30 30
 use PhpXmlRpc\Server;
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
         } elseif ($_GET['FORCE_AUTH'] == 'Digest') {
84 84
             if (empty($_SERVER['PHP_AUTH_DIGEST'])) {
85 85
                 header('HTTP/1.1 401 Unauthorized');
86
-                header('WWW-Authenticate: Digest realm="Phpxmlrpc Digest Realm",qop="auth",nonce="' . uniqid() . '",opaque="' . md5('Phpxmlrpc Digest Realm') . '"');
86
+                header('WWW-Authenticate: Digest realm="Phpxmlrpc Digest Realm",qop="auth",nonce="'.uniqid().'",opaque="'.md5('Phpxmlrpc Digest Realm').'"');
87 87
                 die('Text visible if user hits Cancel button');
88 88
             }
89 89
         }
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
     if (isset($_GET['FORCE_REDIRECT'])) {
92 92
         header('HTTP/1.0 302 Found');
93 93
         unset($_GET['FORCE_REDIRECT']);
94
-        header('Location: ' . $_SERVER['REQUEST_URI'] . (count($_GET) ? '?' . http_build_query($_GET) : ''));
94
+        header('Location: '.$_SERVER['REQUEST_URI'].(count($_GET) ? '?'.http_build_query($_GET) : ''));
95 95
         die();
96 96
     }
97 97
 }
Please login to merge, or discard this patch.
demo/client/_prepend.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@  discard block
 block discarded – undo
8 8
 }
9 9
 
10 10
 // Use the custom class autoloader. These two lines are not needed when the phpxmlrpc library is installed using Composer
11
-include_once __DIR__ . '/../../src/Autoloader.php';
11
+include_once __DIR__.'/../../src/Autoloader.php';
12 12
 PhpXmlRpc\Autoloader::register();
13 13
 
14 14
 // Let unit tests run against localhost, 'plain' demos against a known public server
@@ -22,5 +22,5 @@  discard block
 block discarded – undo
22 22
 function output($text)
23 23
 {
24 24
     /// @todo we should only strip html tags, and let through all xml tags
25
-    echo PHP_SAPI == 'cli' ? strip_tags(str_replace(array('<br/>','<br>'), "\n", $text)) : $text;
25
+    echo PHP_SAPI == 'cli' ? strip_tags(str_replace(array('<br/>', '<br>'), "\n", $text)) : $text;
26 26
 }
Please login to merge, or discard this patch.
demo/client/loggerinjection.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-require_once __DIR__ . "/_prepend.php";
2
+require_once __DIR__."/_prepend.php";
3 3
 
4 4
 /**
5 5
  * Demoing how to inject a custom logger for use by the library
@@ -22,13 +22,13 @@  discard block
 block discarded – undo
22 22
     // logger API
23 23
     public function debug($message, $context = array())
24 24
     {
25
-        $this->debugBuffer .= $message . "\n";
25
+        $this->debugBuffer .= $message."\n";
26 26
     }
27 27
 
28 28
     // logger API
29 29
     public function error($message, $context = array())
30 30
     {
31
-        $this->errorBuffer .= $message . "\n";
31
+        $this->errorBuffer .= $message."\n";
32 32
     }
33 33
 
34 34
     public function getDebug()
@@ -59,8 +59,8 @@  discard block
 block discarded – undo
59 59
 
60 60
 $input = array(
61 61
     array('name' => 'Dave', 'age' => 24),
62
-    array('name' => 'Edd',  'age' => 45),
63
-    array('name' => 'Joe',  'age' => 37),
62
+    array('name' => 'Edd', 'age' => 45),
63
+    array('name' => 'Joe', 'age' => 37),
64 64
     array('name' => 'Fred', 'age' => 27),
65 65
 );
66 66
 
@@ -79,5 +79,5 @@  discard block
 block discarded – undo
79 79
 $response = $client->send($request);
80 80
 output("Response received.<br>");
81 81
 
82
-output("The client error info is:<pre>\n" . $logger->getError() . "\n</pre>");
83
-output("The client debug info is:<pre>\n" . $logger->getDebug() . "\n</pre>");
82
+output("The client error info is:<pre>\n".$logger->getError()."\n</pre>");
83
+output("The client debug info is:<pre>\n".$logger->getDebug()."\n</pre>");
Please login to merge, or discard this patch.
tests/05LoggerTest.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-include_once __DIR__ . '/PolyfillTestCase.php';
3
+include_once __DIR__.'/PolyfillTestCase.php';
4 4
 
5 5
 use PhpXmlRpc\Helper\Charset;
6 6
 use PhpXmlRpc\Helper\Http;
@@ -38,9 +38,9 @@  discard block
 block discarded – undo
38 38
         $l = $h->getLogger();
39 39
         Http::setLogger($this);
40 40
 
41
-        $s = "HTTP/1.0 200 OK\r\n" .
42
-            "Content-Type: unknown\r\n" .
43
-            "\r\n" .
41
+        $s = "HTTP/1.0 200 OK\r\n".
42
+            "Content-Type: unknown\r\n".
43
+            "\r\n".
44 44
             "body";
45 45
         ob_start();
46 46
         $h->parseResponseHeaders($s, false, 1);
Please login to merge, or discard this patch.
src/Request.php 1 patch
Spacing   +24 added lines, -24 removed lines patch added patch discarded remove patch
@@ -57,9 +57,9 @@  discard block
 block discarded – undo
57 57
     public function xml_header($charsetEncoding = '')
58 58
     {
59 59
         if ($charsetEncoding != '') {
60
-            return "<?xml version=\"1.0\" encoding=\"$charsetEncoding\" ?" . ">\n<methodCall>\n";
60
+            return "<?xml version=\"1.0\" encoding=\"$charsetEncoding\" ?".">\n<methodCall>\n";
61 61
         } else {
62
-            return "<?xml version=\"1.0\"?" . ">\n<methodCall>\n";
62
+            return "<?xml version=\"1.0\"?".">\n<methodCall>\n";
63 63
         }
64 64
     }
65 65
 
@@ -82,16 +82,16 @@  discard block
 block discarded – undo
82 82
     public function createPayload($charsetEncoding = '')
83 83
     {
84 84
         if ($charsetEncoding != '') {
85
-            $this->content_type = 'text/xml; charset=' . $charsetEncoding;
85
+            $this->content_type = 'text/xml; charset='.$charsetEncoding;
86 86
         } else {
87 87
             $this->content_type = 'text/xml';
88 88
         }
89 89
         $this->payload = $this->xml_header($charsetEncoding);
90
-        $this->payload .= '<methodName>' . $this->getCharsetEncoder()->encodeEntities(
91
-            $this->methodname, PhpXmlRpc::$xmlrpc_internalencoding, $charsetEncoding) . "</methodName>\n";
90
+        $this->payload .= '<methodName>'.$this->getCharsetEncoder()->encodeEntities(
91
+            $this->methodname, PhpXmlRpc::$xmlrpc_internalencoding, $charsetEncoding)."</methodName>\n";
92 92
         $this->payload .= "<params>\n";
93 93
         foreach ($this->params as $p) {
94
-            $this->payload .= "<param>\n" . $p->serialize($charsetEncoding) .
94
+            $this->payload .= "<param>\n".$p->serialize($charsetEncoding).
95 95
                 "</param>\n";
96 96
         }
97 97
         $this->payload .= "</params>\n";
@@ -141,7 +141,7 @@  discard block
 block discarded – undo
141 141
 
142 142
             return true;
143 143
         } else {
144
-            $this->getLogger()->error('XML-RPC: ' . __METHOD__ . ': value passed in must be a PhpXmlRpc\Value');
144
+            $this->getLogger()->error('XML-RPC: '.__METHOD__.': value passed in must be a PhpXmlRpc\Value');
145 145
             return false;
146 146
         }
147 147
     }
@@ -213,14 +213,14 @@  discard block
 block discarded – undo
213 213
      */
214 214
     public function parseResponse($data = '', $headersProcessed = false, $returnType = XMLParser::RETURN_XMLRPCVALS)
215 215
     {
216
-        if ($this->debug > 0) {
216
+        if ($this->debug>0) {
217 217
             $this->getLogger()->debug("---GOT---\n$data\n---END---");
218 218
         }
219 219
 
220 220
         $this->httpResponse = array('raw_data' => $data, 'headers' => array(), 'cookies' => array());
221 221
 
222 222
         if ($data == '') {
223
-            $this->getLogger()->error('XML-RPC: ' . __METHOD__ . ': no response received from server.');
223
+            $this->getLogger()->error('XML-RPC: '.__METHOD__.': no response received from server.');
224 224
             return new Response(0, PhpXmlRpc::$xmlrpcerr['no_data'], PhpXmlRpc::$xmlrpcstr['no_data']);
225 225
         }
226 226
 
@@ -228,12 +228,12 @@  discard block
 block discarded – undo
228 228
         if (substr($data, 0, 4) == 'HTTP') {
229 229
             $httpParser = new Http();
230 230
             try {
231
-                $httpResponse = $httpParser->parseResponseHeaders($data, $headersProcessed, $this->debug > 0);
231
+                $httpResponse = $httpParser->parseResponseHeaders($data, $headersProcessed, $this->debug>0);
232 232
             } catch (HttpException $e) {
233 233
                 // failed processing of HTTP response headers
234 234
                 // save into response obj the full payload received, for debugging
235 235
                 return new Response(0, $e->getCode(), $e->getMessage(), '', array('raw_data' => $data, 'status_code', $e->statusCode()));
236
-            } catch(\Exception $e) {
236
+            } catch (\Exception $e) {
237 237
                 return new Response(0, $e->getCode(), $e->getMessage(), '', array('raw_data' => $data));
238 238
             }
239 239
         } else {
@@ -249,7 +249,7 @@  discard block
 block discarded – undo
249 249
         // idea from Luca Mariano <[email protected]> originally in PEARified version of the lib
250 250
         $pos = strrpos($data, '</methodResponse>');
251 251
         if ($pos !== false) {
252
-            $data = substr($data, 0, $pos + 17);
252
+            $data = substr($data, 0, $pos+17);
253 253
         }
254 254
 
255 255
         // try to 'guestimate' the character encoding of the received response
@@ -258,21 +258,21 @@  discard block
 block discarded – undo
258 258
             $data
259 259
         );
260 260
 
261
-        if ($this->debug >= 0) {
261
+        if ($this->debug>=0) {
262 262
             $this->httpResponse = $httpResponse;
263 263
         } else {
264 264
             $httpResponse = null;
265 265
         }
266 266
 
267
-        if ($this->debug > 0) {
267
+        if ($this->debug>0) {
268 268
             $start = strpos($data, '<!-- SERVER DEBUG INFO (BASE64 ENCODED):');
269 269
             if ($start) {
270 270
                 $start += strlen('<!-- SERVER DEBUG INFO (BASE64 ENCODED):');
271 271
                 /// @todo what if there is no end tag?
272 272
                 $end = strpos($data, '-->', $start);
273
-                $comments = substr($data, $start, $end - $start);
274
-                $this->getLogger()->debug("---SERVER DEBUG INFO (DECODED) ---\n\t" .
275
-                    str_replace("\n", "\n\t", base64_decode($comments)) . "\n---END---", array('encoding' => $respEncoding));
273
+                $comments = substr($data, $start, $end-$start);
274
+                $this->getLogger()->debug("---SERVER DEBUG INFO (DECODED) ---\n\t".
275
+                    str_replace("\n", "\n\t", base64_decode($comments))."\n---END---", array('encoding' => $respEncoding));
276 276
             }
277 277
         }
278 278
 
@@ -294,7 +294,7 @@  discard block
 block discarded – undo
294 294
                     if ($respEncoding == 'ISO-8859-1') {
295 295
                         $data = utf8_encode($data);
296 296
                     } else {
297
-                        $this->getLogger()->error('XML-RPC: ' . __METHOD__ . ': unsupported charset encoding of received response: ' . $respEncoding);
297
+                        $this->getLogger()->error('XML-RPC: '.__METHOD__.': unsupported charset encoding of received response: '.$respEncoding);
298 298
                     }
299 299
                 }
300 300
             }
@@ -320,16 +320,16 @@  discard block
 block discarded – undo
320 320
             //    there could be proxies meddling with the request, or network data corruption...
321 321
 
322 322
             $r = new Response(0, PhpXmlRpc::$xmlrpcerr['invalid_xml'],
323
-                PhpXmlRpc::$xmlrpcstr['invalid_xml'] . ' ' . $xmlRpcParser->_xh['isf_reason'], '', $httpResponse);
323
+                PhpXmlRpc::$xmlrpcstr['invalid_xml'].' '.$xmlRpcParser->_xh['isf_reason'], '', $httpResponse);
324 324
 
325
-            if ($this->debug > 0) {
325
+            if ($this->debug>0) {
326 326
                 $this->getLogger()->debug($xmlRpcParser->_xh['isf_reason']);
327 327
             }
328 328
         }
329 329
         // second error check: xml well-formed but not xml-rpc compliant
330 330
         elseif ($xmlRpcParser->_xh['isf'] == 2) {
331 331
             $r = new Response(0, PhpXmlRpc::$xmlrpcerr['xml_not_compliant'],
332
-                PhpXmlRpc::$xmlrpcstr['xml_not_compliant'] . ' ' . $xmlRpcParser->_xh['isf_reason'], '', $httpResponse);
332
+                PhpXmlRpc::$xmlrpcstr['xml_not_compliant'].' '.$xmlRpcParser->_xh['isf_reason'], '', $httpResponse);
333 333
 
334 334
             /// @todo echo something for the user? check if it was already done by the parser...
335 335
             //if ($this->debug > 0) {
@@ -338,7 +338,7 @@  discard block
 block discarded – undo
338 338
         }
339 339
         // third error check: parsing of the response has somehow gone boink.
340 340
         /// @todo shall we omit this check, since we trust the parsing code?
341
-        elseif ($xmlRpcParser->_xh['isf'] > 3 || $returnType == XMLParser::RETURN_XMLRPCVALS && !is_object($xmlRpcParser->_xh['value'])) {
341
+        elseif ($xmlRpcParser->_xh['isf']>3 || $returnType == XMLParser::RETURN_XMLRPCVALS && !is_object($xmlRpcParser->_xh['value'])) {
342 342
             // something odd has happened and it's time to generate a client side error indicating something odd went on
343 343
             $r = new Response(0, PhpXmlRpc::$xmlrpcerr['xml_parsing_error'], PhpXmlRpc::$xmlrpcstr['xml_parsing_error'],
344 344
                 '', $httpResponse
@@ -346,7 +346,7 @@  discard block
 block discarded – undo
346 346
 
347 347
             /// @todo echo something for the user?
348 348
         } else {
349
-            if ($this->debug > 1) {
349
+            if ($this->debug>1) {
350 350
                 $this->getLogger()->debug(
351 351
                     "---PARSED---\n".var_export($xmlRpcParser->_xh['value'], true)."\n---END---"
352 352
                 );
@@ -370,7 +370,7 @@  discard block
 block discarded – undo
370 370
                 if ($errNo == 0) {
371 371
                     // FAULT returned, errno needs to reflect that
372 372
                     /// @todo feature creep - add this code to PhpXmlRpc::$xmlrpcerr
373
-                    $this->getLogger()->error('XML-RPC: ' . __METHOD__ . ': fault response received with faultCode 0 or null. Converted it to -1');
373
+                    $this->getLogger()->error('XML-RPC: '.__METHOD__.': fault response received with faultCode 0 or null. Converted it to -1');
374 374
                     $errNo = -1;
375 375
                 }
376 376
 
Please login to merge, or discard this patch.
tests/12ExtraFilesTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-include_once __DIR__ . '/WebTestCase.php';
3
+include_once __DIR__.'/WebTestCase.php';
4 4
 
5 5
 /**
6 6
  * Tests for php files in the 'extras' directory.
Please login to merge, or discard this patch.
tests/10DemofilesTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-include_once __DIR__ . '/WebTestCase.php';
3
+include_once __DIR__.'/WebTestCase.php';
4 4
 
5 5
 /**
6 6
  * Tests for php files in the 'demo' directory.
Please login to merge, or discard this patch.