Passed
Push — master ( 506466...598fec )
by Gaetano
08:18
created
src/Traits/DeprecationLogger.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@  discard block
 block discarded – undo
14 14
             return;
15 15
         }
16 16
 
17
-        $this->getLogger()->warning('XML-RPC Deprecated: ' . $message);
17
+        $this->getLogger()->warning('XML-RPC Deprecated: '.$message);
18 18
     }
19 19
 
20 20
     /**
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
             return;
35 35
         }
36 36
 
37
-        $this->getLogger()->warning('XML-RPC Deprecated: ' . $trace[1]['class'] . '::' . $trace[1]['function'] .
38
-            ' is only supposed to be called by ' . $expectedCaller);
37
+        $this->getLogger()->warning('XML-RPC Deprecated: '.$trace[1]['class'].'::'.$trace[1]['function'].
38
+            ' is only supposed to be called by '.$expectedCaller);
39 39
     }
40 40
 }
Please login to merge, or discard this patch.
src/Response.php 1 patch
Spacing   +32 added lines, -32 removed lines patch added patch discarded remove patch
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
                 // user declares the type of resp value: we "almost" trust it... but log errors just in case
79 79
                 if (($this->valtyp == 'xmlrpcvals' && (!is_a($this->val, 'PhpXmlRpc\Value'))) ||
80 80
                     ($this->valtyp == 'xml' && (!is_string($this->val)))) {
81
-                    $this->getLogger()->error('XML-RPC: ' . __METHOD__ . ': value passed in does not match type ' . $valType);
81
+                    $this->getLogger()->error('XML-RPC: '.__METHOD__.': value passed in does not match type '.$valType);
82 82
                 }
83 83
             }
84 84
         }
@@ -165,34 +165,34 @@  discard block
 block discarded – undo
165 165
     public function serialize($charsetEncoding = '')
166 166
     {
167 167
         if ($charsetEncoding != '') {
168
-            $this->content_type = 'text/xml; charset=' . $charsetEncoding;
168
+            $this->content_type = 'text/xml; charset='.$charsetEncoding;
169 169
         } else {
170 170
             $this->content_type = 'text/xml';
171 171
         }
172 172
 
173 173
         if (PhpXmlRpc::$xmlrpc_null_apache_encoding) {
174
-            $result = "<methodResponse xmlns:ex=\"" . PhpXmlRpc::$xmlrpc_null_apache_encoding_ns . "\">\n";
174
+            $result = "<methodResponse xmlns:ex=\"".PhpXmlRpc::$xmlrpc_null_apache_encoding_ns."\">\n";
175 175
         } else {
176 176
             $result = "<methodResponse>\n";
177 177
         }
178 178
         if ($this->errno) {
179 179
             // Let non-ASCII response messages be tolerated by clients by xml-encoding non ascii chars
180
-            $result .= "<fault>\n" .
181
-                "<value>\n<struct><member><name>faultCode</name>\n<value><int>" . $this->errno .
182
-                "</int></value>\n</member>\n<member>\n<name>faultString</name>\n<value><string>" .
183
-                $this->getCharsetEncoder()->encodeEntities($this->errstr, PhpXmlRpc::$xmlrpc_internalencoding, $charsetEncoding) .
180
+            $result .= "<fault>\n".
181
+                "<value>\n<struct><member><name>faultCode</name>\n<value><int>".$this->errno.
182
+                "</int></value>\n</member>\n<member>\n<name>faultString</name>\n<value><string>".
183
+                $this->getCharsetEncoder()->encodeEntities($this->errstr, PhpXmlRpc::$xmlrpc_internalencoding, $charsetEncoding).
184 184
                 "</string></value>\n</member>\n</struct>\n</value>\n</fault>";
185 185
         } else {
186 186
             if (is_object($this->val) && is_a($this->val, 'PhpXmlRpc\Value')) {
187
-                $result .= "<params>\n<param>\n" . $this->val->serialize($charsetEncoding) . "</param>\n</params>";
187
+                $result .= "<params>\n<param>\n".$this->val->serialize($charsetEncoding)."</param>\n</params>";
188 188
             } else if (is_string($this->val) && $this->valtyp == 'xml') {
189
-                $result .= "<params>\n<param>\n" .
190
-                    $this->val .
189
+                $result .= "<params>\n<param>\n".
190
+                    $this->val.
191 191
                     "</param>\n</params>";
192 192
             } else if ($this->valtyp == 'phpvals') {
193 193
                     $encoder = new Encoder();
194 194
                     $val = $encoder->encode($this->val);
195
-                    $result .= "<params>\n<param>\n" . $val->serialize($charsetEncoding) . "</param>\n</params>";
195
+                    $result .= "<params>\n<param>\n".$val->serialize($charsetEncoding)."</param>\n</params>";
196 196
             } else {
197 197
                 throw new StateErrorException('cannot serialize xmlrpc response objects whose content is native php values');
198 198
             }
@@ -211,9 +211,9 @@  discard block
 block discarded – undo
211 211
     public function xml_header($charsetEncoding = '')
212 212
     {
213 213
         if ($charsetEncoding != '') {
214
-            return "<?xml version=\"1.0\" encoding=\"$charsetEncoding\"?" . ">\n";
214
+            return "<?xml version=\"1.0\" encoding=\"$charsetEncoding\"?".">\n";
215 215
         } else {
216
-            return "<?xml version=\"1.0\"?" . ">\n";
216
+            return "<?xml version=\"1.0\"?".">\n";
217 217
         }
218 218
     }
219 219
 
@@ -229,21 +229,21 @@  discard block
 block discarded – undo
229 229
             case 'errstr':
230 230
             case 'payload':
231 231
             case 'content_type':
232
-                $this->logDeprecation('Getting property Response::' . $name . ' is deprecated');
232
+                $this->logDeprecation('Getting property Response::'.$name.' is deprecated');
233 233
                 return $this->$name;
234 234
             case 'hdrs':
235
-                $this->logDeprecation('Getting property Response::' . $name . ' is deprecated');
235
+                $this->logDeprecation('Getting property Response::'.$name.' is deprecated');
236 236
                 return $this->httpResponse['headers'];
237 237
             case '_cookies':
238
-                $this->logDeprecation('Getting property Response::' . $name . ' is deprecated');
238
+                $this->logDeprecation('Getting property Response::'.$name.' is deprecated');
239 239
                 return $this->httpResponse['cookies'];
240 240
             case 'raw_data':
241
-                $this->logDeprecation('Getting property Response::' . $name . ' is deprecated');
241
+                $this->logDeprecation('Getting property Response::'.$name.' is deprecated');
242 242
                 return $this->httpResponse['raw_data'];
243 243
             default:
244 244
                 /// @todo throw instead? There are very few other places where the lib trigger errors which can potentially reach stdout...
245 245
                 $trace = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 1);
246
-                trigger_error('Undefined property via __get(): ' . $name . ' in ' . $trace[0]['file'] . ' on line ' . $trace[0]['line'], E_USER_WARNING);
246
+                trigger_error('Undefined property via __get(): '.$name.' in '.$trace[0]['file'].' on line '.$trace[0]['line'], E_USER_WARNING);
247 247
                 $result = null;
248 248
                 return $result;
249 249
         }
@@ -258,25 +258,25 @@  discard block
 block discarded – undo
258 258
             case 'errstr':
259 259
             case 'payload':
260 260
             case 'content_type':
261
-                $this->logDeprecation('Setting property Response::' . $name . ' is deprecated');
261
+                $this->logDeprecation('Setting property Response::'.$name.' is deprecated');
262 262
                 $this->$name = $value;
263 263
                 break;
264 264
             case 'hdrs':
265
-                $this->logDeprecation('Setting property Response::' . $name . ' is deprecated');
265
+                $this->logDeprecation('Setting property Response::'.$name.' is deprecated');
266 266
                 $this->httpResponse['headers'] = $value;
267 267
                 break;
268 268
             case '_cookies':
269
-                $this->logDeprecation('Setting property Response::' . $name . ' is deprecated');
269
+                $this->logDeprecation('Setting property Response::'.$name.' is deprecated');
270 270
                 $this->httpResponse['cookies'] = $value;
271 271
                 break;
272 272
             case 'raw_data':
273
-                $this->logDeprecation('Setting property Response::' . $name . ' is deprecated');
273
+                $this->logDeprecation('Setting property Response::'.$name.' is deprecated');
274 274
                 $this->httpResponse['raw_data'] = $value;
275 275
                 break;
276 276
             default:
277 277
                 /// @todo throw instead? There are very few other places where the lib trigger errors which can potentially reach stdout...
278 278
                 $trace = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 1);
279
-                trigger_error('Undefined property via __set(): ' . $name . ' in ' . $trace[0]['file'] . ' on line ' . $trace[0]['line'], E_USER_WARNING);
279
+                trigger_error('Undefined property via __set(): '.$name.' in '.$trace[0]['file'].' on line '.$trace[0]['line'], E_USER_WARNING);
280 280
         }
281 281
     }
282 282
 
@@ -289,16 +289,16 @@  discard block
 block discarded – undo
289 289
             case 'errstr':
290 290
             case 'payload':
291 291
             case 'content_type':
292
-                $this->logDeprecation('Checking property Response::' . $name . ' is deprecated');
292
+                $this->logDeprecation('Checking property Response::'.$name.' is deprecated');
293 293
                 return isset($this->$name);
294 294
             case 'hdrs':
295
-                $this->logDeprecation('Checking property Response::' . $name . ' is deprecated');
295
+                $this->logDeprecation('Checking property Response::'.$name.' is deprecated');
296 296
                 return isset($this->httpResponse['headers']);
297 297
             case '_cookies':
298
-                $this->logDeprecation('Checking property Response::' . $name . ' is deprecated');
298
+                $this->logDeprecation('Checking property Response::'.$name.' is deprecated');
299 299
                 return isset($this->httpResponse['cookies']);
300 300
             case 'raw_data':
301
-                $this->logDeprecation('Checking property Response::' . $name . ' is deprecated');
301
+                $this->logDeprecation('Checking property Response::'.$name.' is deprecated');
302 302
                 return isset($this->httpResponse['raw_data']);
303 303
             default:
304 304
                 return false;
@@ -314,25 +314,25 @@  discard block
 block discarded – undo
314 314
             case 'errstr':
315 315
             case 'payload':
316 316
             case 'content_type':
317
-                $this->logDeprecation('Setting property Response::' . $name . ' is deprecated');
317
+                $this->logDeprecation('Setting property Response::'.$name.' is deprecated');
318 318
                 unset($this->$name);
319 319
                 break;
320 320
             case 'hdrs':
321
-                $this->logDeprecation('Unsetting property Response::' . $name . ' is deprecated');
321
+                $this->logDeprecation('Unsetting property Response::'.$name.' is deprecated');
322 322
                 unset($this->httpResponse['headers']);
323 323
                 break;
324 324
             case '_cookies':
325
-                $this->logDeprecation('Unsetting property Response::' . $name . ' is deprecated');
325
+                $this->logDeprecation('Unsetting property Response::'.$name.' is deprecated');
326 326
                 unset($this->httpResponse['cookies']);
327 327
                 break;
328 328
             case 'raw_data':
329
-                $this->logDeprecation('Unsetting property Response::' . $name . ' is deprecated');
329
+                $this->logDeprecation('Unsetting property Response::'.$name.' is deprecated');
330 330
                 unset($this->httpResponse['raw_data']);
331 331
                 break;
332 332
             default:
333 333
                 /// @todo throw instead? There are very few other places where the lib trigger errors which can potentially reach stdout...
334 334
                 $trace = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 1);
335
-                trigger_error('Undefined property via __unset(): ' . $name . ' in ' . $trace[0]['file'] . ' on line ' . $trace[0]['line'], E_USER_WARNING);
335
+                trigger_error('Undefined property via __unset(): '.$name.' in '.$trace[0]['file'].' on line '.$trace[0]['line'], E_USER_WARNING);
336 336
         }
337 337
     }
338 338
 }
Please login to merge, or discard this patch.
src/Value.php 1 patch
Spacing   +30 added lines, -30 removed lines patch added patch discarded remove patch
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
                     $this->me['struct'] = $val;
99 99
                     break;
100 100
                 default:
101
-                    $this->getLogger()->error("XML-RPC: " . __METHOD__ . ": not a known type ($type)");
101
+                    $this->getLogger()->error("XML-RPC: ".__METHOD__.": not a known type ($type)");
102 102
             }
103 103
         }
104 104
     }
@@ -128,7 +128,7 @@  discard block
 block discarded – undo
128 128
         }
129 129
 
130 130
         if ($typeOf !== 1) {
131
-            $this->getLogger()->error("XML-RPC: " . __METHOD__ . ": not a scalar type ($type)");
131
+            $this->getLogger()->error("XML-RPC: ".__METHOD__.": not a scalar type ($type)");
132 132
             return 0;
133 133
         }
134 134
 
@@ -145,10 +145,10 @@  discard block
 block discarded – undo
145 145
 
146 146
         switch ($this->mytype) {
147 147
             case 1:
148
-                $this->getLogger()->error('XML-RPC: ' . __METHOD__ . ': scalar xmlrpc value can have only one value');
148
+                $this->getLogger()->error('XML-RPC: '.__METHOD__.': scalar xmlrpc value can have only one value');
149 149
                 return 0;
150 150
             case 3:
151
-                $this->getLogger()->error('XML-RPC: ' . __METHOD__ . ': cannot add anonymous scalar to struct xmlrpc value');
151
+                $this->getLogger()->error('XML-RPC: '.__METHOD__.': cannot add anonymous scalar to struct xmlrpc value');
152 152
                 return 0;
153 153
             case 2:
154 154
                 // we're adding a scalar value to an array here
@@ -192,7 +192,7 @@  discard block
 block discarded – undo
192 192
 
193 193
             return 1;
194 194
         } else {
195
-            $this->getLogger()->error('XML-RPC: ' . __METHOD__ . ': already initialized as a [' . $this->kindOf() . ']');
195
+            $this->getLogger()->error('XML-RPC: '.__METHOD__.': already initialized as a ['.$this->kindOf().']');
196 196
             return 0;
197 197
         }
198 198
     }
@@ -223,7 +223,7 @@  discard block
 block discarded – undo
223 223
 
224 224
             return 1;
225 225
         } else {
226
-            $this->getLogger()->error('XML-RPC: ' . __METHOD__ . ': already initialized as a [' . $this->kindOf() . ']');
226
+            $this->getLogger()->error('XML-RPC: '.__METHOD__.': already initialized as a ['.$this->kindOf().']');
227 227
             return 0;
228 228
         }
229 229
     }
@@ -288,7 +288,7 @@  discard block
 block discarded – undo
288 288
         $val = reset($this->me);
289 289
         $typ = key($this->me);
290 290
 
291
-        return '<value>' . $this->serializeData($typ, $val, $charsetEncoding) . "</value>\n";
291
+        return '<value>'.$this->serializeData($typ, $val, $charsetEncoding)."</value>\n";
292 292
     }
293 293
 
294 294
     /**
@@ -311,19 +311,19 @@  discard block
 block discarded – undo
311 311
             case 1:
312 312
                 switch ($typ) {
313 313
                     case static::$xmlrpcBase64:
314
-                        $rs = "<{$typ}>" . base64_encode($val) . "</{$typ}>";
314
+                        $rs = "<{$typ}>".base64_encode($val)."</{$typ}>";
315 315
                         break;
316 316
                     case static::$xmlrpcBoolean:
317
-                        $rs = "<{$typ}>" . ($val ? '1' : '0') . "</{$typ}>";
317
+                        $rs = "<{$typ}>".($val ? '1' : '0')."</{$typ}>";
318 318
                         break;
319 319
                     case static::$xmlrpcString:
320 320
                         // Do NOT use htmlentities, since it will produce named html entities, which are invalid xml
321
-                        $rs = "<{$typ}>" . $this->getCharsetEncoder()->encodeEntities($val, PhpXmlRpc::$xmlrpc_internalencoding, $charsetEncoding) . "</{$typ}>";
321
+                        $rs = "<{$typ}>".$this->getCharsetEncoder()->encodeEntities($val, PhpXmlRpc::$xmlrpc_internalencoding, $charsetEncoding)."</{$typ}>";
322 322
                         break;
323 323
                     case static::$xmlrpcInt:
324 324
                     case static::$xmlrpcI4:
325 325
                     case static::$xmlrpcI8:
326
-                        $rs = "<{$typ}>" . (int)$val . "</{$typ}>";
326
+                        $rs = "<{$typ}>".(int) $val."</{$typ}>";
327 327
                         break;
328 328
                     case static::$xmlrpcDouble:
329 329
                         // avoid using standard conversion of float to string because it is locale-dependent,
@@ -331,16 +331,16 @@  discard block
 block discarded – undo
331 331
                         // sprintf('%F') could be most likely ok, but it fails e.g. on 2e-14.
332 332
                         // The code below tries its best at keeping max precision while avoiding exp notation,
333 333
                         // but there is of course no limit in the number of decimal places to be used...
334
-                        $rs = "<{$typ}>" . preg_replace('/\\.?0+$/', '', number_format((double)$val, PhpXmlRpc::$xmlpc_double_precision, '.', '')) . "</{$typ}>";
334
+                        $rs = "<{$typ}>".preg_replace('/\\.?0+$/', '', number_format((double) $val, PhpXmlRpc::$xmlpc_double_precision, '.', ''))."</{$typ}>";
335 335
                         break;
336 336
                     case static::$xmlrpcDateTime:
337 337
                         if (is_string($val)) {
338 338
                             $rs = "<{$typ}>{$val}</{$typ}>";
339 339
                         // DateTimeInterface is not present in php 5.4...
340 340
                         } elseif (is_a($val, 'DateTimeInterface') || is_a($val, 'DateTime')) {
341
-                            $rs = "<{$typ}>" . $val->format('Ymd\TH:i:s') . "</{$typ}>";
341
+                            $rs = "<{$typ}>".$val->format('Ymd\TH:i:s')."</{$typ}>";
342 342
                         } elseif (is_int($val)) {
343
-                            $rs = "<{$typ}>" . date('Ymd\TH:i:s', $val) . "</{$typ}>";
343
+                            $rs = "<{$typ}>".date('Ymd\TH:i:s', $val)."</{$typ}>";
344 344
                         } else {
345 345
                             // not really a good idea here: but what should we output anyway? left for backward compat...
346 346
                             $rs = "<{$typ}>{$val}</{$typ}>";
@@ -362,14 +362,14 @@  discard block
 block discarded – undo
362 362
             case 3:
363 363
                 // struct
364 364
                 if ($this->_php_class) {
365
-                    $rs = '<struct php_class="' . $this->_php_class . "\">\n";
365
+                    $rs = '<struct php_class="'.$this->_php_class."\">\n";
366 366
                 } else {
367 367
                     $rs = "<struct>\n";
368 368
                 }
369 369
                 $charsetEncoder = $this->getCharsetEncoder();
370 370
                 /** @var Value $val2 */
