Some cleanup & refactor

This commit is contained in:
Jeremy Benoist
2016-09-05 07:50:10 +02:00
parent 02f6489572
commit 3849a9f323
6 changed files with 60 additions and 70 deletions

View File

@ -40,19 +40,13 @@ class WallabagV2Import extends WallabagImport
] + $entry;
}
protected function parseEntriesForProducer($entries)
/**
* {@inheritdoc}
*/
protected function setEntryAsRead(array $importedEntry)
{
foreach ($entries as $importedEntry) {
// set userId for the producer (it won't know which user is connected)
$importedEntry['userId'] = $this->user->getId();
$importedEntry['is_archived'] = 1;
if ($this->markAsRead) {
$importedEntry['is_archived'] = 1;
}
++$this->importedEntries;
$this->producer->publish(json_encode($importedEntry));
}
return $importedEntry;
}
}