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:
authorThomas Steur <thomas.steur@googlemail.com>2014-09-30 09:37:32 +0400
committerThomas Steur <thomas.steur@googlemail.com>2014-09-30 09:37:32 +0400
commita00487b0b841c4b15463b591c7f62176c4b84d15 (patch)
tree6eb893ce356a4740e044c9cdadaf84ffb2095b9d /core/Url.php
parent0edef3332289a7cbe54b58084b967907d1086d29 (diff)
coding style fixes, some PHPStorm inspection fixes, improved readability of code, few refactorings, all as part of our code cleanup strategy
Diffstat (limited to 'core/Url.php')
-rw-r--r--core/Url.php12
1 files changed, 4 insertions, 8 deletions
diff --git a/core/Url.php b/core/Url.php
index 32ea140f20..75b0731e78 100644
--- a/core/Url.php
+++ b/core/Url.php
@@ -10,12 +10,7 @@ namespace Piwik;
use Exception;
-use Piwik\Config;
-use Piwik\Common;
-use Piwik\IP;
-use Piwik\ProxyHttp;
use Piwik\Session;
-use Piwik\UrlHelper;
/**
* Provides URL related helper methods.
@@ -346,7 +341,7 @@ class Url
$hostHeaders = array();
$config = Config::getInstance()->General;
- if(isset($config['proxy_host_headers'])) {
+ if (isset($config['proxy_host_headers'])) {
$hostHeaders = $config['proxy_host_headers'];
}
@@ -473,6 +468,7 @@ class Url
* Redirects the user to the specified URL.
*
* @param string $url
+ * @throws Exception
* @api
*/
public static function redirectToUrl($url)
@@ -490,7 +486,7 @@ class Url
echo "Invalid URL to redirect to.";
}
- if(Common::isPhpCliMode()) {
+ if (Common::isPhpCliMode()) {
throw new Exception("If you were using a browser, Piwik would redirect you to this URL: $url \n\n");
}
exit;
@@ -501,7 +497,7 @@ class Url
*/
public static function redirectToHttps()
{
- if(ProxyHttp::isHttps()) {
+ if (ProxyHttp::isHttps()) {
return;
}
$url = self::getCurrentUrl();