371 371
                 foreach ($val as $key2 => $val2) {
372
-                    $rs .= '<member><name>' . $charsetEncoder->encodeEntities($key2, PhpXmlRpc::$xmlrpc_internalencoding, $charsetEncoding) . "</name>\n";
372
+                    $rs .= '<member><name>'.$charsetEncoder->encodeEntities($key2, PhpXmlRpc::$xmlrpc_internalencoding, $charsetEncoding)."</name>\n";
373 373
                     $rs .= $val2->serialize($charsetEncoding);
374 374
                     $rs .= "</member>\n";
375 375
                 }
@@ -583,7 +583,7 @@  discard block
 block discarded – undo
583 583
      */
584 584
     public function structMemExists($key)
585 585
     {
586
-        $this->logDeprecation('Method ' . __METHOD__ . ' is deprecated');
586
+        $this->logDeprecation('Method '.__METHOD__.' is deprecated');
587 587
 
588 588
         return array_key_exists($key, $this->me['struct']);
589 589
     }
@@ -599,7 +599,7 @@  discard block
 block discarded – undo
599 599
      */
600 600
     public function structMem($key)
601 601
     {
602
-        $this->logDeprecation('Method ' . __METHOD__ . ' is deprecated');
602
+        $this->logDeprecation('Method '.__METHOD__.' is deprecated');
603 603
 
604 604
         return $this->me['struct'][$key];
605 605
     }
