diff options
Diffstat (limited to 'src/Wallabag/ImportBundle/Import/PocketImport.php')
-rw-r--r-- | src/Wallabag/ImportBundle/Import/PocketImport.php | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/Wallabag/ImportBundle/Import/PocketImport.php b/src/Wallabag/ImportBundle/Import/PocketImport.php index 7d38826b..dddb87f4 100644 --- a/src/Wallabag/ImportBundle/Import/PocketImport.php +++ b/src/Wallabag/ImportBundle/Import/PocketImport.php | |||
@@ -149,7 +149,7 @@ class PocketImport extends AbstractImport | |||
149 | // - first call get 5k offset 0 | 149 | // - first call get 5k offset 0 |
150 | // - second call get 5k offset 5k | 150 | // - second call get 5k offset 5k |
151 | // - and so on | 151 | // - and so on |
152 | if (count($entries['list']) === self::NB_ELEMENTS) { | 152 | if (self::NB_ELEMENTS === count($entries['list'])) { |
153 | ++$run; | 153 | ++$run; |
154 | 154 | ||
155 | return $this->import(self::NB_ELEMENTS * $run); | 155 | return $this->import(self::NB_ELEMENTS * $run); |
@@ -175,7 +175,7 @@ class PocketImport extends AbstractImport | |||
175 | */ | 175 | */ |
176 | public function parseEntry(array $importedEntry) | 176 | public function parseEntry(array $importedEntry) |
177 | { | 177 | { |
178 | $url = isset($importedEntry['resolved_url']) && $importedEntry['resolved_url'] !== '' ? $importedEntry['resolved_url'] : $importedEntry['given_url']; | 178 | $url = isset($importedEntry['resolved_url']) && '' !== $importedEntry['resolved_url'] ? $importedEntry['resolved_url'] : $importedEntry['given_url']; |
179 | 179 | ||
180 | $existingEntry = $this->em | 180 | $existingEntry = $this->em |
181 | ->getRepository('WallabagCoreBundle:Entry') | 181 | ->getRepository('WallabagCoreBundle:Entry') |
@@ -194,15 +194,15 @@ class PocketImport extends AbstractImport | |||
194 | $this->fetchContent($entry, $url); | 194 | $this->fetchContent($entry, $url); |
195 | 195 | ||
196 | // 0, 1, 2 - 1 if the item is archived - 2 if the item should be deleted | 196 | // 0, 1, 2 - 1 if the item is archived - 2 if the item should be deleted |
197 | $entry->setArchived($importedEntry['status'] === 1 || $this->markAsRead); | 197 | $entry->setArchived(1 === $importedEntry['status'] || $this->markAsRead); |
198 | 198 | ||
199 | // 0 or 1 - 1 If the item is starred | 199 | // 0 or 1 - 1 If the item is starred |
200 | $entry->setStarred($importedEntry['favorite'] === 1); | 200 | $entry->setStarred(1 === $importedEntry['favorite']); |
201 | 201 | ||
202 | $title = 'Untitled'; | 202 | $title = 'Untitled'; |
203 | if (isset($importedEntry['resolved_title']) && $importedEntry['resolved_title'] !== '') { | 203 | if (isset($importedEntry['resolved_title']) && '' !== $importedEntry['resolved_title']) { |
204 | $title = $importedEntry['resolved_title']; | 204 | $title = $importedEntry['resolved_title']; |
205 | } elseif (isset($importedEntry['given_title']) && $importedEntry['given_title'] !== '') { | 205 | } elseif (isset($importedEntry['given_title']) && '' !== $importedEntry['given_title']) { |
206 | $title = $importedEntry['given_title']; | 206 | $title = $importedEntry['given_title']; |
207 | } | 207 | } |
208 | 208 | ||