From 496ef239baa83fca758ec4034b36fe462feeada4 Mon Sep 17 00:00:00 2001 From: Osman Bozdag Date: Mon, 2 Sep 2024 06:13:07 +0200 Subject: [PATCH 1/5] docs: Fix some typos in helpers/html_helper.rst Fix some typos in helpers/html_helper.rst --- user_guide_src/source/helpers/html_helper.rst | 21 +++++++++---------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/user_guide_src/source/helpers/html_helper.rst b/user_guide_src/source/helpers/html_helper.rst index b16bba0eb933..afa58c8ccb27 100644 --- a/user_guide_src/source/helpers/html_helper.rst +++ b/user_guide_src/source/helpers/html_helper.rst @@ -38,16 +38,15 @@ The following functions are available: .. literalinclude:: html_helper/002.php - There is an optional second parameter that is a true/false value that - specifics if the *src* should have the page specified by - ``$config['indexPage']`` added to the address it creates. + There is an optional second parameter, a true/false value, that + specifies if the *src* should have ``$config['indexPage']`` added to the address it creates. Presumably, this would be if you were using a media controller: .. literalinclude:: html_helper/003.php Additionally, an associative array can be passed as the first parameter, for complete control over all attributes and values. If an *alt* attribute - is not provided, CodeIgniter will generate an empty string. + is not provided, CodeIgniter will generate one with empty string. Example: @@ -220,8 +219,8 @@ The following functions are available: :returns: An HTML video element :rtype: string - Permits you to generate HTML video element from simple or - source arrays. Example: + Permits you to generate an HTML video element from a source string or an array of sources. + Example: .. literalinclude:: html_helper/014.php @@ -269,8 +268,8 @@ The following functions are available: :returns: An HTML source element :rtype: string - Lets you create HTML ```` elements. The first parameter contains the - source source. Example: + Lets you create HTML ```` elements. The first parameter contains the path of the resource. + Example: .. literalinclude:: html_helper/015.php @@ -352,11 +351,11 @@ The following functions are available: .. literalinclude:: html_helper/020.php - The following is a list of the pre-defined doctype choices. These are configurable, - pulled from **app/Config/DocTypes.php**, or they could be over-ridden in your **.env** configuration. + The following is a list of the pre-defined doctypes. These are + pulled from **app/Config/DocTypes.php**, or they could be overridden in your **.env** configuration. =============================== =================== ================================================================================================================================================== - Document type Option Result + Document type $type parameter Result =============================== =================== ================================================================================================================================================== XHTML 1.1 xhtml11 XHTML 1.0 Strict xhtml1-strict From 31abe0b1989b44ed6b0388f5fe895519f224b715 Mon Sep 17 00:00:00 2001 From: kenjis Date: Thu, 5 Sep 2024 12:09:23 +0900 Subject: [PATCH 2/5] docs: add missing @param --- system/Helpers/html_helper.php | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/system/Helpers/html_helper.php b/system/Helpers/html_helper.php index f3d33611dcef..39ba3b04f58d 100644 --- a/system/Helpers/html_helper.php +++ b/system/Helpers/html_helper.php @@ -24,6 +24,7 @@ * Generates an HTML unordered list from an single or * multi-dimensional array. * + * @param array $list List entries * @param array|object|string $attributes HTML attributes string, array, object */ function ul(array $list, $attributes = ''): string @@ -38,6 +39,7 @@ function ul(array $list, $attributes = ''): string * * Generates an HTML ordered list from an single or multi-dimensional array. * + * @param array $list List entries * @param array|object|string $attributes HTML attributes string, array, object */ function ol(array $list, $attributes = ''): string @@ -52,8 +54,8 @@ function ol(array $list, $attributes = ''): string * * Generates an HTML ordered list from an single or multi-dimensional array. * - * @param array $list - * @param array|object|string $attributes string, array, object + * @param array $list List entries + * @param array|object|string $attributes HTML attributes string, array, object */ function _list(string $type = 'ul', $list = [], $attributes = '', int $depth = 0): string { @@ -92,7 +94,7 @@ function _list(string $type = 'ul', $list = [], $attributes = '', int $depth = 0 * Generates an image element * * @param array|string $src Image source URI, or array of attributes and values - * @param bool $indexPage Whether to treat $src as a routed URI string + * @param bool $indexPage Should `Config\App::$indexPage` be added to the source path * @param array|object|string $attributes Additional HTML attributes */ function img($src = '', bool $indexPage = false, $attributes = ''): string @@ -192,7 +194,7 @@ function doctype(string $type = 'html5'): string * Generates link to a JS file * * @param array|string $src Script source or an array of attributes - * @param bool $indexPage Should indexPage be added to the JS path + * @param bool $indexPage Should `Config\App::$indexPage` be added to the JS path */ function script_tag($src = '', bool $indexPage = false): string { @@ -227,7 +229,7 @@ function script_tag($src = '', bool $indexPage = false): string * Generates link tag * * @param array|string $href Stylesheet href or an array - * @param bool $indexPage should indexPage be added to the CSS path. + * @param bool $indexPage Should `Config\App::$indexPage` be added to the CSS path. */ function link_tag( $href = '', @@ -288,6 +290,7 @@ function link_tag( * @param array|string $src Either a source string or an array of sources * @param string $unsupportedMessage The message to display if the media tag is not supported by the browser * @param string $attributes HTML attributes + * @param bool $indexPage Should `Config\App::$indexPage` be added to the source path */ function video($src, string $unsupportedMessage = '', string $attributes = '', array $tracks = [], bool $indexPage = false): string { @@ -334,6 +337,7 @@ function video($src, string $unsupportedMessage = '', string $attributes = '', a * @param array|string $src Either a source string or an array of sources * @param string $unsupportedMessage The message to display if the media tag is not supported by the browser. * @param string $attributes HTML attributes + * @param bool $indexPage Should `Config\App::$indexPage` be added to the source path */ function audio($src, string $unsupportedMessage = '', string $attributes = '', array $tracks = [], bool $indexPage = false): string { @@ -413,6 +417,7 @@ function _media(string $name, array $types = [], string $unsupportedMessage = '' * @param string $src The path of the media resource * @param string $type The MIME-type of the resource with optional codecs parameters * @param string $attributes HTML attributes + * @param bool $indexPage Should `Config\App::$indexPage` be added to the source path */ function source(string $src, string $type = 'unknown', string $attributes = '', bool $indexPage = false): string { @@ -438,7 +443,10 @@ function source(string $src, string $type = 'unknown', string $attributes = '', * Generates a track element to specify timed tracks. The tracks are * formatted in WebVTT format. * - * @param string $src The path of the .VTT file + * @param string $src The path of the .VTT file + * @param string $kind How the text track is meant to be used + * @param string $srcLanguage Language of the track text data + * @param string $label A user-readable title of the text track */ function track(string $src, string $kind, string $srcLanguage, string $label): string { @@ -461,6 +469,7 @@ function track(string $src, string $kind, string $srcLanguage, string $label): s * @param string $data A resource URL * @param string $type Content-type of the resource * @param string $attributes HTML attributes + * @param bool $indexPage Should `Config\App::$indexPage` be added to the data path */ function object(string $data, string $type = 'unknown', string $attributes = '', array $params = [], bool $indexPage = false): string { @@ -513,6 +522,7 @@ function param(string $name, string $value, string $type = 'ref', string $attrib * @param string $src The path of the resource to embed * @param string $type MIME-type * @param string $attributes HTML attributes + * @param bool $indexPage Should `Config\App::$indexPage` be added to the source path */ function embed(string $src, string $type = 'unknown', string $attributes = '', bool $indexPage = false): string { From 1daaa579d99becdd7ff1cc4ad608f3d86c3b6849 Mon Sep 17 00:00:00 2001 From: kenjis Date: Thu, 5 Sep 2024 12:09:53 +0900 Subject: [PATCH 3/5] docs: fix typos --- system/Helpers/html_helper.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/system/Helpers/html_helper.php b/system/Helpers/html_helper.php index 39ba3b04f58d..b9e5e5c8ed0e 100644 --- a/system/Helpers/html_helper.php +++ b/system/Helpers/html_helper.php @@ -21,8 +21,8 @@ /** * Unordered List * - * Generates an HTML unordered list from an single or - * multi-dimensional array. + * Generates an HTML unordered list from a single or + * multidimensional array. * * @param array $list List entries * @param array|object|string $attributes HTML attributes string, array, object @@ -37,7 +37,7 @@ function ul(array $list, $attributes = ''): string /** * Ordered List * - * Generates an HTML ordered list from an single or multi-dimensional array. + * Generates an HTML ordered list from a single or multidimensional array. * * @param array $list List entries * @param array|object|string $attributes HTML attributes string, array, object @@ -52,7 +52,7 @@ function ol(array $list, $attributes = ''): string /** * Generates the list * - * Generates an HTML ordered list from an single or multi-dimensional array. + * Generates an HTML ordered list from a single or multidimensional array. * * @param array $list List entries * @param array|object|string $attributes HTML attributes string, array, object From 06958be3524b0daa58ecfd471d093bad0b7e257f Mon Sep 17 00:00:00 2001 From: Thomas Meschke Date: Thu, 5 Sep 2024 12:28:12 +0200 Subject: [PATCH 4/5] Fix typo in BaseConnection.php --- system/Database/BaseConnection.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/system/Database/BaseConnection.php b/system/Database/BaseConnection.php index dce399bdefb5..56340c8decd5 100644 --- a/system/Database/BaseConnection.php +++ b/system/Database/BaseConnection.php @@ -784,9 +784,9 @@ public function transStart(bool $testMode = false): bool * * @return $this */ - public function transException(bool $transExcetion) + public function transException(bool $transException) { - $this->transException = $transExcetion; + $this->transException = $transException; return $this; } From fe6efeddf83e01bff730901d422a4869c719e683 Mon Sep 17 00:00:00 2001 From: Osman Bozdag Date: Thu, 5 Sep 2024 21:38:02 +0200 Subject: [PATCH 5/5] docs: Update $config['indexPage'] in helpers/html_helper.rst Update $config['indexPage'] to Config\App::$indexPage in img function in helpers/html_helper.rst --- user_guide_src/source/helpers/html_helper.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/user_guide_src/source/helpers/html_helper.rst b/user_guide_src/source/helpers/html_helper.rst index afa58c8ccb27..4e81d6801d4d 100644 --- a/user_guide_src/source/helpers/html_helper.rst +++ b/user_guide_src/source/helpers/html_helper.rst @@ -39,7 +39,7 @@ The following functions are available: .. literalinclude:: html_helper/002.php There is an optional second parameter, a true/false value, that - specifies if the *src* should have ``$config['indexPage']`` added to the address it creates. + specifies if the *src* should have ``Config\App::$indexPage`` added to the address it creates. Presumably, this would be if you were using a media controller: .. literalinclude:: html_helper/003.php