]> git.immae.eu Git - github/wallabag/wallabag.git/blobdiff - src/Wallabag/ImportBundle/Import/ChromeImport.php
CS
[github/wallabag/wallabag.git] / src / Wallabag / ImportBundle / Import / ChromeImport.php
index 1af7cc87ba5b023fbb3e60976171f49394d5ed34..09183abe47cbe321ed8067de34a9f816a6fde97c 100644 (file)
@@ -33,31 +33,22 @@ class ChromeImport extends BrowserImport
     /**
      * {@inheritdoc}
      */
-    protected function prepareEntry($entry = [])
+    protected function prepareEntry(array $entry = [])
     {
         $data = [
-          'title' => $entry['name'],
-          'html' => '',
-          'url' => $entry['url'],
-          'is_archived' => $this->markAsRead,
-          'tags' => '',
-          'created_at' => $entry['date_added'],
+            'title' => $entry['name'],
+            'html' => false,
+            'url' => $entry['url'],
+            'is_archived' => (int) $this->markAsRead,
+            'is_starred' => false,
+            'tags' => '',
+            'created_at' => substr($entry['date_added'], 0, 10),
         ];
 
-        if (array_key_exists('tags', $entry) && $entry['tags'] != '') {
+        if (array_key_exists('tags', $entry) && '' !== $entry['tags']) {
             $data['tags'] = $entry['tags'];
         }
 
         return $data;
     }
-
-    /**
-     * {@inheritdoc}
-     */
-    protected function setEntryAsRead(array $importedEntry)
-    {
-        $importedEntry['is_archived'] = 1;
-
-        return $importedEntry;
-    }
 }