Skip to content

Commit c6c93d9

Browse files
committed
docs: fix @param types
1 parent 30258d5 commit c6c93d9

2 files changed

Lines changed: 29 additions & 29 deletions

File tree

system/Helpers/html_helper.php

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
* Generates an HTML unordered list from an single or
2323
* multi-dimensional array.
2424
*
25-
* @param mixed $attributes HTML attributes string, array, object
25+
* @param array|object|string $attributes HTML attributes string, array, object
2626
*/
2727
function ul(array $list, $attributes = ''): string
2828
{
@@ -36,7 +36,7 @@ function ul(array $list, $attributes = ''): string
3636
*
3737
* Generates an HTML ordered list from an single or multi-dimensional array.
3838
*
39-
* @param mixed $attributes HTML attributes string, array, object
39+
* @param array|object|string $attributes HTML attributes string, array, object
4040
*/
4141
function ol(array $list, $attributes = ''): string
4242
{
@@ -50,8 +50,8 @@ function ol(array $list, $attributes = ''): string
5050
*
5151
* Generates an HTML ordered list from an single or multi-dimensional array.
5252
*
53-
* @param mixed $list
54-
* @param mixed $attributes string, array, object
53+
* @param array $list
54+
* @param array|object|string $attributes string, array, object
5555
*/
5656
function _list(string $type = 'ul', $list = [], $attributes = '', int $depth = 0): string
5757
{
@@ -224,8 +224,8 @@ function script_tag($src = '', bool $indexPage = false): string
224224
*
225225
* Generates link to a CSS file
226226
*
227-
* @param mixed $href Stylesheet href or an array
228-
* @param bool $indexPage should indexPage be added to the CSS path.
227+
* @param array|string $href Stylesheet href or an array
228+
* @param bool $indexPage should indexPage be added to the CSS path.
229229
*/
230230
function link_tag($href = '', string $rel = 'stylesheet', string $type = 'text/css', string $title = '', string $media = '', bool $indexPage = false, string $hreflang = ''): string
231231
{
@@ -281,9 +281,9 @@ function link_tag($href = '', string $rel = 'stylesheet', string $type = 'text/c
281281
* Generates a video element to embed videos. The video element can
282282
* contain one or more video sources
283283
*
284-
* @param mixed $src Either a source string or an array of sources
285-
* @param string $unsupportedMessage The message to display if the media tag is not supported by the browser
286-
* @param string $attributes HTML attributes
284+
* @param array|string $src Either a source string or an array of sources
285+
* @param string $unsupportedMessage The message to display if the media tag is not supported by the browser
286+
* @param string $attributes HTML attributes
287287
*/
288288
function video($src, string $unsupportedMessage = '', string $attributes = '', array $tracks = [], bool $indexPage = false): string
289289
{
@@ -327,9 +327,9 @@ function video($src, string $unsupportedMessage = '', string $attributes = '', a
327327
*
328328
* Generates an audio element to embed sounds
329329
*
330-
* @param mixed $src Either a source string or an array of sources
331-
* @param string $unsupportedMessage The message to display if the media tag is not supported by the browser.
332-
* @param string $attributes HTML attributes
330+
* @param array|string $src Either a source string or an array of sources
331+
* @param string $unsupportedMessage The message to display if the media tag is not supported by the browser.
332+
* @param string $attributes HTML attributes
333333
*/
334334
function audio($src, string $unsupportedMessage = '', string $attributes = '', array $tracks = [], bool $indexPage = false): string
335335
{

system/Helpers/url_helper.php

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -95,8 +95,8 @@ function site_url($relativePath = '', ?string $scheme = null, ?App $config = nul
9595
* Returns the base URL as defined by the App config.
9696
* Base URLs are trimmed site URLs without the index page.
9797
*
98-
* @param mixed $relativePath URI string or array of URI segments
99-
* @param string $scheme
98+
* @param array|string $relativePath URI string or array of URI segments
99+
* @param string $scheme
100100
*/
101101
function base_url($relativePath = '', ?string $scheme = null): string
102102
{
@@ -143,7 +143,7 @@ function current_url(bool $returnObject = false, ?IncomingRequest $request = nul
143143
* If that's not available, however, we'll use a sanitized url from $_SERVER['HTTP_REFERER']
144144
* which can be set by the user so is untrusted and not set by certain browsers/servers.
145145
*
146-
* @return mixed|string|URI
146+
* @return string|URI
147147
*/
148148
function previous_url(bool $returnObject = false)
149149
{
@@ -197,10 +197,10 @@ function index_page(?App $altConfig = null): string
197197
*
198198
* Creates an anchor based on the local URL.
199199
*
200-
* @param mixed $uri URI string or array of URI segments
201-
* @param string $title The link title
202-
* @param mixed $attributes Any attributes
203-
* @param App|null $altConfig Alternate configuration to use
200+
* @param array|string $uri URI string or array of URI segments
201+
* @param string $title The link title
202+
* @param array|object|string $attributes Any attributes
203+
* @param App|null $altConfig Alternate configuration to use
204204
*/
205205
function anchor($uri = '', string $title = '', $attributes = '', ?App $altConfig = null): string
206206
{
@@ -230,10 +230,10 @@ function anchor($uri = '', string $title = '', $attributes = '', ?App $altConfig
230230
* Creates an anchor based on the local URL. The link
231231
* opens a new window based on the attributes specified.
232232
*
233-
* @param string $uri the URL
234-
* @param string $title the link title
235-
* @param mixed $attributes any attributes
236-
* @param App|null $altConfig Alternate configuration to use
233+
* @param string $uri the URL
234+
* @param string $title the link title
235+
* @param array|false|object|string $attributes any attributes
236+
* @param App|null $altConfig Alternate configuration to use
237237
*/
238238
function anchor_popup($uri = '', string $title = '', $attributes = false, ?App $altConfig = null): string
239239
{
@@ -280,9 +280,9 @@ function anchor_popup($uri = '', string $title = '', $attributes = false, ?App $
280280
/**
281281
* Mailto Link
282282
*
283-
* @param string $email the email address
284-
* @param string $title the link title
285-
* @param mixed $attributes any attributes
283+
* @param string $email the email address
284+
* @param string $title the link title
285+
* @param array|object|string $attributes any attributes
286286
*/
287287
function mailto(string $email, string $title = '', $attributes = ''): string
288288
{
@@ -300,9 +300,9 @@ function mailto(string $email, string $title = '', $attributes = ''): string
300300
*
301301
* Create a spam-protected mailto link written in Javascript
302302
*
303-
* @param string $email the email address
304-
* @param string $title the link title
305-
* @param mixed $attributes any attributes
303+
* @param string $email the email address
304+
* @param string $title the link title
305+
* @param array|object|string $attributes any attributes
306306
*/
307307
function safe_mailto(string $email, string $title = '', $attributes = ''): string
308308
{

0 commit comments

Comments
 (0)