Passed
Push — master ( 37ab4f...c74cc3 )
by Gaetano
07:51 queued 43s
created
src/Value.php 1 patch
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -119,7 +119,7 @@  discard block
 block discarded – undo
119 119
                     $this->me['struct'] = $val;
120 120
                     break;
121 121
                 default:
122
-                    $this->getLogger()->errorLog("XML-RPC: " . __METHOD__ . ": not a known type ($type)");
122
+                    $this->getLogger()->errorLog("XML-RPC: ".__METHOD__.": not a known type ($type)");
123 123
             }
124 124
         }
125 125
     }
@@ -144,7 +144,7 @@  discard block
 block discarded – undo
144 144
         }
145 145
 
146 146
         if ($typeOf !== 1) {
147
-            $this->getLogger()->errorLog("XML-RPC: " . __METHOD__ . ": not a scalar type ($type)");
147
+            $this->getLogger()->errorLog("XML-RPC: ".__METHOD__.": not a scalar type ($type)");
148 148
             return 0;
149 149
         }
150 150
 
@@ -161,10 +161,10 @@  discard block
 block discarded – undo
161 161
 
162 162
         switch ($this->mytype) {
163 163
             case 1:
164
-                $this->getLogger()->errorLog('XML-RPC: ' . __METHOD__ . ': scalar xmlrpc value can have only one value');
164
+                $this->getLogger()->errorLog('XML-RPC: '.__METHOD__.': scalar xmlrpc value can have only one value');
165 165
                 return 0;
166 166
             case 3:
167
-                $this->getLogger()->errorLog('XML-RPC: ' . __METHOD__ . ': cannot add anonymous scalar to struct xmlrpc value');
167
+                $this->getLogger()->errorLog('XML-RPC: '.__METHOD__.': cannot add anonymous scalar to struct xmlrpc value');
168 168
                 return 0;
169 169
             case 2:
170 170
                 // we're adding a scalar value to an array here
@@ -206,7 +206,7 @@  discard block
 block discarded – undo
206 206
 
207 207
             return 1;
208 208
         } else {
209
-            $this->getLogger()->errorLog('XML-RPC: ' . __METHOD__ . ': already initialized as a [' . $this->kindOf() . ']');
209
+            $this->getLogger()->errorLog('XML-RPC: '.__METHOD__.': already initialized as a ['.$this->kindOf().']');
210 210
             return 0;
211 211
         }
212 212
     }
@@ -237,7 +237,7 @@  discard block
 block discarded – undo
237 237
 
238 238
             return 1;
239 239
         } else {
240
-            $this->getLogger()->errorLog('XML-RPC: ' . __METHOD__ . ': already initialized as a [' . $this->kindOf() . ']');
240
+            $this->getLogger()->errorLog('XML-RPC: '.__METHOD__.': already initialized as a ['.$this->kindOf().']');
241 241
             return 0;
242 242
         }
243 243
     }
@@ -279,19 +279,19 @@  discard block
 block discarded – undo
279 279
             case 1:
