Replace continue; with break; to avoid PHP 7.3 warnings

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel 2019-01-12 13:09:36 +01:00 committed by Jeremy Benoist
parent a86c3f1759
commit 3784688a88
No known key found for this signature in database
GPG Key ID: BCA73962457ACC3C
7 changed files with 9 additions and 9 deletions

@ -114,7 +114,7 @@ class GrabySiteConfigBuilder implements SiteConfigBuilder
$extraFields = []; $extraFields = [];
foreach ($extraFieldsStrings as $extraField) { foreach ($extraFieldsStrings as $extraField) {
if (false === strpos($extraField, '=')) { if (false === strpos($extraField, '=')) {
continue; break;
} }
list($fieldName, $fieldValue) = explode('=', $extraField, 2); list($fieldName, $fieldValue) = explode('=', $extraField, 2);

@ -56,7 +56,7 @@ class DownloadImages
$imagePath = $this->processSingleImage($entryId, $image, $url, $relativePath); $imagePath = $this->processSingleImage($entryId, $image, $url, $relativePath);
if (false === $imagePath) { 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; // if image contains "&" and we can't find it in the html it might be because it's encoded as &amp;

@ -37,7 +37,7 @@ class RuleBasedTagger
foreach ($rules as $rule) { foreach ($rules as $rule) {
if (!$this->rulerz->satisfies($entry, $rule->getRule())) { if (!$this->rulerz->satisfies($entry, $rule->getRule())) {
continue; break;
} }
$this->logger->info('Matching rule.', [ $this->logger->info('Matching rule.', [

@ -49,7 +49,7 @@ class TagsAssigner
// avoid empty tag // avoid empty tag
if (0 === \strlen($label)) { if (0 === \strlen($label)) {
continue; break;
} }
if (isset($tagsNotYetFlushed[$label])) { if (isset($tagsNotYetFlushed[$label])) {

@ -169,7 +169,7 @@ abstract class AbstractImport implements ImportInterface
$entry = $this->parseEntry($importedEntry); $entry = $this->parseEntry($importedEntry);
if (null === $entry) { if (null === $entry) {
continue; break;
} }
// store each entry to be flushed so we can trigger the entry.saved event for each of them // store each entry to be flushed so we can trigger the entry.saved event for each of them

@ -158,13 +158,13 @@ abstract class BrowserImport extends AbstractImport
foreach ($entries as $importedEntry) { foreach ($entries as $importedEntry) {
if ((array) $importedEntry !== $importedEntry) { if ((array) $importedEntry !== $importedEntry) {
continue; break;
} }
$entry = $this->parseEntry($importedEntry); $entry = $this->parseEntry($importedEntry);
if (null === $entry) { if (null === $entry) {
continue; break;
} }
// @see AbstractImport // @see AbstractImport
@ -206,7 +206,7 @@ abstract class BrowserImport extends AbstractImport
{ {
foreach ($entries as $importedEntry) { foreach ($entries as $importedEntry) {
if ((array) $importedEntry !== $importedEntry) { if ((array) $importedEntry !== $importedEntry) {
continue; break;
} }
// set userId for the producer (it won't know which user is connected) // set userId for the producer (it won't know which user is connected)

@ -65,7 +65,7 @@ class InstapaperImport extends AbstractImport
$handle = fopen($this->filepath, 'r'); $handle = fopen($this->filepath, 'r');
while (false !== ($data = fgetcsv($handle, 10240))) { while (false !== ($data = fgetcsv($handle, 10240))) {
if ('URL' === $data[0]) { if ('URL' === $data[0]) {
continue; break;
} }
// last element in the csv is the folder where the content belong // last element in the csv is the folder where the content belong