+ if (array_key_exists('tags', $data)) {
+ $this->tagsAssigner->assignTagsToEntry(
+ $entry,
+ $data['tags']
+ );
+ }
+
+ $entry->setArchived($data['is_archived']);
+
+ if (!empty($data['created_at'])) {
+ $dt = new \DateTime();
+ $entry->setCreatedAt($dt->setTimestamp($data['created_at']));
+ }
+
+ $this->em->persist($entry);
+ ++$this->importedEntries;
+
+ return $entry;
+ }
+
+ /**
+ * Parse and insert all given entries.
+ *
+ * @param $entries
+ */
+ protected function parseEntries($entries)
+ {
+ $i = 1;
+ $entryToBeFlushed = [];
+
+ foreach ($entries as $importedEntry) {
+ if ((array) $importedEntry !== $importedEntry) {
+ continue;