Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfabiocarneiro <fahecs@gmail.com>2015-05-27 12:56:17 +0300
committerfabiocarneiro <fahecs@gmail.com>2015-05-27 12:56:17 +0300
commita2a63d34ebb460174e1a3e8d8022fe3e3ab4b469 (patch)
treefbfc480352bc711bc03f12849824507e56b5034a /core/Http.php
parentb2f5b5489ceca056217fc6663ec6c2c6b052cd42 (diff)
fix core folder with php-cs-fixer for psr-2
Diffstat (limited to 'core/Http.php')
-rw-r--r--core/Http.php13
1 files changed, 6 insertions, 7 deletions
diff --git a/core/Http.php b/core/Http.php
index 668a9dbe10..91956c9f29 100644
--- a/core/Http.php
+++ b/core/Http.php
@@ -144,8 +144,7 @@ class Http
$httpMethod = 'GET',
$httpUsername = null,
$httpPassword = null
- )
- {
+ ) {
if ($followDepth > 5) {
throw new Exception('Too many redirects (' . $followDepth . ')');
}
@@ -388,7 +387,7 @@ class Http
// determine success or failure
@fclose(@$fsock);
- } else if ($method == 'fopen') {
+ } elseif ($method == 'fopen') {
$response = false;
// we make sure the request takes less than a few seconds to fail
@@ -456,7 +455,7 @@ class Http
if (!empty($default_socket_timeout)) {
@ini_set('default_socket_timeout', $default_socket_timeout);
}
- } else if ($method == 'curl') {
+ } elseif ($method == 'curl') {
if (!self::isCurlEnabled()) {
// can be triggered in tests
throw new Exception("CURL is not enabled in php.ini, but is being used.");
@@ -501,7 +500,7 @@ class Http
@curl_setopt($ch, CURLOPT_NOBODY, true);
}
- if(!empty($httpUsername) && !empty($httpPassword)) {
+ if (!empty($httpUsername) && !empty($httpPassword)) {
$curl_options += array(
CURLOPT_USERPWD => $httpUsername . ':' . $httpPassword,
);
@@ -537,7 +536,7 @@ class Http
if ($response === true) {
$response = '';
- } else if ($response === false) {
+ } elseif ($response === false) {
$errstr = curl_error($ch);
if ($errstr != '') {
throw new Exception('curl_exec: ' . $errstr
@@ -824,4 +823,4 @@ class Http
}
return $modifiedSince;
}
-} \ No newline at end of file
+}