]> git.immae.eu Git - github/wallabag/wallabag.git/blobdiff - src/Wallabag/ImportBundle/Import/FirefoxImport.php
Add a real configuration for CS-Fixer
[github/wallabag/wallabag.git] / src / Wallabag / ImportBundle / Import / FirefoxImport.php
index 351cbef12683545b47404fbad95c36a2ce19f6ad..c18e7e93e64e42679cbf66567b72b1a3a80064f4 100644 (file)
@@ -33,31 +33,22 @@ class FirefoxImport 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'],
-      ];
-
-        if (array_key_exists('tags', $entry) && $entry['tags'] != '') {
+            'title' => $entry['title'],
+            'html' => false,
+            'url' => $entry['uri'],
+            'is_archived' => (int) $this->markAsRead,
+            'is_starred' => false,
+            'tags' => '',
+            'created_at' => substr($entry['dateAdded'], 0, 10),
+        ];
+
+        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;
-    }
 }