aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag/CoreBundle/Tools/Utils.php
diff options
context:
space:
mode:
authorJeremy Benoist <jeremy.benoist@gmail.com>2015-08-20 20:10:32 +0200
committerJeremy Benoist <jeremy.benoist@gmail.com>2015-08-20 20:39:26 +0200
commit6eebd8c90941ddfe8eeca1961f7a7a493e227687 (patch)
treea0563695f05ecde2e760402c79ff816b35212be9 /src/Wallabag/CoreBundle/Tools/Utils.php
parent0ab7404f93670ed161b67528c1a61c5bfa92d42b (diff)
downloadwallabag-6eebd8c90941ddfe8eeca1961f7a7a493e227687.tar.gz
wallabag-6eebd8c90941ddfe8eeca1961f7a7a493e227687.tar.zst
wallabag-6eebd8c90941ddfe8eeca1961f7a7a493e227687.zip
Remove unsed things
Diffstat (limited to 'src/Wallabag/CoreBundle/Tools/Utils.php')
-rw-r--r--src/Wallabag/CoreBundle/Tools/Utils.php13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/Wallabag/CoreBundle/Tools/Utils.php b/src/Wallabag/CoreBundle/Tools/Utils.php
index 7e2968e7..a4fbcffd 100644
--- a/src/Wallabag/CoreBundle/Tools/Utils.php
+++ b/src/Wallabag/CoreBundle/Tools/Utils.php
@@ -25,4 +25,17 @@ class Utils
25 // remove character which can broken the url 25 // remove character which can broken the url
26 return str_replace(array('+', '/'), '', $token); 26 return str_replace(array('+', '/'), '', $token);
27 } 27 }
28
29 /**
30 * For a given text, we calculate reading time for an article
31 * based on 200 words per minute
32 *
33 * @param $text
34 *
35 * @return float
36 */
37 public static function getReadingTime($text)
38 {
39 return floor(str_word_count(strip_tags($text)) / 200);
40 }
28} 41}