280 280
                 switch ($typ) {
281 281
                     case static::$xmlrpcBase64:
282
-                        $rs .= "<${typ}>" . base64_encode($val) . "</${typ}>";
282
+                        $rs .= "<${typ}>".base64_encode($val)."</${typ}>";
283 283
                         break;
284 284
                     case static::$xmlrpcBoolean:
285
-                        $rs .= "<${typ}>" . ($val ? '1' : '0') . "</${typ}>";
285
+                        $rs .= "<${typ}>".($val ? '1' : '0')."</${typ}>";
286 286
                         break;
287 287
                     case static::$xmlrpcString:
288 288
                         // Do NOT use htmlentities, since it will produce named html entities, which are invalid xml
289
-                        $rs .= "<${typ}>" . $this->getCharsetEncoder()->encodeEntities($val, PhpXmlRpc::$xmlrpc_internalencoding, $charsetEncoding) . "</${typ}>";
289
+                        $rs .= "<${typ}>".$this->getCharsetEncoder()->encodeEntities($val, PhpXmlRpc::$xmlrpc_internalencoding, $charsetEncoding)."</${typ}>";
290 290
                         break;
291 291
                     case static::$xmlrpcInt:
292 292
                     case static::$xmlrpcI4:
293 293
                     case static::$xmlrpcI8:
294
-                        $rs .= "<${typ}>" . (int)$val . "</${typ}>";
294
+                        $rs .= "<${typ}>".(int) $val."</${typ}>";
295 295
                         break;
296 296
                     case static::$xmlrpcDouble:
297 297
                         // avoid using standard conversion of float to string because it is locale-dependent,
@@ -299,15 +299,15 @@  discard block
 block discarded – undo
299 299
                         // sprintf('%F') could be most likely ok but it fails eg. on 2e-14.
300 300
                         // The code below tries its best at keeping max precision while avoiding exp notation,
301 301
                         // but there is of course no limit in the number of decimal places to be used...
302
-                        $rs .= "<${typ}>" . preg_replace('/\\.?0+$/', '', number_format((double)$val, PhpXmlRpc::$xmlpc_double_precision, '.', '')) . "</${typ}>";
302
+                        $rs .= "<${typ}>".preg_replace('/\\.?0+$/', '', number_format((double) $val, PhpXmlRpc::$xmlpc_double_precision, '.', ''))."</${typ}>";
303 303
                         break;
304 304
                     case static::$xmlrpcDateTime:
305 305
                         if (is_string($val)) {
306 306
                             $rs .= "<${typ}>${val}</${typ}>";
307 307
                         } elseif (is_a($val, 'DateTime') || is_a($val, 'DateTimeInterface')) {
308
-                            $rs .= "<${typ}>" . $val->format('Ymd\TH:i:s') . "</${typ}>";
308
+                            $rs .= "<${typ}>".$val->format('Ymd\TH:i:s')."</${typ}>";
309 309
                         } elseif (is_int($val)) {
310
-                            $rs .= "<${typ}>" . date('Ymd\TH:i:s', $val) . "</${typ}>";
310
+                            $rs .= "<${typ}>".date('Ymd\TH:i:s', $val)."</${typ}>";
311 311
                         } else {
312 312
                             // not really a good idea here: but what should we output anyway? left for backward compat...
313 313
                             $rs .= "<${typ}>${val}</${typ}>";
@@ -329,14 +329,14 @@  discard block
 block discarded – undo
329 329
             case 3:
330 330
                 // struct
331 331
                 if ($this->_php_class) {
332
-                    $rs .= '<struct php_class="' . $this->_php_class . "\">\n";
332
+                    $rs .= '<struct php_class="'.$this->_php_class."\">\n";
333 333
                 } else {
334 334
                     $rs .= "<struct>\n";
335 335
                 }
336 336
                 $charsetEncoder = $this->getCharsetEncoder();
337 337
                 /** @var Value $val2 */
338 338
                 foreach ($val as $key2 => $val2) {
339
-                    $rs .= '<member><name>' . $charsetEncoder->encodeEntities($key2, PhpXmlRpc::$xmlrpc_internalencoding, $charsetEncoding) . "</name>\n";
339
+                    $rs .= '<member><name>'.$charsetEncoder->encodeEntities($key2, PhpXmlRpc::$xmlrpc_internalencoding, $charsetEncoding)."</name>\n";
340 340
                     //$rs.=$this->serializeval($val2);
341 341
                     $rs .= $val2->serialize($charsetEncoding);
342 342
                     $rs .= "</member>\n";
@@ -372,7 +372,7 @@  discard block
 block discarded – undo
372 372
         $val = reset($this->me);
373 373
         $typ = key($this->me);
374 374
 
375
-        return '<value>' . $this->serializedata($typ, $val, $charsetEncoding) . "</value>\n";
375
+        return '<value>'.$this->serializedata($typ, $val, $charsetEncoding)."</value>\n";
376 376
     }
377 377
 
378 378
     /**
Please login to merge, or discard this patch.