@@ -27,8 +27,9 @@ discard block |
||
| 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 |
||
| 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 |
||
| 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); |
@@ -367,7 +367,9 @@ |
||
| 367 | 367 | echo "<code>OUT: " . 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(); |
@@ -209,11 +209,12 @@ |
||
| 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'; |
@@ -561,8 +561,9 @@ discard block |
||
| 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 |
||
| 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; |
@@ -141,9 +141,9 @@ |
||
| 141 | 141 | * @deprecated |
| 142 | 142 | */ |
| 143 | 143 | function build_remote_method_wrapper_code($client, $methodName, $xmlrpcFuncName, |
| 144 | - $mSig, $mDesc = '', $timeout = 0, $protocol = '', $clientCopyMode = 0, $prefix = 'xmlrpc', |
|
| 145 | - $decodePhpObjects = false, $encodePhpObjects = false, $decodeFault = false, |
|
| 146 | - $faultResponse = '', $namespace = '\\PhpXmlRpc\\') |
|
| 144 | + $mSig, $mDesc = '', $timeout = 0, $protocol = '', $clientCopyMode = 0, $prefix = 'xmlrpc', |
|
| 145 | + $decodePhpObjects = false, $encodePhpObjects = false, $decodeFault = false, |
|
| 146 | + $faultResponse = '', $namespace = '\\PhpXmlRpc\\') |
|
| 147 | 147 | { |
| 148 | 148 | $code = "function $xmlrpcFuncName ("; |
| 149 | 149 | if ($clientCopyMode < 2) { |
@@ -24,14 +24,16 @@ |
||
| 24 | 24 | $this->client = new xmlrpc_client('/NOTEXIST.php', $this->args['HTTPSERVER'], 80); |
| 25 | 25 | $this->client->setDebug($this->args['DEBUG']); |
| 26 | 26 | |
| 27 | - if ($this->args['DEBUG'] == 1) |
|
| 28 | - ob_start(); |
|
| 27 | + if ($this->args['DEBUG'] == 1) { |
|
| 28 | + ob_start(); |
|
| 29 | + } |
|
| 29 | 30 | } |
| 30 | 31 | |
| 31 | 32 | protected function tear_down() |
| 32 | 33 | { |
| 33 | - if ($this->args['DEBUG'] != 1) |
|
| 34 | - return; |
|
| 34 | + if ($this->args['DEBUG'] != 1) { |
|
| 35 | + return; |
|
| 36 | + } |
|
| 35 | 37 | $out = ob_get_clean(); |
| 36 | 38 | $status = $this->getStatus(); |
| 37 | 39 | if ($status == BaseTestRunner::STATUS_ERROR |
@@ -107,14 +107,16 @@ |
||
| 107 | 107 | |
| 108 | 108 | $this->coverageScriptUrl = 'http://' . $this->args['HTTPSERVER'] . '/' . str_replace( '/demo/server/server.php', 'tests/phpunit_coverage.php', $this->args['HTTPURI'] ); |
| 109 | 109 | |
| 110 | - if ($this->args['DEBUG'] == 1) |
|
| 111 | - ob_start(); |
|
| 110 | + if ($this->args['DEBUG'] == 1) { |
|
| 111 | + ob_start(); |
|
| 112 | + } |
|
| 112 | 113 | } |
| 113 | 114 | |
| 114 | 115 | protected function tear_down() |
| 115 | 116 | { |
| 116 | - if ($this->args['DEBUG'] != 1) |
|
| 117 | - return; |
|
| 117 | + if ($this->args['DEBUG'] != 1) { |
|
| 118 | + return; |
|
| 119 | + } |
|
| 118 | 120 | $out = ob_get_clean(); |
| 119 | 121 | $status = $this->getStatus(); |
| 120 | 122 | if ($status == BaseTestRunner::STATUS_ERROR |
@@ -21,14 +21,16 @@ |
||
| 21 | 21 | protected function set_up() |
| 22 | 22 | { |
| 23 | 23 | $this->args = argParser::getArgs(); |
| 24 | - if ($this->args['DEBUG'] == 1) |
|
| 25 | - ob_start(); |
|
| 24 | + if ($this->args['DEBUG'] == 1) { |
|
| 25 | + ob_start(); |
|
| 26 | + } |
|
| 26 | 27 | } |
| 27 | 28 | |
| 28 | 29 | protected function tear_down() |
| 29 | 30 | { |
| 30 | - if ($this->args['DEBUG'] != 1) |
|
| 31 | - return; |
|
| 31 | + if ($this->args['DEBUG'] != 1) { |
|
| 32 | + return; |
|
| 33 | + } |
|
| 32 | 34 | $out = ob_get_clean(); |
| 33 | 35 | $status = $this->getStatus(); |
| 34 | 36 | if ($status == BaseTestRunner::STATUS_ERROR |
@@ -21,14 +21,16 @@ |
||
| 21 | 21 | protected function set_up() |
| 22 | 22 | { |
| 23 | 23 | $this->args = argParser::getArgs(); |
| 24 | - if ($this->args['DEBUG'] == 1) |
|
| 25 | - ob_start(); |
|
| 24 | + if ($this->args['DEBUG'] == 1) { |
|
| 25 | + ob_start(); |
|
| 26 | + } |
|
| 26 | 27 | } |
| 27 | 28 | |
| 28 | 29 | protected function tear_down() |
| 29 | 30 | { |
| 30 | - if ($this->args['DEBUG'] != 1) |
|
| 31 | - return; |
|
| 31 | + if ($this->args['DEBUG'] != 1) { |
|
| 32 | + return; |
|
| 33 | + } |
|
| 32 | 34 | $out = ob_get_clean(); |
| 33 | 35 | $status = $this->getStatus(); |
| 34 | 36 | if ($status == BaseTestRunner::STATUS_ERROR |