]> 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 4d3073b727724f61dd9862c578a732f53c93e5be..225f1791f5bfe6b6fdc04bba4a2d0abf9cc7c600 100644 (file)
@@ -4,7 +4,6 @@ namespace Wallabag\ImportBundle\Import;
 
 use Wallabag\CoreBundle\Entity\Entry;
 use Wallabag\CoreBundle\Event\EntrySavedEvent;
-use Wallabag\UserBundle\Entity\User;
 
 abstract class BrowserImport extends AbstractImport
 {
@@ -78,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);
 
@@ -172,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) {