@@ -612,7 +612,7 @@  discard block
 block discarded – undo
612 612
      */
613 613
     public function structReset()
614 614
     {
615
-        $this->logDeprecation('Method ' . __METHOD__ . ' is deprecated');
615
+        $this->logDeprecation('Method '.__METHOD__.' is deprecated');
616 616
 
617 617
         reset($this->me['struct']);
618 618
     }
@@ -626,7 +626,7 @@  discard block
 block discarded – undo
626 626
      */
627 627
     public function structEach()
628 628
     {
629
-        $this->logDeprecation('Method ' . __METHOD__ . ' is deprecated');
629
+        $this->logDeprecation('Method '.__METHOD__.' is deprecated');
630 630
 
631 631
         $key = key($this->me['struct']);
632 632
         $value = current($this->me['struct']);
@@ -645,7 +645,7 @@  discard block
 block discarded – undo
645 645
      */
646 646
     public function arrayMem($key)
647 647
     {
648
-        $this->logDeprecation('Method ' . __METHOD__ . ' is deprecated');
648
+        $this->logDeprecation('Method '.__METHOD__.' is deprecated');
649 649
 
650 650
         return $this->me['array'][$key];
651 651
     }
@@ -659,7 +659,7 @@  discard block
 block discarded – undo
659 659
      */
660 660
     public function arraySize()
661 661
     {
662
-        $this->logDeprecation('Method ' . __METHOD__ . ' is deprecated');
662
+        $this->logDeprecation('Method '.__METHOD__.' is deprecated');
663 663
 
664 664
         return count($this->me['array']);
665 665
     }
@@ -673,7 +673,7 @@  discard block
 block discarded – undo
673 673
      */
674 674
     public function structSize()
675 675
     {
676
-        $this->logDeprecation('Method ' . __METHOD__ . ' is deprecated');
676
+        $this->logDeprecation('Method '.__METHOD__.' is deprecated');
677 677
 
678 678
         return count($this->me['struct']);
679 679
     }
@@ -685,12 +685,12 @@  discard block
 block discarded – undo
685 685
             case 'me':
686 686
             case 'mytype':
687 687
             case '_php_class':
688
-                $this->logDeprecation('Getting property Value::' . $name . ' is deprecated');
688
+                $this->logDeprecation('Getting property Value::'.$name.' is deprecated');
689 689
                 return $this->$name;
690 690
             default:
691 691
                 /// @todo throw instead? There are very few other places where the lib trigger errors which can potentially reach stdout...
692 692
                 $trace = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 1);
693
-                trigger_error('Undefined property via __get(): ' . $name . ' in ' . $trace[0]['file'] . ' on line ' . $trace[0]['line'], E_USER_WARNING);
693
+                trigger_error('Undefined property via __get(): '.$name.' in '.$trace[0]['file'].' on line '.$trace[0]['line'], E_USER_WARNING);
694 694
                 $result = null;
695 695
                 return $result;
696 696
         }
@@ -702,13 +702,13 @@  discard block
 block discarded – undo
702 702
             case 'me':
703 703
             case 'mytype':
704 704
             case '_php_class':
705
-                $this->logDeprecation('Setting property Value::' . $name . ' is deprecated');
705
+                $this->logDeprecation('Setting property Value::'.$name.' is deprecated');
706 706
                 $this->$name = $value;
707 707
                 break;
