@@ -19,7 +19,7 @@ |
||
19 | 19 | * @param array $params |
20 | 20 | * @return \Psr\Http\Message\StreamInterface|string |
21 | 21 | */ |
22 | - public static function request($method, $params=[]) |
|
22 | + public static function request($method, $params = []) |
|
23 | 23 | { |
24 | 24 | if (empty($method)) { |
25 | 25 | return 'request method can not be empty.'; |
@@ -79,8 +79,12 @@ |
||
79 | 79 | $host = ''; |
80 | 80 | foreach ($possibleHostSources as $source) |
81 | 81 | { |
82 | - if (!empty($host)) break; |
|
83 | - if (empty($_SERVER[$source])) continue; |
|
82 | + if (!empty($host)) { |
|
83 | + break; |
|
84 | + } |
|
85 | + if (empty($_SERVER[$source])) { |
|
86 | + continue; |
|
87 | + } |
|
84 | 88 | $host = $_SERVER[$source]; |
85 | 89 | if (array_key_exists($source, $sourceTransformations)) |
86 | 90 | { |