Skip to content

Commit 0deb909

Browse files
authored
Merge pull request #9168 from kenjis/add-phpdoc-html_helper
docs: update PHPDoc in html_helper
2 parents 4cbe5ec + 1daaa57 commit 0deb909

File tree

1 file changed

+20
-10
lines changed

1 file changed

+20
-10
lines changed

system/Helpers/html_helper.php

Lines changed: 20 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,10 @@
2121
/**
2222
* Unordered List
2323
*
24-
* Generates an HTML unordered list from an single or
25-
* multi-dimensional array.
24+
* Generates an HTML unordered list from a single or
25+
* multidimensional array.
2626
*
27+
* @param array $list List entries
2728
* @param array|object|string $attributes HTML attributes string, array, object
2829
*/
2930
function ul(array $list, $attributes = ''): string
@@ -36,8 +37,9 @@ function ul(array $list, $attributes = ''): string
3637
/**
3738
* Ordered List
3839
*
39-
* Generates an HTML ordered list from an single or multi-dimensional array.
40+
* Generates an HTML ordered list from a single or multidimensional array.
4041
*
42+
* @param array $list List entries
4143
* @param array|object|string $attributes HTML attributes string, array, object
4244
*/
4345
function ol(array $list, $attributes = ''): string
@@ -50,10 +52,10 @@ function ol(array $list, $attributes = ''): string
5052
/**
5153
* Generates the list
5254
*
53-
* Generates an HTML ordered list from an single or multi-dimensional array.
55+
* Generates an HTML ordered list from a single or multidimensional array.
5456
*
55-
* @param array $list
56-
* @param array|object|string $attributes string, array, object
57+
* @param array $list List entries
58+
* @param array|object|string $attributes HTML attributes string, array, object
5759
*/
5860
function _list(string $type = 'ul', $list = [], $attributes = '', int $depth = 0): string
5961
{
@@ -92,7 +94,7 @@ function _list(string $type = 'ul', $list = [], $attributes = '', int $depth = 0
9294
* Generates an image element
9395
*
9496
* @param array|string $src Image source URI, or array of attributes and values
95-
* @param bool $indexPage Whether to treat $src as a routed URI string
97+
* @param bool $indexPage Should `Config\App::$indexPage` be added to the source path
9698
* @param array|object|string $attributes Additional HTML attributes
9799
*/
98100
function img($src = '', bool $indexPage = false, $attributes = ''): string
@@ -192,7 +194,7 @@ function doctype(string $type = 'html5'): string
192194
* Generates link to a JS file
193195
*
194196
* @param array|string $src Script source or an array of attributes
195-
* @param bool $indexPage Should indexPage be added to the JS path
197+
* @param bool $indexPage Should `Config\App::$indexPage` be added to the JS path
196198
*/
197199
function script_tag($src = '', bool $indexPage = false): string
198200
{
@@ -227,7 +229,7 @@ function script_tag($src = '', bool $indexPage = false): string
227229
* Generates link tag
228230
*
229231
* @param array<string, bool|string>|string $href Stylesheet href or an array
230-
* @param bool $indexPage should indexPage be added to the CSS path.
232+
* @param bool $indexPage Should `Config\App::$indexPage` be added to the CSS path.
231233
*/
232234
function link_tag(
233235
$href = '',
@@ -288,6 +290,7 @@ function link_tag(
288290
* @param array|string $src Either a source string or an array of sources
289291
* @param string $unsupportedMessage The message to display if the media tag is not supported by the browser
290292
* @param string $attributes HTML attributes
293+
* @param bool $indexPage Should `Config\App::$indexPage` be added to the source path
291294
*/
292295
function video($src, string $unsupportedMessage = '', string $attributes = '', array $tracks = [], bool $indexPage = false): string
293296
{
@@ -334,6 +337,7 @@ function video($src, string $unsupportedMessage = '', string $attributes = '', a
334337
* @param array|string $src Either a source string or an array of sources
335338
* @param string $unsupportedMessage The message to display if the media tag is not supported by the browser.
336339
* @param string $attributes HTML attributes
340+
* @param bool $indexPage Should `Config\App::$indexPage` be added to the source path
337341
*/
338342
function audio($src, string $unsupportedMessage = '', string $attributes = '', array $tracks = [], bool $indexPage = false): string
339343
{
@@ -413,6 +417,7 @@ function _media(string $name, array $types = [], string $unsupportedMessage = ''
413417
* @param string $src The path of the media resource
414418
* @param string $type The MIME-type of the resource with optional codecs parameters
415419
* @param string $attributes HTML attributes
420+
* @param bool $indexPage Should `Config\App::$indexPage` be added to the source path
416421
*/
417422
function source(string $src, string $type = 'unknown', string $attributes = '', bool $indexPage = false): string
418423
{
@@ -438,7 +443,10 @@ function source(string $src, string $type = 'unknown', string $attributes = '',
438443
* Generates a track element to specify timed tracks. The tracks are
439444
* formatted in WebVTT format.
440445
*
441-
* @param string $src The path of the .VTT file
446+
* @param string $src The path of the .VTT file
447+
* @param string $kind How the text track is meant to be used
448+
* @param string $srcLanguage Language of the track text data
449+
* @param string $label A user-readable title of the text track
442450
*/
443451
function track(string $src, string $kind, string $srcLanguage, string $label): string
444452
{
@@ -461,6 +469,7 @@ function track(string $src, string $kind, string $srcLanguage, string $label): s
461469
* @param string $data A resource URL
462470
* @param string $type Content-type of the resource
463471
* @param string $attributes HTML attributes
472+
* @param bool $indexPage Should `Config\App::$indexPage` be added to the data path
464473
*/
465474
function object(string $data, string $type = 'unknown', string $attributes = '', array $params = [], bool $indexPage = false): string
466475
{
@@ -513,6 +522,7 @@ function param(string $name, string $value, string $type = 'ref', string $attrib
513522
* @param string $src The path of the resource to embed
514523
* @param string $type MIME-type
515524
* @param string $attributes HTML attributes
525+
* @param bool $indexPage Should `Config\App::$indexPage` be added to the source path
516526
*/
517527
function embed(string $src, string $type = 'unknown', string $attributes = '', bool $indexPage = false): string
518528
{

0 commit comments

Comments
 (0)