aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag/CoreBundle
diff options
context:
space:
mode:
Diffstat (limited to 'src/Wallabag/CoreBundle')
-rw-r--r--src/Wallabag/CoreBundle/Tools/Utils.php12
1 files changed, 1 insertions, 11 deletions
diff --git a/src/Wallabag/CoreBundle/Tools/Utils.php b/src/Wallabag/CoreBundle/Tools/Utils.php
index b501ce65..a16baca9 100644
--- a/src/Wallabag/CoreBundle/Tools/Utils.php
+++ b/src/Wallabag/CoreBundle/Tools/Utils.php
@@ -27,16 +27,6 @@ class Utils
27 } 27 }
28 28
29 /** 29 /**
30 * @param $words
31 *
32 * @return float
33 */
34 public static function convertWordsToMinutes($words)
35 {
36 return floor($words / 200);
37 }
38
39 /**
40 * For a given text, we calculate reading time for an article 30 * For a given text, we calculate reading time for an article
41 * based on 200 words per minute. 31 * based on 200 words per minute.
42 * 32 *
@@ -46,6 +36,6 @@ class Utils
46 */ 36 */
47 public static function getReadingTime($text) 37 public static function getReadingTime($text)
48 { 38 {
49 return self::convertWordsToMinutes(str_word_count(strip_tags($text))); 39 return floor(str_word_count(strip_tags($text)) / 200);
50 } 40 }
51} 41}