aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag/ImportBundle
diff options
context:
space:
mode:
authorJérémy Benoist <j0k3r@users.noreply.github.com>2019-02-27 15:31:57 +0100
committerGitHub <noreply@github.com>2019-02-27 15:31:57 +0100
commitfc4c1f50b41f93170bca587730193386b6c2df38 (patch)
tree994fc7fa9e96ef9f15ef311cbc103fab41746e0f /src/Wallabag/ImportBundle
parenta86c3f1759a3c0ecbf095888789c2a08d71b5c09 (diff)
parent8c0ba953070dca22e9a06999cfe355ea01847c64 (diff)
downloadwallabag-fc4c1f50b41f93170bca587730193386b6c2df38.tar.gz
wallabag-fc4c1f50b41f93170bca587730193386b6c2df38.tar.zst
wallabag-fc4c1f50b41f93170bca587730193386b6c2df38.zip
Merge pull request #3857 from wallabag/php73
Replace continue; with break; to avoid PHP 7.3 warnings
Diffstat (limited to 'src/Wallabag/ImportBundle')
-rw-r--r--src/Wallabag/ImportBundle/Import/BrowserImport.php10
-rw-r--r--src/Wallabag/ImportBundle/Import/ChromeImport.php2
-rw-r--r--src/Wallabag/ImportBundle/Import/FirefoxImport.php2
-rw-r--r--src/Wallabag/ImportBundle/Import/WallabagImport.php2
-rw-r--r--src/Wallabag/ImportBundle/Import/WallabagV1Import.php2
5 files changed, 9 insertions, 9 deletions
diff --git a/src/Wallabag/ImportBundle/Import/BrowserImport.php b/src/Wallabag/ImportBundle/Import/BrowserImport.php
index 804bc6cd..3987e80f 100644
--- a/src/Wallabag/ImportBundle/Import/BrowserImport.php
+++ b/src/Wallabag/ImportBundle/Import/BrowserImport.php
@@ -77,7 +77,7 @@ abstract class BrowserImport extends AbstractImport
77 */ 77 */
78 public function parseEntry(array $importedEntry) 78 public function parseEntry(array $importedEntry)
79 { 79 {
80 if ((!array_key_exists('guid', $importedEntry) || (!array_key_exists('id', $importedEntry))) && \is_array(reset($importedEntry))) { 80 if ((!\array_key_exists('guid', $importedEntry) || (!\array_key_exists('id', $importedEntry))) && \is_array(reset($importedEntry))) {
81 if ($this->producer) { 81 if ($this->producer) {
82 $this->parseEntriesForProducer($importedEntry); 82 $this->parseEntriesForProducer($importedEntry);
83 83
@@ -89,7 +89,7 @@ abstract class BrowserImport extends AbstractImport
89 return; 89 return;
90 } 90 }
91 91
92 if (array_key_exists('children', $importedEntry)) { 92 if (\array_key_exists('children', $importedEntry)) {
93 if ($this->producer) { 93 if ($this->producer) {
94 $this->parseEntriesForProducer($importedEntry['children']); 94 $this->parseEntriesForProducer($importedEntry['children']);
95 95
@@ -101,11 +101,11 @@ abstract class BrowserImport extends AbstractImport
101 return; 101 return;
102 } 102 }
103 103
104 if (!array_key_exists('uri', $importedEntry) && !array_key_exists('url', $importedEntry)) { 104 if (!\array_key_exists('uri', $importedEntry) && !\array_key_exists('url', $importedEntry)) {
105 return; 105 return;
106 } 106 }
107 107
108 $url = array_key_exists('uri', $importedEntry) ? $importedEntry['uri'] : $importedEntry['url']; 108 $url = \array_key_exists('uri', $importedEntry) ? $importedEntry['uri'] : $importedEntry['url'];
109 109
110 $existingEntry = $this->em 110 $existingEntry = $this->em
111 ->getRepository('WallabagCoreBundle:Entry') 111 ->getRepository('WallabagCoreBundle:Entry')
@@ -126,7 +126,7 @@ abstract class BrowserImport extends AbstractImport
126 // update entry with content (in case fetching failed, the given entry will be return) 126 // update entry with content (in case fetching failed, the given entry will be return)
127 $this->fetchContent($entry, $data['url'], $data); 127 $this->fetchContent($entry, $data['url'], $data);
128 128
129 if (array_key_exists('tags', $data)) { 129 if (\array_key_exists('tags', $data)) {
130 $this->tagsAssigner->assignTagsToEntry( 130 $this->tagsAssigner->assignTagsToEntry(
131 $entry, 131 $entry,
132 $data['tags'] 132 $data['tags']
diff --git a/src/Wallabag/ImportBundle/Import/ChromeImport.php b/src/Wallabag/ImportBundle/Import/ChromeImport.php
index eccee698..4ae82ade 100644
--- a/src/Wallabag/ImportBundle/Import/ChromeImport.php
+++ b/src/Wallabag/ImportBundle/Import/ChromeImport.php
@@ -57,7 +57,7 @@ class ChromeImport extends BrowserImport
57 'created_at' => substr($entry['date_added'], 0, 10), 57 'created_at' => substr($entry['date_added'], 0, 10),
58 ]; 58 ];
59 59
60 if (array_key_exists('tags', $entry) && '' !== $entry['tags']) { 60 if (\array_key_exists('tags', $entry) && '' !== $entry['tags']) {
61 $data['tags'] = $entry['tags']; 61 $data['tags'] = $entry['tags'];
62 } 62 }
63 63
diff --git a/src/Wallabag/ImportBundle/Import/FirefoxImport.php b/src/Wallabag/ImportBundle/Import/FirefoxImport.php
index 8999e3f3..b3558f21 100644
--- a/src/Wallabag/ImportBundle/Import/FirefoxImport.php
+++ b/src/Wallabag/ImportBundle/Import/FirefoxImport.php
@@ -57,7 +57,7 @@ class FirefoxImport extends BrowserImport
57 'created_at' => substr($entry['dateAdded'], 0, 10), 57 'created_at' => substr($entry['dateAdded'], 0, 10),
58 ]; 58 ];
59 59
60 if (array_key_exists('tags', $entry) && '' !== $entry['tags']) { 60 if (\array_key_exists('tags', $entry) && '' !== $entry['tags']) {
61 $data['tags'] = $entry['tags']; 61 $data['tags'] = $entry['tags'];
62 } 62 }
63 63
diff --git a/src/Wallabag/ImportBundle/Import/WallabagImport.php b/src/Wallabag/ImportBundle/Import/WallabagImport.php
index c3a142b9..75a28fbf 100644
--- a/src/Wallabag/ImportBundle/Import/WallabagImport.php
+++ b/src/Wallabag/ImportBundle/Import/WallabagImport.php
@@ -122,7 +122,7 @@ abstract class WallabagImport extends AbstractImport
122 // update entry with content (in case fetching failed, the given entry will be return) 122 // update entry with content (in case fetching failed, the given entry will be return)
123 $this->fetchContent($entry, $data['url'], $data); 123 $this->fetchContent($entry, $data['url'], $data);
124 124
125 if (array_key_exists('tags', $data)) { 125 if (\array_key_exists('tags', $data)) {
126 $this->tagsAssigner->assignTagsToEntry( 126 $this->tagsAssigner->assignTagsToEntry(
127 $entry, 127 $entry,
128 $data['tags'], 128 $data['tags'],
diff --git a/src/Wallabag/ImportBundle/Import/WallabagV1Import.php b/src/Wallabag/ImportBundle/Import/WallabagV1Import.php
index b9bb525a..e0562611 100644
--- a/src/Wallabag/ImportBundle/Import/WallabagV1Import.php
+++ b/src/Wallabag/ImportBundle/Import/WallabagV1Import.php
@@ -61,7 +61,7 @@ class WallabagV1Import extends WallabagImport
61 $data['html'] = $this->fetchingErrorMessage; 61 $data['html'] = $this->fetchingErrorMessage;
62 } 62 }
63 63
64 if (array_key_exists('tags', $entry) && '' !== $entry['tags']) { 64 if (\array_key_exists('tags', $entry) && '' !== $entry['tags']) {
65 $data['tags'] = $entry['tags']; 65 $data['tags'] = $entry['tags'];
66 } 66 }
67 67