Skip to content

Commit

Permalink
docs: fix @param types
Browse files Browse the repository at this point in the history
  • Loading branch information
kenjis committed Oct 27, 2022
1 parent 30258d5 commit 007dd44
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 29 deletions.
24 changes: 12 additions & 12 deletions system/Helpers/html_helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
* Generates an HTML unordered list from an single or
* multi-dimensional array.
*
* @param mixed $attributes HTML attributes string, array, object
* @param array|object|string $attributes HTML attributes string, array, object
*/
function ul(array $list, $attributes = ''): string
{
Expand All @@ -36,7 +36,7 @@ function ul(array $list, $attributes = ''): string
*
* Generates an HTML ordered list from an single or multi-dimensional array.
*
* @param mixed $attributes HTML attributes string, array, object
* @param array|object|string $attributes HTML attributes string, array, object
*/
function ol(array $list, $attributes = ''): string
{
Expand All @@ -50,8 +50,8 @@ function ol(array $list, $attributes = ''): string
*
* Generates an HTML ordered list from an single or multi-dimensional array.
*
* @param mixed $list
* @param mixed $attributes string, array, object
* @param array $list
* @param array|object|string $attributes string, array, object
*/
function _list(string $type = 'ul', $list = [], $attributes = '', int $depth = 0): string
{
Expand Down Expand Up @@ -224,8 +224,8 @@ function script_tag($src = '', bool $indexPage = false): string
*
* Generates link to a CSS file
*
* @param mixed $href Stylesheet href or an array
* @param bool $indexPage should indexPage be added to the CSS path.
* @param array|string $href Stylesheet href or an array
* @param bool $indexPage should indexPage be added to the CSS path.
*/
function link_tag($href = '', string $rel = 'stylesheet', string $type = 'text/css', string $title = '', string $media = '', bool $indexPage = false, string $hreflang = ''): string
{
Expand Down Expand Up @@ -281,9 +281,9 @@ function link_tag($href = '', string $rel = 'stylesheet', string $type = 'text/c
* Generates a video element to embed videos. The video element can
* contain one or more video sources
*
* @param mixed $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 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
*/
function video($src, string $unsupportedMessage = '', string $attributes = '', array $tracks = [], bool $indexPage = false): string
{
Expand Down Expand Up @@ -327,9 +327,9 @@ function video($src, string $unsupportedMessage = '', string $attributes = '', a
*
* Generates an audio element to embed sounds
*
* @param mixed $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 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
*/
function audio($src, string $unsupportedMessage = '', string $attributes = '', array $tracks = [], bool $indexPage = false): string
{
Expand Down
34 changes: 17 additions & 17 deletions system/Helpers/url_helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,8 @@ function site_url($relativePath = '', ?string $scheme = null, ?App $config = nul
* Returns the base URL as defined by the App config.
* Base URLs are trimmed site URLs without the index page.
*
* @param mixed $relativePath URI string or array of URI segments
* @param string $scheme
* @param array|string $relativePath URI string or array of URI segments
* @param string $scheme
*/
function base_url($relativePath = '', ?string $scheme = null): string
{
Expand Down Expand Up @@ -143,7 +143,7 @@ function current_url(bool $returnObject = false, ?IncomingRequest $request = nul
* If that's not available, however, we'll use a sanitized url from $_SERVER['HTTP_REFERER']
* which can be set by the user so is untrusted and not set by certain browsers/servers.
*
* @return mixed|string|URI
* @return string|URI
*/
function previous_url(bool $returnObject = false)
{
Expand Down Expand Up @@ -197,10 +197,10 @@ function index_page(?App $altConfig = null): string
*
* Creates an anchor based on the local URL.
*
* @param mixed $uri URI string or array of URI segments
* @param string $title The link title
* @param mixed $attributes Any attributes
* @param App|null $altConfig Alternate configuration to use
* @param array|string $uri URI string or array of URI segments
* @param string $title The link title
* @param array|object|string $attributes Any attributes
* @param App|null $altConfig Alternate configuration to use
*/
function anchor($uri = '', string $title = '', $attributes = '', ?App $altConfig = null): string
{
Expand Down Expand Up @@ -230,10 +230,10 @@ function anchor($uri = '', string $title = '', $attributes = '', ?App $altConfig
* Creates an anchor based on the local URL. The link
* opens a new window based on the attributes specified.
*
* @param string $uri the URL
* @param string $title the link title
* @param mixed $attributes any attributes
* @param App|null $altConfig Alternate configuration to use
* @param string $uri the URL
* @param string $title the link title
* @param array|object|string|false $attributes any attributes
* @param App|null $altConfig Alternate configuration to use
*/
function anchor_popup($uri = '', string $title = '', $attributes = false, ?App $altConfig = null): string
{
Expand Down Expand Up @@ -280,9 +280,9 @@ function anchor_popup($uri = '', string $title = '', $attributes = false, ?App $
/**
* Mailto Link
*
* @param string $email the email address
* @param string $title the link title
* @param mixed $attributes any attributes
* @param string $email the email address
* @param string $title the link title
* @param array|object|string $attributes any attributes
*/
function mailto(string $email, string $title = '', $attributes = ''): string
{
Expand All @@ -300,9 +300,9 @@ function mailto(string $email, string $title = '', $attributes = ''): string
*
* Create a spam-protected mailto link written in Javascript
*
* @param string $email the email address
* @param string $title the link title
* @param mixed $attributes any attributes
* @param string $email the email address
* @param string $title the link title
* @param array|object|string $attributes any attributes
*/
function safe_mailto(string $email, string $title = '', $attributes = ''): string
{
Expand Down

0 comments on commit 007dd44

Please sign in to comment.