| @@ -29,7 +29,7 @@ | ||
| 29 | 29 | return; | 
| 30 | 30 | } | 
| 31 | 31 | |
| 32 | -        if (is_file($file = __DIR__ . str_replace(array('PhpXmlRpc\\', '\\'), '/', $class).'.php')) { | |
| 32 | +        if (is_file($file = __DIR__.str_replace(array('PhpXmlRpc\\', '\\'), '/', $class).'.php')) { | |
| 33 | 33 | require $file; | 
| 34 | 34 | } | 
| 35 | 35 | } | 
| @@ -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) { | 
| @@ -41,7 +41,7 @@ discard block | ||
| 41 | 41 | * @param array $extraOptions | 
| 42 | 42 | * @return array|false | 
| 43 | 43 | */ | 
| 44 | -function wrap_php_function($funcName, $newFuncName='', $extraOptions=array()) | |
| 44 | +function wrap_php_function($funcName, $newFuncName = '', $extraOptions = array()) | |
| 45 | 45 |  { | 
| 46 | 46 | $wrapper = new PhpXmlRpc\Wrapper(); | 
| 47 | 47 |      if (!isset($extraOptions['return_source']) || $extraOptions['return_source'] == false) { | 
| @@ -64,7 +64,7 @@ discard block | ||
| 64 | 64 | * @param array $extraOptions | 
| 65 | 65 | * @return array|false | 
| 66 | 66 | */ | 
| 67 | -function wrap_php_class($className, $extraOptions=array()) | |
| 67 | +function wrap_php_class($className, $extraOptions = array()) | |
| 68 | 68 |  { | 
| 69 | 69 | $wrapper = new PhpXmlRpc\Wrapper(); | 
| 70 | 70 | $fix = false; | 
| @@ -74,7 +74,7 @@ discard block | ||
| 74 | 74 | $fix = true; | 
| 75 | 75 | } | 
| 76 | 76 | $wrapped = $wrapper->wrapPhpClass($className, $extraOptions); | 
| 77 | -    foreach($wrapped as $name => $value) { | |
| 77 | +    foreach ($wrapped as $name => $value) { | |
| 78 | 78 |          if ($fix) { | 
| 79 | 79 | eval($value['source']); | 
| 80 | 80 | } | 
| @@ -93,7 +93,7 @@ discard block | ||
| 93 | 93 | * @param string $newFuncName deprecated, use an option in $extraOptions | 
| 94 | 94 | * @return array|callable|false | 
| 95 | 95 | */ | 
| 96 | -function wrap_xmlrpc_method($client, $methodName, $extraOptions=0, $timeout=0, $protocol='', $newFuncName='') | |
| 96 | +function wrap_xmlrpc_method($client, $methodName, $extraOptions = 0, $timeout = 0, $protocol = '', $newFuncName = '') | |
| 97 | 97 |  { | 
| 98 | 98 | if (!is_array($extraOptions)) | 
| 99 | 99 |      { | 
| @@ -128,7 +128,7 @@ discard block | ||
| 128 | 128 | * @param array $extraOptions | 
| 129 | 129 | * @return mixed | 
| 130 | 130 | */ | 
| 131 | -function wrap_xmlrpc_server($client, $extraOptions=array()) | |
| 131 | +function wrap_xmlrpc_server($client, $extraOptions = array()) | |
| 132 | 132 |  { | 
| 133 | 133 | $wrapper = new PhpXmlRpc\Wrapper(); | 
| 134 | 134 | return $wrapper->wrapXmlrpcServer($client, $extraOptions); | 
| @@ -148,7 +148,7 @@ discard block | ||
| 148 | 148 | $faultResponse = '', $namespace = '\\PhpXmlRpc\\') | 
| 149 | 149 |  { | 
| 150 | 150 |      $code = "function $xmlrpcFuncName ("; | 
| 151 | -    if ($clientCopyMode < 2) { | |
| 151 | +    if ($clientCopyMode<2) { | |
| 152 | 152 | // client copy mode 0 or 1 == partial / full client copy in emitted code | 
| 153 | 153 | $innerCode = build_client_wrapper_code($client, $clientCopyMode, $prefix); | 
| 154 | 154 | $innerCode .= "\$client->setDebug(\$debug);\n"; | 
| @@ -162,7 +162,7 @@ discard block | ||
| 162 | 162 | |
| 163 | 163 |      if ($mDesc != '') { | 
| 164 | 164 | // take care that PHP comment is not terminated unwillingly by method description | 
| 165 | -        $mDesc = "/**\n* " . str_replace('*/', '* /', $mDesc) . "\n"; | |
| 165 | +        $mDesc = "/**\n* ".str_replace('*/', '* /', $mDesc)."\n"; | |
| 166 | 166 |      } else { | 
| 167 | 167 | $mDesc = "/**\nFunction $xmlrpcFuncName\n"; | 
| 168 | 168 | } | 
| @@ -171,7 +171,7 @@ discard block | ||
| 171 | 171 |      $innerCode .= "\$encoder = new {$namespace}Encoder();\n"; | 
| 172 | 172 | $plist = array(); | 
| 173 | 173 | $pCount = count($mSig); | 
| 174 | -    for ($i = 1; $i < $pCount; $i++) { | |
| 174 | +    for ($i = 1; $i<$pCount; $i++) { | |
| 175 | 175 | $plist[] = "\$p$i"; | 
| 176 | 176 | $pType = $mSig[$i]; | 
| 177 | 177 | if ($pType == 'i4' || $pType == 'i8' || $pType == 'int' || $pType == 'boolean' || $pType == 'double' || | 
| @@ -187,19 +187,19 @@ discard block | ||
| 187 | 187 | } | 
| 188 | 188 | } | 
| 189 | 189 | $innerCode .= "\$req->addparam(\$p$i);\n"; | 
| 190 | - $mDesc .= '* @param ' . xmlrpc_2_php_type($pType) . " \$p$i\n"; | |
| 190 | + $mDesc .= '* @param '.xmlrpc_2_php_type($pType)." \$p$i\n"; | |
| 191 | 191 | } | 
| 192 | -    if ($clientCopyMode < 2) { | |
| 192 | +    if ($clientCopyMode<2) { | |
| 193 | 193 | $plist[] = '$debug=0'; | 
| 194 | 194 |          $mDesc .= "* @param int \$debug when 1 (or 2) will enable debugging of the underlying {$prefix} call (defaults to 0)\n"; | 
| 195 | 195 | } | 
| 196 | 196 |      $plist = implode(', ', $plist); | 
| 197 | -    $mDesc .= '* @return ' . xmlrpc_2_php_type($mSig[0]) . " (or an {$namespace}Response obj instance if call fails)\n*/\n"; | |
| 197 | +    $mDesc .= '* @return '.xmlrpc_2_php_type($mSig[0])." (or an {$namespace}Response obj instance if call fails)\n*/\n"; | |
| 198 | 198 | |
| 199 | 199 |      $innerCode .= "\$res = \${$this_}client->send(\$req, $timeout, '$protocol');\n"; | 
| 200 | 200 |      if ($decodeFault) { | 
| 201 | 201 |          if (is_string($faultResponse) && ((strpos($faultResponse, '%faultCode%') !== false) || (strpos($faultResponse, '%faultString%') !== false))) { | 
| 202 | -            $respCode = "str_replace(array('%faultCode%', '%faultString%'), array(\$res->faultCode(), \$res->faultString()), '" . str_replace("'", "''", $faultResponse) . "')"; | |
| 202 | +            $respCode = "str_replace(array('%faultCode%', '%faultString%'), array(\$res->faultCode(), \$res->faultString()), '".str_replace("'", "''", $faultResponse)."')"; | |
| 203 | 203 |          } else { | 
| 204 | 204 | $respCode = var_export($faultResponse, true); | 
| 205 | 205 | } | 
| @@ -212,7 +212,7 @@ discard block | ||
| 212 | 212 | $innerCode .= "if (\$res->faultCode()) return $respCode; else return \$encoder->decode(\$res->value());"; | 
| 213 | 213 | } | 
| 214 | 214 | |
| 215 | -    $code = $code . $plist . ") {\n" . $innerCode . "\n}\n"; | |
| 215 | +    $code = $code.$plist.") {\n".$innerCode."\n}\n"; | |
| 216 | 216 | |
| 217 | 217 |      return array('source' => $code, 'docstring' => $mDesc); | 
| 218 | 218 | } | 
| @@ -220,10 +220,10 @@ discard block | ||
| 220 | 220 | /** | 
| 221 | 221 | * @deprecated | 
| 222 | 222 | */ | 
| 223 | -function build_client_wrapper_code($client, $verbatim_client_copy, $prefix='xmlrpc') | |
| 223 | +function build_client_wrapper_code($client, $verbatim_client_copy, $prefix = 'xmlrpc') | |
| 224 | 224 |  { | 
| 225 | 225 |      $code = "\$client = new {$prefix}_client('".str_replace("'", "\'", $client->path). | 
| 226 | -        "', '" . str_replace("'", "\'", $client->server) . "', $client->port);\n"; | |
| 226 | +        "', '".str_replace("'", "\'", $client->server)."', $client->port);\n"; | |
| 227 | 227 | |
| 228 | 228 | // copy all client fields to the client that will be generated runtime | 
| 229 | 229 | // (this provides for future expansion or subclassing of client obj) | 
| @@ -39,10 +39,10 @@ | ||
| 39 | 39 | $flags = ENT_COMPAT; | 
| 40 | 40 | // avoid warnings on php < 5.4... | 
| 41 | 41 |              if (defined('ENT_HTML401')) { | 
| 42 | - $flags = $flags | ENT_HTML401; | |
| 42 | + $flags = $flags | ENT_HTML401; | |
| 43 | 43 | } | 
| 44 | 44 |              if (defined('ENT_SUBSTITUTE')) { | 
| 45 | - $flags = $flags | ENT_SUBSTITUTE; | |
| 45 | + $flags = $flags | ENT_SUBSTITUTE; | |
| 46 | 46 | } | 
| 47 | 47 |              if ($encoding != null) { | 
| 48 | 48 | print "<PRE>\n".htmlentities($message, $flags, $encoding)."\n</PRE>"; | 
| @@ -17,8 +17,8 @@ discard block | ||
| 17 | 17 | // test for php version | 
| 18 | 18 | $ver = phpversion(); | 
| 19 | 19 | $tests['php_version'] = array(); | 
| 20 | - $tests['php_version']['description'] = 'PHP version found: ' . $ver . ".\n\n"; | |
| 21 | -        if (version_compare($ver, '5.3.0') < 0) { | |
| 20 | + $tests['php_version']['description'] = 'PHP version found: '.$ver.".\n\n"; | |
| 21 | +        if (version_compare($ver, '5.3.0')<0) { | |
| 22 | 22 | $tests['php_version']['status'] = 0; | 
| 23 | 23 | $tests['php_version']['description'] .= 'This version of PHP is not compatible with this release of the PHP XMLRPC library. Please upgrade to php 5.1.0 or later'; | 
| 24 | 24 |          } else { | 
| @@ -51,8 +51,8 @@ discard block | ||
| 51 | 51 | // test for php version | 
| 52 | 52 | $ver = phpversion(); | 
| 53 | 53 | $tests['php_version'] = array(); | 
| 54 | - $tests['php_version']['description'] = 'PHP version found: ' . $ver . ".\n\n"; | |
| 55 | -        if (version_compare($ver, '5.3.0') < 0) { | |
| 54 | + $tests['php_version']['description'] = 'PHP version found: '.$ver.".\n\n"; | |
| 55 | +        if (version_compare($ver, '5.3.0')<0) { | |
| 56 | 56 | $tests['php_version']['status'] = 0; | 
| 57 | 57 | $tests['php_version']['description'] .= 'This version of PHP is not compatible with the PHP XMLRPC library. Please upgrade to 5.1.0 or later'; | 
| 58 | 58 |          } else { | 
| @@ -79,7 +79,7 @@ discard block | ||
| 79 | 79 | $info = curl_version(); | 
| 80 | 80 | $tests['curl']['status'] = 2; | 
| 81 | 81 | $tests['curl']['description'] = "The cURL extension is enabled.\n\nYou will be able to send and receive messages using 'HTTPS' and 'HTTP 1.1' protocols"; | 
| 82 | -            if (version_compare($ver, '4.3.8') < 0) { | |
| 82 | +            if (version_compare($ver, '4.3.8')<0) { | |
| 83 | 83 | $tests['curl']['status'] = 1; | 
| 84 | 84 | $tests['curl']['description'] .= ".\nPlease note that the current cURL install does not support keep-alives"; | 
| 85 | 85 | } | 
| @@ -167,7 +167,7 @@ discard block | ||
| 167 | 167 | <?php | 
| 168 | 168 |      $res = phpxmlrpc_verify_compat('server'); | 
| 169 | 169 |      foreach ($res as $test => $result) { | 
| 170 | - echo '<tr><td class="res' . $result['status'] . '">' . htmlspecialchars($test) . '</td><td class="result">' . htmlspecialchars($result['description']) . "</td></tr>\n"; | |
| 170 | + echo '<tr><td class="res'.$result['status'].'">'.htmlspecialchars($test).'</td><td class="result">'.htmlspecialchars($result['description'])."</td></tr>\n"; | |
| 171 | 171 | } | 
| 172 | 172 | ?> | 
| 173 | 173 | </tbody> | 
| @@ -184,7 +184,7 @@ discard block | ||
| 184 | 184 | <?php | 
| 185 | 185 |      $res = phpxmlrpc_verify_compat('client'); | 
| 186 | 186 |      foreach ($res as $test => $result) { | 
| 187 | - echo '<tr><td class="res' . $result['status'] . '">' . htmlspecialchars($test) . '</td><td class="result">' . htmlspecialchars($result['description']) . "</td></tr>\n"; | |
| 187 | + echo '<tr><td class="res'.$result['status'].'">'.htmlspecialchars($test).'</td><td class="result">'.htmlspecialchars($result['description'])."</td></tr>\n"; | |
| 188 | 188 | } | 
| 189 | 189 | ?> | 
| 190 | 190 | </tbody> | 
| @@ -2,20 +2,20 @@ | ||
| 2 | 2 | |
| 3 | 3 | use PHPUnit\Runner\Version as PHPUnit_Version; | 
| 4 | 4 | |
| 5 | -if ( class_exists( 'PHPUnit_Extensions_SeleniumCommon_RemoteCoverage' ) === true | |
| 6 | - && class_exists( 'PHPUnit\Extensions\SeleniumCommon\RemoteCoverage' ) === false | |
| 5 | +if (class_exists('PHPUnit_Extensions_SeleniumCommon_RemoteCoverage') === true | |
| 6 | +    && class_exists('PHPUnit\Extensions\SeleniumCommon\RemoteCoverage') === false | |
| 7 | 7 |  ) { | 
| 8 | - class_alias( 'PHPUnit_Extensions_SeleniumCommon_RemoteCoverage', 'PHPUnit\Extensions\SeleniumCommon\RemoteCoverage' ); | |
| 8 | +    class_alias('PHPUnit_Extensions_SeleniumCommon_RemoteCoverage', 'PHPUnit\Extensions\SeleniumCommon\RemoteCoverage'); | |
| 9 | 9 | } | 
| 10 | 10 | |
| 11 | -if ( class_exists( 'PHPUnit_Runner_BaseTestRunner' ) === true | |
| 12 | - && class_exists( 'PHPUnit\Runner\BaseTestRunner' ) === false | |
| 11 | +if (class_exists('PHPUnit_Runner_BaseTestRunner') === true | |
| 12 | +    && class_exists('PHPUnit\Runner\BaseTestRunner') === false | |
| 13 | 13 |  ) { | 
| 14 | - class_alias( 'PHPUnit_Runner_BaseTestRunner', 'PHPUnit\Runner\BaseTestRunner' ); | |
| 14 | +    class_alias('PHPUnit_Runner_BaseTestRunner', 'PHPUnit\Runner\BaseTestRunner'); | |
| 15 | 15 | } | 
| 16 | 16 | |
| 17 | 17 |  if (class_exists('PHPUnit\Runner\Version') === false || version_compare(PHPUnit_Version::id(), '8.0.0', '<')) { | 
| 18 | - include_once __DIR__ . '/PolyfillTestCase7.php'; | |
| 18 | + include_once __DIR__.'/PolyfillTestCase7.php'; | |
| 19 | 19 |  } else { | 
| 20 | - include_once __DIR__ . '/PolyfillTestCase8.php'; | |
| 20 | + include_once __DIR__.'/PolyfillTestCase8.php'; | |
| 21 | 21 | } | 
| @@ -15,7 +15,7 @@ discard block | ||
| 15 | 15 | chmod($GLOBALS['PHPUNIT_COVERAGE_DATA_DIRECTORY'], 0777); | 
| 16 | 16 | } | 
| 17 | 17 | |
| 18 | - include_once __DIR__ . "/../vendor/phpunit/phpunit-selenium/PHPUnit/Extensions/SeleniumCommon/prepend.php"; | |
| 18 | + include_once __DIR__."/../vendor/phpunit/phpunit-selenium/PHPUnit/Extensions/SeleniumCommon/prepend.php"; | |
| 19 | 19 | } | 
| 20 | 20 | |
| 21 | 21 | $targetFile = null; | 
| @@ -38,5 +38,5 @@ discard block | ||
| 38 | 38 | } | 
| 39 | 39 | |
| 40 | 40 |  if (isset($_COOKIE['PHPUNIT_SELENIUM_TEST_ID']) && extension_loaded('xdebug')) { | 
| 41 | - include_once __DIR__ . "/../vendor/phpunit/phpunit-selenium/PHPUnit/Extensions/SeleniumCommon/append.php"; | |
| 41 | + include_once __DIR__."/../vendor/phpunit/phpunit-selenium/PHPUnit/Extensions/SeleniumCommon/append.php"; | |
| 42 | 42 | } | 
| @@ -4,7 +4,7 @@ | ||
| 4 | 4 |  if (isset($_GET['run'])) { | 
| 5 | 5 | $path = parse_url($_GET['run']); | 
| 6 | 6 |      if (isset($path['query'])) { | 
| 7 | - $query = '?' . $path['query']; | |
| 7 | + $query = '?'.$path['query']; | |
| 8 | 8 | } | 
| 9 | 9 | } | 
| 10 | 10 | |
| @@ -6,7 +6,7 @@ | ||
| 6 | 6 | * @license code licensed under the BSD License: see file license.txt | 
| 7 | 7 | **/ | 
| 8 | 8 | |
| 9 | -$coverageFile = realpath(__DIR__ . "/../vendor/phpunit/phpunit-selenium/PHPUnit/Extensions/SeleniumCommon/phpunit_coverage.php"); | |
| 9 | +$coverageFile = realpath(__DIR__."/../vendor/phpunit/phpunit-selenium/PHPUnit/Extensions/SeleniumCommon/phpunit_coverage.php"); | |
| 10 | 10 | |
| 11 | 11 | // has to be the same value as used in index.php | 
| 12 | 12 | $GLOBALS['PHPUNIT_COVERAGE_DATA_DIRECTORY'] = '/tmp/phpxmlrpc_coverage'; | 
| @@ -46,7 +46,7 @@ discard block | ||
| 46 | 46 | // check for command line params (passed as env vars) vs. web page input params (passed as GET/POST) | 
| 47 | 47 | // Note that the only usecase for web-page mode is when this is used by benchmark.php | 
| 48 | 48 |          if (!isset($_SERVER['REQUEST_METHOD'])) { | 
| 49 | -            foreach($_SERVER as $key => $val) { | |
| 49 | +            foreach ($_SERVER as $key => $val) { | |
| 50 | 50 |                  if (array_key_exists($key, $args)) { | 
| 51 | 51 | $$key = $val; | 
| 52 | 52 | } | 
| @@ -91,7 +91,7 @@ discard block | ||
| 91 | 91 | //} | 
| 92 | 92 | } | 
| 93 | 93 |          if ($HTTPURI[0] != '/') { | 
| 94 | - $HTTPURI = '/' . $HTTPURI; | |
| 94 | + $HTTPURI = '/'.$HTTPURI; | |
| 95 | 95 | } | 
| 96 | 96 | $args['HTTPURI'] = $HTTPURI; | 
| 97 | 97 | |
| @@ -105,21 +105,21 @@ discard block | ||
| 105 | 105 | } | 
| 106 | 106 | |
| 107 | 107 |          if (isset($HTTPSIGNOREPEER)) { | 
| 108 | - $args['HTTPSIGNOREPEER'] = (bool)$HTTPSIGNOREPEER; | |
| 108 | + $args['HTTPSIGNOREPEER'] = (bool) $HTTPSIGNOREPEER; | |
| 109 | 109 | } | 
| 110 | 110 | |
| 111 | 111 |          if (isset($HTTPSVERIFYHOST)) { | 
| 112 | - $args['HTTPSVERIFYHOST'] = (int)$HTTPSVERIFYHOST; | |
| 112 | + $args['HTTPSVERIFYHOST'] = (int) $HTTPSVERIFYHOST; | |
| 113 | 113 | } | 
| 114 | 114 | |
| 115 | 115 |          if (isset($SSLVERSION)) { | 
| 116 | - $args['SSLVERSION'] = (int)$SSLVERSION; | |
| 116 | + $args['SSLVERSION'] = (int) $SSLVERSION; | |
| 117 | 117 | } | 
| 118 | 118 | |
| 119 | 119 |          if (isset($PROXYSERVER)) { | 
| 120 | 120 |              $arr = explode(':', $PROXYSERVER); | 
| 121 | 121 | $args['PROXYSERVER'] = $arr[0]; | 
| 122 | -            if (count($arr) > 1) { | |
| 122 | +            if (count($arr)>1) { | |
| 123 | 123 | $args['PROXYPORT'] = $arr[1]; | 
| 124 | 124 |              } else { | 
| 125 | 125 | $args['PROXYPORT'] = 8080; |