From 252ebd60719d32ec954d0519c9edf2b52b03310c Mon Sep 17 00:00:00 2001 From: Jeremy Benoist Date: Wed, 30 Dec 2015 12:23:51 +0100 Subject: Rewrote Pocket Import For the moment, we won't do a queue system, just a plain synchronous import. We also use ContentProxy to grab content for each article from Pocket. Error from Pocket are now logged using the logger. The ImportInterface need to be simple and not related to oAuth (not all import will use that method). --- src/Wallabag/CoreBundle/Tools/Utils.php | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) (limited to 'src/Wallabag/CoreBundle') 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); } } -- cgit v1.2.3