Skip to content

Commit 6f93b8b

Browse files
committed
docs:replace type mixed at all helpers class.
1 parent 89292d8 commit 6f93b8b

5 files changed

Lines changed: 14 additions & 14 deletions

File tree

system/Helpers/array_helper.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ function dot_array_search(string $index, array $array)
4141
*
4242
* @internal This should not be used on its own.
4343
*
44-
* @return mixed
44+
* @return array|bool|float|int|object|string|null
4545
*/
4646
function _array_search_dot(array $indexes, array $array)
4747
{
@@ -103,9 +103,9 @@ function _array_search_dot(array $indexes, array $array)
103103
/**
104104
* Returns the value of an element at a key in an array of uncertain depth.
105105
*
106-
* @param mixed $key
106+
* @param float|int|string $key
107107
*
108-
* @return mixed|null
108+
* @return array|bool|float|int|object|string|null
109109
*/
110110
function array_deep_search($key, array $array)
111111
{

system/Helpers/cookie_helper.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ function get_cookie($index, bool $xssClean = false, ?string $prefix = '')
8686
/**
8787
* Delete a cookie
8888
*
89-
* @param mixed $name
89+
* @param string $name
9090
* @param string $domain the cookie domain. Usually: .yourdomain.com
9191
* @param string $path the cookie path
9292
* @param string $prefix the cookie prefix

system/Helpers/filesystem_helper.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -292,8 +292,8 @@ function get_dir_file_info(string $sourceDir, bool $topLevelOnly = true, bool $r
292292
* Options are: name, server_path, size, date, readable, writable, executable, fileperms
293293
* Returns false if the file cannot be found.
294294
*
295-
* @param string $file Path to file
296-
* @param mixed $returnedValues Array or comma separated string of information returned
295+
* @param string $file Path to file
296+
* @param array|string|null $returnedValues Array or comma separated string of information returned
297297
*
298298
* @return array|null
299299
*/

system/Helpers/number_helper.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
/**
1616
* Formats a numbers as bytes, based on size, and adds the appropriate suffix
1717
*
18-
* @param mixed $num Will be cast as int
19-
* @param string $locale
18+
* @param array|int|string $num Will be cast as int
19+
* @param string $locale
2020
*
2121
* @return bool|string
2222
*/

system/Helpers/text_helper.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -410,10 +410,10 @@ function word_wrap(string $str, int $charlim = 76): string
410410
*
411411
* This function will strip tags from a string, split it at its max_length and ellipsize
412412
*
413-
* @param string $str String to ellipsize
414-
* @param int $maxLength Max length of string
415-
* @param mixed $position int (1|0) or float, .5, .2, etc for position to split
416-
* @param string $ellipsis ellipsis ; Default '...'
413+
* @param string $str String to ellipsize
414+
* @param int $maxLength Max length of string
415+
* @param float|int $position int (1|0) or float, .5, .2, etc for position to split
416+
* @param string $ellipsis ellipsis ; Default '...'
417417
*
418418
* @return string Ellipsized string
419419
*/
@@ -446,9 +446,9 @@ function ellipsize(string $str, int $maxLength, $position = 1, string $ellipsis
446446
*
447447
* Removes slashes contained in a string or in an array
448448
*
449-
* @param mixed $str string or array
449+
* @param array|string $str string or array
450450
*
451-
* @return mixed string or array
451+
* @return array|string string or array
452452
*/
453453
function strip_slashes($str)
454454
{

0 commit comments

Comments
 (0)