From 3dfd4bcb4c9ba326733ced3ff737e0e5e876fc2a Mon Sep 17 00:00:00 2001 From: kenjis Date: Fri, 6 Sep 2024 13:53:08 +0900 Subject: [PATCH 1/2] docs: fix param types --- user_guide_src/source/helpers/url_helper.rst | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/user_guide_src/source/helpers/url_helper.rst b/user_guide_src/source/helpers/url_helper.rst index 9278539b3aea..6d136855ea47 100644 --- a/user_guide_src/source/helpers/url_helper.rst +++ b/user_guide_src/source/helpers/url_helper.rst @@ -124,7 +124,7 @@ The following functions are available: :param boolean $returnObject: True if you would like a URI instance returned instead of a string. :returns: The URL the user was previously on - :rtype: string|mixed|\\CodeIgniter\\HTTP\\URI + :rtype: string|\\CodeIgniter\\HTTP\\URI Returns the full URL (including segments) of the page the user was previously on. @@ -182,10 +182,10 @@ The following functions are available: .. php:function:: anchor([$uri = ''[, $title = ''[, $attributes = ''[, $altConfig = null]]]]) - :param mixed $uri: URI string or array of URI segments - :param string $title: Anchor title - :param mixed $attributes: HTML attributes - :param \\Config\\App $altConfig: Alternate configuration to use + :param array|string $uri: URI string or array of URI segments + :param string $title: Anchor title + :param array|object|string $attributes: HTML attributes + :param \\Config\\App|null $altConfig: Alternate configuration to use :returns: HTML hyperlink (anchor tag) :rtype: string @@ -222,7 +222,7 @@ The following functions are available: :param string $uri: URI string :param string $title: Anchor title - :param mixed $attributes: HTML attributes + :param array|false|object|string $attributes: HTML attributes :param \\Config\\App $altConfig: Alternate configuration to use :returns: Pop-up hyperlink :rtype: string @@ -262,7 +262,7 @@ The following functions are available: :param string $email: E-mail address :param string $title: Anchor title - :param mixed $attributes: HTML attributes + :param array|object|string $attributes: HTML attributes :returns: A "mail to" hyperlink :rtype: string @@ -281,7 +281,7 @@ The following functions are available: :param string $email: E-mail address :param string $title: Anchor title - :param mixed $attributes: HTML attributes + :param array|object|string $attributes: HTML attributes :returns: A spam-safe "mail to" hyperlink :rtype: string @@ -378,7 +378,7 @@ The following functions are available: .. php:function:: url_to($controller[, ...$args]) :param string $controller: Route name or Controller::method - :param mixed ...$args: One or more parameters to be passed to the route. The last parameter allows you to set the locale. + :param int|string ...$args: One or more parameters to be passed to the route. The last parameter allows you to set the locale. :returns: Absolute URL :rtype: string From 2ef57abe351b9c1488290e944046c86d6ba38bdf Mon Sep 17 00:00:00 2001 From: kenjis Date: Fri, 6 Sep 2024 13:53:24 +0900 Subject: [PATCH 2/2] docs: decorate text --- user_guide_src/source/helpers/url_helper.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/user_guide_src/source/helpers/url_helper.rst b/user_guide_src/source/helpers/url_helper.rst index 6d136855ea47..44e52dd0d8a3 100644 --- a/user_guide_src/source/helpers/url_helper.rst +++ b/user_guide_src/source/helpers/url_helper.rst @@ -21,7 +21,7 @@ The following functions are available: .. php:function:: site_url([$uri = ''[, $protocol = null[, $altConfig = null]]]) :param array|string $uri: URI string or array of URI segments. - :param string $protocol: Protocol, e.g., 'http' or 'https'. If empty string '' is set, a protocol-relative link is returned. + :param string $protocol: Protocol, e.g., ``'http'`` or ``'https'``. If empty string ``''`` is set, a protocol-relative link is returned. :param \\Config\\App $altConfig: Alternate configuration to use. :returns: Site URL :rtype: string @@ -57,7 +57,7 @@ The following functions are available: .. php:function:: base_url([$uri = ''[, $protocol = null]]) :param array|string $uri: URI string or array of URI segments. - :param string $protocol: Protocol, e.g., 'http' or 'https'. If empty string '' is set, a protocol-relative link is returned. + :param string $protocol: Protocol, e.g., ``'http'`` or ``'https'``. If empty string ``''`` is set, a protocol-relative link is returned. :returns: Base URL :rtype: string @@ -292,7 +292,7 @@ The following functions are available: .. php:function:: auto_link($str[, $type = 'both'[, $popup = false]]) :param string $str: Input string - :param string $type: Link type ('email', 'url' or 'both') + :param string $type: Link type (``'email'``, ``'url'`` or ``'both'``) :param bool $popup: Whether to create popup links :returns: Linkified string :rtype: string