708 708
             default:
709 709
                 /// @todo throw instead? There are very few other places where the lib trigger errors which can potentially reach stdout...
710 710
                 $trace = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 1);
711
-                trigger_error('Undefined property via __set(): ' . $name . ' in ' . $trace[0]['file'] . ' on line ' . $trace[0]['line'], E_USER_WARNING);
711
+                trigger_error('Undefined property via __set(): '.$name.' in '.$trace[0]['file'].' on line '.$trace[0]['line'], E_USER_WARNING);
712 712
         }
713 713
     }
714 714
 
@@ -718,7 +718,7 @@  discard block
 block discarded – undo
718 718
             case 'me':
719 719
             case 'mytype':
720 720
             case '_php_class':
721
-                $this->logDeprecation('Checking property Value::' . $name . ' is deprecated');
721
+                $this->logDeprecation('Checking property Value::'.$name.' is deprecated');
722 722
                 return isset($this->$name);
723 723
             default:
724 724
                 return false;
@@ -731,13 +731,13 @@  discard block
 block discarded – undo
731 731
             case 'me':
732 732
             case 'mytype':
733 733
             case '_php_class':
734
-                $this->logDeprecation('Unsetting property Value::' . $name . ' is deprecated');
734
+                $this->logDeprecation('Unsetting property Value::'.$name.' is deprecated');
735 735
                 unset($this->$name);
736 736
                 break;
737 737
             default:
738 738
                 /// @todo throw instead? There are very few other places where the lib trigger errors which can potentially reach stdout...
739 739
                 $trace = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 1);
740
-                trigger_error('Undefined property via __unset(): ' . $name . ' in ' . $trace[0]['file'] . ' on line ' . $trace[0]['line'], E_USER_WARNING);
740
+                trigger_error('Undefined property via __unset(): '.$name.' in '.$trace[0]['file'].' on line '.$trace[0]['line'], E_USER_WARNING);
741 741
         }
742 742
     }
743 743
 }
Please login to merge, or discard this patch.
lib/xmlrpcs.inc 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
      */
55 55
     public function echoInput()
56 56
     {
57
-        $r = new PhpXmlRpc\Response(new PhpXmlRpc\Value("'Aha said I: '" . file_get_contents('php://input'), 'string'));
57
+        $r = new PhpXmlRpc\Response(new PhpXmlRpc\Value("'Aha said I: '".file_get_contents('php://input'), 'string'));
58 58
         print $r->serialize();
59 59
     }
60 60
 
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
      */
66 66
     public function &__get($name)
