Skip to content

Commit 0b7dbab

Browse files
committed
adjusted method order in request class.
1 parent b7b258a commit 0b7dbab

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

system/request.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -110,23 +110,23 @@ public static function ip()
110110
}
111111

112112
/**
113-
* Determine if the request is using HTTPS.
113+
* Get the HTTP protocol for the request.
114114
*
115-
* @return bool
115+
* @return string
116116
*/
117-
public static function is_secure()
117+
public static function protocol()
118118
{
119-
return (static::protocol() == 'https');
119+
return (isset($_SERVER['HTTPS']) and $_SERVER['HTTPS'] !== 'off') ? 'https' : 'http';
120120
}
121121

122122
/**
123-
* Get the HTTP protocol for the request.
123+
* Determine if the request is using HTTPS.
124124
*
125-
* @return string
125+
* @return bool
126126
*/
127-
public static function protocol()
127+
public static function is_secure()
128128
{
129-
return (isset($_SERVER['HTTPS']) and $_SERVER['HTTPS'] !== 'off') ? 'https' : 'http';
129+
return (static::protocol() == 'https');
130130
}
131131

132132
/**

0 commit comments

Comments
 (0)