Skip to content

Commit 6321b98

Browse files
Fix PHP Warning: "continue" targeting switch is equivalent to "break". (#1013)
1 parent 3d4c4e2 commit 6321b98

File tree

4 files changed

+12
-12
lines changed

4 files changed

+12
-12
lines changed

lib/Zend/Feed/Entry/Atom.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ public function delete()
103103
// Redirect
104104
case 3:
105105
$deleteUri = $response->getHeader('Location');
106-
continue;
106+
break;
107107
// Error
108108
default:
109109
/**

lib/Zend/Form.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1170,7 +1170,7 @@ public function addElements(array $elements)
11701170
} else {
11711171
switch ($argc) {
11721172
case 0:
1173-
continue;
1173+
break;
11741174
case (1 <= $argc):
11751175
$type = array_shift($spec);
11761176
case (2 <= $argc):
@@ -1675,7 +1675,7 @@ public function addSubForm(Zend_Form $form, $name, $order = null)
16751675
*/
16761676
public function addSubForms(array $subForms)
16771677
{
1678-
foreach ($subForms as $key => $spec) {
1678+
foreach ($subForms as $key => $spec) {
16791679
$name = (string) $key;
16801680
if ($spec instanceof Zend_Form) {
16811681
$this->addSubForm($spec, $name);
@@ -1687,7 +1687,7 @@ public function addSubForms(array $subForms)
16871687
$order = null;
16881688
switch ($argc) {
16891689
case 0:
1690-
continue;
1690+
break;
16911691
case (1 <= $argc):
16921692
$subForm = array_shift($spec);
16931693

lib/Zend/Pdf/FileParser/Font/OpenType.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -898,7 +898,7 @@ protected function _parseCmapTable()
898898
if ($language != 0) {
899899
$this->_debugLog('Type 0 cmap tables must be language-independent;'
900900
. ' language: %d; skipping', $language);
901-
continue;
901+
break;
902902
}
903903
break;
904904

@@ -917,7 +917,7 @@ protected function _parseCmapTable()
917917
case 0xa: // break intentionally omitted
918918
case 0xc:
919919
$this->_debugLog('Format: 0x%x currently unsupported; skipping', $format);
920-
continue;
920+
break;
921921
//$this->skipBytes(2);
922922
//$cmapLength = $this->readUInt(4);
923923
//$language = $this->readUInt(4);
@@ -929,7 +929,7 @@ protected function _parseCmapTable()
929929

930930
default:
931931
$this->_debugLog('Unknown subtable format: 0x%x; skipping', $format);
932-
continue;
932+
break;
933933
}
934934
$cmapType = $format;
935935
break;

lib/Zend/Reflection/File.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ class Zend_Reflection_File implements Reflector
8686
public function __construct($file)
8787
{
8888
$fileName = $file;
89-
89+
9090
$fileRealpath = realpath($fileName);
9191
if ($fileRealpath) {
9292
// realpath() doesn't return false if Suhosin is included
@@ -95,7 +95,7 @@ public function __construct($file)
9595
$fileRealpath = false;
9696
}
9797
}
98-
98+
9999
if ($fileRealpath === false) {
100100
$fileRealpath = self::findRealpathInIncludePath($file);
101101
}
@@ -355,7 +355,7 @@ protected function _reflect()
355355
case T_DOLLAR_OPEN_CURLY_BRACES:
356356
case T_CURLY_OPEN:
357357
$embeddedVariableTrapped = true;
358-
continue;
358+
break;
359359

360360
// Name of something
361361
case T_STRING:
@@ -366,15 +366,15 @@ protected function _reflect()
366366
$this->_classes[] = $value;
367367
$classTrapped = false;
368368
}
369-
continue;
369+
break;
370370

371371
// Required file names are T_CONSTANT_ENCAPSED_STRING
372372
case T_CONSTANT_ENCAPSED_STRING:
373373
if ($requireTrapped) {
374374
$this->_requiredFiles[] = $value ."\n";
375375
$requireTrapped = false;
376376
}
377-
continue;
377+
break;
378378

379379
// Functions
380380
case T_FUNCTION:

0 commit comments

Comments
 (0)