67 67
     {
68
-        switch($name) {
68
+        switch ($name) {
69 69
             case 'dmap':
70 70
                 return $this->dmap;
71 71
             default:
@@ -96,30 +96,30 @@  discard block
 block discarded – undo
96 96
     Server::xmlrpc_debugmsg($m);
97 97
 }
98 98
 
99
-function _xmlrpcs_getCapabilities($server, $m=null)
99
+function _xmlrpcs_getCapabilities($server, $m = null)
100 100
 {
101 101
     return Server::_xmlrpcs_getCapabilities($server, $m);
102 102
 }
103 103
 
104
-$_xmlrpcs_listMethods_sig=array(array(\PhpXmlRpc\Value::$xmlrpcArray));
105
-$_xmlrpcs_listMethods_doc='This method lists all the methods that the XML-RPC server knows how to dispatch';
106
-$_xmlrpcs_listMethods_sdoc=array(array('list of method names'));
107
-function _xmlrpcs_listMethods($server, $m=null) // if called in plain php values mode, second param is missing
104
+$_xmlrpcs_listMethods_sig = array(array(\PhpXmlRpc\Value::$xmlrpcArray));
105
+$_xmlrpcs_listMethods_doc = 'This method lists all the methods that the XML-RPC server knows how to dispatch';
106
+$_xmlrpcs_listMethods_sdoc = array(array('list of method names'));
107
+function _xmlrpcs_listMethods($server, $m = null) // if called in plain php values mode, second param is missing
108 108
 {
109 109
     return Server::_xmlrpcs_listMethods($server, $m);
110 110
 }
111 111
 
112
-$_xmlrpcs_methodSignature_sig=array(array(\PhpXmlRpc\Value::$xmlrpcArray, $GLOBALS['xmlrpcString']));
113
-$_xmlrpcs_methodSignature_doc='Returns an array of known signatures (an array of arrays) for the method name passed. If no signatures are known, returns a none-array (test for type != array to detect missing signature)';
114
-$_xmlrpcs_methodSignature_sdoc=array(array('list of known signatures, each sig being an array of xmlrpc type names', 'name of method to be described'));
112
+$_xmlrpcs_methodSignature_sig = array(array(\PhpXmlRpc\Value::$xmlrpcArray, $GLOBALS['xmlrpcString']));
113
+$_xmlrpcs_methodSignature_doc = 'Returns an array of known signatures (an array of arrays) for the method name passed. If no signatures are known, returns a none-array (test for type != array to detect missing signature)';
114
+$_xmlrpcs_methodSignature_sdoc = array(array('list of known signatures, each sig being an array of xmlrpc type names', 'name of method to be described'));
115 115
 function _xmlrpcs_methodSignature($server, $m)
116 116
 {
117 117
     return Server::_xmlrpcs_methodSignature($server, $m);
118 118
 }
119 119
 
120
-$_xmlrpcs_methodHelp_sig=array(array($GLOBALS['xmlrpcString'], $GLOBALS['xmlrpcString']));
121
-$_xmlrpcs_methodHelp_doc='Returns help text if defined for the method passed, otherwise returns an empty string';
122
-$_xmlrpcs_methodHelp_sdoc=array(array('method description', 'name of the method to be described'));
120
+$_xmlrpcs_methodHelp_sig = array(array($GLOBALS['xmlrpcString'], $GLOBALS['xmlrpcString']));
121
+$_xmlrpcs_methodHelp_doc = 'Returns help text if defined for the method passed, otherwise returns an empty string';
122
+$_xmlrpcs_methodHelp_sdoc = array(array('method description', 'name of the method to be described'));
123 123
 function _xmlrpcs_methodHelp($server, $m)
124 124
 {
125 125
     return Server::_xmlrpcs_methodHelp($server, $m);
Please login to merge, or discard this patch.
src/Encoder.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -57,13 +57,13 @@  discard block
 block discarded – undo
57 57
                                 'scalar' => $val,
58 58
                                 'timestamp' => \PhpXmlRpc\Helper\Date::iso8601Decode($val)
59 59
                             );
60
-                            return (object)$xmlrpcVal;
60
+                            return (object) $xmlrpcVal;
61 61
                         case 'base64':
62 62
                             $xmlrpcVal = array(
63 63
                                 'xmlrpc_type' => 'base64',
64 64
                                 'scalar' => $val
65 65
                             );
66
-                            return (object)$xmlrpcVal;
66
+                            return (object) $xmlrpcVal;
67 67
                         case 'string':
68 68
                             if (isset($options['extension_api_encoding'])) {
69 69
                                 // if iconv is not available, we use mb_convert_encoding
@@ -136,7 +136,7 @@  discard block
 block discarded – undo
136 136
             case 'msg':
137 137
                 $paramCount = $xmlrpcVal->getNumParams();
138 138
                 $arr = array();
139
-                for ($i = 0; $i < $paramCount; $i++) {
139
+                for ($i = 0; $i<$paramCount; $i++) {
140 140
                     $arr[] = $this->decode($xmlrpcVal->getParam($i), $options);
141 141
                 }
142 142
                 return $arr;
@@ -261,7 +261,7 @@  discard block
 block discarded – undo
261 261
                 break;
262 262
             case 'resource':
263 263
                 if (in_array('extension_api', $options)) {
264
-                    $xmlrpcVal = new Value((int)$phpVal, Value::$xmlrpcInt);
264
+                    $xmlrpcVal = new Value((int) $phpVal, Value::$xmlrpcInt);
265 265
                 } else {
266 266
                     $xmlrpcVal = new Value();
267 267
                 }
@@ -310,7 +310,7 @@  discard block
 block discarded – undo
310 310
                     if ($valEncoding == 'ISO-8859-1') {
311 311
                         $xmlVal = utf8_encode($xmlVal);
312 312
                     } else {
313
-                        $this->getLogger()->error('XML-RPC: ' . __METHOD__ . ': invalid charset encoding of xml text: ' . $valEncoding);
313
+                        $this->getLogger()->error('XML-RPC: '.__METHOD__.': invalid charset encoding of xml text: '.$valEncoding);
314 314
                     }
315 315
                 }
316 316
             }
@@ -336,10 +336,10 @@  discard block
 block discarded – undo
336 336
             $_xh = $xmlRpcParser->_xh;
337 337
         }
338 338
 
339
-        if ($_xh['isf'] > 1) {
339
+        if ($_xh['isf']>1) {
340 340
             // test that $_xh['value'] is an obj, too???
341 341
 
342
-            $this->getLogger()->error('XML-RPC: ' . $_xh['isf_reason']);
342
+            $this->getLogger()->error('XML-RPC: '.$_xh['isf_reason']);
343 343
 
344 344
             return false;
345 345
         }
@@ -360,7 +360,7 @@  discard block
 block discarded – undo
360 360
 
361 361
             case 'methodcall':
362 362
                 $req = new Request($_xh['method']);
363
-                for ($i = 0; $i < count($_xh['params']); $i++) {
363
+                for ($i = 0; $i<count($_xh['params']); $i++) {
364 364
                     $req->addParam($_xh['params'][$i]);
365 365
                 }
366 366
                 return $req;
Please login to merge, or discard this patch.
src/Server.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -463,7 +463,7 @@
 block discarded – undo
463 463
     public function addToMap($methodName, $function, $sig = null, $doc = false, $sigDoc = false, $parametersType = false,
464 464
         $exceptionHandling = false)
465 465
     {
466
-       $this->add_to_map($methodName, $function, $sig, $doc, $sigDoc, $parametersType, $exceptionHandling);
466
+        $this->add_to_map($methodName, $function, $sig, $doc, $sigDoc, $parametersType, $exceptionHandling);
467 467
     }
468 468
 
469 469
     /**
Please login to merge, or discard this patch.
Spacing   +64 added lines, -64 removed lines patch added patch discarded remove patch
@@ -251,7 +251,7 @@  discard block
 block discarded – undo
251 251
     public function getOptions()
252 252
     {
253 253
         $values = array();
254
-        foreach(static::$options as $opt) {
254
+        foreach (static::$options as $opt) {
255 255
             $values[$opt] = $this->getOption($opt);
256 256
         }
257 257
         return $values;
@@ -264,7 +264,7 @@  discard block
 block discarded – undo
264 264
      */
265 265
     public function setOptions($options)
266 266
     {
267
-        foreach($options as $name => $value) {
267
+        foreach ($options as $name => $value) {
268 268
             $this->setOption($name, $value);
269 269
         }
270 270
 
@@ -302,7 +302,7 @@  discard block
 block discarded – undo
302 302
      */
303 303
     public static function xmlrpc_debugmsg($msg)
304 304
     {
305
-        static::$_xmlrpc_debuginfo .= $msg . "\n";
305
+        static::$_xmlrpc_debuginfo .= $msg."\n";
306 306
     }
307 307
 
308 308
     /**
@@ -314,7 +314,7 @@  discard block
 block discarded – undo
314 314
      */
315 315
     public static function error_occurred($msg)
316 316
     {
317
-        static::$_xmlrpcs_occurred_errors .= $msg . "\n";
317
+        static::$_xmlrpcs_occurred_errors .= $msg."\n";
318 318
     }
319 319
 
320 320
     /**
@@ -335,10 +335,10 @@  discard block
 block discarded – undo
335 335
         // user debug info should be encoded by the end user using the INTERNAL_ENCODING
336 336
         $out = '';
337 337
         if ($this->debug_info != '') {
338
-            $out .= "<!-- SERVER DEBUG INFO (BASE64 ENCODED):\n" . base64_encode($this->debug_info) . "\n-->\n";
338
+            $out .= "<!-- SERVER DEBUG INFO (BASE64 ENCODED):\n".base64_encode($this->debug_info)."\n-->\n";
339 339
         }
340 340
         if (static::$_xmlrpc_debuginfo != '') {
341
-            $out .= "<!-- DEBUG INFO:\n" . $this->getCharsetEncoder()->encodeEntities(str_replace('--', '_-', static::$_xmlrpc_debuginfo), PhpXmlRpc::$xmlrpc_internalencoding, $charsetEncoding) . "\n-->\n";
341
+            $out .= "<!-- DEBUG INFO:\n".$this->getCharsetEncoder()->encodeEntities(str_replace('--', '_-', static::$_xmlrpc_debuginfo), PhpXmlRpc::$xmlrpc_internalencoding, $charsetEncoding)."\n-->\n";
342 342
             // NB: a better solution MIGHT be to use CDATA, but we need to insert it
343 343
             // into return payload AFTER the beginning tag
344 344
             //$out .= "<![CDATA[ DEBUG INFO:\n\n" . str_replace(']]>', ']_]_>', static::$_xmlrpc_debuginfo) . "\n]]>\n";
@@ -367,8 +367,8 @@  discard block
 block discarded – undo
367 367
         $this->debug_info = '';
368 368
 
369 369
         // Save what we received, before parsing it
370
-        if ($this->debug > 1) {
371
-            $this->debugMsg("+++GOT+++\n" . $data . "\n+++END+++");
370
+        if ($this->debug>1) {
371
+            $this->debugMsg("+++GOT+++\n".$data."\n+++END+++");
372 372
         }
373 373
 
374 374
         $resp = $this->parseRequestHeaders($data, $reqCharset, $respCharset, $respEncoding);
@@ -385,13 +385,13 @@  discard block
 block discarded – undo
385 385
             $resp->raw_data = $rawData;
386 386
         }
387 387
 
388
-        if ($this->debug > 2 && static::$_xmlrpcs_occurred_errors != '') {
389
-            $this->debugMsg("+++PROCESSING ERRORS AND WARNINGS+++\n" .
390
-                static::$_xmlrpcs_occurred_errors . "+++END+++");
388
+        if ($this->debug>2 && static::$_xmlrpcs_occurred_errors != '') {
389
+            $this->debugMsg("+++PROCESSING ERRORS AND WARNINGS+++\n".
390
+                static::$_xmlrpcs_occurred_errors."+++END+++");
391 391
         }
392 392
 
393 393
         $header = $resp->xml_header($respCharset);
394
-        if ($this->debug > 0) {
394
+        if ($this->debug>0) {
395 395
             $header .= $this->serializeDebug($respCharset);
396 396
         }
397 397
 
@@ -402,7 +402,7 @@  discard block
 block discarded – undo
402 402
         if (empty($payload)) {
403 403
             $payload = $resp->serialize($respCharset);
404 404
         }
405
-        $payload = $header . $payload;
405
+        $payload = $header.$payload;
406 406
 
407 407
         if ($returnPayload) {
408 408
             return $payload;
@@ -411,7 +411,7 @@  discard block
 block discarded – undo
411 411
         // if we get a warning/error that has output some text before here, then we cannot
412 412
         // add a new header. We cannot say we are sending xml, either...
413 413
         if (!headers_sent()) {
414
-            header('Content-Type: ' . $resp->getContentType());
414
+            header('Content-Type: '.$resp->getContentType());
415 415
             // we do not know if client actually told us an accepted charset, but if it did we have to tell it what we did
416 416
             header("Vary: Accept-Charset");
417 417
 
@@ -434,12 +434,12 @@  discard block
 block discarded – undo
434 434
             // Note that Apache/mod_php will add (and even alter!) the Content-Length header on its own, but only for
435 435
             // responses up to 8000 bytes
436 436
             if ($phpNoSelfCompress) {
437
-                header('Content-Length: ' . (int)strlen($payload));
437
+                header('Content-Length: '.(int) strlen($payload));
438 438
             }
439 439
         } else {
440 440
             /// @todo allow the user to easily subclass this in a way which allows the resp. headers to be already sent
441 441
             ///       by now without flagging it as an error. Possibly check for presence of Content-Type header
442
-            $this->getLogger()->error('XML-RPC: ' . __METHOD__ . ': http headers already sent before response is fully generated. Check for php warning or error messages');
442
+            $this->getLogger()->error('XML-RPC: '.__METHOD__.': http headers already sent before response is fully generated. Check for php warning or error messages');
443 443
         }
444 444
 
445 445
         print $payload;
@@ -528,9 +528,9 @@  discard block
 block discarded – undo
528 528
             $numParams = count($in);
529 529
         }
530 530
         foreach ($sigs as $curSig) {
531
-            if (count($curSig) == $numParams + 1) {
531
+            if (count($curSig) == $numParams+1) {
532 532
                 $itsOK = 1;
533
-                for ($n = 0; $n < $numParams; $n++) {
533
+                for ($n = 0; $n<$numParams; $n++) {
534 534
                     if (is_object($in)) {
535 535
                         $p = $in->getParam($n);
536 536
                         if ($p->kindOf() == 'scalar') {
@@ -543,10 +543,10 @@  discard block
 block discarded – undo
543 543
                     }
544 544
 
545 545
                     // param index is $n+1, as first member of sig is return type
546
-                    if ($pt != $curSig[$n + 1] && $curSig[$n + 1] != Value::$xmlrpcValue) {
546
+                    if ($pt != $curSig[$n+1] && $curSig[$n+1] != Value::$xmlrpcValue) {
547 547
                         $itsOK = 0;
548
-                        $pno = $n + 1;
549
-                        $wanted = $curSig[$n + 1];
548
+                        $pno = $n+1;
549
+                        $wanted = $curSig[$n+1];
550 550
                         $got = $pt;
551 551
                         break;
552 552
                     }
@@ -573,10 +573,10 @@  discard block
 block discarded – undo
573 573
         // check if $_SERVER is populated: it might have been disabled via ini file
574 574
         // (this is true even when in CLI mode)
575 575
         if (count($_SERVER) == 0) {
576
-            $this->getLogger()->error('XML-RPC: ' . __METHOD__ . ': cannot parse request headers as $_SERVER is not populated');
576
+            $this->getLogger()->error('XML-RPC: '.__METHOD__.': cannot parse request headers as $_SERVER is not populated');
577 577
         }
578 578
 
579
-        if ($this->debug > 1) {
579
+        if ($this->debug>1) {
580 580
             if (function_exists('getallheaders')) {
581 581
                 $this->debugMsg(''); // empty line
582 582
                 foreach (getallheaders() as $name => $val) {
@@ -601,13 +601,13 @@  discard block
 block discarded – undo
601 601
                 if (function_exists('gzinflate') && in_array($contentEncoding, $this->accepted_compression)) {
602 602
                     if ($contentEncoding == 'deflate' && $degzdata = @gzuncompress($data)) {
603 603
                         $data = $degzdata;
604
-                        if ($this->debug > 1) {
605
-                            $this->debugMsg("\n+++INFLATED REQUEST+++[" . strlen($data) . " chars]+++\n" . $data . "\n+++END+++");
604
+                        if ($this->debug>1) {
605
+                            $this->debugMsg("\n+++INFLATED REQUEST+++[".strlen($data)." chars]+++\n".$data."\n+++END+++");
606 606
                         }
607 607
                     } elseif ($contentEncoding == 'gzip' && $degzdata = @gzinflate(substr($data, 10))) {
608 608
                         $data = $degzdata;
609
-                        if ($this->debug > 1) {
610
-                            $this->debugMsg("+++INFLATED REQUEST+++[" . strlen($data) . " chars]+++\n" . $data . "\n+++END+++");
609
+                        if ($this->debug>1) {
610
+                            $this->debugMsg("+++INFLATED REQUEST+++[".strlen($data)." chars]+++\n".$data."\n+++END+++");
611 611
                         }
612 612
                     } else {
613 613
                         $r = new static::$responseClass(0, PhpXmlRpc::$xmlrpcerr['server_decompress_fail'],
@@ -695,7 +695,7 @@  discard block
 block discarded – undo
695 695
                     if ($reqEncoding == 'ISO-8859-1') {
696 696
                         $data = utf8_encode($data);
697 697
                     } else {
698
-                        $this->getLogger()->error('XML-RPC: ' . __METHOD__ . ': unsupported charset encoding of received request: ' . $reqEncoding);
698
+                        $this->getLogger()->error('XML-RPC: '.__METHOD__.': unsupported charset encoding of received request: '.$reqEncoding);
699 699
                     }
700 700
                 }
701 701
             }
@@ -729,7 +729,7 @@  discard block
 block discarded – undo
729 729
             preg_match('/^XML error ([0-9]+)/', $_xh['isf_reason'], $matches);
730 730
             return new static::$responseClass(
731 731
                 0,
732
-                PhpXmlRpc::$xmlrpcerrxml + (int)$matches[1],
732
+                PhpXmlRpc::$xmlrpcerrxml+(int) $matches[1],
733 733
                 $_xh['isf_reason']);
734 734
         } elseif ($_xh['isf']) {
735 735
             /// @todo separate better the various cases, as we have done in Request::parseResponse: invalid xml-rpc vs.
@@ -737,7 +737,7 @@  discard block
 block discarded – undo
737 737
             return new static::$responseClass(
738 738
                 0,
739 739
                 PhpXmlRpc::$xmlrpcerr['invalid_request'],
740
-                PhpXmlRpc::$xmlrpcstr['invalid_request'] . ' ' . $_xh['isf_reason']);
740
+                PhpXmlRpc::$xmlrpcstr['invalid_request'].' '.$_xh['isf_reason']);
741 741
         } else {
742 742
             // small layering violation in favor of speed and memory usage: we should allow the 'execute' method handle
743 743
             // this, but in the most common scenario (xml-rpc values type server with some methods registered as phpvals)
@@ -747,8 +747,8 @@  discard block
 block discarded – undo
747 747
                     ($this->dmap[$_xh['method']]['parameters_type'] != 'xmlrpcvals')
748 748
                 )
749 749
             ) {
750
-                if ($this->debug > 1) {
751
-                    $this->debugMsg("\n+++PARSED+++\n" . var_export($_xh['params'], true) . "\n+++END+++");
750
+                if ($this->debug>1) {
751
+                    $this->debugMsg("\n+++PARSED+++\n".var_export($_xh['params'], true)."\n+++END+++");
752 752
                 }
753 753
 
754 754
                 return $this->execute($_xh['method'], $_xh['params'], $_xh['pt']);
@@ -756,12 +756,12 @@  discard block
 block discarded – undo
756 756
                 // build a Request object with data parsed from xml and add parameters in
757 757
                 $req = new Request($_xh['method']);
758 758
                 /// @todo for more speed, we could just pass in the array to the constructor (and loose the type validation)...
759
-                for ($i = 0; $i < count($_xh['params']); $i++) {
759
+                for ($i = 0; $i<count($_xh['params']); $i++) {
760 760
                     $req->addParam($_xh['params'][$i]);
761 761
                 }
762 762
 
763
-                if ($this->debug > 1) {
764
-                    $this->debugMsg("\n+++PARSED+++\n" . var_export($req, true) . "\n+++END+++");
763
+                if ($this->debug>1) {
764
+                    $this->debugMsg("\n+++PARSED+++\n".var_export($req, true)."\n+++END+++");
765 765
                 }
766 766
 
767 767
                 return $this->execute($req);
@@ -811,7 +811,7 @@  discard block
 block discarded – undo
811 811
                 return new static::$responseClass(
812 812
                     0,
813 813
                     PhpXmlRpc::$xmlrpcerr['incorrect_params'],
814
-                    PhpXmlRpc::$xmlrpcstr['incorrect_params'] . ": {$errStr}"
814
+                    PhpXmlRpc::$xmlrpcstr['incorrect_params'].": {$errStr}"
815 815
                 );
816 816
             }
817 817
         }
@@ -826,7 +826,7 @@  discard block
 block discarded – undo
826 826
         // build string representation of function 'name'
827 827
         if (is_array($func)) {
828 828
             if (is_object($func[0])) {
829
-                $funcName = get_class($func[0]) . '->' . $func[1];
829
+                $funcName = get_class($func[0]).'->'.$func[1];
830 830
             } else {
831 831
                 $funcName = implode('::', $func);
832 832
             }
@@ -838,16 +838,16 @@  discard block
 block discarded – undo
838 838
 
839 839
         // verify that function to be invoked is in fact callable
840 840
         if (!is_callable($func)) {
841
-            $this->getLogger()->error("XML-RPC: " . __METHOD__ . ": function '$funcName' registered as method handler is not callable");
841
+            $this->getLogger()->error("XML-RPC: ".__METHOD__.": function '$funcName' registered as method handler is not callable");
842 842
             return new static::$responseClass(
843 843
                 0,
844 844
                 PhpXmlRpc::$xmlrpcerr['server_error'],
845
-                PhpXmlRpc::$xmlrpcstr['server_error'] . ": no function matches method"
845
+                PhpXmlRpc::$xmlrpcstr['server_error'].": no function matches method"
846 846
             );
847 847
         }
848 848
 
849 849
         if (isset($dmap[$methodName]['exception_handling'])) {
850
-            $exception_handling = (int)$dmap[$methodName]['exception_handling'];
850
+            $exception_handling = (int) $dmap[$methodName]['exception_handling'];
851 851
         } else {
852 852
             $exception_handling = $this->exception_handling;
853 853
         }
@@ -868,14 +868,14 @@  discard block
 block discarded – undo
868 868
                     $r = call_user_func($func, $req);
869 869
                 }
870 870
                 if (!is_a($r, 'PhpXmlRpc\Response')) {
871
-                    $this->getLogger()->error("XML-RPC: " . __METHOD__ . ": function '$funcName' registered as method handler does not return an xmlrpc response object but a " . gettype($r));
871
+                    $this->getLogger()->error("XML-RPC: ".__METHOD__.": function '$funcName' registered as method handler does not return an xmlrpc response object but a ".gettype($r));
872 872
                     if (is_a($r, 'PhpXmlRpc\Value')) {
873 873
                         $r = new static::$responseClass($r);
874 874
                     } else {
875 875
                         $r = new static::$responseClass(
876 876
                             0,
877 877
                             PhpXmlRpc::$xmlrpcerr['server_error'],
878
-                            PhpXmlRpc::$xmlrpcstr['server_error'] . ": function does not return xmlrpc response object"
878
+                            PhpXmlRpc::$xmlrpcstr['server_error'].": function does not return xmlrpc response object"
879 879
                         );
880 880
                     }
881 881
                 }
@@ -890,7 +890,7 @@  discard block
 block discarded – undo
890 890
                         $r = call_user_func_array($func, array($methodName, $params, $this->user_data));
891 891
                         // mimic EPI behaviour: if we get an array that looks like an error, make it an error response
892 892
                         if (is_array($r) && array_key_exists('faultCode', $r) && array_key_exists('faultString', $r)) {
893
-                            $r = new static::$responseClass(0, (integer)$r['faultCode'], (string)$r['faultString']);
893
+                            $r = new static::$responseClass(0, (integer) $r['faultCode'], (string) $r['faultString']);
894 894
                         } else {
895 895
                             // functions using EPI api should NOT return resp objects, so make sure we encode the
896 896
                             // return type correctly
@@ -1021,7 +1021,7 @@  discard block
 block discarded – undo
1021 1021
      */
1022 1022
     protected function debugMsg($string)
1023 1023
     {
1024
-        $this->debug_info .= $string . "\n";
1024
+        $this->debug_info .= $string."\n";
1025 1025
     }
1026 1026
 
1027 1027
     /**
@@ -1312,7 +1312,7 @@  discard block
 block discarded – undo
1312 1312
                 $i++; // for error message, we count params from 1
1313 1313
                 return static::_xmlrpcs_multicall_error(new static::$responseClass(0,
1314 1314
                     PhpXmlRpc::$xmlrpcerr['incorrect_params'],
1315
-                    PhpXmlRpc::$xmlrpcstr['incorrect_params'] . ": probable xml error in param " . $i));
1315
+                    PhpXmlRpc::$xmlrpcstr['incorrect_params'].": probable xml error in param ".$i));
1316 1316
             }
1317 1317
         }
1318 1318
 
@@ -1393,7 +1393,7 @@  discard block
 block discarded – undo
1393 1393
             }
1394 1394
         } else {
1395 1395
             $numCalls = count($req);
1396
-            for ($i = 0; $i < $numCalls; $i++) {
1396
+            for ($i = 0; $i<$numCalls; $i++) {
1397 1397
                 $result[$i] = static::_xmlrpcs_multicall_do_call_phpvals($server, $req[$i]);
1398 1398
             }
1399 1399
         }
@@ -1421,7 +1421,7 @@  discard block
 block discarded – undo
1421 1421
         // From PHP 8.4 the E_STRICT constant has been deprecated and will emit deprecation notices.
1422 1422
         // PHP core and core extensions since PHP 8.0 and later do not emit E_STRICT notices at all.
1423 1423
         // On PHP 7 series before PHP 7.4, some functions conditionally emit E_STRICT notices.
1424
-        if (PHP_VERSION_ID >= 70400) {
1424
+        if (PHP_VERSION_ID>=70400) {
1425 1425
             static::error_occurred($errString);
1426 1426
         } elseif ($errCode != E_STRICT) {
1427 1427
                 static::error_occurred($errString);
@@ -1462,12 +1462,12 @@  discard block
 block discarded – undo
1462 1462
      */
1463 1463
     protected function xml_header($charsetEncoding = '')
1464 1464
     {
1465
-        $this->logDeprecation('Method ' . __METHOD__ . ' is deprecated');
1465
+        $this->logDeprecation('Method '.__METHOD__.' is deprecated');
1466 1466
 
1467 1467
         if ($charsetEncoding != '') {
1468
-            return "<?xml version=\"1.0\" encoding=\"$charsetEncoding\"?" . ">\n";
1468
+            return "<?xml version=\"1.0\" encoding=\"$charsetEncoding\"?".">\n";
1469 1469
         } else {
1470
-            return "<?xml version=\"1.0\"?" . ">\n";
1470
+            return "<?xml version=\"1.0\"?".">\n";
1471 1471
         }
1472 1472
     }
1473 1473
 
@@ -1483,7 +1483,7 @@  discard block
 block discarded – undo
1483 1483
             case self::OPT_FUNCTIONS_PARAMETERS_TYPE:
1484 1484
             case self::OPT_PHPVALS_ENCODING_OPTIONS:
1485 1485
             case self::OPT_RESPONSE_CHARSET_ENCODING:
1486
-                $this->logDeprecation('Getting property Request::' . $name . ' is deprecated');
1486
+                $this->logDeprecation('Getting property Request::'.$name.' is deprecated');
1487 1487
                 return $this->$name;
1488 1488
             case 'accepted_charset_encodings':
1489 1489
                 // manually implement the 'protected property' behaviour
@@ -1495,16 +1495,16 @@  discard block
 block discarded – undo
1495 1495
                     }
1496 1496
                 }
1497 1497
                 if ($canAccess) {
1498
-                    $this->logDeprecation('Getting property Request::' . $name . ' is deprecated');
1498
+                    $this->logDeprecation('Getting property Request::'.$name.' is deprecated');
1499 1499
                     return $this->accepted_compression;
1500 1500
                 } else {
1501
-                    trigger_error("Cannot access protected property Server::accepted_charset_encodings in " . __FILE__, E_USER_ERROR);
1501
+                    trigger_error("Cannot access protected property Server::accepted_charset_encodings in ".__FILE__, E_USER_ERROR);
1502 1502
                 }
1503 1503
                 break;
1504 1504
             default:
1505 1505
                 /// @todo throw instead? There are very few other places where the lib trigger errors which can potentially reach stdout...
1506 1506
                 $trace = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 1);
1507
-                trigger_error('Undefined property via __get(): ' . $name . ' in ' . $trace[0]['file'] . ' on line ' . $trace[0]['line'], E_USER_WARNING);
1507
+                trigger_error('Undefined property via __get(): '.$name.' in '.$trace[0]['file'].' on line '.$trace[0]['line'], E_USER_WARNING);
1508 1508
                 $result = null;
1509 1509
                 return $result;
1510 1510
         }
@@ -1521,7 +1521,7 @@  discard block
 block discarded – undo
1521 1521
             case self::OPT_FUNCTIONS_PARAMETERS_TYPE:
1522 1522
             case self::OPT_PHPVALS_ENCODING_OPTIONS:
1523 1523
             case self::OPT_RESPONSE_CHARSET_ENCODING:
1524
-                $this->logDeprecation('Setting property Request::' . $name . ' is deprecated');
1524
+                $this->logDeprecation('Setting property Request::'.$name.' is deprecated');
1525 1525
                 $this->$name = $value;
1526 1526
                 break;
1527 1527
             case 'accepted_charset_encodings':
@@ -1534,16 +1534,16 @@  discard block
 block discarded – undo
1534 1534
                     }
