Skip to content

Commit 3c232c4

Browse files
committed
update method name to camelcase; simplify getting value
1 parent 10d6384 commit 3c232c4

File tree

1 file changed

+4
-5
lines changed
  • src/app/code/community/Hackathon/PromoCodeMessages/Model

1 file changed

+4
-5
lines changed

src/app/code/community/Hackathon/PromoCodeMessages/Model/Validator.php

+4-5
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ protected function _validateConditions($rule)
228228
$msgs = array_merge($msgs, $this->_processCondition($condition));
229229
}
230230
if (count($msgs) > 0) {
231-
$errorMsgs = $this->_multi_implode('', $msgs);
231+
$errorMsgs = $this->_multiImplode('', $msgs);
232232
Mage::throwException($this->_formatMessage($errorMsgs));
233233
}
234234
}
@@ -319,8 +319,7 @@ protected function _processRule($condition = array())
319319
->setStoreFilter($storeId, false)
320320
->addFieldToFilter('tsv.option_id', array('in' => $value));
321321
if ($collection->getSize() > 0) {
322-
$item = $collection->getFirstItem();
323-
$value = $item->getValue();
322+
$value = $collection->getFirstItem()->getValue();
324323
}
325324
}
326325
}
@@ -397,13 +396,13 @@ protected function _formatMessage($message, $params = '', $internalMessage = nul
397396
* @param $array
398397
* @return string
399398
*/
400-
protected function _multi_implode($glue, $array)
399+
protected function _multiImplode($glue, $array)
401400
{
402401
$ret = '';
403402

404403
foreach ($array as $item) {
405404
if (is_array($item)) {
406-
$ret .= $this->_multi_implode($glue, $item) . $glue;
405+
$ret .= $this->_multiImplode($glue, $item) . $glue;
407406
}
408407
else {
409408
$ret .= $item . $glue;

0 commit comments

Comments
 (0)