X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=src%2FWallabag%2FCoreBundle%2FTools%2FUtils.php;h=a16baca97e0a09e27e7c35e7ecafdfdf0131416e;hb=abd454c45633e335d9d63bcd250e760b968f8138;hp=b501ce6595503a1f0cfda55aea55b3a9ea5a507c;hpb=ff7b031d5792f7b6fd43b508d89397775bd1433c;p=github%2Fwallabag%2Fwallabag.git 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 @@ -26,16 +26,6 @@ class Utils return str_replace(array('+', '/'), '', $token); } - /** - * @param $words - * - * @return float - */ - public static function convertWordsToMinutes($words) - { - return floor($words / 200); - } - /** * For a given text, we calculate reading time for an article * based on 200 words per minute. @@ -46,6 +36,6 @@ class Utils */ public static function getReadingTime($text) { - return self::convertWordsToMinutes(str_word_count(strip_tags($text))); + return floor(str_word_count(strip_tags($text)) / 200); } }