1535 1535
                 }
1536 1536
                 if ($canAccess) {
1537
-                    $this->logDeprecation('Setting property Request::' . $name . ' is deprecated');
1537
+                    $this->logDeprecation('Setting property Request::'.$name.' is deprecated');
1538 1538
                     $this->accepted_compression = $value;
1539 1539
                 } else {
1540
-                    trigger_error("Cannot access protected property Server::accepted_charset_encodings in " . __FILE__, E_USER_ERROR);
1540
+                    trigger_error("Cannot access protected property Server::accepted_charset_encodings in ".__FILE__, E_USER_ERROR);
1541 1541
                 }
1542 1542
                 break;
1543 1543
             default:
1544 1544
                 /// @todo throw instead? There are very few other places where the lib trigger errors which can potentially reach stdout...
1545 1545
                 $trace = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 1);
1546
-                trigger_error('Undefined property via __set(): ' . $name . ' in ' . $trace[0]['file'] . ' on line ' . $trace[0]['line'], E_USER_WARNING);
1546
+                trigger_error('Undefined property via __set(): '.$name.' in '.$trace[0]['file'].' on line '.$trace[0]['line'], E_USER_WARNING);
1547 1547
         }
1548 1548
     }
1549 1549
 
@@ -1558,7 +1558,7 @@  discard block
 block discarded – undo
