Passed
Push — master ( 182ddb...cf05b0 )
by Gaetano
07:26
created
tests/06EncoderTest.php 1 patch
Spacing   +2 added lines, -2 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__ . '/LoggerAwareTestCase.php';
3
+include_once __DIR__.'/LoggerAwareTestCase.php';
4 4
 
5 5
 /**
6 6
  * Tests involving automatic encoding/decoding of php values into xmlrpc values (the Encoder class).
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
         /// @todo it seems that old php versions can not automatically transform latin to utf8 upon xml parsing.
76 76
         ///       We should fix that, then re-enable this test
77 77
         if (version_compare(PHP_VERSION, '5.6.0', '>=')) {
78
-            $i = $e->decodeXml('<?xml version="1.0" encoding="ISO-8859-15" ?><value><string>' . $string . '</string></value>');
78
+            $i = $e->decodeXml('<?xml version="1.0" encoding="ISO-8859-15" ?><value><string>'.$string.'</string></value>');
79 79
             $this->assertEquals($string, $i->scalarVal());
80 80
         }
81 81
 
Please login to merge, or discard this patch.
tests/07ClientTest.php 1 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__ . '/LoggerAwareTestCase.php';
3
+include_once __DIR__.'/LoggerAwareTestCase.php';
4 4
 
5 5
 /**
6 6
  * Tests involving the Client class (and no server).
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
         $this->client->server .= 'XXX';
36 36
         $dnsinfo = @dns_get_record($this->client->server);
37 37
         if ($dnsinfo) {
38
-            $this->markTestSkipped('Seems like there is a catchall DNS in effect: host ' . $this->client->server . ' found');
38
+            $this->markTestSkipped('Seems like there is a catchall DNS in effect: host '.$this->client->server.' found');
39 39
         } else {
40 40
             $r = $this->client->send($m, 5);
41 41
             // make sure there's no freaking catchall DNS in effect
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
 
63 63
         // now test a successful connection
64 64
         $server = explode(':', $this->args['HTTPSERVER']);
65
-        if (count($server) > 1) {
65
+        if (count($server)>1) {
66 66
             $this->client->port = $server[1];
67 67
         }
68 68
         $this->client->server = $server[0];
Please login to merge, or discard this patch.
tests/02ValueTest.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__ . '/LoggerAwareTestCase.php';
3
+include_once __DIR__.'/LoggerAwareTestCase.php';
4 4
 
5 5
 /**
6 6
  * Tests involving the Value class.
@@ -155,7 +155,7 @@  discard block
 block discarded – undo
155 155
         $this->assertequals(1, count($v1));
156 156
         $out = array('me' => array(), 'mytype' => 2, '_php_class' => null);
157 157
 
158
-        foreach($v1 as $key => $val)
158
+        foreach ($v1 as $key => $val)
159 159
         {
160 160
             $this->assertArrayHasKey($key, $out);
161 161
             $expected = $out[$key];
@@ -170,7 +170,7 @@  discard block
 block discarded – undo
170 170
         $this->assertequals(2, count($v2));
171 171
         $out = array(array('key' => 0, 'value'  => 'object'), array('key' => 1, 'value'  => 'object'));
172 172
         $i = 0;
173
-        foreach($v2 as $key => $val)
173
+        foreach ($v2 as $key => $val)
174 174
         {
175 175
             $expected = $out[$i];
176 176
             $this->assertequals($expected['key'], $key);
@@ -184,7 +184,7 @@  discard block
 block discarded – undo
184 184
     {
185 185
         // nb: make sure that  the serialized xml corresponding to this is > 10MB in size
186 186
         $data = array();
187
-        for ($i = 0; $i < 500000; $i++ ) {
187
+        for ($i = 0; $i<500000; $i++) {
188 188
             $data[] = 'hello world';
189 189
         }
190 190
 
Please login to merge, or discard this patch.
tests/04ParsingTest.php 1 patch
Spacing   +16 added lines, -16 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__ . '/LoggerAwareTestCase.php';
3
+include_once __DIR__.'/LoggerAwareTestCase.php';
4 4
 
5 5
 /**
6 6
  * Tests involving xml parsing.
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
 
102 102
     public function testI8()
103 103
     {
104
-        if (PHP_INT_SIZE == 4 ) {
104
+        if (PHP_INT_SIZE == 4) {
105 105
             $this->markTestSkipped('Can not test i8 as php is compiled in 32 bit mode');
106 106
             return;
107 107
         }
@@ -176,7 +176,7 @@  discard block
 block discarded – undo
176 176
 
177 177
     public function testUnicodeInMemberName()
178 178
     {
179
-        $str = "G" . chr(252) . "nter, El" . chr(232) . "ne";
179
+        $str = "G".chr(252)."nter, El".chr(232)."ne";
180 180
         $v = array($str => new xmlrpcval(1));
181 181
         $r = new xmlrpcresp(new xmlrpcval($v, 'struct'));
182 182
         $r = $r->serialize();
@@ -192,7 +192,7 @@  discard block
 block discarded – undo
192 192
         $response = @utf8_encode(
193 193
             '<?xml version="1.0"?>
194 194
 <!-- covers what happens when lib receives UTF8 chars in response text and comments -->
195
-<!-- ' . chr(224) . chr(252) . chr(232) . '&#224;&#252;&#232; -->
195
+<!-- ' . chr(224).chr(252).chr(232).'&#224;&#252;&#232; -->
196 196
 <methodResponse>
197 197
 <fault>
198 198
 <value>
@@ -203,7 +203,7 @@  discard block
 block discarded – undo
203 203
 </member>
204 204
 <member>
205 205
 <name>faultString</name>
206
-<value><string>' . chr(224) . chr(252) . chr(232) . '&#224;&#252;&#232;</string></value>
206
+<value><string>' . chr(224).chr(252).chr(232).'&#224;&#252;&#232;</string></value>
207 207
 </member>
208 208
 </struct>
209 209
 </value>
@@ -212,7 +212,7 @@  discard block
 block discarded – undo
212 212
         $m = $this->newRequest('dummy');
213 213
         $r = $m->parseResponse($response);
214 214
         $v = $r->faultString();
215
-        $this->assertEquals(chr(224) . chr(252) . chr(232) . chr(224) . chr(252) . chr(232), $v);
215
+        $this->assertEquals(chr(224).chr(252).chr(232).chr(224).chr(252).chr(232), $v);
216 216
     }
217 217
 
218 218
     public function testBrokenRequests()
@@ -419,8 +419,8 @@  discard block
 block discarded – undo
419 419
         $i = \PhpXmlRpc\PhpXmlRpc::$xmlrpc_reject_invalid_values;
420 420
         \PhpXmlRpc\PhpXmlRpc::$xmlrpc_reject_invalid_values = true;
421 421
 
422
-        foreach($values as $value) {
423
-            $f = '<?xml version="1.0"?><methodResponse><params><param><value>' . $value . '</value></param></params></methodResponse> ';
422
+        foreach ($values as $value) {
423
+            $f = '<?xml version="1.0"?><methodResponse><params><param><value>'.$value.'</value></param></params></methodResponse> ';
424 424
             $r = $s->parseResponse($f);
425 425
             $v = $r->faultCode();
426 426
             $this->assertEquals(2, $v, "Testing $value");
@@ -524,11 +524,11 @@  discard block
 block discarded – undo
524 524
 
525 525
     public function testUTF8Response()
526 526
     {
527
-        $string = chr(224) . chr(252) . chr(232);
527
+        $string = chr(224).chr(252).chr(232);
528 528
 
529 529
         $s = $this->newRequest('dummy');
530
-        $f = "HTTP/1.1 200 OK\r\nContent-type: text/xml; charset=UTF-8\r\n\r\n" . '<?xml version="1.0"?><methodResponse><params><param><value><struct><member><name>userid</name><value>311127</value></member>
531
-<member><name>dateCreated</name><value><dateTime.iso8601>20011126T09:17:52</dateTime.iso8601></value></member><member><name>content</name><value>' . @utf8_encode($string) . '</value></member><member><name>postid</name><value>7414222</value></member></struct></value></param></params></methodResponse>
530
+        $f = "HTTP/1.1 200 OK\r\nContent-type: text/xml; charset=UTF-8\r\n\r\n".'<?xml version="1.0"?><methodResponse><params><param><value><struct><member><name>userid</name><value>311127</value></member>
531
+<member><name>dateCreated</name><value><dateTime.iso8601>20011126T09:17:52</dateTime.iso8601></value></member><member><name>content</name><value>' . @utf8_encode($string).'</value></member><member><name>postid</name><value>7414222</value></member></struct></value></param></params></methodResponse>
532 532
 ';
533 533
         $r = $s->parseResponse($f, false, 'phpvals');
534 534
         $v = $r->value();
@@ -536,7 +536,7 @@  discard block
 block discarded – undo
536 536
         $this->assertEquals($string, $v);
537 537
 
538 538
         $f = '<?xml version="1.0" encoding="UTF-8"?><methodResponse><params><param><value><struct><member><name>userid</name><value>311127</value></member>
539
-<member><name>dateCreated</name><value><dateTime.iso8601>20011126T09:17:52</dateTime.iso8601></value></member><member><name>content</name><value>' . @utf8_encode($string) . '</value></member><member><name>postid</name><value>7414222</value></member></struct></value></param></params></methodResponse>
539
+<member><name>dateCreated</name><value><dateTime.iso8601>20011126T09:17:52</dateTime.iso8601></value></member><member><name>content</name><value>' . @utf8_encode($string).'</value></member><member><name>postid</name><value>7414222</value></member></struct></value></param></params></methodResponse>
540 540
 ';
541 541
         $r = $s->parseResponse($f, false, 'phpvals');
542 542
         $v = $r->value();
@@ -552,11 +552,11 @@  discard block
 block discarded – undo
552 552
 
553 553
     public function testLatin1Response()
554 554
     {
555
-        $string = chr(224) . chr(252) . chr(232);
555
+        $string = chr(224).chr(252).chr(232);
556 556
 
557 557
         $s = $this->newRequest('dummy');
558
-        $f = "HTTP/1.1 200 OK\r\nContent-type: text/xml; charset=ISO-8859-1\r\n\r\n" . '<?xml version="1.0"?><methodResponse><params><param><value><struct><member><name>userid</name><value>311127</value></member>
559
-<member><name>dateCreated</name><value><dateTime.iso8601>20011126T09:17:52</dateTime.iso8601></value></member><member><name>content</name><value>' . $string . '</value></member><member><name>postid</name><value>7414222</value></member></struct></value></param></params></methodResponse>
558
+        $f = "HTTP/1.1 200 OK\r\nContent-type: text/xml; charset=ISO-8859-1\r\n\r\n".'<?xml version="1.0"?><methodResponse><params><param><value><struct><member><name>userid</name><value>311127</value></member>
559
+<member><name>dateCreated</name><value><dateTime.iso8601>20011126T09:17:52</dateTime.iso8601></value></member><member><name>content</name><value>' . $string.'</value></member><member><name>postid</name><value>7414222</value></member></struct></value></param></params></methodResponse>
560 560
 ';
561 561
         $r = $s->parseResponse($f, false, 'phpvals');
562 562
         $v = $r->value();
@@ -564,7 +564,7 @@  discard block
 block discarded – undo
564 564
         $this->assertEquals($string, $v);
565 565
 
566 566
         $f = '<?xml version="1.0" encoding="ISO-8859-1"?><methodResponse><params><param><value><struct><member><name>userid</name><value>311127</value></member>
567
-<member><name>dateCreated</name><value><dateTime.iso8601>20011126T09:17:52</dateTime.iso8601></value></member><member><name>content</name><value>' . $string . '</value></member><member><name>postid</name><value>7414222</value></member></struct></value></param></params></methodResponse>
567
+<member><name>dateCreated</name><value><dateTime.iso8601>20011126T09:17:52</dateTime.iso8601></value></member><member><name>content</name><value>' . $string.'</value></member><member><name>postid</name><value>7414222</value></member></struct></value></param></params></methodResponse>
568 568
 ';
569 569
         $r = $s->parseResponse($f, false, 'phpvals');
570 570
         $v = $r->value();
Please login to merge, or discard this patch.
tests/ServerAwareTestCase.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__ . '/LoggerAwareTestCase.php';
3
+include_once __DIR__.'/LoggerAwareTestCase.php';
4 4
 
5 5
 use PHPUnit\Extensions\SeleniumCommon\RemoteCoverage;
6 6
 use PHPUnit\Framework\TestResult;
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
      */
