]> git.immae.eu Git - github/wallabag/wallabag.git/blobdiff - src/Wallabag/ImportBundle/Import/BrowserImport.php
php-cs-fixer
[github/wallabag/wallabag.git] / src / Wallabag / ImportBundle / Import / BrowserImport.php
index 1628cb47eddc6e1e040a8bf8dd37cb33449350c2..225f1791f5bfe6b6fdc04bba4a2d0abf9cc7c600 100644 (file)
@@ -77,7 +77,7 @@ 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);
 
@@ -171,7 +171,7 @@ abstract class BrowserImport extends AbstractImport
             $entryToBeFlushed[] = $entry;
 
             // flush every 20 entries
-            if (($i % 20) === 0) {
+            if (0 === ($i % 20)) {
                 $this->em->flush();
 
                 foreach ($entryToBeFlushed as $entry) {
@@ -231,4 +231,6 @@ abstract class BrowserImport extends AbstractImport
 
         return $importedEntry;
     }
+
+    abstract protected function prepareEntry(array $entry = []);
 }