Skip to content

Commit

Permalink
refactor:优化 full_url 函数的参数类型
Browse files Browse the repository at this point in the history
  • Loading branch information
build-admin committed Jul 2, 2024
1 parent 7bdc307 commit cf7b998
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions app/common.php
Original file line number Diff line number Diff line change
Expand Up @@ -139,12 +139,12 @@ function get_route_remark(): string

/**
* 获取资源完整url地址;若安装了云存储或 config/buildadmin.php 配置了CdnUrl,则自动使用对应的CdnUrl
* @param string $relativeUrl 资源相对地址 不传入则获取域名
* @param bool $domain 是否携带域名 或者直接传入域名
* @param string $default 默认值
* @param string $relativeUrl 资源相对地址 不传入则获取域名
* @param string|bool $domain 是否携带域名 或者直接传入域名
* @param string $default 默认值
* @return string
*/
function full_url(string $relativeUrl = '', bool $domain = true, string $default = ''): string
function full_url(string $relativeUrl = '', string|bool $domain = true, string $default = ''): string
{
// 存储/上传资料配置
Event::trigger('uploadConfigInit', App::getInstance());
Expand Down

0 comments on commit cf7b998

Please sign in to comment.