Improve documentation with brief key

This commit is contained in:
Hypolite Petovan 2017-11-19 08:41:16 -05:00
parent 2336fa9d74
commit 0fe4233569

View file

@ -1362,11 +1362,14 @@ function status_editor(App $a, $x, $notes_cid = 0, $popup = false) {
} }
/** /**
* Returns all the children in the given item list of the given parent. If threading * Returns all the children in the given item list of the given parent, recusrsively
* is allowed, does it recursively. * or not.
*
* @brief Returns all the children in the given item list of the given parent
* *
* @param array $item_list * @param array $item_list
* @param array $parent * @param array $parent
* @param bool $recursive
* @return type * @return type
*/ */
function get_item_children(array $item_list, array $parent, $recursive = true) function get_item_children(array $item_list, array $parent, $recursive = true)
@ -1394,7 +1397,7 @@ function get_item_children(array $item_list, array $parent, $recursive = true)
} }
/** /**
* Recursively sorts a tree-like item array * @brief Recursively sorts a tree-like item array
* *
* @param array $items * @param array $items
* @return array * @return array
@ -1412,7 +1415,7 @@ function sort_item_children(array $items)
} }
/** /**
* Recursively add all children items at the top level of a list * @brief Recursively add all children items at the top level of a list
* *
* @param array $children List of items to append * @param array $children List of items to append
* @param array $item_list * @param array $item_list
@ -1438,6 +1441,8 @@ function add_children_to_list(array $children, array &$item_list)
* This process is rendered somewhat more complicated because items can be either * This process is rendered somewhat more complicated because items can be either
* replies or likes, and these don't factor at all in the reply count/last reply. * replies or likes, and these don't factor at all in the reply count/last reply.
* *
* @brief Selectively flattens a tree-like item structure to prevent threading stairs
*
* @param array $parent A tree-like array of items * @param array $parent A tree-like array of items
* @return array * @return array
*/ */
@ -1488,6 +1493,8 @@ function smart_flatten_conversation(array $parent)
* sort the top-level posts either on "created" or "commented", and finally * sort the top-level posts either on "created" or "commented", and finally
* append all the items at the top level (???) * append all the items at the top level (???)
* *
* @brief Expands a flat item list into a conversation array for display
*
* @param array $item_list A list of items belonging to one or more conversations * @param array $item_list A list of items belonging to one or more conversations
* @param string $order Either on "created" or "commented" * @param string $order Either on "created" or "commented"
* @return array * @return array
@ -1548,7 +1555,7 @@ function conv_sort(array $item_list, $order)
} }
/** /**
* usort() callback to sort item arrays by the created key * @brief usort() callback to sort item arrays by the created key
* *
* @param array $a * @param array $a
* @param array $b * @param array $b
@ -1560,7 +1567,7 @@ function sort_thr_created(array $a, array $b)
} }
/** /**
* usort() callback to reverse sort item arrays by the created key * @brief usort() callback to reverse sort item arrays by the created key
* *
* @param array $a * @param array $a
* @param array $b * @param array $b
@ -1572,7 +1579,7 @@ function sort_thr_created_rev(array $a, array $b)
} }
/** /**
* usort() callback to sort item arrays by the commented key * @brief usort() callback to sort item arrays by the commented key
* *
* @param array $a * @param array $a
* @param array $b * @param array $b