Skip to content

Commit 8190b9d

Browse files
author
Ji Lu
committed
MAGETWO-15665: Addressed a few static code analysis issues
1 parent ede6757 commit 8190b9d

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

app/code/Magento/Developer/Model/Config/Backend/AllowedIps.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,21 +57,22 @@ public function beforeSave()
5757
}
5858

5959
$dataArray = explode(',', $allowedIpsRaw);
60-
foreach ($dataArray as $k => $data) {
60+
foreach ($dataArray as $data) {
6161
if ( filter_var(trim($data), FILTER_VALIDATE_IP) ) {
6262
$allowedIpsArray[] = $data;
6363
} else {
6464
$noticeMsgArray[] = $data;
65-
}
65+
}
6666
}
6767

6868
$noticeMsg = implode(',', $noticeMsgArray);
69-
if (!empty($noticeMsgArray))
69+
if (!empty($noticeMsgArray)) {
7070
$this->messageManager->addNotice(
7171
__(
7272
__('The following invalid values cannot be saved: %values', ['values' => $noticeMsg])
7373
)
7474
);
75+
}
7576

7677
$this->setValue(implode(',', $allowedIpsArray));
7778
return parent::beforeSave();

0 commit comments

Comments
 (0)