Passed
Push — master ( c576cf...1a08ad )
by Gaetano
07:23
created
tests/6HTTPTest.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -1,11 +1,11 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-include_once __DIR__ . '/../lib/xmlrpc.inc';
4
-include_once __DIR__ . '/../lib/xmlrpc_wrappers.inc';
3
+include_once __DIR__.'/../lib/xmlrpc.inc';
4
+include_once __DIR__.'/../lib/xmlrpc_wrappers.inc';
5 5
 
6
-include_once __DIR__ . '/parse_args.php';
6
+include_once __DIR__.'/parse_args.php';
7 7
 
8
-include_once __DIR__ . '/5ServerTest.php';
8
+include_once __DIR__.'/5ServerTest.php';
9 9
 
10 10
 /**
11 11
  * Tests which stress http features of the library.
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
         );
31 31
 
32 32
         $methods = array();
33
-        foreach(get_class_methods('ServerTest') as $method)
33
+        foreach (get_class_methods('ServerTest') as $method)
34 34
         {
35 35
             if (strpos($method, 'test') === 0 && !in_array($method, $unsafeMethods))
36 36
             {
@@ -271,7 +271,7 @@  discard block
 block discarded – undo
271 271
                 preg_match('/ubunutu([0-9]+)/', $output[0], $matches);
272 272
                 $ubuntuVersion = @$matches[1];
273 273
             }
274
-            if ($ubuntuVersion >= 20) {
274
+            if ($ubuntuVersion>=20) {
275 275
                 $this->markTestSkipped('HTTPS via Socket known to fail on php less than 7.2 on Ubuntu 20 and higher');
276 276
                 return;
277 277
             }
Please login to merge, or discard this patch.
lib/xmlrpcs.inc 1 patch
Spacing   +14 added lines, -14 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,12 +65,12 @@  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:
72 72
                 $trace = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS);
73
-                trigger_error('Undefined property via __get(): ' . $name . ' in ' . $trace[0]['file'] . ' on line ' .
73
+                trigger_error('Undefined property via __get(): '.$name.' in '.$trace[0]['file'].' on line '.
74 74
                     $trace[0]['line'], E_USER_NOTICE);
75 75
                 return null;
76 76
         }
@@ -97,30 +97,30 @@  discard block
 block discarded – undo
97 97
     Server::xmlrpc_debugmsg($m);
98 98
 }
99 99
 
100
-function _xmlrpcs_getCapabilities($server, $m=null)
100
+function _xmlrpcs_getCapabilities($server, $m = null)
101 101
 {
102 102
     return Server::_xmlrpcs_getCapabilities($server, $m);
103 103
 }
104 104
 
105
-$_xmlrpcs_listMethods_sig=array(array(\PhpXmlRpc\Value::$xmlrpcArray));
106
-$_xmlrpcs_listMethods_doc='This method lists all the methods that the XML-RPC server knows how to dispatch';
107
-$_xmlrpcs_listMethods_sdoc=array(array('list of method names'));
108
-function _xmlrpcs_listMethods($server, $m=null) // if called in plain php values mode, second param is missing
105
+$_xmlrpcs_listMethods_sig = array(array(\PhpXmlRpc\Value::$xmlrpcArray));
106
+$_xmlrpcs_listMethods_doc = 'This method lists all the methods that the XML-RPC server knows how to dispatch';
107
+$_xmlrpcs_listMethods_sdoc = array(array('list of method names'));
108
+function _xmlrpcs_listMethods($server, $m = null) // if called in plain php values mode, second param is missing
109 109
 {
110 110
     return Server::_xmlrpcs_listMethods($server, $m);
111 111
 }
112 112
 
113
-$_xmlrpcs_methodSignature_sig=array(array(\PhpXmlRpc\Value::$xmlrpcArray, $GLOBALS['xmlrpcString']));
114
-$_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)';
115
-$_xmlrpcs_methodSignature_sdoc=array(array('list of known signatures, each sig being an array of xmlrpc type names', 'name of method to be described'));
113
+$_xmlrpcs_methodSignature_sig = array(array(\PhpXmlRpc\Value::$xmlrpcArray, $GLOBALS['xmlrpcString']));
114
+$_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)';
115
+$_xmlrpcs_methodSignature_sdoc = array(array('list of known signatures, each sig being an array of xmlrpc type names', 'name of method to be described'));
116 116
 function _xmlrpcs_methodSignature($server, $m)
117 117
 {
118 118
     return Server::_xmlrpcs_methodSignature($server, $m);
119 119
 }
120 120
 
121
-$_xmlrpcs_methodHelp_sig=array(array($GLOBALS['xmlrpcString'], $GLOBALS['xmlrpcString']));
122
-$_xmlrpcs_methodHelp_doc='Returns help text if defined for the method passed, otherwise returns an empty string';
123
-$_xmlrpcs_methodHelp_sdoc=array(array('method description', 'name of the method to be described'));
121
+$_xmlrpcs_methodHelp_sig = array(array($GLOBALS['xmlrpcString'], $GLOBALS['xmlrpcString']));
122
+$_xmlrpcs_methodHelp_doc = 'Returns help text if defined for the method passed, otherwise returns an empty string';
123
+$_xmlrpcs_methodHelp_sdoc = array(array('method description', 'name of the method to be described'));
124 124
 function _xmlrpcs_methodHelp($server, $m)
125 125
 {
126 126
     return Server::_xmlrpcs_methodHelp($server, $m);
Please login to merge, or discard this patch.
lib/xmlrpc_wrappers.inc 1 patch
Spacing   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -41,10 +41,10 @@  discard block
 block discarded – undo
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
-    if (!isset($extraOptions['return_source'])  || $extraOptions['return_source'] == false) {
47
+    if (!isset($extraOptions['return_source']) || $extraOptions['return_source'] == false) {
48 48
         // backwards compat: return string instead of callable
49 49
         $extraOptions['return_source'] = true;
50 50
         $wrapped = $wrapper->wrapPhpFunction($funcName, $newFuncName, $extraOptions);
@@ -64,17 +64,17 @@  discard block
 block discarded – undo
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;
71
-    if (!isset($extraOptions['return_source'])  || $extraOptions['return_source'] == false) {
71
+    if (!isset($extraOptions['return_source']) || $extraOptions['return_source'] == false) {
72 72
         // backwards compat: return string instead of callable
73 73
         $extraOptions['return_source'] = true;
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
 block discarded – undo
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
     {
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
 
109 109
     $wrapper = new PhpXmlRpc\Wrapper();
110 110
 
111
-    if (!isset($extraOptions['return_source'])  || $extraOptions['return_source'] == false) {
111
+    if (!isset($extraOptions['return_source']) || $extraOptions['return_source'] == false) {
112 112
         // backwards compat: return string instead of callable
113 113
         $extraOptions['return_source'] = true;
114 114
         $wrapped = $wrapper->wrapXmlrpcMethod($client, $methodName, $extraOptions);
@@ -128,7 +128,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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)
Please login to merge, or discard this patch.
tests/index.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 }
Please login to merge, or discard this patch.
debugger/index.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -4,7 +4,7 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
debugger/common.php 1 patch
Spacing   +4 added lines, -5 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
20 20
     // assume this is either a standalone install, or installed as Composer dependency
21 21
     /// @todo if the latter is true, should we just not skip using the custom Autoloader, and let a top-level
22 22
     ///       debugger include this one, taking care of autoloading?
23
-    include_once __DIR__ . "/../src/Autoloader.php";
23
+    include_once __DIR__."/../src/Autoloader.php";
24 24
     PhpXmlRpc\Autoloader::register();
25 25
 }
26 26
 
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
         }
35 35
 
36 36
         // Variables that shouldn't be unset
37
-        $noUnset = array('GLOBALS',  '_GET', '_POST', '_COOKIE', '_REQUEST', '_SERVER', '_ENV', '_FILES');
37
+        $noUnset = array('GLOBALS', '_GET', '_POST', '_COOKIE', '_REQUEST', '_SERVER', '_ENV', '_FILES');
38 38
 
39 39
         $input = array_merge($_GET, $_POST, $_COOKIE, $_SERVER, $_ENV, $_FILES,
40 40
             isset($_SESSION) && is_array($_SESSION) ? $_SESSION : array()
@@ -54,8 +54,7 @@  discard block
 block discarded – undo
54 54
     function stripslashes_deep($value)
55 55
     {
56 56
         $value = is_array($value) ?
57
-            array_map('stripslashes_deep', $value) :
58
-            stripslashes($value);
57
+            array_map('stripslashes_deep', $value) : stripslashes($value);
59 58
 
60 59
         return $value;
61 60
     }
@@ -105,7 +104,7 @@  discard block
 block discarded – undo
105 104
     $path = isset($_GET['path']) ? $_GET['path'] : '';
106 105
     // in case user forgot initial '/' in xmlrpc server path, add it back
107 106
     if ($path && ($path[0]) != '/') {
108
-        $path = '/' . $path;
107
+        $path = '/'.$path;
109 108
     }
110 109
 
111 110
     if (isset($_GET['debug']) && ($_GET['debug'] == '1' || $_GET['debug'] == '2')) {
Please login to merge, or discard this patch.
demo/client/parallel.php 1 patch
Spacing   +15 added lines, -15 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
 use PhpXmlRpc\Encoder;
5 5
 use PhpXmlRpc\Client;
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
         $handles = array();
25 25
         $curl = curl_multi_init();
26 26
 
27
-        foreach($requests as $k => $req) {
27
+        foreach ($requests as $k => $req) {
28 28
             $req->setDebug($this->debug);
29 29
 
30 30
             $handle = $this->prepareCurlHandle(
@@ -57,19 +57,19 @@  discard block
 block discarded – undo
57 57
         $running = 0;
58 58
         do {
59 59
             curl_multi_exec($curl, $running);
60
-        } while($running > 0);
60
+        } while ($running>0);
61 61
 
62 62
         $responses = array();
63
-        foreach($handles as $k => $h) {
63
+        foreach ($handles as $k => $h) {
64 64
             $responses[$k] = curl_multi_getcontent($handles[$k]);
65 65
 
66
-            if ($this->debug > 1) {
66
+            if ($this->debug>1) {
67 67
                 $message = "---CURL INFO---\n";
68 68
                 foreach (curl_getinfo($h) as $name => $val) {
69 69
                     if (is_array($val)) {
70 70
                         $val = implode("\n", $val);
71 71
                     }
72
-                    $message .= $name . ': ' . $val . "\n";
72
+                    $message .= $name.': '.$val."\n";
73 73
                 }
74 74
                 $message .= '---END---';
75 75
                 $this->getLogger()->debugMessage($message);
@@ -80,9 +80,9 @@  discard block
 block discarded – undo
80 80
         }
81 81
         curl_multi_close($curl);
82 82
 
83
-        foreach($responses as $k => $resp) {
83
+        foreach ($responses as $k => $resp) {
84 84
             if (!$resp) {
85
-                $responses[$k] = new Response(0, PhpXmlRpc::$xmlrpcerr['curl_fail'], PhpXmlRpc::$xmlrpcstr['curl_fail'] . ': ' . curl_error($curl));
85
+                $responses[$k] = new Response(0, PhpXmlRpc::$xmlrpcerr['curl_fail'], PhpXmlRpc::$xmlrpcstr['curl_fail'].': '.curl_error($curl));
86 86
             } else {
87 87
                 $responses[$k] = $requests[$k]->parseResponse($resp, true, $this->return_type);
88 88
             }
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
 $value = $encoder->encode($data, array('auto_dates'));
100 100
 $req = new Request('interopEchoTests.echoValue', array($value));
101 101
 $reqs = array();
102
-for ($i = 0; $i < $num_tests; $i++) {
102
+for ($i = 0; $i<$num_tests; $i++) {
103 103
     $reqs[] = $req;
104 104
 }
105 105
 
@@ -114,18 +114,18 @@  discard block
 block discarded – undo
114 114
 
115 115
 $t = microtime(true);
116 116
 $resp = $client->send($reqs);
117
-$t = microtime(true) - $t;
118
-echo "Sequential send: " . sprintf('%.3f', $t) . " secs.\n";
117
+$t = microtime(true)-$t;
118
+echo "Sequential send: ".sprintf('%.3f', $t)." secs.\n";
119 119
 flush();
120 120
 
121 121
 $t = microtime(true);
122 122
 $resp = $client->sendParallel($reqs);
123
-$t = microtime(true) - $t;
124
-echo "Parallel send: " . sprintf('%.3f', $t) . " secs.\n";
123
+$t = microtime(true)-$t;
124
+echo "Parallel send: ".sprintf('%.3f', $t)." secs.\n";
125 125
 flush();
126 126
 
127 127
 $client->no_multicall = false;
128 128
 $t = microtime(true);
129 129
 $resp = $client->send($reqs);
130
-$t = microtime(true) - $t;
131
-echo "Multicall send: " . sprintf('%.3f', $t) . " secs.\n";
130
+$t = microtime(true)-$t;
131
+echo "Multicall send: ".sprintf('%.3f', $t)." secs.\n";
Please login to merge, or discard this patch.
tests/phpunit_coverage.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -6,7 +6,7 @@
 block discarded – undo
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';
Please login to merge, or discard this patch.
tests/parse_args.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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;
Please login to merge, or discard this patch.