]> git.immae.eu Git - github/wallabag/wallabag.git/commitdiff
Replace continue; with break; to avoid PHP 7.3 warnings
authorThomas Citharel <tcit@tcit.fr>
Sat, 12 Jan 2019 12:09:36 +0000 (13:09 +0100)
committerJeremy Benoist <jeremy.benoist@gmail.com>
Wed, 27 Feb 2019 13:29:14 +0000 (14:29 +0100)
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
src/Wallabag/CoreBundle/GuzzleSiteAuthenticator/GrabySiteConfigBuilder.php
src/Wallabag/CoreBundle/Helper/DownloadImages.php
src/Wallabag/CoreBundle/Helper/RuleBasedTagger.php
src/Wallabag/CoreBundle/Helper/TagsAssigner.php
src/Wallabag/ImportBundle/Import/AbstractImport.php
src/Wallabag/ImportBundle/Import/BrowserImport.php
src/Wallabag/ImportBundle/Import/InstapaperImport.php

index 90e00c62d9aaeff353e5f356ec6fcc4703e9d5db..2e57aac8a891930dd05e3e63a060e028df45e9aa 100644 (file)
@@ -114,7 +114,7 @@ class GrabySiteConfigBuilder implements SiteConfigBuilder
         $extraFields = [];
         foreach ($extraFieldsStrings as $extraField) {
             if (false === strpos($extraField, '=')) {
-                continue;
+                break;
             }
 
             list($fieldName, $fieldValue) = explode('=', $extraField, 2);
index cc3dcfceb7796ffcb457e749eb654680347f3dc8..8c1c208f57772c811abb409af2ebd75b60fb8f9a 100644 (file)
@@ -56,7 +56,7 @@ class DownloadImages
             $imagePath = $this->processSingleImage($entryId, $image, $url, $relativePath);
 
             if (false === $imagePath) {
-                continue;
+                break;
             }
 
             // if image contains "&" and we can't find it in the html it might be because it's encoded as &amp;
index fbdf2ac7a706bdcb0d862f8fb719ab279b5a72fb..d156df84ee753f852e1ef926eb285f1db0cc541c 100644 (file)
@@ -37,7 +37,7 @@ class RuleBasedTagger
 
         foreach ($rules as $rule) {
             if (!$this->rulerz->satisfies($entry, $rule->getRule())) {
-                continue;
+                break;
             }
 
             $this->logger->info('Matching rule.', [
index e6b4989f8d64ba638b30e6bd7554bb96d8aa799e..519150f539f89441c88cf37740e7fd2a7bce18ae 100644 (file)
@@ -49,7 +49,7 @@ class TagsAssigner
 
             // avoid empty tag
             if (0 === \strlen($label)) {
-                continue;
+                break;
             }
 
             if (isset($tagsNotYetFlushed[$label])) {
index d39d71b6caf1e3b7def2c0b352b4ceeccdef0840..5ae4aa8d654373843a61b0276576a800fea9fd49 100644 (file)
@@ -169,7 +169,7 @@ abstract class AbstractImport implements ImportInterface
             $entry = $this->parseEntry($importedEntry);
 
             if (null === $entry) {
-                continue;
+                break;
             }
 
             // store each entry to be flushed so we can trigger the entry.saved event for each of them
index 804bc6cd06b4c89b3b8aff84f56f158c7711d960..178ebe8e52aa5981075280b848165fb0325c0601 100644 (file)
@@ -158,13 +158,13 @@ abstract class BrowserImport extends AbstractImport
 
         foreach ($entries as $importedEntry) {
             if ((array) $importedEntry !== $importedEntry) {
-                continue;
+                break;
             }
 
             $entry = $this->parseEntry($importedEntry);
 
             if (null === $entry) {
-                continue;
+                break;
             }
 
             // @see AbstractImport
@@ -206,7 +206,7 @@ abstract class BrowserImport extends AbstractImport
     {
         foreach ($entries as $importedEntry) {
             if ((array) $importedEntry !== $importedEntry) {
-                continue;
+                break;
             }
 
             // set userId for the producer (it won't know which user is connected)
index 439c978c71f02a6d4953cf25e7475b2a9a63582a..6b6b35afa7e5e0da548c6126a3657654a2ba4259 100644 (file)
@@ -65,7 +65,7 @@ class InstapaperImport extends AbstractImport
         $handle = fopen($this->filepath, 'r');
         while (false !== ($data = fgetcsv($handle, 10240))) {
             if ('URL' === $data[0]) {
-                continue;
+                break;
             }
 
             // last element in the csv is the folder where the content belong