1
0
Fork 0
mirror of https://github.com/wallabag/wallabag.git synced 2025-09-15 18:57:05 +00:00

Remove unsed things

This commit is contained in:
Jeremy Benoist 2015-08-20 20:10:32 +02:00
parent 0ab7404f93
commit 6eebd8c909
6 changed files with 15 additions and 157 deletions

View file

@ -25,4 +25,17 @@ class Utils
// remove character which can broken the url
return str_replace(array('+', '/'), '', $token);
}
/**
* For a given text, we calculate reading time for an article
* based on 200 words per minute
*
* @param $text
*
* @return float
*/
public static function getReadingTime($text)
{
return floor(str_word_count(strip_tags($text)) / 200);
}
}