1558 1558
             case self::OPT_FUNCTIONS_PARAMETERS_TYPE:
1559 1559
             case self::OPT_PHPVALS_ENCODING_OPTIONS:
1560 1560
             case self::OPT_RESPONSE_CHARSET_ENCODING:
1561
-                $this->logDeprecation('Checking property Request::' . $name . ' is deprecated');
1561
+                $this->logDeprecation('Checking property Request::'.$name.' is deprecated');
1562 1562
                 return isset($this->$name);
1563 1563
             case 'accepted_charset_encodings':
1564 1564
                 // manually implement the 'protected property' behaviour
@@ -1570,7 +1570,7 @@  discard block
 block discarded – undo
1570 1570
                     }
1571 1571
                 }
1572 1572
                 if ($canAccess) {
1573
-                    $this->logDeprecation('Checking property Request::' . $name . ' is deprecated');
1573
+                    $this->logDeprecation('Checking property Request::'.$name.' is deprecated');
1574 1574
                     return isset($this->accepted_compression);
1575 1575
                 }
1576 1576
                 // break through voluntarily
@@ -1590,7 +1590,7 @@  discard block
 block discarded – undo
1590 1590
             case self::OPT_FUNCTIONS_PARAMETERS_TYPE:
1591 1591
             case self::OPT_PHPVALS_ENCODING_OPTIONS:
