Passed
Push — master ( 67ed62...5da465 )
by Gaetano
02:56
created
pakefile.php 1 patch
Braces   +7 added lines, -6 removed lines patch added patch discarded remove patch
@@ -27,8 +27,9 @@  discard block
 block discarded – undo
27 27
 
28 28
     public static function libVersion()
29 29
     {
30
-        if (self::$libVersion == null)
31
-            throw new \Exception('Missing library version argument');
30
+        if (self::$libVersion == null) {
31
+                    throw new \Exception('Missing library version argument');
32
+        }
32 33
         return self::$libVersion;
33 34
     }
34 35
 
@@ -59,9 +60,10 @@  discard block
 block discarded – undo
59 60
 
60 61
     public static function getOpts($args=array(), $cliOpts=array())
61 62
     {
62
-        if (count($args) > 0)
63
-        //    throw new \Exception('Missing library version argument');
63
+        if (count($args) > 0) {
64
+                //    throw new \Exception('Missing library version argument');
64 65
             self::$libVersion = $args[0];
66
+        }
65 67
 
66 68
         foreach (self::$tools as $name => $binary) {
67 69
             if (isset($cliOpts[$name])) {
@@ -338,8 +340,7 @@  discard block
 block discarded – undo
338 340
             $cmd = Builder::tool('zip');
339 341
             $extra = '-9 -r';
340 342
             pake_sh("$cmd $distFile $extra ".basename(Builder::distDir()));
341
-        }
342
-        else {
343
+        } else {
343 344
             $finder = pakeFinder::type('any')->pattern(basename(Builder::distDir()).'/**');
344 345
             // see https://bugs.php.net/bug.php?id=58852
345 346
             $pharFile = str_replace(Builder::libVersion(), '_LIBVERSION_', $distFile);
Please login to merge, or discard this patch.
debugger/action.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -367,7 +367,9 @@
 block discarded – undo
367 367
                                 echo "<code>OUT:&nbsp;" . htmlspecialchars($ret->scalarval(), ENT_COMPAT, \PhpXmlRpc\PhpXmlRpc::$xmlrpc_internalencoding) . "<br />IN: (";
368 368
                                 if ($x->count() > 1) {
369 369
                                     foreach($x as $k => $y) {
370
-                                        if ($k == 0) continue;
370
+                                        if ($k == 0) {
371
+                                            continue;
372
+                                        }
371 373
                                         echo htmlspecialchars($y->scalarval(), ENT_COMPAT, \PhpXmlRpc\PhpXmlRpc::$xmlrpc_internalencoding);
372 374
                                         if ($wstype != 1) {
373 375
                                             $type = $y->scalarval();
Please login to merge, or discard this patch.
demo/server/server.php 1 patch
Braces   +6 added lines, -5 removed lines patch added patch discarded remove patch
@@ -209,11 +209,12 @@
 block discarded – undo
209 209
     $a = $req->getParam(0);
210 210
     $b = $req->getParam(1);
211 211
 
212
-    if ($a->scalartyp() == Value::$xmlrpcNull)
213
-        return new PhpXmlRpc\Response(new Value(inner_findstate($b->scalarval())));
214
-    else
215
-        return new PhpXmlRpc\Response(new Value(inner_findstate($a->scalarval())));
216
-}
212
+    if ($a->scalartyp() == Value::$xmlrpcNull) {
213
+            return new PhpXmlRpc\Response(new Value(inner_findstate($b->scalarval())));
214
+    } else {
215
+            return new PhpXmlRpc\Response(new Value(inner_findstate($a->scalarval())));
216
+    }
217
+    }
217 218
 
218 219
 $addtwo_sig = array(array(Value::$xmlrpcInt, Value::$xmlrpcInt, Value::$xmlrpcInt));
219 220
 $addtwo_doc = 'Add two integers together and return the result';
Please login to merge, or discard this patch.
src/Wrapper.php 1 patch
Braces   +4 added lines, -3 removed lines patch added patch discarded remove patch
@@ -561,8 +561,9 @@  discard block
 block discarded – undo
561 561
         }
562 562
         foreach ($parsVariations as $i => $pars) {
563 563
             $innerCode .= "if (\$paramCount == " . count($pars) . ") \$retval = {$catchWarnings}$realFuncName(" . implode(',', $pars) . ");\n";
564
-            if ($i < (count($parsVariations) - 1))
565
-                $innerCode .= "else\n";
564
+            if ($i < (count($parsVariations) - 1)) {
565
+                            $innerCode .= "else\n";
566
+            }
566 567
         }
567 568
         $innerCode .= "if (is_a(\$retval, '{$namespace}Response')) return \$retval; else\n";
568 569
         if ($funcDesc['returns'] == Value::$xmlrpcDateTime || $funcDesc['returns'] == Value::$xmlrpcBase64) {
@@ -615,7 +616,7 @@  discard block
 block discarded – undo
615 616
                         if ($methodWrap) {
616 617
                             if (is_object($className)) {
617 618
                                 $realClassName = get_class($className);
618
-                            }else {
619
+                            } else {
619 620
                                 $realClassName = $className;
620 621
                             }
621 622
                             $results[$prefix."$realClassName.$mName"] = $methodWrap;
Please login to merge, or discard this patch.
tests/1ParsingBugsTest.php 1 patch
Braces   +6 added lines, -4 removed lines patch added patch discarded remove patch
@@ -19,14 +19,16 @@
 block discarded – undo
19 19
     protected function set_up()
20 20
     {
21 21
         $this->args = argParser::getArgs();
22
-        if ($this->args['DEBUG'] == 1)
23
-            ob_start();
22
+        if ($this->args['DEBUG'] == 1) {
23
+                    ob_start();
24
+        }
24 25
     }
25 26
 
26 27
     protected function tear_down()
27 28
     {
28
-        if ($this->args['DEBUG'] != 1)
29
-            return;
29
+        if ($this->args['DEBUG'] != 1) {
30
+                    return;
31
+        }
30 32
         $out = ob_get_clean();
31 33
         $status = $this->getStatus();
32 34
         if ($status == PHPUnit_Runner_BaseTestRunner::STATUS_ERROR
Please login to merge, or discard this patch.
tests/4LocalhostMultiTest.php 1 patch
Braces   +4 added lines, -8 removed lines patch added patch discarded remove patch
@@ -201,8 +201,7 @@  discard block
 block discarded – undo
201 201
         {
202 202
             $this->markTestSkipped('CURL missing: cannot test http 1.1 w. proxy');
203 203
             return;
204
-        }
205
-        else if ($this->args['PROXYSERVER'] == '')
204
+        } else if ($this->args['PROXYSERVER'] == '')
206 205
         {
207 206
             $this->markTestSkipped('PROXYSERVER definition missing: cannot test proxy w. http 1.1');
208 207
             return;
@@ -226,8 +225,7 @@  discard block
 block discarded – undo
226 225
         {
227 226
             $this->markTestSkipped('CURL missing: cannot test https functionality');
228 227
             return;
229
-        }
230
-        else if ($this->args['HTTPSSERVER'] == '')
228
+        } else if ($this->args['HTTPSSERVER'] == '')
231 229
         {
232 230
             $this->markTestSkipped('HTTPS SERVER definition missing: cannot test https');
233 231
             return;
@@ -278,13 +276,11 @@  discard block
 block discarded – undo
278 276
         {
279 277
             $this->markTestSkipped('CURL missing: cannot test https w. proxy');
280 278
             return;
281
-        }
282
-        else if ($this->args['PROXYSERVER'] == '')
279
+        } else if ($this->args['PROXYSERVER'] == '')
283 280
         {
284 281
             $this->markTestSkipped('PROXYSERVER definition missing: cannot test proxy w. https');
285 282
             return;
286
-        }
287
-        else if ($this->args['HTTPSSERVER'] == '')
283
+        } else if ($this->args['HTTPSSERVER'] == '')
288 284
         {
289 285
             $this->markTestSkipped('HTTPS SERVER definition missing: cannot test https w. proxy');
290 286
             return;
Please login to merge, or discard this patch.
tests/2InvalidHostTest.php 1 patch
Braces   +6 added lines, -4 removed lines patch added patch discarded remove patch
@@ -22,14 +22,16 @@
 block discarded – undo
22 22
         $this->client = new xmlrpc_client('/NOTEXIST.php', $this->args['HTTPSERVER'], 80);
23 23
         $this->client->setDebug($this->args['DEBUG']);
24 24
 
25
-        if ($this->args['DEBUG'] == 1)
26
-            ob_start();
25
+        if ($this->args['DEBUG'] == 1) {
26
+                    ob_start();
27
+        }
27 28
     }
28 29
 
29 30
     protected function tear_down()
30 31
     {
31
-        if ($this->args['DEBUG'] != 1)
32
-            return;
32
+        if ($this->args['DEBUG'] != 1) {
33
+                    return;
34
+        }
33 35
         $out = ob_get_clean();
34 36
         $status = $this->getStatus();
35 37
         if ($status == PHPUnit_Runner_BaseTestRunner::STATUS_ERROR
Please login to merge, or discard this patch.
tests/3LocalhostTest.php 1 patch
Braces   +6 added lines, -4 removed lines patch added patch discarded remove patch
@@ -100,14 +100,16 @@
 block discarded – undo
100 100
 
101 101
         $this->coverageScriptUrl = 'http://' . $this->args['HTTPSERVER'] . '/' . str_replace( '/demo/server/server.php', 'tests/phpunit_coverage.php', $this->args['HTTPURI'] );
102 102
 
103
-        if ($this->args['DEBUG'] == 1)
104
-            ob_start();
103
+        if ($this->args['DEBUG'] == 1) {
104
+                    ob_start();
105
+        }
105 106
     }
106 107
 
107 108
     protected function tear_down()
108 109
     {
109
-        if ($this->args['DEBUG'] != 1)
110
-            return;
110
+        if ($this->args['DEBUG'] != 1) {
111
+                    return;
112
+        }
111 113
         $out = ob_get_clean();
112 114
         $status = $this->getStatus();
113 115
         if ($status == PHPUnit_Runner_BaseTestRunner::STATUS_ERROR
Please login to merge, or discard this patch.