Polish docs for HTML, Inflector, Language, Number, Path, Security and Smiley helpers
Also fixed a DB_cache bug introduced in previous commit and removed an unused parameter in a smiley helper
diff --git a/system/database/DB_cache.php b/system/database/DB_cache.php
index b8f8995..1be80c5 100644
--- a/system/database/DB_cache.php
+++ b/system/database/DB_cache.php
@@ -199,7 +199,7 @@
*/
public function delete_all()
{
- delete_files($this->db->cachedir, TRUE, 0, TRUE);
+ delete_files($this->db->cachedir, TRUE, TRUE);
}
}
diff --git a/system/helpers/html_helper.php b/system/helpers/html_helper.php
index 404392f..fa49f7d 100644
--- a/system/helpers/html_helper.php
+++ b/system/helpers/html_helper.php
@@ -157,12 +157,12 @@
/**
* Generates HTML BR tags based on number supplied
*
- * @param int
+ * @param int $count Number of times to repeat the tag
* @return string
*/
- function br($num = 1)
+ function br($count = 1)
{
- return str_repeat('<br />', $num);
+ return str_repeat('<br />', $count);
}
}
diff --git a/system/helpers/inflector_helper.php b/system/helpers/inflector_helper.php
index 6f1086a..59cb296 100644
--- a/system/helpers/inflector_helper.php
+++ b/system/helpers/inflector_helper.php
@@ -45,7 +45,7 @@
*
* Takes a plural word and makes it singular
*
- * @param string
+ * @param string $str Input string
* @return string
*/
function singular($str)
@@ -109,11 +109,10 @@
*
* Takes a singular word and makes it plural
*
- * @param string
- * @param bool
+ * @param string $str Input string
* @return string
*/
- function plural($str, $force = FALSE)
+ function plural($str)
{
$result = strval($str);
@@ -166,7 +165,7 @@
*
* Takes multiple words separated by spaces or underscores and camelizes them
*
- * @param string
+ * @param string $str Input string
* @return string
*/
function camelize($str)
@@ -184,7 +183,7 @@
*
* Takes multiple words separated by spaces and underscores them
*
- * @param string
+ * @param string $str Input string
* @return string
*/
function underscore($str)
@@ -202,8 +201,8 @@
*
* Takes multiple words separated by the separator and changes them to spaces
*
- * @param string $str
- * @param string $separator
+ * @param string $str Input string
+ * @param string $separator Input separator
* @return string
*/
function humanize($str, $separator = '_')
@@ -219,12 +218,12 @@
/**
* Checks if the given word has a plural version.
*
- * @param string the word to check
- * @return bool if the word is countable
+ * @param string $word Word to check
+ * @return bool
*/
function is_countable($word)
{
- return ! in_array(strtolower(strval($word)),
+ return ! in_array(strtolower($word),
array(
'equipment', 'information', 'rice', 'money',
'species', 'series', 'fish', 'meta'
diff --git a/system/helpers/smiley_helper.php b/system/helpers/smiley_helper.php
index 6ae8937..4b49175 100644
--- a/system/helpers/smiley_helper.php
+++ b/system/helpers/smiley_helper.php
@@ -131,10 +131,9 @@
*
* @param string the URL to the folder containing the smiley images
* @param array
- * @param array
* @return array
*/
- function get_clickable_smileys($image_url, $alias = '', $smileys = NULL)
+ function get_clickable_smileys($image_url, $alias = '')
{
// For backward compatibility with js_insert_smiley
if (is_array($alias))
@@ -143,7 +142,7 @@
}
elseif (FALSE === ($smileys = _get_smiley_array()))
{
- return $smileys;
+ return FALSE;
}
// Add a trailing slash to the file path if needed