1592 1592
             case self::OPT_RESPONSE_CHARSET_ENCODING:
1593
-                $this->logDeprecation('Unsetting property Request::' . $name . ' is deprecated');
1593
+                $this->logDeprecation('Unsetting property Request::'.$name.' is deprecated');
1594 1594
                 unset($this->$name);
1595 1595
                 break;
1596 1596
             case 'accepted_charset_encodings':
@@ -1603,16 +1603,16 @@  discard block
 block discarded – undo
1603 1603
                     }
1604 1604
                 }
1605 1605
                 if ($canAccess) {
1606
-                    $this->logDeprecation('Unsetting property Request::' . $name . ' is deprecated');
1606
+                    $this->logDeprecation('Unsetting property Request::'.$name.' is deprecated');
1607 1607
                     unset($this->accepted_compression);
1608 1608
                 } else {
1609
-                    trigger_error("Cannot access protected property Server::accepted_charset_encodings in " . __FILE__, E_USER_ERROR);
1609
+                    trigger_error("Cannot access protected property Server::accepted_charset_encodings in ".__FILE__, E_USER_ERROR);
1610 1610
                 }
1611 1611
                 break;
1612 1612
             default:
1613 1613
                 /// @todo throw instead? There are very few other places where the lib trigger errors which can potentially reach stdout...
1614 1614
                 $trace = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 1);
1615
-                trigger_error('Undefined property via __unset(): ' . $name . ' in ' . $trace[0]['file'] . ' on line ' . $trace[0]['line'], E_USER_WARNING);
1615
+                trigger_error('Undefined property via __unset(): '.$name.' in '.$trace[0]['file'].' on line '.$trace[0]['line'], E_USER_WARNING);
1616 1616
         }
1617 1617
     }
1618 1618
 }
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/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/server/proxy.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@  discard block
 block discarded – undo
16 16
  * @license code licensed under the BSD License: see file license.txt
17 17
  */
18 18
 
19
-require_once __DIR__ . "/_prepend.php";
19
+require_once __DIR__."/_prepend.php";
20 20
 
21 21
 // *** NB: WE BLOCK THIS FROM RUNNING BY DEFAULT IN CASE ACCESS IS GRANTED TO IT IN PRODUCTION BY MISTAKE ***
22 22
 // Comment out the following safeguard if you want to use it as is, but remember: this is an open relay !!!
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
     //            fe. any url using the 'file://' protocol might be considered a hacking attempt
48 48
     $client = new Client($url);
49 49
 
50
-    if ($req->getNumParams() > 3) {
50
+    if ($req->getNumParams()>3) {
51 51
         // We have to set some options onto the client.
52 52
         // Note that if we do not untaint the received values, warnings might be generated...
53 53
         $options = $encoder->decode($req->getParam(3));
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
                     $client->setOption(Client::OPT_VERIFY_PEER, $val);
88 88
                     break;
89 89
                 case 'Timeout':
90
-                    $timeout = (integer)$val;
90
+                    $timeout = (integer) $val;
91 91
                     break;
92 92
             } // switch
93 93
         }
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
     ///         X-forwarded-for anyway, unless they consider this server as trusted...)
101 101
     $reqMethod = $req->getParam(1)->scalarVal();
102 102
     $req = new Request($reqMethod);
103
-    if ($req->getNumParams() > 1) {
103
+    if ($req->getNumParams()>1) {
104 104
         $pars = $req->getParam(2);
105 105
         foreach ($pars as $par) {
106 106
             $req->addParam($par);
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
     }
109 109
 
110 110
     // add debug info into response we give back to caller
111
-    Server::xmlrpc_debugmsg("Sending to server $url the payload: " . $req->serialize());
111
+    Server::xmlrpc_debugmsg("Sending to server $url the payload: ".$req->serialize());
112 112
 
113 113
     return $client->send($req, $timeout);
114 114
 }
Please login to merge, or discard this patch.