use Wallabag\CoreBundle\Entity\Entry;
use Wallabag\CoreBundle\Event\EntrySavedEvent;
-use Wallabag\UserBundle\Entity\User;
abstract class BrowserImport extends AbstractImport
{
*/
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);
$entryToBeFlushed[] = $entry;
// flush every 20 entries
- if (($i % 20) === 0) {
+ if (0 === ($i % 20)) {
$this->em->flush();
foreach ($entryToBeFlushed as $entry) {
return $importedEntry;
}
+
+ abstract protected function prepareEntry(array $entry = []);
}