29 29
     public function _run($result = NULL)
30 30
     {
31
-        $this->testId = get_class($this) . '__' . $this->getName();
31
+        $this->testId = get_class($this).'__'.$this->getName();
32 32
 
33 33
         if ($result === NULL) {
34 34
             $result = $this->createResult();
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
         parent::set_up();
60 60
 
61 61
         // assumes HTTPURI to be in the form /tests/index.php?etc...
62
-        $this->baseUrl = 'http://' . $this->args['HTTPSERVER'] . preg_replace('|\?.+|', '', $this->args['HTTPURI']);
63
-        $this->coverageScriptUrl = 'http://' . $this->args['HTTPSERVER'] . preg_replace('|/tests/index\.php(\?.*)?|', '/tests/phpunit_coverage.php', $this->args['HTTPURI']);
62
+        $this->baseUrl = 'http://'.$this->args['HTTPSERVER'].preg_replace('|\?.+|', '', $this->args['HTTPURI']);
63
+        $this->coverageScriptUrl = 'http://'.$this->args['HTTPSERVER'].preg_replace('|/tests/index\.php(\?.*)?|', '/tests/phpunit_coverage.php', $this->args['HTTPURI']);
64 64
     }
65 65
 }
Please login to merge, or discard this patch.
demo/client/getstatename.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
 output('<html lang="en">
5 5
 <head><title>phpxmlrpc - Getstatename demo</title></head>
@@ -17,13 +17,13 @@  discard block
 block discarded – undo
17 17
 $stateNo = "";
18 18
 
19 19
 if (isset($_POST['stateno']) && $_POST['stateno'] != "") {
20
-    $stateNo = (integer)$_POST['stateno'];
20
+    $stateNo = (integer) $_POST['stateno'];
21 21
     $method = 'examples.getStateName';
22 22
     $arguments = array(
23 23
         new Value($stateNo, Value::$xmlrpcInt),
24 24
     );
25 25
     $req = new Request($method, $arguments);
26
-    output("Sending the following request:<pre>\n\n" . htmlentities($req->serialize()) .
26
+    output("Sending the following request:<pre>\n\n".htmlentities($req->serialize()).
27 27
         "\n\n</pre>Debug info of server data follows...\n\n");
28 28
     $client = new Client(XMLRPCSERVER);
29 29
     $client->setOption(Client::OPT_DEBUG, 1);
@@ -32,12 +32,12 @@  discard block
 block discarded – undo
32 32
         $val = $resp->value();
33 33
         // NB: we are _assuming_ that the server did return a scalar xml-rpc value here.
34 34
         // If the server is not trusted, we might check that via `$val->kindOf() == 'scalar'`
35
-        output('<br/>State number <b>' . $stateNo . '</b> is <b>'
36
-            . htmlspecialchars($val->scalarval()) . '</b><br/><br/>');
35
+        output('<br/>State number <b>'.$stateNo.'</b> is <b>'
36
+            . htmlspecialchars($val->scalarval()).'</b><br/><br/>');
37 37
     } else {
38 38
         output('An error occurred: ');
39
-        output('<pre>Code: ' . htmlspecialchars($resp->faultCode())
40
-            . " Reason: '" . htmlspecialchars($resp->faultString()) . "'</pre>");
39
+        output('<pre>Code: '.htmlspecialchars($resp->faultCode())
40
+            . " Reason: '".htmlspecialchars($resp->faultString())."'</pre>");
41 41
     }
42 42
 }
43 43
 
Please login to merge, or discard this patch.
demo/client/wrap.php 1 patch
Spacing   +4 added lines, -4 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
 output('<html lang="en">
5 5
 <head><title>phpxmlrpc - Webservice wrapper demo</title></head>
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
20 20
 $client->setOption(\PhpXmlRpc\Client::OPT_RETURN_TYPE, 'phpvals'); // let client give us back php values instead of xmlrpcvals
21 21
 $resp = $client->send(new PhpXmlRpc\Request('system.listMethods'));
22 22
 if ($resp->faultCode()) {
23
-    output("<p>Server methods list could not be retrieved: error {$resp->faultCode()} '" . htmlspecialchars($resp->faultString()) . "'</p>\n");
23
+    output("<p>Server methods list could not be retrieved: error {$resp->faultCode()} '".htmlspecialchars($resp->faultString())."'</p>\n");
24 24
 } else {
25 25
     output("<p>Server methods list retrieved, now wrapping it up...</p>\n<ul>\n");
26 26
     flush();
@@ -32,9 +32,9 @@  discard block
 block discarded – undo
32 32
         if ($methodName == 'examples.getStateName') {
33 33
             $callable = $wrapper->wrapXmlrpcMethod($client, $methodName);
34 34
             if ($callable) {
35
-                output("<li>Remote server method " . htmlspecialchars($methodName) . " wrapped into php function</li>\n");
35
+                output("<li>Remote server method ".htmlspecialchars($methodName)." wrapped into php function</li>\n");
36 36
             } else {
37
-                output("<li>Remote server method " . htmlspecialchars($methodName) . " could not be wrapped!</li>\n");
37
+                output("<li>Remote server method ".htmlspecialchars($methodName)." could not be wrapped!</li>\n");
38 38
             }
39 39
             break;
40 40
         }
Please login to merge, or discard this patch.
src/Value.php 1 patch
Spacing   +23 added lines, -23 removed lines patch added patch discarded remove patch
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
                     $this->me['struct'] = $val;
97 97
                     break;
98 98
                 default:
99
-                    $this->getLogger()->error("XML-RPC: " . __METHOD__ . ": not a known type ($type)");
99
+                    $this->getLogger()->error("XML-RPC: ".__METHOD__.": not a known type ($type)");
100 100
             }
101 101
         }
102 102
     }
