aboutsummaryrefslogtreecommitdiffstats
path: root/includes/htmlform/fields/HTMLFormFieldCloner.php
diff options
context:
space:
mode:
authorUmherirrender <umherirrender_de.wp@web.de>2021-08-17 22:51:43 +0200
committerUmherirrender <umherirrender_de.wp@web.de>2021-08-17 22:51:43 +0200
commit244ea7c0b517ca8415f378c5cecb3297c47f0f91 (patch)
tree1a9b86934ec05f9a8454764cbe8c50865040b45b /includes/htmlform/fields/HTMLFormFieldCloner.php
parent4d8c21e2fbff6c6e3009b82e02df03a7e2cf072a (diff)
downloadmediawikicore-244ea7c0b517ca8415f378c5cecb3297c47f0f91.tar.gz
mediawikicore-244ea7c0b517ca8415f378c5cecb3297c47f0f91.zip
Simplify else-branches after continue/break
When the if branch continues the loop, than the next branch does not need to be an else branch Change-Id: Ia158709b7fd2ea811f1049cf8f53ed12c89719e3
Diffstat (limited to 'includes/htmlform/fields/HTMLFormFieldCloner.php')
-rw-r--r--includes/htmlform/fields/HTMLFormFieldCloner.php9
1 files changed, 4 insertions, 5 deletions
diff --git a/includes/htmlform/fields/HTMLFormFieldCloner.php b/includes/htmlform/fields/HTMLFormFieldCloner.php
index fba81bf23b09..e0c46c84f716 100644
--- a/includes/htmlform/fields/HTMLFormFieldCloner.php
+++ b/includes/htmlform/fields/HTMLFormFieldCloner.php
@@ -170,7 +170,8 @@ class HTMLFormFieldCloner extends HTMLFormField {
foreach ( $fields as $fieldname => $field ) {
if ( $field->skipLoadData( $subrequest ) ) {
continue;
- } elseif ( !empty( $field->mParams['disabled'] ) ) {
+ }
+ if ( !empty( $field->mParams['disabled'] ) ) {
$row[$fieldname] = $field->getDefault();
} else {
$row[$fieldname] = $field->loadDataFromRequest( $subrequest );
@@ -186,9 +187,8 @@ class HTMLFormFieldCloner extends HTMLFormField {
foreach ( $fields as $fieldname => $field ) {
if ( !empty( $field->mParams['nodata'] ) ) {
continue;
- } else {
- $row[$fieldname] = $field->getDefault();
}
+ $row[$fieldname] = $field->getDefault();
}
$ret[] = $row;
}
@@ -206,9 +206,8 @@ class HTMLFormFieldCloner extends HTMLFormField {
foreach ( $fields as $fieldname => $field ) {
if ( !empty( $field->mParams['nodata'] ) ) {
continue;
- } else {
- $row[$fieldname] = $field->getDefault();
}
+ $row[$fieldname] = $field->getDefault();
}
$ret = [ $row ];
}