@@ -188,7 +188,7 @@ discard block |
||
188 | 188 | } |
189 | 189 | |
190 | 190 | if ($this->_enable_cache && $this->getMethod() === 'GET') { |
191 | - $cache_key = urlencode($request_uri) . implode(',', $send_headers); |
|
191 | + $cache_key = urlencode($request_uri).implode(',', $send_headers); |
|
192 | 192 | if (array_key_exists($cache_key, self::$_cache)) { |
193 | 193 | return self::$_cache[$cache_key]; |
194 | 194 | } |
@@ -208,7 +208,7 @@ discard block |
||
208 | 208 | curl_setopt($ch, CURLOPT_AUTOREFERER, true); |
209 | 209 | |
210 | 210 | if (!empty($send_headers)) curl_setopt($ch, CURLOPT_HTTPHEADER, $send_headers); |
211 | - if (!is_null($post_data)) { |
|
211 | + if (!is_null($post_data)) { |
|
212 | 212 | curl_setopt($ch, CURLOPT_POST, 1); |
213 | 213 | curl_setopt($ch, CURLOPT_POSTFIELDS, $post_data); |
214 | 214 | } |
@@ -96,6 +96,6 @@ |
||
96 | 96 | */ |
97 | 97 | private function auth_url(string $path): string |
98 | 98 | { |
99 | - return $this->_auth_domain . '/' . ltrim($path, '/'); |
|
99 | + return $this->_auth_domain.'/'.ltrim($path, '/'); |
|
100 | 100 | } |
101 | 101 | } |
@@ -20,13 +20,13 @@ discard block |
||
20 | 20 | public static function setGetVar(string $key, string $value, string $url): string |
21 | 21 | { |
22 | 22 | if (!self::is_absolute_url($url)) { |
23 | - $url = 'http://dummy.com/' . ltrim($url, '/'); |
|
23 | + $url = 'http://dummy.com/'.ltrim($url, '/'); |
|
24 | 24 | } |
25 | 25 | |
26 | 26 | // try to parse uri |
27 | 27 | $parts = parse_url($url); |
28 | 28 | if (empty($parts)) { |
29 | - throw new InvalidArgumentException("Can't parse URL: " . $url); |
|
29 | + throw new InvalidArgumentException("Can't parse URL: ".$url); |
|
30 | 30 | } |
31 | 31 | |
32 | 32 | // Parse params and add new variable |
@@ -40,18 +40,18 @@ discard block |
||
40 | 40 | // Generate URI segments and formatting |
41 | 41 | $scheme = (array_key_exists('scheme', $parts)) ? $parts['scheme'] : 'http'; |
42 | 42 | $user = (array_key_exists('user', $parts)) ? $parts['user'] : ''; |
43 | - $port = (array_key_exists('port', $parts) && $parts['port']) ? ':' . $parts['port'] : ''; |
|
43 | + $port = (array_key_exists('port', $parts) && $parts['port']) ? ':'.$parts['port'] : ''; |
|
44 | 44 | |
45 | 45 | if ($user != '') { |
46 | 46 | // format in either user:[email protected] or [email protected] |
47 | - $user .= (array_key_exists('pass', $parts) && $parts['pass']) ? ':' . $parts['pass'] . '@' : ''; |
|
47 | + $user .= (array_key_exists('pass', $parts) && $parts['pass']) ? ':'.$parts['pass'].'@' : ''; |
|
48 | 48 | } |
49 | 49 | |
50 | 50 | // handle URL params which are existing / new |
51 | - $params = ($params) ? '?' . http_build_query($params) : ''; |
|
51 | + $params = ($params) ? '?'.http_build_query($params) : ''; |
|
52 | 52 | |
53 | 53 | // Recompile URI segments |
54 | - $newUri = $scheme . '://' . $user . $parts['host'] . $port . $parts['path'] . $params; |
|
54 | + $newUri = $scheme.'://'.$user.$parts['host'].$port.$parts['path'].$params; |
|
55 | 55 | |
56 | 56 | return str_replace('http://dummy.com/', '', $newUri); |
57 | 57 | } |
@@ -64,10 +64,10 @@ discard block |
||
64 | 64 | { |
65 | 65 | // Strip off the query and fragment parts of the URL before checking |
66 | 66 | if (($queryPosition = strpos($url, '?')) !== false) { |
67 | - $url = substr($url, 0, $queryPosition - 1); |
|
67 | + $url = substr($url, 0, $queryPosition-1); |
|
68 | 68 | } |
69 | 69 | if (($hashPosition = strpos($url, '#')) !== false) { |
70 | - $url = substr($url, 0, $hashPosition - 1); |
|
70 | + $url = substr($url, 0, $hashPosition-1); |
|
71 | 71 | } |
72 | 72 | $colonPosition = strpos($url, ':'); |
73 | 73 | $slashPosition = strpos($url, '/'); |