aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag/CoreBundle
diff options
context:
space:
mode:
authorJeremy Benoist <jeremy.benoist@gmail.com>2015-12-30 12:23:51 +0100
committerJeremy Benoist <jeremy.benoist@gmail.com>2016-01-02 23:27:41 +0100
commit252ebd60719d32ec954d0519c9edf2b52b03310c (patch)
tree044c97abeda75c33901d8bfcd33fa107279b1778 /src/Wallabag/CoreBundle
parentb4b592a0c0ee356e81775baf8f9976288d7b686c (diff)
downloadwallabag-252ebd60719d32ec954d0519c9edf2b52b03310c.tar.gz
wallabag-252ebd60719d32ec954d0519c9edf2b52b03310c.tar.zst
wallabag-252ebd60719d32ec954d0519c9edf2b52b03310c.zip
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).
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}