php-cs fixes.
This commit is contained in:
@@ -434,7 +434,8 @@ class DataAccessFunctions extends AbstractSmartyPlugin
|
|||||||
*
|
*
|
||||||
* @return string the camel cased string.
|
* @return string the camel cased string.
|
||||||
*/
|
*/
|
||||||
private function underscoreToCamelcase($str) {
|
private function underscoreToCamelcase($str)
|
||||||
|
{
|
||||||
// Split string in words.
|
// Split string in words.
|
||||||
$words = explode('_', strtolower($str));
|
$words = explode('_', strtolower($str));
|
||||||
|
|
||||||
|
|||||||
@@ -65,7 +65,6 @@ class RemoveAmountOnCategories extends CouponAbstract
|
|||||||
$this->category_list = isset($effects[self::CATEGORIES_LIST]) ? $effects[self::CATEGORIES_LIST] : array();
|
$this->category_list = isset($effects[self::CATEGORIES_LIST]) ? $effects[self::CATEGORIES_LIST] : array();
|
||||||
|
|
||||||
if (! is_array($this->category_list)) $this->category_list = array($this->category_list);
|
if (! is_array($this->category_list)) $this->category_list = array($this->category_list);
|
||||||
|
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -170,8 +170,7 @@ class RemoveAmountOnProducts extends CouponAbstract
|
|||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
} elseif ($fieldName === self::CATEGORY_ID) {
|
||||||
elseif ($fieldName === self::CATEGORY_ID) {
|
|
||||||
if (empty($fieldValue)) {
|
if (empty($fieldValue)) {
|
||||||
throw new \InvalidArgumentException(
|
throw new \InvalidArgumentException(
|
||||||
Translator::getInstance()->trans(
|
Translator::getInstance()->trans(
|
||||||
@@ -191,4 +190,4 @@ class RemoveAmountOnProducts extends CouponAbstract
|
|||||||
|
|
||||||
return $fieldValue;
|
return $fieldValue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -66,7 +66,6 @@ class RemovePercentageOnCategories extends CouponAbstract
|
|||||||
$this->percentage = isset($effects[self::PERCENTAGE]) ? $effects[self::PERCENTAGE] : 0;
|
$this->percentage = isset($effects[self::PERCENTAGE]) ? $effects[self::PERCENTAGE] : 0;
|
||||||
|
|
||||||
if (! is_array($this->category_list)) $this->category_list = array($this->category_list);
|
if (! is_array($this->category_list)) $this->category_list = array($this->category_list);
|
||||||
|
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -175,8 +175,7 @@ class RemovePercentageOnProducts extends CouponAbstract
|
|||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
} elseif ($fieldName === self::CATEGORY_ID) {
|
||||||
elseif ($fieldName === self::CATEGORY_ID) {
|
|
||||||
if (empty($fieldValue)) {
|
if (empty($fieldValue)) {
|
||||||
throw new \InvalidArgumentException(
|
throw new \InvalidArgumentException(
|
||||||
Translator::getInstance()->trans(
|
Translator::getInstance()->trans(
|
||||||
@@ -196,4 +195,4 @@ class RemovePercentageOnProducts extends CouponAbstract
|
|||||||
|
|
||||||
return $fieldValue;
|
return $fieldValue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user