Let's name it better, more clear.
authorRoland Häder <roland@mxchange.org>
Sun, 16 Jul 2017 17:25:33 +0000 (19:25 +0200)
committerRoland Häder <roland@mxchange.org>
Sun, 16 Jul 2017 17:25:33 +0000 (19:25 +0200)
Signed-off-by: Roland Häder <roland@mxchange.org>
framework/config/class_FrameworkConfiguration.php

index 9736e39551b5b12871034c24f08ba4f13e365adf..16ebaf86dcd0d90eebdc46d98125e64468e20bb8 100644 (file)
@@ -381,26 +381,27 @@ class FrameworkConfiguration implements Registerable {
        /**
         * Detects the HTTPS flag
         *
        /**
         * Detects the HTTPS flag
         *
-        * @return      $isSecured      The detected HTTPS flag or null if failed
+        * @return      $https  The detected HTTPS flag or null if failed
         */
        public function detectHttpSecured () {
                // Default is null
         */
        public function detectHttpSecured () {
                // Default is null
-               $isSecured = NULL;
+               $https = NULL;
 
                // Is HTTPS set?
                if ($this->isHttpSecured()) {
                        // Then use it
 
                // Is HTTPS set?
                if ($this->isHttpSecured()) {
                        // Then use it
-                       $isSecured = $_SERVER['HTTPS'];
+                       $https = $_SERVER['HTTPS'];
                } // END - if
 
                // Return it
                } // END - if
 
                // Return it
-               return $isSecured;
+               return $https;
        }
 
        /**
         * Checks whether HTTPS is set in $_SERVER
         *
        }
 
        /**
         * Checks whether HTTPS is set in $_SERVER
         *
-        * @return $isset       Whether HTTPS is set
+        * @return      $isset  Whether HTTPS is set
+        * @todo        Test more fields
         */
        public function isHttpSecured () {
                return (isset($_SERVER['HTTPS']));
         */
        public function isHttpSecured () {
                return (isset($_SERVER['HTTPS']));
@@ -413,16 +414,16 @@ class FrameworkConfiguration implements Registerable {
         */
        public function detectBaseUrl () {
                // Initialize the URL
         */
        public function detectBaseUrl () {
                // Initialize the URL
-               $baseUrl = 'http';
+               $protocol = 'http';
 
                // Do we have HTTPS?
                if ($this->isHttpSecured()) {
                        // Add the >s< for HTTPS
 
                // Do we have HTTPS?
                if ($this->isHttpSecured()) {
                        // Add the >s< for HTTPS
-                       $baseUrl .= 's';
+                       $protocol = 's';
                } // END - if
 
                // Construct the full URL and secure it against CSRF attacks
                } // END - if
 
                // Construct the full URL and secure it against CSRF attacks
-               $baseUrl = $baseUrl . '://' . $this->detectDomain() . $this->detectScriptPath();
+               $baseUrl = $protocol . '://' . $this->detectDomain() . $this->detectScriptPath();
 
                // Return the URL
                return $baseUrl;
 
                // Return the URL
                return $baseUrl;