@@ -126,7 +126,7 @@  discard block
 block discarded – undo
126 126
         }
127 127
 
128 128
         if ($typeOf !== 1) {
129
-            $this->getLogger()->error("XML-RPC: " . __METHOD__ . ": not a scalar type ($type)");
129
+            $this->getLogger()->error("XML-RPC: ".__METHOD__.": not a scalar type ($type)");
130 130
             return 0;
131 131
         }
132 132
 
@@ -143,10 +143,10 @@  discard block
 block discarded – undo
143 143
 
144 144
         switch ($this->mytype) {
145 145
             case 1:
146
-                $this->getLogger()->error('XML-RPC: ' . __METHOD__ . ': scalar xmlrpc value can have only one value');
146
+                $this->getLogger()->error('XML-RPC: '.__METHOD__.': scalar xmlrpc value can have only one value');
147 147
                 return 0;
148 148
             case 3:
149
-                $this->getLogger()->error('XML-RPC: ' . __METHOD__ . ': cannot add anonymous scalar to struct xmlrpc value');
149
+                $this->getLogger()->error('XML-RPC: '.__METHOD__.': cannot add anonymous scalar to struct xmlrpc value');
150 150
                 return 0;
151 151
             case 2:
152 152
                 // we're adding a scalar value to an array here
@@ -190,7 +190,7 @@  discard block
 block discarded – undo
190 190
 
191 191
             return 1;
192 192
         } else {
193
-            $this->getLogger()->error('XML-RPC: ' . __METHOD__ . ': already initialized as a [' . $this->kindOf() . ']');
193
+            $this->getLogger()->error('XML-RPC: '.__METHOD__.': already initialized as a ['.$this->kindOf().']');
194 194
             return 0;
195 195
         }
