Skip to content

Commit a4b5319

Browse files
committed
refactor: remove uneeded code
1 parent 1aefd3d commit a4b5319

1 file changed

Lines changed: 0 additions & 15 deletions

File tree

system/Helpers/url_helper.php

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -105,23 +105,8 @@ function _get_uri($relativePath = '', ?App $config = null): URI
105105
*/
106106
function site_url($relativePath = '', ?string $scheme = null, ?App $config = null): string
107107
{
108-
$appConfig = null;
109-
if ($config === null) {
110-
/** @var App $appConfig */
111-
$appConfig = config('App');
112-
}
113-
114108
$uri = _get_uri($relativePath, $config);
115109

116-
if ($config === null) {
117-
$config = $appConfig;
118-
}
119-
120-
// Check if the baseURL scheme needs to be coerced into its secure version
121-
if ($config->forceGlobalSecureRequests && $uri->getScheme() === 'http') {
122-
$uri->setScheme('https');
123-
}
124-
125110
return URI::createURIString(
126111
$scheme ?? $uri->getScheme(),
127112
$uri->getAuthority(),

0 commit comments

Comments
 (0)