*/
public function parseEntry(array $importedEntry)
{
- if ((!array_key_exists('guid', $importedEntry) || (!array_key_exists('id', $importedEntry))) && is_array(reset($importedEntry))) {
+ if ((!array_key_exists('guid', $importedEntry) || (!array_key_exists('id', $importedEntry))) && \is_array(reset($importedEntry))) {
if ($this->producer) {
$this->parseEntriesForProducer($importedEntry);
);
}
- $entry->setArchived($data['is_archived']);
+ $entry->updateArchived($data['is_archived']);
if (!empty($data['created_at'])) {
$dt = new \DateTime();
$entryToBeFlushed[] = $entry;
// flush every 20 entries
- if (($i % 20) === 0) {
+ if (0 === ($i % 20)) {
$this->em->flush();
foreach ($entryToBeFlushed as $entry) {