]> git.immae.eu Git - github/wallabag/wallabag.git/commitdiff
Replace continue; with break; to avoid PHP 7.3 warnings php73
authorThomas Citharel <tcit@tcit.fr>
Sat, 12 Jan 2019 12:09:36 +0000 (13:09 +0100)
committerThomas Citharel <tcit@tcit.fr>
Sat, 12 Jan 2019 12:09:36 +0000 (13:09 +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 63f65067da31381b6f0622863f337a46fc78852e..da02fbeefa92a99d905b3481d4d955e1f79978d4 100644 (file)
@@ -36,7 +36,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 58a234f46bd357dedf7abd8c14b9cc381b33df37..ea86c52862c3b94f6cb1bc5fe8a88606ebc66f32 100644 (file)
@@ -156,7 +156,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 614386cb2804f451f022c48181480b7c1ee13db1..b55525e5b4dcbe9e3e21a776c54c426d97bbe8a6 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 e113ba00824a75c07f07f142fea311a415a07c34..60da77519936196e5358f5c82438633f7316c46c 100644 (file)
@@ -65,7 +65,7 @@ class InstapaperImport extends AbstractImport
         $handle = fopen($this->filepath, 'rb');
         while (false !== ($data = fgetcsv($handle, 10240))) {
             if ('URL' === $data[0]) {
-                continue;
+                break;
             }
 
             // last element in the csv is the folder where the content belong