}
$entries = [];
- $handle = fopen($this->filepath, 'rb');
+ $handle = fopen($this->filepath, 'r');
while (false !== ($data = fgetcsv($handle, 10240))) {
if ('URL' === $data[0]) {
continue;
return true;
}
+ /**
+ * {@inheritdoc}
+ */
+ public function validateEntry(array $importedEntry)
+ {
+ if (empty($importedEntry['url'])) {
+ return false;
+ }
+
+ return true;
+ }
+
/**
* {@inheritdoc}
*/
);
}
- $entry->setArchived($importedEntry['is_archived']);
+ $entry->updateArchived($importedEntry['is_archived']);
$entry->setStarred($importedEntry['is_starred']);
$this->em->persist($entry);