196 196
     }
@@ -221,7 +221,7 @@  discard block
 block discarded – undo
221 221
 
222 222
             return 1;
223 223
         } else {
224
-            $this->getLogger()->error('XML-RPC: ' . __METHOD__ . ': already initialized as a [' . $this->kindOf() . ']');
224
+            $this->getLogger()->error('XML-RPC: '.__METHOD__.': already initialized as a ['.$this->kindOf().']');
225 225
             return 0;
226 226
         }
227 227
     }
@@ -265,19 +265,19 @@  discard block
 block discarded – undo
265 265
             case 1:
266 266
                 switch ($typ) {
267 267
                     case static::$xmlrpcBase64:
268
-                        $rs .= "<{$typ}>" . base64_encode($val) . "</{$typ}>";
268
+                        $rs .= "<{$typ}>".base64_encode($val)."</{$typ}>";
269 269
                         break;
270 270
                     case static::$xmlrpcBoolean:
271
-                        $rs .= "<{$typ}>" . ($val ? '1' : '0') . "</{$typ}>";
271
+                        $rs .= "<{$typ}>".($val ? '1' : '0')."</{$typ}>";
272 272
                         break;
273 273
                     case static::$xmlrpcString:
274 274
                         // Do NOT use htmlentities, since it will produce named html entities, which are invalid xml
275
-                        $rs .= "<{$typ}>" . $this->getCharsetEncoder()->encodeEntities($val, PhpXmlRpc::$xmlrpc_internalencoding, $charsetEncoding) . "</{$typ}>";
275
+                        $rs .= "<{$typ}>".$this->getCharsetEncoder()->encodeEntities($val, PhpXmlRpc::$xmlrpc_internalencoding, $charsetEncoding)."</{$typ}>";
276 276
                         break;
277 277
                     case static::$xmlrpcInt:
278 278
                     case static::$xmlrpcI4:
279 279
                     case static::$xmlrpcI8:
280
-                        $rs .= "<{$typ}>" . (int)$val . "</{$typ}>";
280
+                        $rs .= "<{$typ}>".(int) $val."</{$typ}>";
281 281
                         break;
282 282
                     case static::$xmlrpcDouble:
283 283
                         // avoid using standard conversion of float to string because it is locale-dependent,
@@ -285,16 +285,16 @@  discard block
 block discarded – undo
285 285
                         // sprintf('%F') could be most likely ok, but it fails e.g. on 2e-14.
286 286
                         // The code below tries its best at keeping max precision while avoiding exp notation,
287 287
                         // but there is of course no limit in the number of decimal places to be used...
288
-                        $rs .= "<{$typ}>" . preg_replace('/\\.?0+$/', '', number_format((double)$val, PhpXmlRpc::$xmlpc_double_precision, '.', '')) . "</{$typ}>";
288
+                        $rs .= "<{$typ}>".preg_replace('/\\.?0+$/', '', number_format((double) $val, PhpXmlRpc::$xmlpc_double_precision, '.', ''))."</{$typ}>";
289 289
                         break;
290 290
                     case static::$xmlrpcDateTime:
291 291
                         if (is_string($val)) {
292 292
                             $rs .= "<{$typ}>{$val}</{$typ}>";
293 293
                         // DateTimeInterface is not present in php 5.4...
294 294
                         } elseif (is_a($val, 'DateTimeInterface') || is_a($val, 'DateTime')) {
295
-                            $rs .= "<{$typ}>" . $val->format('Ymd\TH:i:s') . "</{$typ}>";
295
+                            $rs .= "<{$typ}>".$val->format('Ymd\TH:i:s')."</{$typ}>";
296 296
                         } elseif (is_int($val)) {
297
-                            $rs .= "<{$typ}>" . date('Ymd\TH:i:s', $val) . "</{$typ}>";
297
+                            $rs .= "<{$typ}>".date('Ymd\TH:i:s', $val)."</{$typ}>";
298 298
                         } else {
299 299
                             // not really a good idea here: but what should we output anyway? left for backward compat...
300 300
                             $rs .= "<{$typ}>{$val}</{$typ}>";
@@ -316,14 +316,14 @@  discard block
 block discarded – undo
316 316
             case 3:
317 317
                 // struct
318 318
                 if ($this->_php_class) {
319
-                    $rs .= '<struct php_class="' . $this->_php_class . "\">\n";
319
+                    $rs .= '<struct php_class="'.$this->_php_class."\">\n";
320 320
                 } else {
321 321
                     $rs .= "<struct>\n";
322 322
                 }
323 323
                 $charsetEncoder = $this->getCharsetEncoder();
324 324
                 /** @var Value $val2 */
325 325
                 foreach ($val as $key2 => $val2) {
326
-                    $rs .= '<member><name>' . $charsetEncoder->encodeEntities($key2, PhpXmlRpc::$xmlrpc_internalencoding, $charsetEncoding) . "</name>\n";
326
+                    $rs .= '<member><name>'.$charsetEncoder->encodeEntities($key2, PhpXmlRpc::$xmlrpc_internalencoding, $charsetEncoding)."</name>\n";
327 327
                     //$rs.=$this->serializeval($val2);
328 328
                     $rs .= $val2->serialize($charsetEncoding);
329 329
                     $rs .= "</member>\n";
@@ -358,7 +358,7 @@  discard block
 block discarded – undo
358 358
         $val = reset($this->me);
359 359
         $typ = key($this->me);
360 360
 
361
-        return '<value>' . $this->serializeData($typ, $val, $charsetEncoding) . "</value>\n";
361
+        return '<value>'.$this->serializeData($typ, $val, $charsetEncoding)."</value>\n";
362 362
     }
363 363
 
364 364
     /**
@@ -373,7 +373,7 @@  discard block
 block discarded – undo
373 373
      */
374 374
     public function structMemExists($key)
375 375
     {
376
-        $this->logDeprecation('Method ' . __METHOD__ . ' is deprecated');
376
+        $this->logDeprecation('Method '.__METHOD__.' is deprecated');
377 377
 
378 378
         return array_key_exists($key, $this->me['struct']);
379 379
     }
@@ -389,7 +389,7 @@  discard block
 block discarded – undo
389 389
      */
390 390
     public function structMem($key)
391 391
     {
392
-        $this->logDeprecation('Method ' . __METHOD__ . ' is deprecated');
392
+        $this->logDeprecation('Method '.__METHOD__.' is deprecated');
393 393
 
394 394
         return $this->me['struct'][$key];
395 395
     }
@@ -402,7 +402,7 @@  discard block
 block discarded – undo
402 402
      */
403 403
     public function structReset()
404 404
     {
405
-        $this->logDeprecation('Method ' . __METHOD__ . ' is deprecated');
405
+        $this->logDeprecation('Method '.__METHOD__.' is deprecated');
406 406
 
407 407
         reset($this->me['struct']);
408 408
     }
@@ -417,7 +417,7 @@  discard block
 block discarded – undo
417 417
      */
418 418
     public function structEach()
419 419
     {
420
-        $this->logDeprecation('Method ' . __METHOD__ . ' is deprecated');
420
+        $this->logDeprecation('Method '.__METHOD__.' is deprecated');
421 421
 
422 422
         return @each($this->me['struct']);
423 423
     }
@@ -462,7 +462,7 @@  discard block
 block discarded – undo
462 462
      */
463 463
     public function arrayMem($key)
464 464
     {
465
-        $this->logDeprecation('Method ' . __METHOD__ . ' is deprecated');
465
+        $this->logDeprecation('Method '.__METHOD__.' is deprecated');
466 466
 
467 467
         return $this->me['array'][$key];
468 468
     }
@@ -476,7 +476,7 @@  discard block
 block discarded – undo
476 476
      */
477 477
     public function arraySize()
478 478
     {
479
-        $this->logDeprecation('Method ' . __METHOD__ . ' is deprecated');
479
+        $this->logDeprecation('Method '.__METHOD__.' is deprecated');
480 480
 
481 481
         return count($this->me['array']);
482 482
     }
@@ -490,7 +490,7 @@  discard block
 block discarded – undo
490 490
      */
491 491
     public function structSize()
492 492
     {
493
-        $this->logDeprecation('Method ' . __METHOD__ . ' is deprecated');
493
+        $this->logDeprecation('Method '.__METHOD__.' is deprecated');
494 494
 
495 495
         return count($this->me['struct']);
496 496
     }
Please login to merge, or discard this patch.
tests/LoggerAwareTestCase.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -1,11 +1,11 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-include_once __DIR__ . '/../lib/xmlrpc.inc';
4
-include_once __DIR__ . '/../lib/xmlrpcs.inc';
3
+include_once __DIR__.'/../lib/xmlrpc.inc';
4
+include_once __DIR__.'/../lib/xmlrpcs.inc';
5 5
 
6
-include_once __DIR__ . '/parse_args.php';
6
+include_once __DIR__.'/parse_args.php';
7 7
 
8
-include_once __DIR__ . '/PolyfillTestCase.php';
8
+include_once __DIR__.'/PolyfillTestCase.php';
9 9
 
10 10
 use PHPUnit\Runner\BaseTestRunner;
11 11
 
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
 
33 33
     protected function tear_down()
34 34
     {
35
-        if ($this->args['DEBUG'] > 0) {
35
+        if ($this->args['DEBUG']>0) {
36 36
             return;
37 37
         }
38 38
 
@@ -50,16 +50,16 @@  discard block
 block discarded – undo
50 50
 
51 51
     public function debug($message, $context = array())
52 52
     {
53
-        $this->buffer .= $message . "\n";
53
+        $this->buffer .= $message."\n";
54 54
     }
55 55
 
56 56
     public function error($message, $context = array())
57 57
     {
58
-        $this->buffer .= $message . "\n";
58
+        $this->buffer .= $message."\n";
59 59
     }
60 60
 
61 61
     public function warning($message, $context = array())
62 62
     {
63
-        $this->buffer .= $message . "\n";
63
+        $this->buffer .= $message."\n";
64 64
     }
65 65
 }
Please login to merge, or discard this patch.