diff options
author | Maurício Meneghini Fauth <mauricio@fauth.dev> | 2019-12-01 17:40:30 +0300 |
---|---|---|
committer | Maurício Meneghini Fauth <mauricio@fauth.dev> | 2019-12-01 20:10:07 +0300 |
commit | dd06cd38f897256e0bcc064676afc5667b0adee6 (patch) | |
tree | 2d3e39531393c6981635ad0b6a9fc5b40ae358a0 /libraries/classes/Utils | |
parent | f3135a9cf61bb77fc8106331392661f3a858f22d (diff) |
Defines rules for double quote usage
Makes sure that any use of double quotes strings are warranted.
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
Diffstat (limited to 'libraries/classes/Utils')
-rw-r--r-- | libraries/classes/Utils/HttpRequest.php | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/libraries/classes/Utils/HttpRequest.php b/libraries/classes/Utils/HttpRequest.php index 45ec37765d..c484c5ad81 100644 --- a/libraries/classes/Utils/HttpRequest.php +++ b/libraries/classes/Utils/HttpRequest.php @@ -120,14 +120,14 @@ class HttpRequest } $curlStatus &= curl_setopt($curlHandle, CURLOPT_USERAGENT, 'phpMyAdmin'); - if ($method != "GET") { + if ($method != 'GET') { $curlStatus &= curl_setopt($curlHandle, CURLOPT_CUSTOMREQUEST, $method); } if ($header) { $curlStatus &= curl_setopt($curlHandle, CURLOPT_HTTPHEADER, [$header]); } - if ($method == "POST") { + if ($method == 'POST') { $curlStatus &= curl_setopt($curlHandle, CURLOPT_POSTFIELDS, $content); } @@ -208,13 +208,13 @@ class HttpRequest 'request_fulluri' => true, 'timeout' => 10, 'user_agent' => 'phpMyAdmin', - 'header' => "Accept: */*", + 'header' => 'Accept: */*', ], ]; if ($header) { $context['http']['header'] .= "\n" . $header; } - if ($method == "POST") { + if ($method == 'POST') { $context['http']['content'] = $content; } $context = $this->handleContext($context); @@ -224,7 +224,7 @@ class HttpRequest stream_context_create($context) ); if (isset($http_response_header)) { - preg_match("#HTTP/[0-9\.]+\s+([0-9]+)#", $http_response_header[0], $out); + preg_match('#HTTP/[0-9\.]+\s+([0-9]+)#', $http_response_header[0], $out); $httpStatus = intval($out[1]); return $this->response($response, $httpStatus, $returnOnlyStatus); } |