Skip to content

Commit 1ef7f3e

Browse files
committed
fixed static test issues in app/code/Magento/SalesRule/Controller/Adminhtml/Promo/Quote/NewConditionHtml.php
1 parent e9bf0d0 commit 1ef7f3e

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

app/code/Magento/SalesRule/Controller/Adminhtml/Promo/Quote/NewConditionHtml.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,15 @@ class NewConditionHtml extends Quote implements HttpPostActionInterface
2222
*/
2323
public function execute()
2424
{
25-
$id = $this->getRequest()->getParam('id');
2625
$formName = $this->getRequest()->getParam('form_namespace');
27-
$typeArr = explode(
26+
$id = $this->getRequest()->getParam('id');
27+
$typeArray = explode(
2828
'|',
2929
str_replace('-', '/', $this->getRequest()->getParam('type', ''))
3030
);
31-
$type = $typeArr[0];
31+
$type = $typeArray[0];
3232

33-
if (class_exists($type) && !in_array(ConditionInterface::class, class_implements($type))) {
33+
if ($type && class_exists($type) && !in_array(ConditionInterface::class, class_implements($type))) {
3434
$html = '';
3535
$this->getResponse()->setBody($html);
3636
return;
@@ -47,8 +47,8 @@ public function execute()
4747
)->setPrefix(
4848
'conditions'
4949
);
50-
if (!empty($typeArr[1])) {
51-
$model->setAttribute($typeArr[1]);
50+
if (!empty($typeArray[1])) {
51+
$model->setAttribute($typeArray[1]);
5252
}
5353

5454
if ($model instanceof AbstractCondition) {

0 commit comments

Comments
 (0)